Commit Graph
247 Commits
Author SHA1 Message Date
Zakk 04d787ade7 fix(rules): say in view why adding a rule or running a trace is disabled
Add rule shows its missing-position reason under the toolbar, the add-rule dialog names the missing or invalid condition or outbound, the trace form says what it lacks or that the backend cannot trace, and the connection's add-rule dialog says it is still loading.
2026-09-28 07:04:27 +10:00
Zakk a8be01676b fix(policies): say in view why group actions are disabled
Edit and Test all in a group's header, the last-filter remove button in Arrange and the check settings Save now show their reason under the action instead of only in a tooltip, or not at all. The review's Apply notice also covers a page that lost write access.
2026-09-28 07:04:27 +10:00
Zakk db413e148f fix(config): say in view why Apply and Validate are disabled
On a phone the quick setup's Apply and reload sat disabled with no
explanation: the only reason it ever gave was a hover tooltip, and only
for incomplete text, never for the common case of nothing changed yet.

Add ActionHelp to the kit: a help line under an action row, in view on
every width, that the row's disabled buttons name as their description.
Once it gives the reason the button drops the same text from its
tooltip. The config page uses it for the quick setup, the module Edit
and Apply rows, the source card and the Validate tab, with the reasons
projected in view.ts: no changes, a change on disk to keep or discard,
invalid subscriptions or network fields, incomplete text, and why a
file cannot be validated.
2026-09-28 06:41:39 +10:00
Zakk 915f81ad8b fix(policies): line up large node groups with small ones
A group of more than twelve members lays its tiles out with React Aria's
GridLayout, which spreads its column spacing over both outer edges and
wraps at 200px per tile, while a small group's plain grid wraps at 168px
with no edge inset. The two forms sat at different insets and column
counts, and on a phone the overlay scrollbar landed right on the last
column's edge.

Each virtual cell is now a tile plus the grid's 8px gap, with no column
spacing from the layout, and both forms wrap at 204px, which holds the
demo's longest name beside a three-digit latency. The scroll panel
reaches 8px into the card's padding: the tiles line up with a small
group's and the last gap is the room the scrollbar draws in. Rows and
keyboard navigation are unchanged.
2026-09-28 06:21:28 +10:00
Zakk 94877713a0 fix(tables): scroll tables sideways on phones instead of dropping columns
At phone width DataTable dropped columns until the minima fit, so Logs and
Events kept only their text column, the rule list lost its number, source
and hits, and every table sat at exactly the viewport width with the rest
of each row out of reach.

Below the phone breakpoint no column is dropped now: each keeps its minimum
width and the table scrolls sideways, the container around a native table
and the grid itself once virtualised. A virtualised grid no longer gets the
inline minimum width, which made the container scroll it and carried the
vertical scrollbar off screen. Tablet and desktop widths still drop columns
as before and render the same.

The phone specs now scroll to the trailing columns, and a new spec checks
that the logs table scrolls to its whole message column at 390px and fits
without scrolling at 1440px.
2026-09-28 06:05:20 +10:00
Zakk c909d8fd66 test: share the appearance, geometry and deferred helpers
Six e2e loops wrote the language and scheme to localStorage the same
way, and the mirror and right-to-left specs each defined box and turn.
They now come from fixtures.ts. The store tests share one deferred
from testHelpers.ts, and connection-rule.spec.ts builds its rejected
reload from one factory for both tests that use it.
2026-09-28 06:00:35 +10:00
Zakk ef9510c753 fix(i18n): label every write-and-reload button "Apply and reload"
The outbound mode card and the arrange review dialog said "Apply"
while the configuration page said "Apply and reload", though all
three write the configuration and reload it. They now share the
configuration page's key, so the label says what happens and the
three places cannot drift apart.
2026-09-28 06:00:35 +10:00
Zakk aa8d84e475 fix(config): warn about a new source only when no loaded file includes it
The new source dialog read include patterns from the main file alone,
while the contract lets any file of the resulting set include the path.
It now resolves each loaded file's patterns from where that file lives,
as the demo backend does, and says nothing while a file's text is
unknown. resolveIncludePath moves from the demo backend to dae so both
share it.
2026-09-28 04:08:30 +10:00
Zakk c5d0bdc4bc fix(config): hold the quick setup on a file changed on disk
After a 412 the quick setup took the refetched file as its base and
kept the form, so the next save wrote the form over the change on disk
without the person seeing it, as the source card did before. It now
works like the source card: a changed form over a file that changed on
disk shows the alert, and saving waits until the person keeps the form
over the new text or discards it. The setup has no Cancel of its own, so
the alert offers the discard. An untouched form follows the file.

