Commit Graph
39 Commits
Author SHA1 Message Date
Zakk 45c56014e9 fix(ui): return controls to S2's default M size
Segmented, page toolbars, page actions and links, tab rows and the Activity mode cards no longer force L (40px); every control is M (32px) unless it passes size="L", and a control's own size now wins over the size a card provides. Tab rows take the M control height, S2's compact Tabs height. Icon buttons keep zero padding in small rows again. A control that asks for L gets L's 16px text and corners. Guards assert the M values; CONTRIBUTING and the READMEs drop the L rule.
2026-10-04 14:51:42 +11:00
Zakk 44c0f8b5a4 fix(widgets): wrap long names instead of cutting them
List widgets cut a long node, group, source or device name with an
ellipsis behind a tooltip, against the rule that labels are never cut.
A name that does not fit beside its value now takes its own line, the
value under it at the end, and wraps there whole. Kv loses its
truncate prop, which has no users left.
2026-10-04 14:50:30 +11:00
Zakk 6dbc5a7aae feat(dashboard): lay wide lists out in two columns
The ranking, policy group, source and notice lists stretched one row
across a full-width card. From a 640px container with four rows or
more they now fill two columns, the first before the second; fewer
rows keep one column as wide as one of those.

The notices card follows its notices instead of a row count: the
height setting goes, a stored row count reads as the natural height,
and the card keeps the chart-wait floor so the row does not move when
its rows arrive.
2026-10-04 14:50:30 +11:00
Zakk b49067aadf fix(config): show unconfirmed and read-only states at the right level 2026-10-04 14:40:43 +11:00
Zakk d6c93d8f40 refactor(rules): share the quick rule button 2026-10-04 14:37:10 +11:00
Zakk 33abd5385b fix(widgets): offer only the widths and heights a card can fill
Cumulative traffic and the DNS answer and network splits go up to half width and the group switch up to two thirds. The two splits have a fixed few categories, so they offer no row count and list every category on the dashboard. A stored width or row count a card no longer offers reads as the nearest one and the card stays.
2026-10-04 14:36:38 +11:00
Zakk 72d1b8ed00 feat(dns): list expired cache entries on request
The cache tab gains a Show expired switch that sends include_expired=true
on every page of the walk and keys the listing by it. A walk with expired
entries no longer stands in for the usage read. The demo backend hides
expired entries unless asked and carries one expired entry.
2026-10-04 14:36:04 +11:00
Zakk 9580b88e27 chore: drop unused exports and restating comments
Knip, checked by a repository-wide grep, found 47 exports that no other
module imports. Each loses its export keyword and stays in its file; the
unused type re-exports leave the charts and engines barrels and the
nodes widget re-export list. Nothing is deleted that code still uses.

Every page registers a preload through lazyPage, so Feature.preload is
required and the optional checks around it go. The rules dictionary
resolves a rule's source inline instead of through a one-call helper,
and the dock hit test reuses FloatingPanel's within(). vite.config.ts
loses a copy of the Activity chunk comment, and registry.ts a comment
that restated lazyPage.
2026-10-04 06:56:45 +11:00
Zakk dcb6d92b4a fix(fonts): declare the Noto faces only when the font archive is installed
The @font-face rules point at fonts/, which only the optional doona-fonts
archive provides, so a UI installed without it requested every Noto slice
its text needed and logged a 404 for each.

