agent: remove rebuild button, move dashboard link into the links menu
mara (#3704): 'remove rebuild button, move link to dashboards into links menu.' The overflow (⋯) menu existed for exactly two items: the dashboard back-link and a rebuild-container action. Rebuild is gone outright — the dashboard's own R3BU1LD button already covers it, this was just a rarely-used shortcut not worth its own menu. The dashboard link moves into MetaNav's links popover (now the first item, above stats/forge/ config/extras) instead. With both gone, OverflowMenu had nothing left to justify existing as a separate component — deleted along with its CSS and the now-unused rebuildAction.ts (only consumer). MetaNav gained a dashboardBase prop (Root.tsx already computes this via resolveDashboardBase for InboxPanel/pause — reused, not duplicated) and renders the dashboard link as a real <a>, same treatment as every other item in that popover — no dangling window.open()-only affordance. Updated docs/web-ui/agent.md's Header section and the couple of now-stale OverflowMenu references in index.html's/MetaNav.css's own comments. Verified: header now shows a single trailing icon-badge (was two), popover opens with dashboard first then the agent_links() set. tsc --noEmit clean, build clean, both pre-push lints clean.
This commit is contained in:
parent
8e97fc6263
commit
668ccc2278
8 changed files with 71 additions and 143 deletions
|
|
@ -15,7 +15,6 @@ import { SidePanel } from './components/SidePanel.js';
|
|||
import { InboxPanel } from './components/InboxPanel.js';
|
||||
import { TodosPanel } from './components/TodosPanel.js';
|
||||
import { TermInput } from './components/TermInput.js';
|
||||
import { OverflowMenu } from './components/OverflowMenu.js';
|
||||
import { LoginFlow } from './components/LoginFlow.js';
|
||||
import { useAgentState } from './hooks/useAgentState.js';
|
||||
import { useTodos } from './hooks/useTodos.js';
|
||||
|
|
@ -89,11 +88,18 @@ export function Root() {
|
|||
<>
|
||||
<HeaderPill kind="inbox" icon="📬" label="inbox" count={state?.inbox.length ?? 0} onClick={() => setOpenPanel('inbox')} />
|
||||
<HeaderPill kind="todos" icon="📋" label="todos" count={todos.length} onClick={() => setOpenPanel('todos')} />
|
||||
{/* Needs a loaded snapshot for their data (links/forge_public_url,
|
||||
* dashboard_port) — both omitted (like the old page's
|
||||
* populateOverflowMenu) until the first /api/state resolves. */}
|
||||
{state ? <MetaNav links={state.links} forgePublicUrl={state.forge_public_url} /> : null}
|
||||
{state ? <OverflowMenu label={state.label} dashboardBase={resolveDashboardBase(state.dashboard_port)} /> : null}
|
||||
{/* Needs a loaded snapshot for its data (links/forge_public_url,
|
||||
* dashboard_port) — omitted until the first /api/state resolves,
|
||||
* same as the old page's populateOverflowMenu (now deleted —
|
||||
* dashboard-link moved here, rebuild removed outright, see
|
||||
* MetaNav.tsx's file comment). */}
|
||||
{state ? (
|
||||
<MetaNav
|
||||
links={state.links}
|
||||
forgePublicUrl={state.forge_public_url}
|
||||
dashboardBase={resolveDashboardBase(state.dashboard_port)}
|
||||
/>
|
||||
) : null}
|
||||
</>
|
||||
);
|
||||
// Kept mounted regardless of `openPanel` (open/closed toggles just the
|
||||
|
|
|
|||
Loading…
Reference in a new issue