Commit Graph
690 Commits
Author SHA1 Message Date
Zakk 07877041ae test(shared): restore cache and consistency regressions
Restore rule-write count and localization coverage, independent rule/file plurals, memoized flag and region lookups, and Settings registry-to-control consistency without restoring unrelated wording pins.
2026-10-28 06:58:10 +00:00
Zakk e69519974d fix(settings): release bitmaps after canvas failures
Close decoded wallpaper bitmaps even when canvas creation or drawing throws. Preserve the original error and successful encoding behavior, with a regression for the failure-path resource release.
2026-10-28 06:58:10 +00:00
Zakk 5cfe3df836 perf(features): avoid repeated traffic projection work
Choose the heaviest connection while building chart points, parse fallback queries once, and append DNS samples without copying accumulated buckets. Preserve projection output and correct the comments describing chart inputs.
2026-10-28 06:58:10 +00:00
Zakk a1c194c4e8 refactor(activity): remove obsolete projection forwards
Import mode projections and notice filtering from their owning modules. Remove the feature-level forwarding exports so the shared-module cutover has one canonical import path.
2026-10-28 06:58:10 +00:00
Zakk 459c9d753e test(features): remove redundant implementation assertions
Keep coverage at the owning modules and retain behavioral cases. Remove duplicate row-cache tests, global regex call-count spies and catalogue-only assertions that pin internals or wording instead of feature behavior.
2026-10-28 06:58:10 +00:00
Zakk 616b671d87 chore(features): remove unused exports and dialog state
Keep implementation types private, remove unused template option snapshots and the node-link re-export, and align comments with existing behavior. No consumer needs the removed surface.
2026-10-28 06:58:10 +00:00
Zakk 57898f9424 perf(features): avoid redundant projection work
Avoid quadratic bucket copies, repeated parsing and unused rule projections in node, policy and rule views. Preserve ordering, hit attribution, probe availability and generated rule text.
2026-10-28 06:58:10 +00:00
Zakk c877c33b7b feat(ui): explain unavailable features in place with the same text 2026-10-27 22:04:24 +00:00
Zakk 9ad4d40000 feat(ui): list unavailable features with the setting that turns them on 2026-10-27 22:04:24 +00:00
Zakk 6cb6d58d5b fix(ui): say why a feature is unavailable without wrong claims
Four hints said something honk does not do.

- holdsCredentials now matches honk's contains_api_secret: a source is
  refused only when a native_api or clash_api block under a top-level
  experimental section holds a secret or a nested block. Rule templates
  and the config page keep asking the adapter.
- Flow recording set to Off was described as recorded on demand. The
  adapter now reports auto as on demand, the Off mode as mode-off, and
  a configuration without record_flows as a recorder it turns off.
- Engine settings carry their full dotted name, so the geodata hint
  names assets.geodata.geosite and assets.geodata.geoip and the snippet
  is an assets { geodata { } } block; the text says honk refuses them
  beside the legacy experimental.native_api keys. settingName is gone.
- A source whose text does not match its hash is called incomplete,
  and redacted only when the backend reports secrets_redacted.
2026-10-27 21:43:13 +00:00
Zakk f13e5cdf65 docs: link the documentation at doona.daeuniverse.org 2026-10-27 06:08:09 +00:00
Zakk 0add7a08be refactor(ui): drop the Feedback forwarder, touch.css chunk and the table-cards state copy
Import the split feedback files directly and move each test beside its file. Fold the touch hit areas into the coarse-pointer block of foundations.css (+89 B gzip on startupCss, budget 30520 to 30620). Widen the CardView state selectors to table cards instead of repeating them. Feedback.tsx keeps two re-exports until Dialog.tsx and NodeGrid.tsx stop importing it.
2026-10-27 01:41:42 +00:00
Zakk 191b6a6fbd feat(rules): trace by firewall mark
The routing trace contract takes a mark, but the trace form had no field for it, so
mark() rules always stayed undecided. An advanced field next to DSCP takes the mark
in decimal or in the 0x hexadecimal form dae rules use, checks the unsigned 32-bit
range inline, and sends it only when filled.
2026-10-27 01:40:18 +00:00
Zakk e5e387c8b8 fix(settings): take the event capture grace from the engine
The note shown while event capture runs said every recorder has a 60 s grace, for any engine. 60 s is honk's flowDemandGraceSeconds; the contract leaves the value to the engine. The note now shows the engine's grace when the engine defines one and a version without a number otherwise.
2026-10-27 00:28:50 +00:00
Zakk 3a4c185ba5 fix(events): link only to pages the backend offers
A flow gap always linked to the recording settings and a generation change always linked to the configuration page, even when the backend left runtime_settings or config out of its capabilities, which the contract treats as unavailable. eventLinks now takes the advertised resources and drops a link whose resource is unavailable or not yet known; the row cache is keyed on the resources too.
2026-10-27 00:28:50 +00:00
Zakk 815b322f9b fix(flows): show step errors and the DNS status and query type
The DNS, outbound, connection and datapath step fields dropped the contract's error, and the DNS step also dropped status and qtype. Because a step with fields shows no raw JSON, an error the backend reported was never visible. Each branch now adds an Error row when the step reports one, and the DNS step shows its query type and answer status with the labels already used elsewhere.
2026-10-27 00:28:50 +00:00
Zakk 430ed00f87 fix(config): complete dns targets with upstreams instead of outbounds
Completion after `->` or `fallback:` offered groups and builtin outbounds
everywhere, including dns rules, where a target is an upstream or an
action. Inside `dns`, the list now holds the upstreams every source
defines (this one as edited) plus `asis` and `reject` in `request`, or
`accept` and `reject` in `response`, as the DNS rule contract allows.
Routing completion is unchanged.
2026-10-27 00:27:12 +00:00
Zakk 6cc1a844e7 fix(manage): count only probeable nodes and grade group test summaries
Test all on the Nodes page started and counted every listed node, so nodes
the backend cannot probe were reported as unavailable. It now probes only
the nodes the single-row test would offer, and is disabled with a reason
when none qualify.