src/fonts.ts now fetches fonts/README once per page load and attaches
fonts.css and the language's fonts-tc.css or fonts-sc.css only when it
answers. main.tsx starts the check at module load so it overlaps the
catalogue fetch, and the catalogue still resolves after its faces are
declared and the Latin slice loaded, as it was from the first paint when
the faces sat in the page's stylesheet; with font-display: optional, text
laid out before the slice arrives keeps the system font. With the archive
the faces, unicode ranges and per-glyph loading are unchanged. The probe is a GET so the service worker caches it
for offline starts, and its body is read so a worker-relayed response does
not hold the request open. The worker no longer caches an HTML response for
a build file, so a host that answers missing paths with the page cannot pin
the probe to "absent" after the archive is installed.
2026-10-04 06:18:13 +11:00
Zakk 5eb4ed4789 fix(widgets): keep the panel height on a vertical resize
A step with no vertical movement freed the height to the cap even while an edge handle was being dragged vertically. The release decision now uses the gesture's cumulative vertical travel.
2026-10-04 06:08:47 +11:00
Zakk 32a61a5f31 fix(store): stop refetching capabilities on runtime heartbeats
runtime.updated coalesces runtime counter changes and arrives every few
seconds. Its invalidation row listed capabilities, and with every: 0 the
event refetch has no rate floor, so one Activity tab read
/api/v1/capabilities about every 2.5 s. Capabilities now refresh only on
generation.changed, a reconnect's stream.ready, or a new sign-in.
2026-10-04 05:52:07 +11:00
Zakk 4c004db603 refactor(ui): name kit files after their contents
Tip and TextTooltip move from Button.tsx to Tooltip.tsx, Link to
Link.tsx, and Select.tsx, which holds no select, becomes ItemText.tsx.
buttonClass no longer accepts a size it ignored, and CONTRIBUTING lists
the controls that take no size and stay M.
2026-10-04 05:40:54 +11:00
Zakk 045ca676c2 refactor(ui): add ValueTile and ChartWait, pack by data-pack
The value tile body and the chart placeholder were written by hand in
each card; they are now kit components, and the lint ban rejects their
raw classes in features. Dashboard packing reads data-pack marks set by
the cards instead of selecting feature class names. CONTRIBUTING lists
the layout and text utility classes features may use directly.
2026-10-04 05:40:54 +11:00
Zakk 076758bbc3 refactor(widgets): keep widget traits in the registry
Each widget's traits (value tile, list, rate, panel title, group choice, narrowest width) live in its registry entry instead of id arrays across files. Widgets read their surface from a WidgetSurface context instead of a dashboard flag passed down, the latency widget's unreachable save fallback is gone, and replaceWidget replaces an item by instance.
2026-10-04 05:28:22 +11:00
Zakk da75ebdf2b perf(shell): warm the pages only once the backend accepts the tab
The sign-in page downloaded every page chunk: registry.ts preloaded Activity at module load and useShellController started warmAllPages on mount. warmAllPages now runs from useShell once capabilities load. A tab holding a credential still preloads Activity at module load; a tab with no profile preloads it only once hosted detection shows it runs the demo, so a first visit to a password-protected honk does not. On the demo sign-in page this drops 58 JS files (530775 B gzip) to 14 (360229 B).

honest.spec saves a bearer, and four paused-clock Activity and dashboard tests run as a restored demo session, so a paused clock does not hold a suspended Activity page; the 1440 widgets test waits for the panel header before measuring it.
2026-10-04 04:54:47 +11:00
Zakk 573ef3dfa2 fix(api): retry empty reads once and name the request in errors
A JSON GET that comes back as an empty 2xx body, or gets no response at
all, is sent once more after 300 ms. A second failure is reported with
attempts: 2. Timeouts, caller aborts, error statuses, POSTs and the SSE
streams are not retried, and GETs never enter the refusal loop.

API errors now record the method, the path and query, and the
Content-Type, Content-Length, Transfer-Encoding, Content-Encoding and
Server response headers. The copied diagnostics add an attempts line and
a headers line to each entry.
2026-10-04 04:29:05 +11:00
Zakk 8da44b0de4 fix(policies): keep a group editor open when its group is removed
The edit dialog's draft lived in the group's card, which the runtime list
poll unmounted as soon as the group was removed or renamed elsewhere, so
the open dialog and its unsaved edits vanished without a word.

The page now keeps the card whose editor is open after the list drops
its group. The editor shows a notice that the group was removed and the
changes were not saved, and Apply stays disabled with that reason. The
fields keep the edits, so they can still be copied, and closing the
dialog lets the card go. A group back under the same id is listed again
and the editor returns to normal.

InlineAlert gains S2's notice tone for the warning.
2026-10-04 04:02:48 +11:00
Zakk 50a4532e24 fix(widgets): keep narrow donut legends on one line and the panel's small size usable
- Donut legends below 380px keep the name, value and share on one line; only
  the panel's small size, half a row wide, still puts the value under the name.
- The small notices widget takes the whole panel row.
- The small node latency dots widget shows the ranked list; at the panel's
  width the name column takes what the value leaves beside a 64px track.
- Area charts without a time window drop middle time labels that come within
  8px of a neighbour, keeping the last label and the first when it fits.
2026-10-04 03:54:03 +11:00
Zakk 27771c3b3d fix(styles): end the 600px rules below the phone breakpoint
Two rules (the tree hint, and the phone padding and wrapping for the
main area, fields, buttons and badges) used max-width: 600px, so at
exactly 600px they applied together with the min-width: 600px layout.
They now end at 599.98px like every other phone rule. Only a 600px
wide viewport changes.
2026-10-04 03:45:32 +11:00
Zakk 1726be71f6 refactor(styles): name the breakpoints in one list
The stylesheets wrote the phone bound three ways and components
repeated their own media queries. Breakpoints now live in one list in
ui/hooks.ts; stylesheets write (min-width: N) or (max-width: N-0.02),
and components take their queries from the same module. A unit test
holds every media query in src to the list. Values are unchanged at
every whole-pixel width.
2026-10-04 03:45:32 +11:00
Zakk 0d71be3571 fix(ui): place selection markers from layout offsets
useSlider measured the selected item with getBoundingClientRect. Since the
press feedback became a transform that eases back after release, the box it
read moved for a few frames, so the ResizeObserver pass found a new position
and set the marker still. The segmented and tab markers jumped instead of
sliding. Offsets ignore transforms, so both passes agree.
2026-10-04 03:36:54 +11:00
Zakk 17b7a0f424 fix(widgets): stop offering a large size for key-value metric widgets 2026-10-04 03:21:50 +11:00
Zakk aa2f4a99ce refactor(widgets): give the sortable base and grip one home
The base rules SortableCanvas shares between the dashboard and the
widget editor (body wrapper, tools, drag cursor) move from dashboard.css
to sortable.css; each host keeps its placement under its own selector.
The resize pill drawn twice becomes one .rp-grip, and the wide-to-large
cell size is mapped once in WidgetGrid. No visual change.
2026-10-04 03:03:37 +11:00
Zakk 1ee204f037 perf(sw): reuse hashed assets the page already loaded on install
Only index.html, which keeps its name across builds, is precached with cache: 'reload'. Files under assets/ are named after their content hash, so the copy already in the HTTP cache is the same file; the install now reuses it instead of downloading it again.
2026-10-04 01:54:31 +10:00
Zakk 06317d3569 fix(widgets): give the floating panel a light glass material 2026-10-04 01:42:13 +10:00
Zakk 5bdcc4e431 refactor(styles): move design tokens to foundations and split segmented
The :root tokens, their direction, pointer, phone and dark overrides move from
motion.css to the top of foundations.css, and the Segmented control rules move
to segmented.css, imported right after motion.css. Rules move verbatim; the
control size test follows the rules to their new file.
2026-10-04 01:33:16 +10:00
Zakk 59300139e9 perf(geo): match region aliases in one pass
regionOf ran 267 Unicode regexes per node name, and compiling and
warming them cost 358-372 ms of self time when Activity first loaded
at 4x CPU. Two combined alternations (case-insensitive aliases and the
capital-only ISO codes) now find the same alias: alternatives are
sorted longest first, then by priority, so the leftmost match is the
alias the old loop chose. Activity startup drops to 11-25 ms in geo.ts.

