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
1 changed files with 49 additions and 148 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue