Commit Graph
70 Commits
Author SHA1 Message Date
Zakk 29327acf9d refactor(api): name the demo backend and the storage keys once
DEMO_API and isDemoApi replace the 'mock' spellings, src/api/storage.ts holds every storage key with its existing string (a test pins them), and the native-API probe the sign-in screen falls back to moves into api/auth.ts. The discovery timeouts stay 3 s for hosted detection and 5 s for the connection test.
2026-09-26 04:47:54 +10:00
Zakk fd01bb6502 fix(i18n): show enum values a newer backend adds instead of a blank
Labels for wire enums were looked up as t(labels[value]). A value the
contract gained after this build has no entry, so translate received
undefined: the label came out blank (a log level, a connection state),
"undefined" inside a sentence, or, for an event kind, eventSummary fell
off its switch and the events page threw on the missing summary.

enumLabel(labels, value, t) returns the value as sent when there is no
label, and replaces the lookups on the events, logs, connections,
flows, rules, nodes, config, overview, policies and search views, plus
the hand-written `labels[v] ? t(labels[v]) : v` checks. eventSummary
gets a default branch that names the event's resource.
2026-09-26 04:13:29 +10:00
Zakk 933f046d94 fix(dae): recognise built-in outbounds through one check
About a dozen places spelled out 'direct' and 'block' to decide whether
a node or outbound is built in: the probe buttons, the pseudo owner on
the nodes page, the routing map, the connection chain labels, the
trace, the node menu default and group filters. isBuiltinOutbound in
dae/vocab.ts now answers that from builtinOutbounds, and the rule
editor's outbound list reads the same names.

The colour checks that single out 'block' (traffic and outbound
charts) and the routing map's typed 'direct'/'block' kinds stay as
they are: they depend on which built-in it is, not on being built in.
2026-09-26 04:13:29 +10:00
Zakk 6374434365 refactor(shell): read navigation from features/*/nav.ts
Search listed each page's tabs and cards by importing the pages' view
models, which pulled the setup templates, the dae vocabulary and the
geodata presets into the search chunk. The tab and card lists now live
in leaf modules (dns, rules, config and settings nav.ts), and the
geodata card check moves with the settings cards.

Search also rebuilt the nodes page's provider table to find a node's
owner. The pseudo owner of a node without a provider is now one
selector in api/selectors.ts, used by the nodes page and search alike.
2026-09-26 04:13:29 +10:00
Zakk 62191512b0 refactor(features): share cross-feature code through features/shared
Code that two or more features use lived inside one of them, so pages
imported each other's internals: policy labels and the policy picker,
the region guess and node menu projection, the probe toast, pending
rule writes and rule links, and the lifecycle actions. These now live
in features/shared, each module with its tests, and the shell reaches
the pending-rule and lifecycle hooks there too.

The probe summary test moves next to probeSummary, so api tests no
longer import a feature.
2026-09-26 04:13:29 +10:00
Zakk 0dcee45d2a refactor(dae): move rule text and source naming out of features
Rule anchoring (rules/source.ts) and source naming and validation
(config/names.ts) are dae text helpers used by rules, connections,
config and the mock, so they now live in dae/ruleText.ts and
dae/sources.ts. The DNS type batching joins store/dns.ts, which owns
the other DNS reads, and the relative-time ticker moves to ui/clock.ts,
so TimeCell no longer reaches into the store.
2026-09-26 04:13:29 +10:00
Zakk 46f40355e2 test(perf): measure the long tables, probes and a log burst
The perf run covered page loads, scrolling the node table and hovering
the routing tree, but none of the paths that rerun on every keystroke,
probe, poll or log batch. It now also types in the 3,000-node search,
probes five nodes, polls and re-sorts 1,000 connections, selects
connection rows, and holds the logs page under a burst.

The mock takes a doona-mock-busy flag for these runs: byte counters
move on every poll and logs arrive every 20 ms, as on a loaded router.
PERF_ONLY picks scenarios by regular expression and PERF_RUNS sets the
number of runs behind each median.
2026-09-26 02:25:49 +10:00
Zakk daad9f5ec4 perf(pwa): cache the mock backend only for pages that run on it
The service worker installed the mock backend chunk for every reader,
including those on a real backend. It now leaves that chunk out of the
precache; a page that started on the mock reports it along with its
language, and the worker caches it then, so the demo still starts offline
after its first visit.

worker install: 82776 bytes (27896 gzip) less for real-backend readers
shell: 233816 -> 233865 bytes gzip (the report)
2026-09-26 01:38:05 +10:00
Zakk b9c6edbf2a fix(config): report a written but unapplied file on its own
failureNotice wrapped ui.writtenNotApplied in the caller's failure
wording, so a main-source edit read "Could not write the configuration:
Written to the configuration file but not applied". The notice now
stands alone, still negative, for every caller.
2026-09-26 00:18:10 +10:00
Zakk 6a3303e579 fix(mock): keep settings patches atomic and geodata status per contract
A PATCH /runtime/settings stored its geodata part before the other
fields were checked, so a refused patch still changed geodata. The
geodata part is now stored only after every other field passes.

GET /geodata reported required_codes from the demo rule fixture even
after an edit changed the active rules. Each activation now derives them
from the active routing section.

A custom geodata URL was shown as written in source_redacted and
fetched_url_redacted, query and all. Both now go through the redaction
the provider URLs already used, now shared as redactUrl.
2026-09-26 00:04:28 +10:00
Zakk ca2b5be0fe feat(nodes): set refresh interval, User-Agent and cache when adding a subscription
The add dialog shows each option the backend lists in create_options: the interval as the table's presets with the default preselected, the User-Agent with the default as placeholder, and the cache switch with a line of help. Only a value that differs from the default is sent, so an untouched entry stays one line. The e2e mock backend now serves provider create and refresh.
2026-09-25 23:09:34 +10:00
Zakk df9d024e0c test(mock): accept subscription options on create
The mock advertises honk's create_options, refuses an option it does not list or a value out of range, writes an entry with options as a block like honk does, reads that block's URL back, and deletes the whole block.
2026-09-25 23:09:34 +10:00
Zakk f8980d6539 build(api): pin the upstream contract
Pin merged honk API eba8a24. ProviderCreate gains optional update_interval, user_agent and cache, and resources.providers.create_options lists the ones a backend accepts with their defaults. types.ts is regenerated with pnpm gen:api.
2026-09-25 23:09:34 +10:00
Zakk b4b2dfeca5 fix(mock): advance the traffic history with the clock
The mock served the traffic history recorded at page load. After two
minutes the live window held none of it, so once the tab came back from
the background, or the activity page opened later in the session, the
download, upload and connection curves were one fresh poll: a single
point, or no data. The ring now advances in ten-second steps from page
load, and a refetch returns the samples it already served.
2026-09-25 22:25:23 +10:00
Zakk ab2148314d build(api): pin the upstream contract
Pin merged honk API c5e2152. It adds the route geodata downloads take
(GeoDataSettings.download and GeoAsset.download_route), with routing as the
default, and turns automatic updates on by default. types.ts is regenerated
with pnpm gen:api. The mock stores the route, checks the group, reports the
route each asset came through, and starts with automatic updates on and the
routing route.
2026-09-25 21:53:20 +10:00
Zakk 33fd82a453 fix(api): say how long a refused request waits before retrying
A rate-limited DNS query, probe or route trace waits out Retry-After, up to a minute, while the page shows only a spinner and looks hung. A wait longer than three seconds now shows a status under the page title with the reason and a countdown to the automatic retry.
2026-09-25 21:03:15 +10:00
Zakk 62995057f8 fix(auth): sign in from the public discovery view
A caller the listener does not admit now gets a reduced discovery without anonymous_loopback, so the sign-in type reads only the fields both views carry. The password e2e backend serves that view.
2026-09-25 20:10:25 +10:00
Zakk 9418d98af7 fix(mock): answer an unpinnable rule list with a retryable 503
snapshot_unavailable is now a 503 with Retry-After in the contract, not a 409.
2026-09-25 20:10:25 +10:00
Zakk c9b04de0cb build(api): pin the upstream contract
Pin merged honk API 606a6b7. Discovery is now a union of the admitted and the public view; types.ts is regenerated with pnpm gen:api.
2026-09-25 20:10:25 +10:00
Zakk 2f0db600f7 fix(ui): report an unknown operation outcome neutrally
An operation the backend forgot was reported inside each action's failure wording, such as "Could not run the operation: Result unknown", in a failure toast. The outcome is not a failure. Error toasts and edit problems now go through one notice helper that shows an unknown outcome on its own, in a neutral tone, and says the data was reloaded.
2026-09-25 19:30:40 +10:00
Zakk b4e03a49e9 fix(api): bound the stream silence limit
heartbeat_seconds is optional, and a zero, missing or tiny value gave a silence limit of zero or NaN, so the stream would reconnect again and again. A value that is not a positive number now falls back to 15 seconds, and the limit never drops below 10 seconds.
2026-09-25 19:30:40 +10:00
Zakk ee9eb271ca fix(logs): mark records lost when a stream cursor expires
When the backend no longer holds the resume cursor, the stream restarts at the head and the records sent meanwhile are gone. The logs and events lists joined old and new records as if nothing was missing. The client now reports the expired cursor; the logs list shows a marker row at the gap and the events list says so on the stream-ready row that restarted the stream.
2026-09-25 19:30:40 +10:00
Zakk f95ad6585b fix(api): reconnect event and log streams that miss heartbeats
A half-open connection after sleep or a network change never errors, so both streams kept showing as connected while no events arrived. The client now treats two and a half missed heartbeat intervals as a dropped connection, reports it, and resumes from the last cursor. Events use the advertised heartbeat_seconds; logs use the contract ceiling of 15 seconds.
2026-09-25 19:30:40 +10:00
Zakk 108110c54e fix(api): keep a host clock per backend and stop it flapping
Each backend profile now owns its clock, so a late response from the previous profile cannot move the new one, and the settings form test connection no longer resets the active clock. A shift starts above 5 s of skew and holds until the skew falls below 2.5 s.
2026-09-25 19:16:53 +10:00
Zakk cc8c1c6a34 fix(api): read relative times and chart windows on the host clock
A host without an RTC can run minutes off until NTP syncs. Relative times then showed valid DNS entries as expired and the live traffic window dropped every sample. The client now estimates the host offset from the observed_at of recent responses and applies it, past a five second tolerance, to the shared ticking clock and the ring windows.
2026-09-25 19:16:53 +10:00
Zakk 8000f38983 fix(api): retry refused validations and routing traces
Replaying only keyed requests also stopped the retry of config
validation and routing traces, which are POSTs without an
Idempotency-Key but write nothing. They now retry transient 503 and 429
refusals the same way DNS queries do. Deletes still do not.
2026-09-25 17:21:53 +10:00
Zakk 88c10cb84b refactor(api): name the statuses an operation ends in
The runtime settings refetch and the operation poll each spelled out
succeeded and failed. operationDone() in the model now names them once,
and the refetch says why only finished operations trigger it.
2026-09-25 17:21:53 +10:00
Zakk 975319026e fix(settings): refresh runtime settings when an operation finishes
honk restores runtime settings on every activation, including a no-op one, which emits no generation.changed. The settings card then showed the overridden values until the next five-second poll. A finished operation now refreshes runtime settings at once.
2026-09-25 17:21:53 +10:00
Zakk da0ae5f607 fix(api): replay only requests that carry an idempotency key
Node and provider management sends no Idempotency-Key, and the contract offers none for those endpoints. A refused create or delete may already have written the main source, so replaying it after a 503 could repeat the write or turn a failed activation into a success. Transport retries now apply to keyed mutations and DNS queries only.
2026-09-25 17:21:53 +10:00
Zakk 0a4392f183 refactor(geodata): share the contract checks and name the 412 heuristic
The settings page and the mock each checked geodata patches, and the URL
length check had drifted: bytes in one, UTF-16 units in the other. Both
now use the bounds and URL validator in src/dae/geodata.ts, which count
characters as the contract's maxLength does.

The default preset and the tests pick presets by id. The mock reads the
rule categories through scanConfig and no longer relies on `this` in
update(). The two-strike 412 check in the config editor moves into
refusalOutcome(), with unit tests.
2026-09-25 17:21:49 +10:00
Zakk c3044863e3 fix(connections): keep the renamed node column hidden and share its path
A view saved before the chain column became the node column lost its hidden state; map the old id on read. The tooltip path check was written twice, so it moves to selectors as chainPath.
2026-09-25 17:21:45 +10:00
Zakk d684dce9e5 feat(mock): serve geodata sources, automatic updates and status
The demo backend stores geodata URLs and automatic-update settings apart from the other runtime settings, so they survive a reload, and reports update status and the categories the demo rules use. An update fetches from the first URL of each asset and fails, keeping the files, when a known small file lacks a used category. The preset catalogue and the MetaCubeX lite category list live in src/dae/geodata.ts, shared with the settings page.
2026-09-25 06:52:31 +10:00
Zakk c537a3a2d2 build(api): pin the upstream contract
Pin merged honk API 76f0efa, which adds configurable geodata sources, automatic updates and update status. geodata is a runtime settings field but not a numeric one, so the numeric field list leaves it out.
2026-09-25 06:52:31 +10:00
Zakk f918e021d7 feat(connections): show the node instead of the full chain
The chain column was too narrow for a group path and truncated it. Show only the leaf node, with the full path in the tooltip; fall back to the outbound name when the chain is empty. The flows table gets the same column.
2026-09-25 05:54:57 +10:00
Zakk 4630504c58 build(api): pin the upstream contract
Pin merged honk API 9d88cab and resolve rule sources by ID. The mock reports UTF-8 byte columns; source navigation stays line-based because routes carry only a line.
2026-09-24 16:08:36 +10:00
Zakk 3d1e9a9b92 fix: address feedback on 0.1.0-beta.2
Stop shipping a node_modules archive with releases; package recipes now
install the prebuilt program and font tarballs. State in the READMEs and
guides that the native API exists only on the feat/native-api branch of
Glassyiris/honk, and show a clear message when an engine answers 404 for
both discovery and capabilities instead of asking for a token.

Report the page language to the service worker only after it activates,
so an updated build keeps the language for offline start. Keep secondary
facts on a caption line under card values, keep cards in a row equal in
height, lay the capabilities list out in columns, frost sticky headers and
overlays in the glass palette, and fit Overview, DNS and the routing map on
tablets and phones. Localize backend datapath errors and the rule editor's
must switch.

List events received before the Events page opened. Fill the mock
backend with realistic connections, DNS records, logs, events, notices
and history for the public demo, with traffic shaped by destination.
Link the demo from the READMEs and refresh the screenshots.
2026-09-24 14:27:28 +10:00
Zakk 0918f6512d fix(dns): report cache usage from entry counts
Pause hidden cache work, show log errors in place and report cache usage by entries. Restrict offline caching to the active language and keep the tab’s backend session pinned.
2026-09-23 22:17:52 +10:00
Zakk 2169d65464 fix(rules): validate edits before changing source text
Keep group and rule edits anchored to their source lines and reject invalid typed values. Stabilize session handling and table layout while adding DNS cache capacity.
2026-09-23 20:24:18 +10:00
Zakk 8f7fddea6e feat(auth): present sign-in and setup in a dialog
Accept administrator passwords from eight characters and put sign-in and setup in a dialog. Reduce unnecessary polling and improve field errors, labels and compact layouts.
2026-09-23 19:04:29 +10:00
Zakk c7ec045bb2 refactor(ui): unify confirmations, retries and labels
Share confirmation dialogs, formatters, cards and menus across features. Make failed reads retryable, correct cancellation behavior and standardize terminology and status text.
2026-09-23 17:49:06 +10:00
Zakk 6ec531e9c4 perf(features): reduce polling and centralize page ownership
Limit event refetches, load search and font assets on demand and keep active views stable. Move tabs, capability gates and data reads into their feature controllers.
2026-09-23 15:19:41 +10:00
Zakk 92715e341f feat(charts): add fact cards and persistent data tabs
Add reusable fact tiles and titled cards, including DNS rankings and cache state. Keep selected data panels mounted and avoid replacing unchanged poll results.
2026-09-23 13:28:34 +10:00
Zakk 774258cd51 feat(charts): add DNS, node, connection and log analysis
Add chart forms for query logs, node latency, connection traffic and log levels. Show labelled facts and hover detail, and check chart behavior in Chromium and WebKit.
2026-09-23 11:58:32 +10:00
Zakk 73db15940a fix(ui): clarify loading failures and selected states
Keep each tab bound to its loaded backend and surface group-arrange failures. Correct labels and disclosures and extend browser smoke checks to WebKit.
2026-09-23 10:59:25 +10:00
Zakk 177f91b755 feat(policies): edit and arrange group memberships
Use shared dae parsing to edit group members and evaluate filters. Apply group ordering in one action, then align shared pickers, fields, routes and semantic UI tokens.
2026-09-23 09:49:44 +10:00
Zakk d12779a0da feat(auth): add password setup and sign-in
Add password setup, sign-in and sign-out. Place field errors near their controls and correct page loading and links around the new flow.
2026-09-23 08:23:36 +10:00
Zakk cc6bfe99f7 fix(ui): stabilize loading states, edits and responsive pages
Hold card and table geometry while data or fonts load. Keep configuration edits inside their source lines and address regressions across the feature pages.
2026-09-23 04:03:45 +10:00
Zakk 6333b757d6 feat(settings): expose recorder modes and source details
Add recorder settings and an unmasked configuration surface, and link module cards to source sections. Update the guide, control motion and list rendering thresholds.
2026-09-23 01:22:42 +10:00
Zakk 37d724d2e2 build(install): validate distribution recipes
Exercise APK and IPK recipes and install packages on supported distributions. Align Gentoo and other recipes with their target repositories while correcting page and store behavior.
2026-09-22 15:49:07 +10:00
Zakk 47a48a1a89 feat(config): edit modules one section at a time
Add a modules tab for focused source edits. Tighten capability and session handling, align tests and move store and dae code into their top-level modules.
2026-09-22 10:49:44 +10:00