The cache now holds two pages of names (MAX_PAGE) instead of 2048.
The unit tests keep the old matcher as a reference and compare both
on every alias, its case forms, every ordered pair, and the fixtures.
2026-10-04 01:06:56 +10:00
Zakk a1dc30cc36 chore(size): budget the download paths instead of the total
check:size now gates what users download: the sign-in and Activity startup paths, their CSS, each locale and font stylesheet, each page beyond the Activity startup, the config editor and the mock. The total is printed but no longer gates.
2026-10-04 00:57:55 +10:00
Zakk 27e9d9e714 perf(logs): render streamed table rows once per update
Each published batch re-rendered the table around the body: the Table element
was rebuilt with the new rows, so React Aria rendered every visible row with the
old collection and again with the new one. The table element is now memoised and
the body reads its rows from context, so a batch re-renders only the collection
and the visible rows once. The non-tree groups list kept returning a new empty
array, which defeated the memo; it is now one constant.

The flow placement read layout after writing custom properties on the grid on
every scroll event, forcing a style and layout pass of every row. It now reads
before writing, writes only changed values and runs scroll and resize placement
once per frame.

A table-flow spec counts the components that render mounted rows and holds a
batch to one render per row.
2026-10-04 00:48:57 +10:00
Zakk 584b026c9c fix(activity): fold repeated notices and drop stream lifecycle
The notices card folds identical notices (same level, kind and text) into
one row wherever they fall in the feed, at the position of the latest one,
and its badge counts distinct notices. A stream-wide flow gap opens at its
reason instead of repeating the reason label after the kind. Stream ready
is lifecycle, so it stays on the Events page only.
2026-10-04 00:39:59 +10:00
Zakk 83e1c8b8f8 refactor(policies): extract the group retry merge into a pure function
The three-way merge in the group dialog's save moves to groupMerge.ts with direct tests; the hook calls it and refuses in the same order as before.
2026-10-04 00:29:15 +10:00
Zakk 7099a5c6ff refactor(styles): import each stylesheet where its rules render
Page header rules move from dashboard.css to page-layout.css, the widget
content rules and the mode switch's fill rule to widget-content.css
(imported by WidgetContent), and the impact list rules from routing.css to
impact.css (imported by RuleTemplates and Dns). Rules move verbatim; a page
opened first no longer depends on the Activity or Flows chunk for them.
2026-10-04 00:20:49 +10:00
Zakk 43240d6ac4 refactor(nodes): use useDialogSession for dialog requests
useNodesPage counted dialog openings by hand; it now uses the hook the config and policies dialogs share.
2026-10-03 23:30:32 +10:00
Zakk f65a40bf69 docs(screenshots): capture the beta.13 dashboard, widget and config views 2026-10-03 23:21:33 +10:00
Zakk 3d6df0c65b refactor(widgets): move WidgetCard out of the Activity page entry
The panel editor's ModuleControls imported WidgetCard from Dashboard.tsx,
the Activity page entry, which tied the editor to the page module and
closed a dynamic import cycle. WidgetCard now lives unchanged in its own
module that both import, and a lint zone keeps the shell from importing
Dashboard.tsx; registry.ts stays its only loader.
2026-10-03 23:12:35 +10:00
Zakk 6fb8c72f56 refactor(features): move feature-only modules to their features
The group dialog modules are used only by policies, the subscription
fields only by nodes, and NodeGrid only by the policies Nodes view, so
they move next to their one consumer. Imports, the i18n literal list
and the single-consumer collection lint exemption follow the paths;
nothing else changes.
2026-10-03 23:04:06 +10:00
Zakk 951cdb21cd refactor(api): share Retry-After parsing and the snapshot refusal check
parseRetryAfter replaces the two header readers, and isSnapshotRefusal
the three inline 503 snapshot_unavailable tests. Each caller keeps its
default and condition.
2026-10-03 22:55:39 +10:00
Zakk 09a3ea3e46 feat(changelog): collect per-pr release fragments
Keep pull requests out of the shared Unreleased section. Resolve PR numbers from fragment-adding commits, collect release notes with comparison links, and require fragments in the existing CI lane.
2026-10-03 22:47:03 +10:00
Zakk d3adb108a0 fix(widgets): scroll the editor's preview on its own 2026-10-03 22:37:31 +10:00