The alert is one component for the source card, the modules and the
setup.
2026-09-28 04:08:30 +10:00
Zakk 6cf7d25227 fix(config): stop overwriting disk changes and guessing secrets
After a 412 the source card made the refetched file the draft's base and
kept the typed text, so the next save wrote the draft over the change
made on disk without the person seeing it. The card now compares the
draft's base with the file as loaded: when they differ, an alert says
the file changed and saving waits until the person keeps the draft over
it or cancels. A module draft is carried over on its own when the change
is outside its section, since splicing it in keeps that change, and
waits the same way when the section itself changed or was removed.

A read-only main or include file was always labelled as holding a
listener secret. honk also refuses the includes it writes itself, and
another backend may have its own reasons, so the secret is named only
when the text defines a native_api or clash_api block; otherwise the
file is shown as read-only.
2026-09-28 04:08:30 +10:00
Zakk 7aa71df39b test(config): click Apply once in the 412 rebase tests
toPass repeated the click with the wait, so a slow reload toast led to a
second save. Both tests now wait for the render that rebases the draft,
seen as the refetched source's line count or the section's shifted line
range, then click once and wait for the toast.
2026-09-28 03:46:04 +10:00
Zakk 1e46eef0f4 fix(login): make the showcase a still picture under reduced motion
Under reduced motion the game ignores every press, yet the panel kept a
focusable button named as a game. The button is now disabled and the
panel hidden from assistive technology while the preference holds, and
both follow a change made with the page open. The scene draws the same.
2026-09-28 03:46:04 +10:00
Zakk d4e54f3f6c fix(login): keep the form when the showcase fails to load
The showcase chunk loaded under Suspense with no error boundary, so a
failed import blanked the whole sign-in page. LoadBoundary takes an
optional fallback, and the login page gives it the same empty panel it
shows while the chunk loads; the form beside it keeps working.
2026-09-28 03:46:04 +10:00
Zakk 30493a1f4e fix(login): one type scale on the sign-in form
The demo account moves from its bordered box to one line of secondary
text under the sign-in button. The column spaces its parts in steps of
8, 16, 24 and 32, the link row matches the note's size, and the brand
leads the page at a 40px logo with a 24px wordmark.
2026-09-28 02:40:27 +10:00
Zakk 6f27d171aa feat(login): construction scene and Flappy Duck in the showcase
The panel beside the sign-in form draws the approved construction scene;
a press turns it into Flappy Duck, with the forwarded traffic as the
score. The engine lives in loginGame.ts, its text in the catalogue, and
the canvas button is a small kit component.
2026-09-28 02:40:27 +10:00
Zakk 944dc572c0 test(e2e): change the backend URL from the sign-in page
Settings renders without a backend, so the sign-in page's link opens the
backend editor while signed out. The spec follows it, saves a second
backend and checks that the sign-in page probes that backend and offers
its first-run setup.
2026-09-28 02:40:27 +10:00
Zakk 49c1a4a6d5 test(e2e): cover the sign-in page and the demo account
login.spec covers the demo: the sign-in page comes first with the
account filled in and named, signing in enters the demo and survives a
reload, a wrong password is refused, the language menu and scheme toggle
work on the page, a 360px screen has no horizontal scroll and no
showcase, and the showcase panel appears from 1024px. A rejected saved
token shows its notice and accepts a new token.

The password specs find the form on the page instead of in a dialog. The
chunk and sub-path specs keep their saved mock profile and now start
signed in through the new signedIn fixture option.
2026-09-28 02:40:27 +10:00
Zakk 1754d623ca test(e2e): check the degraded datapath status in the faults scenario
The default mock is a healthy honk now and seeds a degraded datapath only
in the faults scenario, so the Overview header and Activity status tests
run there.
2026-09-28 02:35:45 +10:00
Zakk ba214d6706 fix(limits): list the rule list, validation and closing connections
With rules or config_validate unavailable, or connections.can_close false,
the Rules list, Validate and Close disappeared and Overview said nothing,
as the base and m1 profiles show. The rule list and validation are now
resources in the list, and closing connections is a sub-item like manage.
Validation follows the loaded sources in honk (config.rs running), so it
joins the configuration's row when that is not loaded and is otherwise not
provided.

