Commit Graph
1098 Commits
Author SHA1 Message Date
Zakk b05593f086 fix(api): follow a caller's abort after garbage collection
Node's Request.clone() links the clone's signal to the original only
through a weak reference, so after a garbage collection an aborted read
or operation start kept waiting for its deadline. Reads now send the
original request, which has no body to protect, and the retry loop for
operation starts passes the caller's signal to send() explicitly.
2026-10-26 15:08:39 +00:00
Zakk c50fcac366 feat(nodes): paste several node links at once and test every listed node
The link field comes first, the batch list stays readable on a phone,
and one action tests every node in the list.

The startup budgets follow the size CI measures for this tree plus 0.3%:
login 240,300 and Activity 344,800 bytes gzip. CI builds about 0.7 KB and
1 KB larger than a local build.
2026-10-26 14:35:11 +00:00
Zakk fb540aed89 fix(ui): confirm destructive actions and show form errors at their fields
Suspend, clear and switching to direct or global mode now ask first,
like reload does. Form errors show under the field they belong to, and
a disabled submit says why.

The startup budgets follow the size CI measures for this tree plus 0.3%:
login 239,900 and Activity 344,300 bytes gzip. CI builds about 0.7 KB and
1 KB larger than a local build.
2026-10-26 14:24:13 +00:00
Zakk a611db090a fix(ui): name discarded drafts and translate interface terms
The discard dialog names the draft it drops instead of always saying
"this config". Interface terms that are not config keys or protocol
names are translated, and the rule save button says Save.
2026-10-26 14:24:13 +00:00
Zakk 01a369ae08 fix(policies): replace a masked check URL without testing it
honk masks a listener secret in a group's check_url as <redacted> and
tests a JSON Patch against the unmasked value, so the check settings
dialog's test op always failed with 409 and the URL could never be
changed. A masked opening URL now goes as a bare replace under the
request's If-Match, and a draft that still contains <redacted> is
refused, since honk would store the literal.
2026-10-24 18:18:49 +11:00
Zakk c04ae7fc59 fix(contract): type masked check_url reads
honk masks listener secrets in a group's check_url as the literal
<redacted>, which SafeHttpUrl's format: uri rejects. GroupConfig.check_url
now reads as MaskedHttpUrl, and the check_url patch value says that a
test with the masked value fails with 409 and a write stores it as sent.
2026-10-24 18:18:49 +11:00
Zakk bc1cfbe5f6 fix(settings): keep one pair of brackets on an IPv6 suggestion
location.hostname already brackets an IPv6 address, so wrapping it again
suggested http://[[::1]]:9527. The test now feeds a real URL.
2026-10-20 05:24:44 +11:00
Zakk 20429992eb fix(settings): suggest the backend only on http pages
An https page cannot call honk's plain-http listener, so it gets no
suggestion. While the field holds an unsaved address, the first-run
note says the demo data stays until the URL is saved.
2026-10-20 04:53:35 +11:00
qiuzi 8890314d4f feat(settings): prefill the backend address with this host's honk API
When no backend is saved yet, the backend address field suggests
http://<this-host>:9527 instead of starting empty, so a doona served
from anywhere on the LAN points at the router's native API with one
confirmation. Saved backends still win; the suggestion is only the
form's initial value.
2026-10-20 04:53:35 +11:00
Zakk ed40010b69 fix(rules): explain the blank process in a help button
The description line under the process field was wider than the field, so it
widened its grid cell and pushed DSCP onto a new row. The explanation moves to
the label's help button. A field label row with a help button now keeps the
label's own line height, so the 24 px button no longer pushes the input below
its neighbours.
2026-10-20 04:28:00 +11:00
Zakk 189324a912 fix(ui): keep wrapped table rows level across every cell
In a virtualised table with a wrapping column, a long cell grew its row while the
other cells kept the fixed 40 px height, so each cell drew its separator at its
own height and a long rule's row looked broken. Rows and cells of a multiline
virtual table now fill the box React Aria lays out for the row.
2026-10-20 04:27:54 +11:00
Zakk b7f7e3bfed fix(rules): trace a blank process as traffic without one
The trace form left pname out when the process field was blank, so honk treated
the process as unknown and every earlier pname() rule came back indeterminate,
even though forwarded LAN traffic, which has no process, routes fine. A blank
field now sends pname "", which honk evaluates as no process; the field says so.
2026-10-17 22:38:39 +11:00
eries 1d17ece272 fix(i18n): keep XHTTP help within startup budgets
Shorten XHTTP help in all three complete catalogues while retaining the defaults, validation, node-ID and download-peer guidance. Keep the existing size budgets: CI's Node 22 gzip output exceeded login by 10 bytes and Activity by 42 bytes.

