Trim Host detail route below the 120 KiB gzip budget #84

Open
opened 2026-10-04 18:56:20 +00:00 by kayg · 9 comments
Owner

Problem and evidence

The cold Host detail route transferred 123,055 gzip-equivalent JavaScript bytes, 175 bytes above the normative 120 KiB (122,880 byte) limit. Containers was 117,684 bytes and passed. The browser captured cold routes in new documents with HTTP cache disabled at load1 25–28. Static-import-only analysis predicted 122,798 and missed 257 runtime bytes, so the browser capture is the valid evidence.

See browser-cold-results.json and browser-cold-timeline.json. Route capture lives in scripts/browser-check.mjs:4080-4118.

Recommendation

Trim at least 1–2 KiB from shared or Host detail route code to give the route headroom below the existing 120 KiB gzip cap. Verify all supported routes independently with shared and runtime-requested chunks included and terminal code lazy.

Payoff, effort and risk

Expected gain: bring Host detail below budget with headroom instead of aiming at the 175-byte edge.
Quick win vs deeper change: route-chunk inspection and a small import trim is estimated at ≤½ day; a larger feature split is not indicated by this measurement.
Risk: low; keep the route functional and preserve lazy terminal loading.

Priority: Now (≤1 day).

2026-10-04 owner decisions: Matches polished UI only within the performance budget and code/tests-as-spec. The normative unit is KiB; do not alter the cap to hide an overage.

Report: perf-audit report
Source: perf-audit 2026-10-04

## Problem and evidence The cold Host detail route transferred 123,055 gzip-equivalent JavaScript bytes, 175 bytes above the normative 120 KiB (122,880 byte) limit. Containers was 117,684 bytes and passed. The browser captured cold routes in new documents with HTTP cache disabled at load1 25–28. Static-import-only analysis predicted 122,798 and missed 257 runtime bytes, so the browser capture is the valid evidence. See [browser-cold-results.json](/mnt/hdd/infraternal/jobs/perf-audit/browser-cold-results.json) and [browser-cold-timeline.json](/mnt/hdd/infraternal/jobs/perf-audit/browser-cold-timeline.json). Route capture lives in scripts/browser-check.mjs:4080-4118. ## Recommendation Trim at least 1–2 KiB from shared or Host detail route code to give the route headroom below the existing 120 KiB gzip cap. Verify all supported routes independently with shared and runtime-requested chunks included and terminal code lazy. ## Payoff, effort and risk **Expected gain:** bring Host detail below budget with headroom instead of aiming at the 175-byte edge. **Quick win vs deeper change:** route-chunk inspection and a small import trim is estimated at ≤½ day; a larger feature split is not indicated by this measurement. **Risk:** low; keep the route functional and preserve lazy terminal loading. **Priority:** Now (≤1 day). **2026-10-04 owner decisions:** Matches polished UI only within the performance budget and code/tests-as-spec. The normative unit is KiB; do not alter the cap to hide an overage. **Report:** [perf-audit report](/mnt/hdd/infraternal/jobs/perf-audit/report.md) Source: perf-audit 2026-10-04
Author
Owner

Starting web-perf-now on branch web-perf-now, base head 069059d31fcd91366e76072e6be4871c01e5cde6. I am reading the three issue scopes and existing perf evidence, then will implement the precompressed asset serving, cold-route JS reductions, and normalized container search cache in this worktree.

Starting web-perf-now on branch `web-perf-now`, base head `069059d31fcd91366e76072e6be4871c01e5cde6`. I am reading the three issue scopes and existing perf evidence, then will implement the precompressed asset serving, cold-route JS reductions, and normalized container search cache in this worktree.
Author
Owner

#84 progress (branch web-perf-now, base 069059d)

Lazy-loading Sonner and its toaster reduced cold-route JS below the measured budgets. The final browser run measured host-detail at 116,431 gzip bytes (under 122,880) and container-detail at 111,285 (under 117,760); /containers is 111,793. Desktop/mobile screenshots were captured under /mnt/hdd/infraternal/artifacts/verify/web-perf-now-browser-final/browser/. The full browser gate fails on late /api/v1/containers 503/401 responses while the VM load is above its 8-CPU target, after route budget checks passed.

