polish server deployment workflow

This commit is contained in:
npc0-hue
2026-07-25 10:57:22 +08:00
parent 4e2bff4639
commit bb12137c4e
7 changed files with 74 additions and 26 deletions
+11 -1
View File
@@ -167,6 +167,16 @@ export function ServerDetailPage({ session, params, operations, onNavigate }: Pa
void refresh();
}, [refresh]);
useEffect(() => {
if (params.routeKey !== "run-builder" || instance.status !== "ready" || typeof document === "undefined") return;
const frame = window.requestAnimationFrame(() => {
const target = document.getElementById("run-builder");
target?.scrollIntoView({ behavior: "smooth", block: "start" });
target?.focus({ preventScroll: true });
});
return () => window.cancelAnimationFrame(frame);
}, [instance.status, params.routeKey]);
const serverOperations = useMemo(
() => operations.operations.filter((operation) => operation.targetId === serverId || operation.targetId.startsWith(`${serverId}:`)),
[operations.operations, serverId]
@@ -1007,7 +1017,7 @@ function RuntimeDistributionSection({ instance, runtimeActions, session, operati
}
return (
<article className="console-panel" aria-label="run distribution controls">
<article id="run-builder" className="console-panel" aria-label="run distribution controls" tabIndex={-1}>
<div className="panel-header">
<h2>
<PackageOpen size={16} style={{ verticalAlign: "-2px" }} />