Verify the production build and size gate with Node 22.23.3, matching CI, and inspect all three languages in the node dialog.
2026-10-12 04:46:12 +11:00
eries c59a9aec81 fix(nodes): simplify XHTTP drafts and shared saves
Keep pending headers in the node draft and run link preflight inside the shared source-save transaction. Apply only changed XHTTP fields, preserve empty headers, encode apostrophes, and explain missing edit fields.

Quote generated node declaration keys uniformly and lazy-load dialog-only subscription fields without increasing size budgets. Update regressions and user documentation.
2026-10-12 04:46:12 +11:00
eries 716ab20b0f fix(nodes): quote a node named mux where its declaration is written
honk reads a bare `mux:` line in a node section as the removed standalone
mux setting and rejects it, so the edit check refused a valid link for a
node named mux and renaming a node to mux broke the source. Write and
check that one name quoted; group and DNS references stay unchanged.
2026-10-12 04:46:12 +11:00
eries 811db1cf30 feat(nodes): edit XHTTP link options as fields
Show a vless or trojan XHTTP link's mode, path, host, headers, padding,
POST pacing and download peer as fields that rewrite only their own part
of the link. Check an edited link with honk's syntax validation before the
source write, so a link honk would skip is refused with its reason, and
refuse links over the 8192 characters node creation accepts.
2026-10-12 04:46:12 +11:00
Zakk cedc7759a7 feat(settings): let Liquid Glass keep refraction while scrolling
Settings > Appearance gains a switch, on by default, for the scroll pause. Turned off, the root carries data-lens-steady and lens.ts no longer pauses the lens. The Glass rows (wallpaper, blur and this switch) now load with the Glass palettes only, which keeps the Settings route within its size budget: 72,866 bytes over a 72,800 limit inline, 67,133 lazy.
2026-10-12 00:56:19 +11:00
Zakk 201f0a2118 perf(glass): pause the lens while the page scrolls
Chromium redraws every lensed backdrop on the CPU each frame the page moves under it: about 11 ms a frame on a desktop page of cards, enough to drop to 42 fps on an RTX 4080. While the page scrolls, and for 150 ms after, the root carries data-lens-paused and the lens tokens fall back to the same blur and colour without the refraction. Scrolling measures at 60 fps with 0.3 ms of compositor draw, the same as Clear.
2026-10-12 00:56:19 +11:00
Zakk 7d1237ecf2 feat(ui): look up public addresses on IP sites
Clicking a public address in the connection details or a DNS answer opens a menu of ipinfo.io, ipapi.is, ip-api.com and bgp.he.net. The chosen site opens in a new tab without a referrer; nothing is requested before that.

DNS answers now lead with the record data, followed by the type and TTL, and show the owner name only when it differs from the name asked for.
2026-10-09 22:45:21 +11:00
Zakk 49829f1016 fix(policies): preserve node focus and fade busy lists
Native disabled buttons blur the focused node during selection requests.
Use React Aria's pending state to block presses while retaining focus.
Fade both list containers at half opacity without adding busy to virtual
row dependencies, and remove the unused node disabled styles.
2026-10-09 06:36:56 +11:00
Zakk 5a044cbfba fix(policies): keep node rows focusable while a selection is pending
A pending selection listed every node in disabledKeys with the default
disabledBehavior, so the focused row lost its tabIndex during React's
commit. Chromium blurred it while React's event dispatch was off, and
react-aria kept the row marked focused, leaving a focus ring on rows the
user had clicked away from. Disable only selection while busy, so rows
stay focusable, and drop the data-focused guard the CSS no longer needs.