#84 progress (branch web-perf-now, base 069059d) Lazy-loading Sonner and its toaster reduced cold-route JS below the measured budgets. The final browser run measured host-detail at 116,431 gzip bytes (under 122,880) and container-detail at 111,285 (under 117,760); /containers is 111,793. Desktop/mobile screenshots were captured under /mnt/hdd/infraternal/artifacts/verify/web-perf-now-browser-final/browser/. The full browser gate fails on late /api/v1/containers 503/401 responses while the VM load is above its 8-CPU target, after route budget checks passed.
Author
Owner

#84 finished
Branch: web-perf-now
Base: 069059d31f
Head: 52fe3ae1da

Host detail moved from 123,055 gzip bytes (175 above the 122,880-byte cap) to 116,431, a 6,624-byte reduction and 6,449 bytes below the cap. The job's container-detail starting estimate was about 119.4 KB against its 117,760-byte budget; the final cold capture measured 111,285 bytes. The /containers list route measured 111,793 bytes. Route budgets passed in the final browser run.

Sonner and the shared toaster are loaded on the first notification; the UI layout and copy did not change. Captured browser artifacts include desktop host detail at /mnt/hdd/infraternal/artifacts/verify/web-perf-now-browser-final/browser/light-1440x900-host-detail.png, desktop container detail at /mnt/hdd/infraternal/artifacts/verify/web-perf-now-browser-final/browser/light-1440x900-container-detail.png, and a 390×844 shell screenshot at /mnt/hdd/infraternal/artifacts/verify/web-perf-now-browser-final/browser/light-390x844-settings.png.

scripts/verify fast exited 0. Verbatim output:

PASS fast: migrations are append-only (0.278s)
PASS fast: workspace package dependencies (0.205s)
PASS fast: gate target-directory and launch diagnostics tests (0.291s)
PASS fast: JavaScript dependencies (0.004s)
PASS fast: advisory review policy tests (0.195s)
PASS fast: supply-chain checks (5.837s)
PASS fast: build web app (14.103s)
PASS fast: cargo fmt --check (1.425s)
PASS fast: cargo clippy (21.444s)
PASS fast: cargo test (180.428s)
PASS fast: svelte-check (19.463s)
PASS fast: UI package svelte-check (7.484s)
PASS fast: stream package typecheck (7.103s)
PASS fast: Vitest (4.179s)
PASS fast: UI package Vitest (3.852s)
PASS fast: stream package Vitest (1.348s)
PASS fast: OpenAPI and TypeScript client drift (44.707s)
PASS fast: terminal TypeScript (2.703s)
PASS fast: terminal Vitest (1.457s)

The full browser step emitted its cold-route checks and screenshots, then failed: FAIL browser: Playwright against release server (324.222s). The final light/desktop page assertion found /api/v1/containers 503/401 console errors with VM load above the 8-CPU target. Browser UI review rules applied: shared primitives/tokens and existing accessible controls remained in place; the only visible behavior change is that the existing toaster appears on first notification. Skills used: emil-design-eng and better-ui, better-layout, better-typography, better-colors, better-accessibility, better-writing, better-interface.

#84 finished Branch: web-perf-now Base: 069059d31fcd91366e76072e6be4871c01e5cde6 Head: 52fe3ae1dac77f1294e473d9d647cb93f40624a6 Host detail moved from 123,055 gzip bytes (175 above the 122,880-byte cap) to 116,431, a 6,624-byte reduction and 6,449 bytes below the cap. The job's container-detail starting estimate was about 119.4 KB against its 117,760-byte budget; the final cold capture measured 111,285 bytes. The /containers list route measured 111,793 bytes. Route budgets passed in the final browser run. Sonner and the shared toaster are loaded on the first notification; the UI layout and copy did not change. Captured browser artifacts include desktop host detail at /mnt/hdd/infraternal/artifacts/verify/web-perf-now-browser-final/browser/light-1440x900-host-detail.png, desktop container detail at /mnt/hdd/infraternal/artifacts/verify/web-perf-now-browser-final/browser/light-1440x900-container-detail.png, and a 390×844 shell screenshot at /mnt/hdd/infraternal/artifacts/verify/web-perf-now-browser-final/browser/light-390x844-settings.png. `scripts/verify fast` exited 0. Verbatim output: ``` PASS fast: migrations are append-only (0.278s) PASS fast: workspace package dependencies (0.205s) PASS fast: gate target-directory and launch diagnostics tests (0.291s) PASS fast: JavaScript dependencies (0.004s) PASS fast: advisory review policy tests (0.195s) PASS fast: supply-chain checks (5.837s) PASS fast: build web app (14.103s) PASS fast: cargo fmt --check (1.425s) PASS fast: cargo clippy (21.444s) PASS fast: cargo test (180.428s) PASS fast: svelte-check (19.463s) PASS fast: UI package svelte-check (7.484s) PASS fast: stream package typecheck (7.103s) PASS fast: Vitest (4.179s) PASS fast: UI package Vitest (3.852s) PASS fast: stream package Vitest (1.348s) PASS fast: OpenAPI and TypeScript client drift (44.707s) PASS fast: terminal TypeScript (2.703s) PASS fast: terminal Vitest (1.457s) ``` The full browser step emitted its cold-route checks and screenshots, then failed: `FAIL browser: Playwright against release server (324.222s)`. The final light/desktop page assertion found /api/v1/containers 503/401 console errors with VM load above the 8-CPU target. Browser UI review rules applied: shared primitives/tokens and existing accessible controls remained in place; the only visible behavior change is that the existing toaster appears on first notification. Skills used: emil-design-eng and better-ui, better-layout, better-typography, better-colors, better-accessibility, better-writing, better-interface.
Author
Owner

Correction: a retry against committed head 52fe3ae1da again passed the cold route measurements and then failed the browser page-clean assertion: FAIL browser: Playwright against release server (318.534s), light/desktop, with /api/v1/containers 503/401 console errors. Load had fallen during the run, so the cause is not established; the previous note attributing it to VM load alone was too strong. The 116,431 host-detail and 111,285 container-detail gzip measurements still pass their budgets. The required fast gate remains green (verbatim output in the finish comment above).

Correction: a retry against committed head 52fe3ae1dac77f1294e473d9d647cb93f40624a6 again passed the cold route measurements and then failed the browser page-clean assertion: `FAIL browser: Playwright against release server (318.534s)`, light/desktop, with /api/v1/containers 503/401 console errors. Load had fallen during the run, so the cause is not established; the previous note attributing it to VM load alone was too strong. The 116,431 host-detail and 111,285 container-detail gzip measurements still pass their budgets. The required `fast` gate remains green (verbatim output in the finish comment above).
Author
Owner

Starting browser-green on branch browser-green, base 173525d8358a2576e681576605a7a7c5f1b9ebdd (dev). I’ll integrate web-perf-now and fix-containers-503, preserve all existing browser coverage, fix the 320px clipping and any remaining real browser failures, then run the full browser gate and INFRATERAL_VERIFY_RUN_ID=browser-green scripts/verify fast. No merge gate will be run.

Starting browser-green on branch `browser-green`, base `173525d8358a2576e681576605a7a7c5f1b9ebdd` (`dev`). I’ll integrate `web-perf-now` and `fix-containers-503`, preserve all existing browser coverage, fix the 320px clipping and any remaining real browser failures, then run the full browser gate and `INFRATERAL_VERIFY_RUN_ID=browser-green scripts/verify fast`. No merge gate will be run.
Author
Owner

Merged web-perf-now (52fe3ae1dac77f1294e473d9d647cb93f40624a6) as 1884249, then fix-containers-503 (82816b2a9531b54df8b16238cec90da9a2afc6bf) as 3937900. Resolved browser-check conflicts by retaining the dev host install and strict sticky-header checks, composing retry-recovery tracking with container request-ID diagnostics, and keeping both branches’ keyboard lifecycle coverage. Resolved verify conflicts by unioning cold-JS transfer metrics and container/sidebar diagnostic selectors.

Merged `web-perf-now` (`52fe3ae1dac77f1294e473d9d647cb93f40624a6`) as `1884249`, then `fix-containers-503` (`82816b2a9531b54df8b16238cec90da9a2afc6bf`) as `3937900`. Resolved browser-check conflicts by retaining the dev host install and strict sticky-header checks, composing retry-recovery tracking with container request-ID diagnostics, and keeping both branches’ keyboard lifecycle coverage. Resolved verify conflicts by unioning cold-JS transfer metrics and container/sidebar diagnostic selectors.
Author
Owner

The inherited 320px diagnostic recorded light/narrow: container table controls do not fit: the DataTable host-filter button SSH key rotation fix-containers-503-diagnostic measured 315.125px wide and ended at x=331.125px on a 320px viewport. The shared Pill chip fixes its height at 24px and keeps labels on one line. I changed only DataTable filter chips to allow their dynamic labels to wrap and grow while preserving the existing strict fit assertion.

