Group session navigation beside the panel toggle, centre Sessions, and retain New session/Search at the trailing edge. Remove the duplicate Info view and keep global OpenCode diagnostics in Settings > OpenCode. Read the selected execution host's fixed opencode.log through the CLI's documented log directory, using bounded 128 KiB snapshots, strict selector validation, no-store responses and source-change/cancellation fences. Share the movable, non-modal output frame with native background-shell output while keeping log bytes separate from messages and model requests. Restore saved Info selections only after native parent hydration without claiming user-selection authority. Keep output open across unrelated settings changes, and update all ten locales and affected help pages. Validation: 76 browser tests, 6 backend tests, 15 restoration tests and 31 help tests passed, along with server/UI typechecks, production UI build and whitespace checks. Independent gatekeeper review of exact head 8ccbfeb236e17ba02c3232a8a038c122c47976e8 reported zero actionable findings; a COMMENT review records the evidence. CI state at administrative merge: help build and completed authorization/compatibility checks passed; the remaining platform, native and browser jobs were still in progress, with no reported failing check. Those in-progress jobs are not represented as passed. The unrelated existing Missions help-anchor assertion is documented in the PR. Closes #1465.
8.2 KiB
UI conventions
Shared renderer rules for dialogs, utility windows, icon toggles, surfaces and scrollbars.
Agent conventions
-
Read-only diagnostic output uses
components/output-window.tsx, sharingDismissibleWindow's non-modal focus, Escape, outside-interaction and drag geometry. OpenCode logs and background-shell output supply their own bounded reads/rendering inside its shared header, actions, body and close button. Opening an output window preserves the underlying controls and conversation. Put source-specific retrieval outside this frame; render plain log bytes as text, and ANSI output only through the existing ANSI renderer. -
One-way acknowledgement targets opt into the same sweep listener with
toggleSweepClear(element)and a sharedtoggleSweepGroup. They always contribute the on state and clear through their own click when crossed. Regular toggles retain their own click and checked/pressed-state handling. -
Authentication recovery uses
lib/auth-recovery.tsandcomponents/auth-recovery-dialog.tsx: confirm CodeNomad auth status before showing an expired-login form, reconnect in place to preserve drafts, and never replay failed mutations. Its shared window styles live instyles/components/auth-recovery.css. -
Confirmation dialogs (
components/alert-dialog.tsx) keep Kobalte's initial focus on Cancel, so Enter never confirms by reflex, while the confirm button stays the filled primary action. Alert-dialog buttons show the accent focus ring on any:focus(styles/components/alert-dialog.css), including the initial focus of a mouse-opened dialog, so the ring marks the button Enter acts on. Prompts focus their input, where Enter submits. Covered bytests/browser/alert-dialog.test.ts. -
Guarded confirmations opt into
confirmDelayMs,expiresAfterMsand capturedreturnFocusthroughshowConfirmDialog. The exact dialog owns its timers; the confirm handler also checks elapsed time. Their viewport-bounded flex shell uses the shared scrolling.window-bodyand persistent.window-footer, keeping long target names and both actions reachable on short screens. Navigation revokes unsent consent; admitted request feedback follows its captured presentation owner independently of display invalidations. -
Persistent command/search utility windows use
components/dismissible-window.tsx: non-modal, no scrim, outside interactions keep them open, and explicit toggles use.icon-togglewitharia-expanded/aria-controls. Keep search state scoped to its instance/session and close it when that view becomes inactive. -
The
.icon-toggleactive state (aria-pressed/aria-expanded/data-active) is one shared rule instyles/utilities.css: one uniform partial accent tint for every palette (an ink of accent leaning 20% toward--text-on-accent, then 10% toward--surface-base, at 40% opacity, 50% on hover) over the surface beneath, primary-text icon, disabled toggles excluded. It is for icon toggles only: text list rows select through--list-item-highlight-*instead (Mission past runs). The only active override is.tool-call-output-rail, which keeps its compact output-rail toggles transparent.tests/browser/icon-toggle-active.test.tssamples real active toggles on every ready-made palette over the session header (search), sessions sidebar header, right-panel tab bar, user and assistant message cards (speech button), interruption dock header and transcript canvas (overlay windows share the canvas colour): OKLab ΔE ≥ 8 from the surface on the header and ≥ 5 elsewhere, ≥ 6 from the header's idle hover, ≥ 1.4 from active to active hover, icon ≥ 3:1 on both fills. -
Lists of independent toggles of one kind (Message content eyes and chevrons, session selection checkboxes, right-panel customization, notification routing, model visibility, form multi-select options) sweep by drag through
lib/toggle-sweep.ts: give each toggledata-toggle-sweep={toggleSweepGroup("<group>")}, one group per column or list. Pressing a toggle and dragging out of it flips it; every toggle of the same group the pointer then crosses takes that state, through its own click, so handlers,disabled/aria-disabledand accessibility stay the toggle's. State is read fromchecked(checkbox inputs, labels standing for their control) oraria-pressed/aria-checked. Mouse and pen only; touch keeps scrolling, and another pointer pressing mid-sweep leaves it going; the release after a sweep clicks nothing. A toggle whose handler saves asynchronously shows its new state at once and applies successive clicks (merge or queue them), never dropping clicks while saving; one whose change is costly to apply (Message content re-renders the transcript) or whose writes each carry a whole table (notification routing, which also runs its writes one after another and asks for System permission once per gesture) defers it withafterSweep, so a sweep applies once, on release. Never give a group to exclusive selectors (tabs, presets, radio-like choices) or to trust decisions such as extension activation. Covered bytests/browser/transcript-presets.test.ts,tests/browser/session-search.test.tsandtests/browser/notification-routing.test.ts. -
Window and panel buttons come from
styles/components/window.css:.window-icon-buttonfor icon-only commands,.window-actionfor bordered actions,.window-text-buttonfor borderless inline text commands (accent text, hover tint, muted when disabled: install an integration, re-enable a plugin); both mute when disabled. The Missions panel and its readers use.window-actionfor ordinary commands and keep.window-text-buttonfor end-of-list "Load more" links only (dev-docs/MISSIONS.md). Scheduling's Add a criterion uses the sharedbutton-primaryto emphasize discovery. A command placed in a.window-footernext tobutton-secondary/button-primarytakes that footer's template instead. Contextual layout (width, alignment) may be scoped to a panel; colours, borders and states stay in the primitive. -
Movable utility windows opt into
DismissibleWindow.draggableand mark their existing top bar withdata-window-drag-handle; keep drag geometry shared and controls interactive.--window-visible-heightbounds their height to the visual viewport; native scrolling and a sticky existing top bar keep results, pagination and drag/close controls reachable. -
Appearance mode and the saved light/dark selections are independent (
lib/appearance-preferences.ts). Message/tool cards use the muted surface; preferences use the same secondary surface as the main panels. Show a subtle local rollover with--surface-hover-overlayover the preserved selected background, never by substituting a generic panel or the secondary surface; right-panel canvas button rollover overrides live instyles/panels/control-hover.css. -
index.cssre-anchorsbox-sizing: border-boxon everydetails > :not(summary): the component library resets elements tobox-sizing: inherit, so folded content would inherit content-box from the browser's own details slot and overflow full-width controls. Keep that rule rather than patching individual disclosures. -
In-app logos render
components/brand-logo.tsx: the hexagon cropped to its bounds, black (CodeNomad-Logo-OnLight.svg) on light palettes and white (CodeNomad-Logo-OnDark.svg) on dark ones, picked in CSS from the palette's appearance; the always-dark loading screen uses the white one. The square app icon (CodeNomad-Icon.png) stays out of the page; it serves the browser tab and its badge. Large logos (home page, empty states, loading screen) follow their title, never the window: 4rem tall beside atext-3xltitle, 3.2rem beside the narrow session column's 1.5rem title, and 5.3rem beside the loading screen's larger title; the title bar's is 20px, the smallest size at which its letters read, which still leaves room in macOS's 28px bar. Resize the logo whenever its title's size changes. -
Keep the global scrollbar-width default at zero specificity (
:where(...)insrc/index.css) so component visibility rules win. The timeline shares the transcript's standard native scrollbar (geometry, rail ownership and thumb drags:dev-docs/SESSION_HISTORY_NAVIGATION.md); validate with the full stylesheet and real thumb gestures on mixed-height transcripts.