The e2e test now clicks through real rows instead of injecting the
stale attribute.
2026-10-09 04:56:01 +11:00
Zakk 57941fd69c fix(nodes): give the details card's groups a full-width row 2026-10-09 04:32:41 +11:00
Zakk 3b10d8e1d1 fix(events): hold the anchor only while the page scrolls
A sideways swipe on the table, or a wheel or swipe taken by a box that
scrolls on its own, left the page still but suspended prepend
compensation, so new rows pushed the row being read down. Start the
hold only for a vertical wheel the page receives, or a mainly vertical
touch movement that did not start in such a box.

Raise the route budget by 100 bytes for the shared table chunk.
2026-10-09 04:18:43 +11:00
Zakk 2f3f0d63d5 fix(i18n): match the zh-CN empty DNS cache wording 2026-10-09 03:57:37 +11:00
Zakk b52bfa4784 fix(auth): name the address limit when setup is refused 2026-10-09 03:57:37 +11:00
Zakk ae0d0f5f48 fix(dns): say no cache entries when nothing is filtered 2026-10-09 03:57:37 +11:00
Zakk d3c1bac6d6 fix(nodes): keep newly added node actions usable
Keep menu item identities stable as config-backed actions appear, and refresh config after node changes so editing does not require a reload. Separate menu choice IDs from internal commands and retain configured transports in demo nodes.
2026-10-08 03:44:22 +11:00
Zakk 0252b60f61 feat(nodes): show the configured stream transport
Display transport information reported by the backend while preserving protocol filters and compatibility with older responses. Keep XHTTP share links intact through node creation and editing.
2026-10-08 01:47:22 +11:00
Zakk 7375cd7d8f fix(policies): require focus for node keyboard outlines
Ignore stale focus-visible attributes on unfocused node rows so they cannot resemble additional selections. Preserve the active keyboard outline and selected borders.
2026-10-07 20:36:07 +11:00
Zakk a31a516988 fix(policies): update selection borders immediately
Exclude node borders from color transitions so rapid switches do not leave a visible ring on the previous selection.
2026-10-07 19:25:03 +11:00
Zakk a7106ddddb fix(glass): preserve collapsed toast stacking
Remove the Glass positioning override so background notifications retain their shared absolute stacking layout.
2026-10-07 19:05:51 +11:00
Zakk e88a0d66a6 fix(rules): place template help beside its title
Lay out radio titles and contextual help together so longer descriptions cannot push the info button away from its title.
2026-10-07 19:05:46 +11:00
Zakk 364d2b1e6d feat(policies): collapse region choices by default
Keep the group editor compact by placing region choices in the existing disclosure. Preserve selected tags and the checklist accessible name.
2026-10-07 17:27:10 +11:00
Zakk b1a7ac5b05 fix(auth): preserve generic permission refusals
The backend uses permission_denied for both HTTP policy and administrator setup restrictions. Show the existing localized permission error and request ID instead of assuming every refusal concerns setup peer addresses.
2026-10-07 05:37:20 +11:00
Zakk 18df090f0c fix(dns): apply cache matching to displayed entries
Use the existing bounded matcher for both the cache table and deletion candidates. Expose filtering for read-only caches and make linked domain criteria visible and clearable.
2026-10-07 05:37:20 +11:00
Zakk 5d0645d7fe fix(glass): restore toggle states and empty-table surfaces
Keep selected quiet controls visibly distinct and let empty table messages share the surrounding glass material. Cover each material in a separate browser regression case.
2026-10-07 05:37:20 +11:00
Zakk b2e86482ba perf(glass): reduce page-flow table filtering
Keep blur and colour treatment on long Events and Logs tables without applying the SVG lens over their full height. Preserve refraction on other glass surfaces and cover nested tables and accessibility overrides.
2026-10-07 04:08:34 +11:00
Zakk d41633f996 fix(widgets): stabilize editor scrolling and preview scale
Keep gallery cards clear of the column scrollbar and remove the horizontal
fade where the three-column gallery scrolls vertically. Reserve the preview
scrollbar gutter so its appearance cannot trigger a resize feedback loop.
2026-10-07 00:43:26 +11:00
Zakk 2ef4f1fed2 fix(events): let wheel scrolling override prepend anchoring
Prepending live rows can move the viewport down while the user scrolls up. Yield anchoring during vertical wheel or touch movement and resume it after scrolling settles.