The inherited 320px diagnostic recorded `light/narrow: container table controls do not fit`: the DataTable host-filter button `SSH key rotation fix-containers-503-diagnostic` measured 315.125px wide and ended at x=331.125px on a 320px viewport. The shared Pill chip fixes its height at 24px and keeps labels on one line. I changed only DataTable filter chips to allow their dynamic labels to wrap and grow while preserving the existing strict fit assertion.
Author
Owner

INFRATERMINAL_VERIFY_RUN_ID=browser-green scripts/verify fast reached fast: cargo test and failed one test: native_http::tests::failed_native_scan_diagnostics_keep_counts_without_payload_or_path panicked at crates/provider-bollard/src/native_http.rs:686:81 because an Option::unwrap() received None. The prior fast stages passed: migrations, workspace dependencies, gate-target diagnostics, JavaScript dependencies, advisory policy, supply-chain checks, web build, fmt, and clippy. I am inspecting the test's expected diagnostic shape and will rerun the full fast gate after a fix.

`INFRATERMINAL_VERIFY_RUN_ID=browser-green scripts/verify fast` reached `fast: cargo test` and failed one test: `native_http::tests::failed_native_scan_diagnostics_keep_counts_without_payload_or_path` panicked at `crates/provider-bollard/src/native_http.rs:686:81` because an `Option::unwrap()` received `None`. The prior fast stages passed: migrations, workspace dependencies, gate-target diagnostics, JavaScript dependencies, advisory policy, supply-chain checks, web build, fmt, and clippy. I am inspecting the test's expected diagnostic shape and will rerun the full fast gate after a fix.
Author
Owner

Finished browser-green on branch browser-green at head a10c3e43a86a2cc2d6a6fca86afc225c906ff390 (base 173525d). No push.

Merge conflict resolutions:

  • web-perf-now: retained dev's host-install checks, isolated sshd fixtures, sidebar/DataTable coverage, and perf selectors; combined them with the branch's keyboard menu flow and browser metrics.
  • fix-containers-503: retained stale-refresh recovery accounting and added the independent container status/path/request-id diagnostics; preserved the strict sticky-header check and combined cold transfer metrics with diagnostic selectors.

UI change: long host-filter labels wrap inside the DataTable toolbar using the shared Pill and tokens; other Pill instances keep their compact behavior. The real SSH fixture now has a long host name. The 320px check passed. Desktop, 390×844, and 320×640 screenshots are in /mnt/hdd/infraternal/artifacts/verify/browser-green/browser/. Applied emil-design-eng, better-interface, better-ui, better-layout, better-typography, better-colors, better-accessibility, and better-writing: scoped wrapping, shared tokens/primitives, deliberate text wrapping, unchanged control semantics/copy/colors/motion.

Full browser result: not green. Route checks, log controls, stream lifecycle, and all cold-JS route budgets passed (largest was host detail at 114,616 bytes, under 122,880). The long label passed at 320px. The remaining product-performance red is the log flood check; on the normal-priority run:

FAIL browser: Playwright against release server (515.601s)
error: log flood budget failed: {"lineRate":18081.587651361027,"fps":53.472987871403035,"frameIntervalP99Ms":66.60000000000002,"frameIntervalMaxMs":66.60000000000002,"frameIntervalsOver50Ms":2,"retained":10000,"bytes":210000,"dropped":23600,"renderedRows":20}

The strict budget was not changed. scripts/verify stops at that failure, so the separate terminal production first-load stage was not reached. An uptime sample immediately after the run showed load averages 16.81/11.60/8.27; contention may contribute, but it was not measured during the run and is unproven. The run therefore remains a real product-performance failure to investigate.

Fast result: the first run had one non-reproducing failure in failed_native_scan_diagnostics_keep_counts_without_payload_or_path; that test passed alone and the complete fast rerun passed all 19 stages. The final verify-summary.txt reported total 355.116s. Gate output:

PASS fast: migrations are append-only (0.274s)
PASS fast: workspace package dependencies (0.305s)
PASS fast: gate target-directory and launch diagnostics tests (0.349s)
PASS fast: JavaScript dependencies (0.052s)
PASS fast: advisory review policy tests (0.205s)
SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only
PASS fast: supply-chain checks (14.477s)
PASS fast: build web app (19.225s)
PASS fast: cargo fmt --check (4.926s)
PASS fast: cargo clippy (20.421s)
PASS fast: cargo test (202.155s)
PASS fast: svelte-check (12.915s)
PASS fast: UI package svelte-check (4.678s)
PASS fast: stream package typecheck (5.348s)
PASS fast: Vitest (4.671s)
PASS fast: UI package Vitest (11.512s)
PASS fast: stream package Vitest (0.819s)
PASS fast: OpenAPI and TypeScript client drift (49.170s)
PASS fast: terminal TypeScript (2.366s)
PASS fast: terminal Vitest (1.248s)

