fix(control): banner owns top viewport when daemon offline; drop empty preamble

Page hierarchy was upside-down: user landed on /control and saw
(1) vague title preamble "Live agent state, project readiness, and
next actions" — meaningless words, (2) small fleet-status header,
(3) "Agent operations / Current work, queued instructions, and
saved context by project" section header explaining nothing the
user couldn't infer, (4) THEN the actually-actionable daemon-offline
banner. The thing that fixes their problem was four scrolls below
the thing they didn't need.

Three coordinated cuts:

1. PageLayout subtitle removed from /control. The chip strip and
   banner below carry all the real state — the subtitle was just
   text taking space.

2. DaemonStatusBanner moved to the TOP of ControlPanel — when
   daemon is offline, the Start/Restart buttons are now the first
   thing the eye lands on. When daemon is healthy, the banner
   self-hides (existing behavior), so this move costs nothing for
   the happy path.

3. "Agent operations" section header collapsed. Renders only when
   headerRight has content (project filters etc); the wordy
   subtitle is gone. Empty div placeholder keeps the flex layout
   stable when headerRight is present.

Final item of the 7-item Elon-team-pass plan. Net effect: /control
opens with the actionable signal first, vague chrome last.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
g-butandClaude Opus 4.7 committed 2026-05-31 13:30:35 +02:00
1 parent 990f66bb23
commit 383e9b0f2a
2 files changed
+27 -18

No files matched your search

+5 -1
View File
@@ -8,7 +8,11 @@ export const metadata = { title: "Control" };
export default function ControlPage() {
return (
<PullToRefresh>
<PageLayout title="Control" subtitle="Live agent state, project readiness, and next actions">
{/* Subtitle dropped 2026-05-31 — "Live agent state, project readiness,
and next actions" was meaningless preamble taking space the daemon-
status banner needs. Title alone is enough; the chip strip + banner
below tell the user what's actually happening. */}
<PageLayout title="Control">
<Suspense fallback={null}>
<ControlPanel />
</Suspense>
+22 -17
View File
@@ -234,6 +234,22 @@ export function ControlPanel() {
return (
<div className="space-y-6">
{/* Hierarchy rewrite 2026-05-31: when the daemon is offline or never seen,
the banner with Start/Restart buttons OWNS the top viewport — it's
the only actionable thing on the page until the user reconnects.
When healthy, the banner self-hides and FleetStatus is the first thing
the eye lands on. Also removed the verbose "Agent operations / Current
work, queued instructions, and saved context by project" section
header: that subtitle taught the user nothing they couldn't infer
from the table itself. */}
<DaemonStatusBanner
daemonNeverSeen={daemonNeverSeen}
daemonOffline={daemonOffline}
daemonLastPushedAt={daemonLastPushedAt}
runtimeAvailable={runtimeAvailable}
onRefresh={() => refresh(true)}
/>
<ControlFleetStatus
dashboard={dashboard}
attentionCount={attention.length}
@@ -250,23 +266,12 @@ export function ControlPanel() {
onAutomationChange={automationPolicy.updateMode}
/>
<section className="ui-control-operations-header">
<div>
<h2 className="text-base font-semibold text-text-primary">Agent operations</h2>
<p className="mt-1 text-sm text-text-secondary">
Current work, queued instructions, and saved context by project.
</p>
</div>
{headerRight}
</section>
<DaemonStatusBanner
daemonNeverSeen={daemonNeverSeen}
daemonOffline={daemonOffline}
daemonLastPushedAt={daemonLastPushedAt}
runtimeAvailable={runtimeAvailable}
onRefresh={() => refresh(true)}
/>
{headerRight && (
<section className="ui-control-operations-header">
<div />
{headerRight}
</section>
)}
<AttentionBar items={attention} failedCommands={data?.failedCommands} onFocusProject={setSelectedTab} />