Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: a hide debug output toggle in the header's settings menu

The row moves from the per-agent page into @hive/shared so both pages mount
the same one. The terminal's debug rows now follow the preference as it
changes, so rows already on screen hide or show at once instead of only the
rows that arrive after the toggle.
This commit is contained in:
iris 2026-10-12 20:15:56 +02:00 • committed by mara
commit be6036b216
9 changed files with 88 additions and 36 deletions

View file

@ -12,7 +12,7 @@ import { useApplyMotionOverride } from "@hive/shared/motion-apply.js";
import { Header } from "./components/Header.js";
import { MetaNav } from "./components/MetaNav.js";
import { ExpandDetailsSetting } from "./components/ExpandDetailsSetting.js";
import { HideDebugSetting } from "./components/HideDebugSetting.js";
import { HideDebugSetting } from "@hive/shared/hide-debug-setting.js";
import { StatusChips } from "./components/StatusChips.js";
import { LiveStream, type LiveStreamHandle } from "./components/LiveStream.js";
import { HeaderPill } from "./components/HeaderPill.js";

View file

@ -1,25 +0,0 @@
// Agent-terminal-only settings-menu row: "hide debug output". Same shape
// as `ExpandDetailsSetting` (its own file's header comment explains why
// this lives here rather than as a `SettingsMenu` prop) — mara: "add a
// setting to not display verbose output... like the grey colored debug
// stuff."
import { useState } from "preact/hooks";
import { getHideDebugPref, setHideDebugPref } from "@hive/shared/prefs.js";
export function HideDebugSetting() {
const [hideDebug, setHideDebugState] = useState(() => getHideDebugPref());
return (
<label class="settings-menu-row">
<span>hide debug output</span>
<input
type="checkbox"
checked={hideDebug}
onChange={(e) => {
const v = (e.target as HTMLInputElement).checked;
setHideDebugPref(v);
setHideDebugState(v);
}}
/>
</label>
);
}