The policy group test summary was always a positive toast. It now folds
the result the way a node test does: positive when a member answered,
negative when every finished member failed, neutral otherwise. The level
rule moves into probeLevel so both share it.

Group config values that are objects or lists render as compact JSON
instead of "[object Object]".
2026-10-27 00:27:12 +00:00
Zakk 3b93f5f8d5 refactor(ui): share chart tip rows, node path cell and card drag type
The area chart and the compact widget chart built their tip rows twice, connections and flows drew the same node cell twice, and the card drag type was defined in two files. Each now has one definition. Stale control size comments on tabs, cards and the widget layout migration are corrected.
2026-10-27 00:04:41 +00:00
Zakk f3aeb893b7 perf(ui): cut layout work on page switches
Profiles of page switches showed four sources of avoidable work:

- packSection wrote each card's data-wide attribute between reads, so
  every card forced a layout, and it looked up each card's line again
  for every row check; it now reads every card first, then writes, and
  reuses the lookups. Packing still runs synchronously on mount and on
  card changes, so the layout is final when a commit ends.
- useSlider and useOverflow measured synchronously in the commit and
  again from their ResizeObserver; only the observer measures now. The
  slider commits its marker inside the observer callback with flushSync,
  so a new tab bar paints with its marker.
- FitTags mounted every tag link only to hide most of them; the first
  pass renders plain probes, measures them together, and mounts only the
  links that fit. Focus on a fitted link survives a later re-measure.
- NodeGrid listed the onSelect callback among the collection
  dependencies, so each new callback identity rebuilt the Policies grid;
  only whether selection is enabled matters there.

E2E helpers that decide from layout-dependent state wait for the frame
in which a collapsed control or a resized chart settles.
2026-10-26 20:53:15 +00:00
Zakk 120f7f6c83 refactor(shell): replace the address alone before a reload
Saving a backend and signing out reload the app right after changing the
route, so the shell rendered a page the reload discarded. They now rewrite
the address with history.replaceState through replaceAddress, and the
urgent flag added to keep that render out of a transition goes away.
2026-10-26 20:29:29 +00:00
Zakk 260f728b28 fix(ui): block saving a blank backend URL and keep log actions in one row
A blank backend URL counted as the demo alias and saved; it is now an
error like any invalid URL, and the help text says to enter mock for the
demo. The log export and record settings stay in the toolbar row and wrap
as whole controls. Tests cover leaving an applied rule template, one
Escape closing search, the group draft prompt, the required name, number
ranges, the reload reason and the Save label.
2026-10-26 17:50:33 +00:00
Zakk 8a31bc10ca fix(shell): navigate urgently on submit and keep hidden pages idle
A route replacement during a form submit no longer starts a transition,
which threw "Failed to construct 'FormData'". Hidden rule and trace tabs
stop polling, verdicts of sources in use are never evicted, and tests
assert that retained hidden pages make no requests.

The startup budgets follow the size CI measures for this tree plus 0.3%:
login 213,700 and Activity 326,000 bytes gzip. CI builds about 0.7 KB and
1 KB larger than a local build.
2026-10-26 17:40:07 +00:00
Zakk 64f537cafe perf(shell): render page switches as transitions and reuse resources
A new page renders as a transition. Resources pass between pages as the
same snapshot, completeness verdicts are kept for the sources in use,
unchanged widget layouts are not saved, and the nav marker stays put.
tools/perf.mjs measures the longest task of each switch.
2026-10-26 17:40:07 +00:00
Zakk 4e7c37462a fix(settings): clear pending work a hidden page cancels
A page kept under a hidden <Activity> runs its effect cleanups and keeps
its state. The connection test's cleanup aborted the request but left
`pending` set, and the wallpaper row's cleanup dropped the image being
prepared before `choose` could clear its flag, so both buttons stayed
pending after the page was shown again. The cleanups now clear the flag
as well; the request and pick generations still keep a late result from
writing back.
2026-10-26 17:12:10 +00:00
Zakk 59aa58e2c8 fix(ui): make flow records, the DNS filter and empty tabs readable
Flow records are cards on a phone and the rule wraps on desktop. The DNS
device filter has a label, the empty trace and query tabs say what they
are for, and the connections group count no longer truncates.
2026-10-26 16:49:12 +00:00
Zakk 66bcd4c8a4 fix(shell): lead a first run with a connect card and keep the panel collapsed
A first run without a backend starts with a connect card. The floating
panel starts collapsed; it overlays Activity and Overview, whose layout
stays as it is, and reserves a column on other pages. Hub pages are set
apart from page tabs and touch targets are larger.

The startup budgets follow the size CI measures for this tree plus 0.3%:
login 213,600 and Activity 325,300 bytes gzip. CI builds about 0.7 KB and
1 KB larger than a local build.
2026-10-26 16:49:12 +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 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 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 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 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 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 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 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 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