remove the forge links from the hive dashboard and the agent page
Each agent row on the hive dashboard, and the agent page's link menu, linked to the agent's forge profile and its config repo. Both are gone, with what only they used: - hive-agent no longer builds the two links, the `Forge` link kind, or the `forge_public_url` field of its state, and no longer reads `HIVE_FORGE_PUBLIC_URL`. The agent page's link menu and the dashboard row's icon strip (which skips a forge link an agent not yet rebuilt still sends) drop their forge handling. - hive-c0re's dashboard state no longer carries `forge_public_url`. - `HIVE_FORGE_PUBLIC_URL` is no longer forwarded to agents through the meta flake (the forwarded-variable list, its test fixture, the controller's settings and the VM test), so the next meta flake render differs by that one line. hive-c0re still reads it for the forge URL a hive publishes, so `swarm.forge.publicUrl` stays, with its description corrected. - The docs stop describing the links.
This commit is contained in:
parent
1b6d7f3c99
commit
d516bb890c
4 changed files with 49 additions and 148 deletions
|
|
@ -141,7 +141,7 @@ export function Root() {
|
|||
count={todos.length}
|
||||
onClick={() => setOpenPanel("todos")}
|
||||
/>
|
||||
{/* Needs a loaded snapshot for its data (links/forge_public_url,
|
||||
{/* Needs a loaded snapshot for its data (links,
|
||||
* 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
|
||||
|
|
@ -149,7 +149,6 @@ export function Root() {
|
|||
{state ? (
|
||||
<MetaNav
|
||||
links={state.links}
|
||||
forgePublicUrl={state.forge_public_url}
|
||||
dashboardBase={resolveDashboardBase(state.dashboard_port)}
|
||||
/>
|
||||
) : null}
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ h3 {
|
|||
object-fit: cover;
|
||||
}
|
||||
|
||||
/* Meta-nav links (stats / screen / forge / dashboard / extras) —
|
||||
/* Meta-nav links (stats / screen / dashboard / extras) —
|
||||
no underline; hover lights with cyan glow + subtle background
|
||||
tint. Reads as a row of soft tabs rather than default-styled
|
||||
inline anchors. */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// (`@hive/shared/icons.js`'s `LinkIcon` — an emoji glyph can't match a
|
||||
// neighbouring icon's size/weight on any platform, see that file's
|
||||
// comment) in the pills cluster that opens a popover listing
|
||||
// stats/screen/forge/config + any `services.hyperhive.agent.dashboardLinks` extras,
|
||||
// stats/screen + any `services.hyperhive.agent.dashboardLinks` extras,
|
||||
// sourced from the backend's `agent_links()` (the single source of
|
||||
// truth — same list also feeds the dashboard card's icon strip) — plus
|
||||
// a `🧭 dashboard` back-link.
|
||||
|
|
@ -28,17 +28,12 @@ import "./MetaNav.css";
|
|||
|
||||
export interface MetaNavProps {
|
||||
links: AgentLink[];
|
||||
forgePublicUrl: string | null;
|
||||
/** Absolute base URL of the host dashboard (`resolveDashboardBase`)
|
||||
* — the `🧭 dashboard` item links to `${dashboardBase}`. */
|
||||
dashboardBase: string;
|
||||
}
|
||||
|
||||
export function MetaNav({
|
||||
links,
|
||||
forgePublicUrl,
|
||||
dashboardBase,
|
||||
}: MetaNavProps) {
|
||||
export function MetaNav({ links, dashboardBase }: MetaNavProps) {
|
||||
const [open, setOpen] = useState(false);
|
||||
const rootRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
|
|
@ -64,11 +59,7 @@ export function MetaNav({
|
|||
};
|
||||
}, [open]);
|
||||
|
||||
// Same kind -> URL resolution as app.js's old refreshState meta-links
|
||||
// loop: `forge` needs `forgePublicUrl` set or the link is dropped
|
||||
// entirely (never guessed from `<host>:3000`); `external` is already
|
||||
// absolute; `container` is a same-origin path.
|
||||
const visible = links.filter((lnk) => lnk.kind !== "forge" || forgePublicUrl);
|
||||
// `external` is already absolute; `container` is a same-origin path.
|
||||
// No early-return-on-empty: the dashboard link below is always
|
||||
// present, so the trigger always has at least one item.
|
||||
|
||||
|
|
@ -93,24 +84,20 @@ export function MetaNav({
|
|||
>
|
||||
🧭 dashboard
|
||||
</a>
|
||||
{visible.map((lnk) => {
|
||||
const href =
|
||||
lnk.kind === "forge" ? `${forgePublicUrl}${lnk.url}` : lnk.url;
|
||||
return (
|
||||
<a
|
||||
key={lnk.url}
|
||||
class="meta-nav-item"
|
||||
href={href}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
role="menuitem"
|
||||
onClick={() => setOpen(false)}
|
||||
>
|
||||
{lnk.icon ? <span aria-hidden="true">{lnk.icon}</span> : null}
|
||||
{lnk.label}
|
||||
</a>
|
||||
);
|
||||
})}
|
||||
{links.map((lnk) => (
|
||||
<a
|
||||
key={lnk.url}
|
||||
class="meta-nav-item"
|
||||
href={lnk.url}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
role="menuitem"
|
||||
onClick={() => setOpen(false)}
|
||||
>
|
||||
{lnk.icon ? <span aria-hidden="true">{lnk.icon}</span> : null}
|
||||
{lnk.label}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,11 +28,10 @@ export interface AgentState {
|
|||
paused: boolean;
|
||||
inbox: InboxRow[];
|
||||
links: AgentLink[];
|
||||
forge_public_url: string | null;
|
||||
}
|
||||
|
||||
// Mirrors `hive_agent::web_ui::state::AgentLink` — one meta-nav entry
|
||||
// in the agent page header (stats/screen/forge/config + any
|
||||
// in the agent page header (stats/screen + any
|
||||
// `services.hyperhive.agent.dashboardLinks` extras). `agent_links()` on the backend
|
||||
// is the single source of truth for what links an agent exposes; see
|
||||
// docs/2-handbook/agents/web-page.md::Header for the kind → URL resolution table.
|
||||
|
|
@ -40,7 +39,7 @@ export interface AgentLink {
|
|||
url: string;
|
||||
icon: string;
|
||||
label: string;
|
||||
kind: "container" | "forge" | "external";
|
||||
kind: "container" | "external";
|
||||
}
|
||||
|
||||
export interface TokenUsage {
|
||||
|
|
|
|||
Loading…
Reference in a new issue