Watch
0
0
Fork
You've already forked hyperhive
0

frontend: remove the unused vanilla terminal and tab strip, and fix comments that describe removed UI

shared/src/terminal/terminal.js (and its index.js re-export and package export) had no importer: the Preact Row replaced it. The .tail-pill and .load-more-pill rules were only made by it, and the preview's own tail-pill override styled a pill that no longer exists. hive-tab-strip.js had no importer either. Four constants nobody imports are no longer exported. The shared terminal pane section of the web-ui shape doc now describes Row, linkify and markdown instead of the removed factory. Header comments that named removed components (StatusChips, MetaNav, Root.tsx, the cost badge, four folded sections, a detail dialog) now describe the current code.
This commit is contained in:
iris 2026-11-19 18:31:24 +01:00 • committed by mara
commit a1e5855859
4 changed files with 78 additions and 990 deletions

View file

@ -1,7 +1,6 @@
// Settings-menu row: "hide developer details". Rendered as a `<SettingsMenu>`
// child (`./SettingsMenu.js`) by each page that has a terminal, the
// per-agent page and the swarm UI, rather than as a prop on the menu: the
// caller owns its row. Both read the same preference (`../prefs.js`), which
// child (`./SettingsMenu.js`) by the swarm UI's shell, rather than as a prop on
// the menu: the caller owns its row. The preference (`../prefs.js`) is the one
// `../terminal/Row.tsx` follows as it changes — mara: "add a setting to not
// display verbose output... like the grey colored debug stuff."
import { useState } from "preact/hooks";

View file

@ -1,8 +1,7 @@
/* <SettingsMenu> popover — matches `@hive/shared`'s `Dropdown`
(`../dropdown/Dropdown.css`, `.ui-dropdown`) values exactly
(background/border/radius/shadow), same "reuse the values, not the
component" call `MetaNav` already made for its own
popover: this one holds `<select>` rows, not `Dropdown`'s
(background/border/radius/shadow): the values are reused, not the
component, because this popover holds `<select>` rows, not `Dropdown`'s
command-dispatch `<button>`s. Right-anchored — this trigger lives at
the end of a header's icon-trigger cluster in every page that mounts
it, so a left anchor would push it off-screen. */

View file

@ -46,7 +46,7 @@ export interface SettingsMenuProps {
* shared component." A caller owns its row(s) entirely (state,
* storage key, markup); this component never learns they exist. Use
* `settings-menu-row` (this file's CSS) on each row's outer element
* to match spacing/typography — see `Root.tsx` for a worked example.
* to match spacing/typography — `HideDebugSetting` is a worked example.
*/
children?: ComponentChildren;
}

View file

@ -3,10 +3,8 @@
// value, react to it changing, write a new one") rather than each
// caller reinventing its own key handling. Not settings-page-specific:
// any client-local preference reaches for `useLocalSetting` directly.
// Originated in swarm-ui's own `lib/settings-storage.ts`; moved here
// once the per-agent page needed the identical mechanism (mara: "i
// think the component should be shared" — see `SettingsMenu.tsx`'s
// file comment for the full story).
// Lives in `@hive/shared` so every package that needs a stored setting uses
// the one mechanism (see `SettingsMenu.tsx`'s file comment).
//
// `localStorage`'s own `storage` event only fires in *other* tabs, never
// the tab that made the write — so two components in the same tab both