frontend: trim narrated-history comments in packages/agent, packages/swarm-ui
Continues #3901. Same pattern as tabs.js/swarm.js: cut 'used to be X, now Y'/'moved to'/'no longer' change-history narration down to the current design fact, keep every load-bearing rationale intact (the ResizeObserver feedback-loop note in Header.tsx, the Dropdown- vs-real-<a> semantics in MetaNav.tsx, etc.).
This commit is contained in:
parent
56c0602c2f
commit
c2733d2edf
6 changed files with 72 additions and 95 deletions
|
|
@ -12,12 +12,11 @@
|
|||
// calls — exactly why the bulk endpoint exists instead of looping the
|
||||
// single-agent one.
|
||||
//
|
||||
// Owns the "+ agent" trigger too: creation used to be its own
|
||||
// `/create-agent` route + nav item, but the roster this populates is
|
||||
// the natural home for the action that populates it — a separate top-
|
||||
// level nav entry was one click of indirection for no benefit. The form
|
||||
// itself (`CreateAgentForm`) is unchanged from its page days, just
|
||||
// mounted inside a `Dialog` instead of a route.
|
||||
// Owns the "+ agent" trigger too — the roster this populates is the
|
||||
// natural home for the action that populates it; a separate top-level
|
||||
// nav entry would be one click of indirection for no benefit. The form
|
||||
// itself (`CreateAgentForm`) mounts inside a `Dialog` here rather than
|
||||
// its own route.
|
||||
import { useState } from 'preact/hooks';
|
||||
import { ApiErrorPanel } from '@hive/shared/api-error-panel.js';
|
||||
import { readApiError, type ProblemDetails } from '@hive/shared/api-error.js';
|
||||
|
|
|
|||
|
|
@ -179,10 +179,7 @@ export function CreateAgentForm() {
|
|||
literal behaviour (deploying the container onto the hive isn't
|
||||
wired up server-side yet — see this file's top comment) —
|
||||
mara's explicit call on this copy: read as finished, not as a
|
||||
running commentary on partial implementation. The 🪪 glyph that
|
||||
used to sit here as body copy now lives on `Panel`'s own `icon`
|
||||
prop instead — it's what prompted that prop to exist at all
|
||||
(see Panel.tsx's doc comment) */}
|
||||
running commentary on partial implementation. */}
|
||||
<Panel title="what this creates" icon="🪪">
|
||||
<p>
|
||||
Submitting this queues everything a new agent needs: a swarm-level identity, a config
|
||||
|
|
|
|||
|
|
@ -16,16 +16,16 @@
|
|||
// Page-switch animation, two pieces (motion-guard rules live in
|
||||
// Shell.css): `.shell-body` remounts on every navigation
|
||||
// (`key={location}`) to replay a plain fade-in, and a single shared
|
||||
// underline (`.shell-nav-indicator`, replacing what used to be a
|
||||
// per-link border) hops through every nav item it passes over on its
|
||||
// way to the new active one, not just a straight two-point tween — a
|
||||
// nav hives→components jump visibly touches "new agent" and "jobs" in
|
||||
// between, position and colour together. Accent is a discrete cycle
|
||||
// through the existing base16 chromatic slots (`NAV_ITEMS`' `accent`
|
||||
// field), not a continuous hue rotation — everything here still
|
||||
// derives from base16, same rule the rest of the palette follows.
|
||||
// `.shell-brand` rides the identical accent value (`navAccent` below),
|
||||
// so the header reads as one accent changing, not the underline alone.
|
||||
// underline (`.shell-nav-indicator`) hops through every nav item it
|
||||
// passes over on its way to the new active one, not just a straight
|
||||
// two-point tween — a nav hives→components jump visibly touches "new
|
||||
// agent" and "jobs" in between, position and colour together. Accent
|
||||
// is a discrete cycle through the existing base16 chromatic slots
|
||||
// (`NAV_ITEMS`' `accent` field), not a continuous hue rotation —
|
||||
// everything here still derives from base16, same rule the rest of
|
||||
// the palette follows. `.shell-brand` rides the identical accent value
|
||||
// (`navAccent` below), so the header reads as one accent changing, not
|
||||
// the underline alone.
|
||||
import { useEffect, useRef, useState } from 'preact/hooks';
|
||||
import type { ComponentChildren } from 'preact';
|
||||
import { Link, useLocation } from 'wouter-preact';
|
||||
|
|
@ -109,10 +109,10 @@ function NavLink({
|
|||
return (
|
||||
<Link href={href} className="shell-nav-link">
|
||||
{/* Touch target (min-height) lives on the <a> so the whole row is
|
||||
tappable. The underline itself no longer lives here — see
|
||||
`.shell-nav-indicator` — this span is still what gets
|
||||
measured to position that shared indicator, so it hugs just
|
||||
the text rather than the full-height tappable box. */}
|
||||
tappable. The underline lives on the shared
|
||||
`.shell-nav-indicator`, not here — this span is still what
|
||||
gets measured to position it, so it hugs just the text rather
|
||||
than the full-height tappable box. */}
|
||||
<span
|
||||
ref={textRef}
|
||||
class={'shell-nav-link-text' + (active ? ' shell-nav-link-active' : '')}
|
||||
|
|
|
|||
Loading…
Reference in a new issue