Flows that are off with no record_flows switch fell into "this version
lacks it". They are idle, so they go to that group, without the Settings
link when there is no switch to turn.
2026-09-28 02:35:45 +10:00
Zakk 9b4f284485 fix(activity): report a degraded datapath in the status as Overview does
Overview's header adds a degraded or failed datapath to the lifecycle
state, while Activity's status card showed the lifecycle alone, so the two
pages disagreed about one engine. engineStatus moves to features/shared and
takes the text for a missing lifecycle from its caller, since each page
words that case differently. Activity now reads the datapath and shows the
same text and tone; the card keeps its layout and its View details link, so
the status carries no link of its own.
2026-09-28 02:35:45 +10:00
Zakk 90222e3d15 test(overview): cover the limit rows, the recorders' help and the version link 2026-09-28 02:35:45 +10:00
Zakk 8e09674662 test(overview): cover the grouped limits, the Activity link and the header
The base profile's subscription service now reports it cannot refresh,
so its preview shows a service that is not running beside the other
causes a base honk can have at once. The overview spec checks each
group once with its features, the merged record snippet, the restart
note and the version docs link, the dots-only Backend features card,
the Activity link to the card and the degraded datapath in the header.
2026-09-28 02:35:45 +10:00
Zakk a95d5214c8 feat(overview): explain why backend features are off
Overview now lists the features that are off or limited before the
available ones, each with its state, the reason and, on honk, the
experimental.native_api setting that turns it on. Activity's status
card counts them and keeps its link to the details.
2026-09-28 02:35:45 +10:00
Zakk d52ce21ceb fix(activity): link the read-only mode help to the docs
The help linked README.md#install, which is now a short entry. It
opens the read-only section of the troubleshooting page in the UI
language instead.
2026-09-28 02:35:27 +10:00
Zakk d5535c20db feat(shell): link the docs site from sign-in and About
docsHref(lang, anchor) in src/features/shared/docs.ts builds the docs
site URL for the UI language, taking the page from docsAnchors.json,
which doona-docs holds to its own anchor map. Sign-in and About gain a
"Setup guide" link to the docs home in a new tab, and the sign-in link
for a honk build without the native API now opens the troubleshooting
section, since the README section it named moved to the docs site.
2026-09-28 02:35:27 +10:00
Zakk f078667a0c test(connections): measure a cut busiest host once it settles
The long-host cases read the host's edges once, right after the tile
marked it cut. CI once measured the mirrored case before the long name
had laid out (cut false, first character inside), so the edges are now
polled until they match.
2026-09-28 02:34:55 +10:00
Zakk 41a8c6f2be test(rules): take the landed write's operation from Location
The Cancel-after-landing test read the operation id from the 202 body. In
CI Chromium twice discarded that fulfilled body before json() read it
("No data found for resource"), failing the test and its retry. The
mock's accepted response also carries the operation's href in Location,
which needs no body fetch.
2026-09-28 02:34:55 +10:00
Zakk 0eebc24a7d fix(dns): show the device filter error under its field
The device filter marked its search field invalid, but its error was a
separate note below the toolbar with no aria-describedby, so a screen
reader did not read it with the field. The kit's search variant
ignored the error prop.

Give the search variant the same error slot as other text fields: the
box sits inside the field with a FieldError under it, and the structure
stays the same with or without an error so the input keeps focus. A
toolbar holding an invalid search field aligns its controls by their
top, so the error does not lift the box above its neighbours. The DNS
log passes its error through the field and drops the note.
2026-09-28 02:13:26 +10:00
Zakk 3cdaf1cd2a fix(config): keep a late new-file outcome out of a reopened dialog
The new-file dialog can close with Cancel or Escape while the create is
pending. A failure that arrived later was written into whatever form
was open by then, and a late success called the old dialog's close,
shutting a dialog the user had opened since.