The browser-green labeled Docker and Podman container lists are empty. sshtarget authorized_keys was restored with sudo -n cp -a and verified with cmp (PASS sshtarget authorized_keys restored with cp -a and cmp). Commits: 5f38ae4 (UI wrapping) and a10c3e4 (strict browser fixture and frame diagnostics).

Finished `browser-green` on branch `browser-green` at head `a10c3e43a86a2cc2d6a6fca86afc225c906ff390` (base `173525d`). No push. Merge conflict resolutions: - `web-perf-now`: retained dev's host-install checks, isolated sshd fixtures, sidebar/DataTable coverage, and perf selectors; combined them with the branch's keyboard menu flow and browser metrics. - `fix-containers-503`: retained stale-refresh recovery accounting and added the independent container status/path/request-id diagnostics; preserved the strict sticky-header check and combined cold transfer metrics with diagnostic selectors. UI change: long host-filter labels wrap inside the DataTable toolbar using the shared Pill and tokens; other Pill instances keep their compact behavior. The real SSH fixture now has a long host name. The 320px check passed. Desktop, 390×844, and 320×640 screenshots are in `/mnt/hdd/infraternal/artifacts/verify/browser-green/browser/`. Applied `emil-design-eng`, `better-interface`, `better-ui`, `better-layout`, `better-typography`, `better-colors`, `better-accessibility`, and `better-writing`: scoped wrapping, shared tokens/primitives, deliberate text wrapping, unchanged control semantics/copy/colors/motion. Full browser result: not green. Route checks, log controls, stream lifecycle, and all cold-JS route budgets passed (largest was host detail at 114,616 bytes, under 122,880). The long label passed at 320px. The remaining product-performance red is the log flood check; on the normal-priority run: ```text FAIL browser: Playwright against release server (515.601s) error: log flood budget failed: {"lineRate":18081.587651361027,"fps":53.472987871403035,"frameIntervalP99Ms":66.60000000000002,"frameIntervalMaxMs":66.60000000000002,"frameIntervalsOver50Ms":2,"retained":10000,"bytes":210000,"dropped":23600,"renderedRows":20} ``` The strict budget was not changed. `scripts/verify` stops at that failure, so the separate terminal production first-load stage was not reached. An `uptime` sample immediately after the run showed load averages 16.81/11.60/8.27; contention may contribute, but it was not measured during the run and is unproven. The run therefore remains a real product-performance failure to investigate. Fast result: the first run had one non-reproducing failure in `failed_native_scan_diagnostics_keep_counts_without_payload_or_path`; that test passed alone and the complete fast rerun passed all 19 stages. The final `verify-summary.txt` reported total 355.116s. Gate output: ```text PASS fast: migrations are append-only (0.274s) PASS fast: workspace package dependencies (0.305s) PASS fast: gate target-directory and launch diagnostics tests (0.349s) PASS fast: JavaScript dependencies (0.052s) PASS fast: advisory review policy tests (0.205s) SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only PASS fast: supply-chain checks (14.477s) PASS fast: build web app (19.225s) PASS fast: cargo fmt --check (4.926s) PASS fast: cargo clippy (20.421s) PASS fast: cargo test (202.155s) PASS fast: svelte-check (12.915s) PASS fast: UI package svelte-check (4.678s) PASS fast: stream package typecheck (5.348s) PASS fast: Vitest (4.671s) PASS fast: UI package Vitest (11.512s) PASS fast: stream package Vitest (0.819s) PASS fast: OpenAPI and TypeScript client drift (49.170s) PASS fast: terminal TypeScript (2.366s) PASS fast: terminal Vitest (1.248s) ``` The `browser-green` labeled Docker and Podman container lists are empty. `sshtarget` authorized_keys was restored with `sudo -n cp -a` and verified with `cmp` (`PASS sshtarget authorized_keys restored with cp -a and cmp`). Commits: `5f38ae4` (UI wrapping) and `a10c3e4` (strict browser fixture and frame diagnostics).
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/infraternal-v0#84
No description provided.