Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions internal/dashboard/webui/app-src/src/pages/ProjectPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const HOST_H_DEFAULT = 320;
const CHAT_W_DEFAULT = 420;

export function ProjectPage({ id }: { id: string }) {
const { projects } = useStatus(4000);
const { projects, loaded: statusLoaded } = useStatus(4000);
const me = useMemo(() => projects.find((p) => p.id === id), [projects, id]);
const name = me?.name || id;

Expand Down Expand Up @@ -212,16 +212,20 @@ export function ProjectPage({ id }: { id: string }) {
</a>
)}
<button
className={`dock-toggle power-toggle${up ? " is-up" : ""}${pending ? " busy" : ""}`}
className={`dock-toggle power-toggle${up ? " is-up" : ""}${pending || !statusLoaded ? " busy" : ""}`}
type="button"
disabled={!!pending}
disabled={!!pending || !statusLoaded}
title="Start or stop this project's container"
onClick={() => doPower(false)}
>
{pending ? (
<>
<span className="power-spin">↻</span> {pending === "starting" ? "starting…" : "stopping…"}
</>
) : !statusLoaded ? (
<>
<span className="power-spin">↻</span> …
</>
) : up ? (
"■ Stop"
) : (
Expand Down Expand Up @@ -306,6 +310,8 @@ export function ProjectPage({ id }: { id: string }) {
</div>
{seen.container && up ? (
<XtermPane projectId={id} wsPath="/container/ws" kind="container" />
) : !statusLoaded ? (
<p className="empty screen-loading">checking status…</p>
) : (
<p className="empty">{up ? "open to connect" : "container not running"}</p>
)}
Expand Down Expand Up @@ -337,6 +343,8 @@ export function ProjectPage({ id }: { id: string }) {
</div>
{dockSeen && me?.tmux_up ? (
<XtermPane projectId={id} wsPath="/terminal/ws" kind="claude" />
) : !statusLoaded ? (
<p className="empty screen-loading">checking status…</p>
) : (
<p className="empty">
{me?.tmux_up ? "open to connect" : "this project isn't running — press ▶ Start above"}
Expand Down
4 changes: 4 additions & 0 deletions internal/dashboard/webui/app-src/src/styles/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,10 @@ table.projects th, table.projects td {
animation: screen-live 2s ease-in-out infinite;
}
@keyframes screen-live { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
/* Pulsing "checking status…" placeholder shown in a screen-frame before the
first /status poll resolves — so a running project doesn't flash "isn't
running" during the initial fetch. */
.screen-loading { animation: screen-live 1.4s ease-in-out infinite; }

.screen-iframe {
display: block; width: 100%; height: 72vh; border: 0; background: var(--bg);
Expand Down

Large diffs are not rendered by default.

Loading
Loading