Number each opening with useDialogSession, as the policy dialogs do.
An outcome for a closed dialog no longer touches the current one: a
failure goes to a toast naming the file, and a success shows its toast
without closing the dialog or opening the new file.
2026-09-28 02:13:26 +10:00
Zakk 263445ab31 fix(settings): report an unknown geodata update outcome as neutral
When the backend forgets the update operation while the page polls it,
settle() throws ui.operationUnknown and re-reads the data. The update
handler built its own negative toast, so the unknown outcome read as
"Could not update geodata" even though the update may have run.

Report the failure through toastFailure, which shows an unknown
outcome as a neutral notice and every other failure as before.
2026-09-28 02:13:26 +10:00
Zakk 4a95f97823 fix(events): cut a long summary beside its help button as other cells do
The help row put the summary in a plain span, so a cut summary lost the tooltip every other cut cell has and the phone spec found no cut text. The summary goes back into TextTooltip inside the row, and the spec expects the new gap wording.
2026-09-28 02:10:26 +10:00
Zakk 913caf2031 test(tables): tap a cut row at 320px in zh-CN
The phone spec ran at 390px, in English, with mouse clicks, so nothing
covered what a phone actually does. The new case taps a Logs row with
touch at the narrowest supported width in a CJK locale and checks that
the whole message is disclosed and hidden again.
2026-09-28 02:10:26 +10:00
Zakk b7cb1d7520 fix(tables): disclose cut row text on phones
At 390px the Events and Logs tables keep only their text column, and its
cells are nowrap with an ellipsis. Pressing a row did nothing and the table
does not scroll sideways, so the end of a summary or a log message, often
the error itself, could not be read. The Validation tab already solved
this by selecting the row and showing its detail under the table, but the
code lived in that page.

DataTable now takes a `detail` renderer: a row press, or Enter or Space on
the focused row, selects it (aria-selected) and renders the detail in a
polite live region under the table; a second press closes it. Validation,
Events and Logs use it. Nothing is rendered until a row is pressed, so the
layout is unchanged.

The DNS resolution log's Time column was 96px, which cut "17 seconds ago";
its minimum now fits the longest relative time.
2026-09-28 02:10:26 +10:00
Zakk 1ff1b1930f fix(api): give requests a deadline
A backend that accepts the connection and never answers left fetch
pending forever. Reads share one in-flight promise per key, so every
later refetch of that key waited on the same hung request and the page
never recovered.

send now aborts a request after 15 seconds for reads and 30 seconds for
writes, and reports it as a timeout. A write that timed out may still
have been applied, so its text asks for a reload before trying again.
A caller abort stays an abort. The event and log streams do not go
through send and keep their own silence limit.
2026-09-28 02:10:11 +10:00
Zakk 6fc8a5bbc5 test(e2e): edit the stale source in place in the faults spec
Sources are edited in place since the Edit button went away, so the faults spec waits for the writable editor instead of pressing Edit.
2026-09-28 02:07:38 +10:00
Zakk 8ccccc8886 test(e2e): cover the faults scenario's refused writes and failed refresh 2026-09-28 02:07:38 +10:00
Zakk 201f7ccc86 feat(mock): serve a healthy honk by default, faults on request
The default demo showed a degraded datapath, unavailable nodes, dropped
flow records, warning and error logs, a failed operation, config
warnings, DNS upstream failures, and a rule on geosite:discord that the
lite geodata files lack, so picking them made the update fail. Someone
trying the demo read these as bugs.