Seed the healthy demo with 200 visible Events and Logs records to exercise scrolling with a full table, and cover active and stationary anchoring.
2026-10-06 22:52:26 +11:00
Zakk 9be7d4c16f fix(ui): commit font label widths before packing 2026-10-06 06:07:00 +11:00
Zakk 903a5842d9 fix(table): release selection setter chains on row updates 2026-10-06 04:47:12 +11:00
Zakk 9839b3430f fix(events): key event rows by kind and id (#502)
A user on beta.14 (Chrome 154, 32 GB) hit "Out of Memory" on the Events
page by switching between Connections and Events. Reproduced in the KVM
lab against honk debug.2026.10.4.native-api.2: 30 switches crash the
tab; JS event listeners on Events grew from 546 to 4813 in 3 minutes
while DOM stayed flat, and the heap held a chain of React Aria
`setFocusedKey` wrappers retaining old collections.

Cause: an event's id is its stream cursor, and the `stream.ready` that
opens a resumed stream repeats the cursor of the event before it (see
`src/store/events.ts`). The Events table (`src/features/events/view.ts`)
and the notices (`src/features/activity/view.ts`, notice feed in
`src/store/logs.ts`) keyed rows by id alone, so each reconnect, which
every Connections/Events switch causes, added a duplicate key.

Fix: `eventKey` (kind + id) for those rows and the notice feed, as the
events feed already keyed. With row keys changed to kind + id, the same
30-switch run no longer crashes.

No UI change. Unit tests updated; e2e runs in CI.
2026-10-06 04:10:20 +11:00
Zakk 13959afdd8 fix(session): keep a password sign-in across tabs and restarts
The password session lived in sessionStorage, so closing the tab or the
browser signed the user out and every new tab asked for the password
again. honk already bounds the session (12 hours, held in memory) and
doona drops it on the backend's 401, so the tab gave no extra safety.

Keep it in localStorage under the same key and shape, still bound to the
profile and endpoint. Every tab now shares it: a sign-out or an ended
session clears it for all of them through the existing storage event.
Deleting a profile drops a session left for it. A copy left in
sessionStorage from before is ignored, so a tab open across the update
signs in once more and an old copy can never return after a sign-out.
2026-10-05 22:09:13 +11:00
Zakk 423e6102a5 fix(ui): keep the menu rule clear of a focused row
The rule above a menu's closing commands sat flush against the rows on either side, so a focused or hovered row's ring was drawn over it. It now gets 4px above and below.
2026-10-05 21:51:28 +11:00
Zakk 2e59a9b07d feat(diagnostics): explain missing offline dependencies
honk reports a file the configuration depends on that cannot be read as
missing-offline-dependency, offline-dependency-denied,
invalid-offline-dependency or unreadable-offline-dependency, with an
English message that names neither the file nor the setting. The Config
page, pending rule failures and the routing mode dialog now explain these
codes in the page language and keep the backend words under Details. The
explanation lives in its own module, outside the sign-in entry chunk.

A geodata update in honk replaces only the files it has loaded, and it
lists only those. The routing mode dialog therefore reads the geodata
kinds the template writes: when every needed kind is loaded and the
backend can update, it offers Download geodata to repair the files;
otherwise it names the needed file honk never loaded, or a loaded one
left empty, and links to the install docs. After a download only the
refusal it answered is cleared, so closing and reopening the dialog
meanwhile keeps the new errors.

The Settings card and the dialog share one geodata update per backend,
so either shows it busy and its result toasts once.
2026-10-05 21:30:02 +11:00
Zakk 19ba0136cb feat(shell): open the Appearance tab from the palette menus
The top bar palette menu and the phone overflow menu's palette list end with an Appearance settings row that opens Settings on its Appearance tab. The sign-in page keeps its menu as it was, since Settings is not open to it yet.
2026-10-05 21:21:50 +11:00
Zakk 666b126ac7 feat(settings): give appearance its own tab
The top bar, sign-in and phone palette menus are plain text rows again,
with only the Liquid Glass note at the end of its row.

Settings gets two tabs on the shared Tabs component: General holds the
backend, runtime, geodata, probe and about cards, and Appearance holds the
appearance settings with the palette grid always open. The tab lives in
?tab=appearance; a ?card= link or a search hit for an appearance setting
opens that tab, and the landing waits for a tab mounted a render later.
Both panels stay mounted and a switch replaces the address, so a backend
draft survives it without the discard prompt; leaving Settings still asks.

The Settings route now loads the Tabs chunk: locally 71865 bytes gzip, so
the route budget rises from 71000 to 72100.
2026-10-05 21:21:50 +11:00
Zakk cd52bc6e34 perf(ui): load Glass only for Glass palettes
Glass's materials and tokens (about 4 KB gzip of startup CSS) and the wallpaper
module shipped at startup for every palette, though only the Glass palettes use
them. The stylesheet is now its own asset and the wallpaper code its own chunk,
src/shell/glass.ts.

For a stored Glass palette the first-paint script writes the stylesheet link
(its hashed name filled in by the build), so it blocks the first paint like the
main stylesheet and no frame shows the non-Glass base; the wallpaper may arrive
after the first render, as before. A picked Glass palette applies only once the
stylesheet has loaded, so its look changes in one step. The palette menus and
the Settings picker preload it on intent; a stale build reloads the page as
elsewhere.

The link goes before every other stylesheet, where theme.css used to import it,
so it keeps losing the same cascade ties to later rules and to page
stylesheets; screenshots of all four Glass palettes and Rose Pine on Activity,
Settings and Rules match the previous build.
2026-10-05 19:45:27 +11:00
Zakk b405ac7d31 fix(shell): catch up with a navigation made before the route listener
useRoute reads the address in its state initializer during the first
render but subscribes to popstate in a passive effect. A hash change that
lands in between fires no listener, so the shell keeps showing the page it
first read while the address already points elsewhere. Under load the
startup render and its effects are far enough apart for a quick
#/rules -> #/activity?card=mode sequence to land in that gap.

After subscribing, the effect now compares the address with the route it
holds and handles a mismatch as a navigation. It compares with the
accepted route, a ref that push and the popstate handler set together
with the state, not with the rendered route: a page can replace the
address in the same commit, as settings does when it strips a pairing
link's credentials, and that must not be taken for a navigation that
restores the link and asks about the draft.
2026-10-05 19:37:14 +11:00
Zakk 570bf9f9b6 perf(rules): load the trace tab when it is pointed at
The trace tab's number fields pull in React Aria's NumberField stack,
about 8 KB gzip of the rules page's growth since beta.14. The tab now
lives in its own module, loaded when its tab is pointed at, focused or
opened, with its form card's Skeleton for a direct link. The form state
stays in the page, so what was typed survives a tab switch.

Rollup keys a page that shares code with its own lazy part by chunk file
instead of source, so check:size finds such a page through the part and
counts the part as what it adds to the page, under its own routePart
budget. Opening the trace tab directly costs about 2 KB more than before
(two gzip streams instead of one); the rules page alone is 13 KB lighter.
2026-10-05 19:05:37 +11:00