The default demo now has none of them. The chat rule becomes
geosite:openai, which every preset carries. The seeded faults move to an
opt-in scenario: localStorage doona-mock-scenario=faults, or
createMockApi({faults: true}) for the specs' in-process backend. It also
adds a geosite:category-ads-all rule so the lite preset still fails the
way honk refuses it. Specs about those states use the scenario.
2026-09-28 02:07:38 +10:00
Zakk 2e40bc1de1 fix(activity): say how to fix a routing block the mode cannot enter
When an ordinary rule sits before a must rule, the refusal now tells the
person to move the must rules to the top, and the toast names the rule in
the way on its second line instead of a generic write failure.
2026-09-28 02:07:38 +10:00
Zakk 14fc28692a fix(mock): put the demo's must rules at the top of routing
The demo routing section listed the doubleclick block rule before the two
direct(must) rules, so switching the outbound mode in the demo was always
refused. The must rules now lead, and the rule ids follow the new order.
2026-09-28 02:07:38 +10:00
Zakk 6e62549c85 fix(config): keep the source toolbar and note row lines fixed
The picker, badge and facts form one group whose flex basis decides
whether the buttons share its line, so a long path or a read-only badge
no longer pushes Export onto a line of its own; the path ellipsises from
its start instead. New file and Export wrap as a pair. The note row puts
its actions beside the note and renders no empty action group.
2026-09-28 02:07:06 +10:00
Zakk a3a7f163c7 test(e2e): check the read-only notice on a tap in WebKit too
The touch case for a read-only source ran only in Chromium, while the
installed iOS app runs in WebKit. It moves to the phone spec, which
both engines run, and now also checks that the tap draws no caret or
active line. A writable source is edited in place on this branch, so
the case uses the generated read-only source.
2026-09-28 02:07:06 +10:00
Zakk 5e4744eb82 fix(config): start every source editor at the same height
The validate row only rendered for writable sources, so a read-only
source's editor sat 44px higher. The row now always renders: the
source note on the left (or the unsaved hint while dirty), actions on
the right, and the note no longer repeats under the editor.
2026-09-28 02:07:06 +10:00
Zakk 13fd88453d test(config): wait for the reload before the 412 retry
The mock reloads the concurrent write about a second after it lands, and
until then a refetch still reads the old digest. A retry inside that
second is refused again with the same digest and reported as a disk
ahead of the running configuration, so the test passed in Chromium only
by timing and failed in WebKit. Wait until the new content is served
before pressing Apply.
2026-09-28 02:07:06 +10:00
Zakk 0ad887f297 fix(config): keep the read-only help only where it adds to the note
Each read-only source already says under its text why it cannot be
edited, and the help beside the badge repeated that for generated,
subscription, secret and redacted sources. The help now stays only when
writes are off, where it says how to turn them on. The notice shown on
an edit attempt uses the note instead.
2026-09-28 02:07:06 +10:00
Zakk f3143be5a9 fix(config): say under each source what it is and what can be done
The trimmed footer left most guidance behind the help buttons. Every
source with text now carries one visible line under it: for a read-only
source the reason and the way forward, from the same table as its badge;
for an editable one, that clicking the text edits it, that Validate can
check it, and that a file changed on disk is not overwritten.

The export warning is a visible line under the toolbar again, and the
help button beside Export that only repeated it is gone.
2026-09-28 02:07:06 +10:00
Zakk 8e166d88b8 test(e2e): stop pressing the source Edit button in other specs
Architecture, router, store, node, capability and completion specs
waited for or pressed the removed button; they now wait for the source
editor to become editable instead.
2026-09-28 02:07:06 +10:00
Zakk 1b21bcd522 test(config): cover in-place source editing and the read-only notice
Specs no longer press the source Edit button. New cases: a writable
source turns dirty on typing, goes clean again when typed back, and
Cancel leaves nothing to undo; typing, paste and a touch tap into a
generated source show the read-only notice once per visit and leave the
text unchanged. A redacted main source now shows its badge, and a
diagnostic opens an editable source at its caret line.
2026-09-28 02:07:06 +10:00
Zakk 4be6813358 test(config): cover the read-only reason badge
A generated source shows one badge with its help and offers neither
Validate nor Edit, while the main source keeps Validate and no badge.
The export warning is now read from the help beside Export, and a
read-only include no longer shows a disabled Validate.
2026-09-28 02:07:06 +10:00
Zakk ea9c7056c5 fix(shared): say when the configuration forbids a recorder
With allowed:false the empty Logs list and the empty distribution fell back
to "No log records yet" and "No flows in this snapshot", while Settings says
the recorder is disabled in configuration. recorderEmpty now checks the
configuration first and returns a forbidden key, before the Settings switch
and the filter.
2026-09-28 02:06:40 +10:00
Zakk 02e9f01f10 fix(events): keep the help button in view beside a long summary
The summary and its help button shared one nowrap cell that clips its
overflow. A flow.gap summary carries the flow id, the reason and a count, so
on a phone the button fell outside the cell and could not be opened.
HelpRow takes a fill option for clipped cells: the text shrinks with an
ellipsis and the button keeps its width. Rows without help keep the same
ellipsis as before.

The evicted reason read "flow records expired", but the contract lets
capacity pressure evict a flow before its retention time. The label now
says the flow was removed from the retained records, and the help names
both causes.
2026-09-28 02:06:40 +10:00