Trim Host detail route below the 120 KiB gzip budget #84
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Starting web-perf-now on branch
web-perf-now, base head069059d31fcd91366e76072e6be4871c01e5cde6. 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.#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 finished
Branch: web-perf-now
Base:
069059d31fHead:
52fe3ae1daHost 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 fastexited 0. Verbatim output: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.Correction: a retry against committed head
52fe3ae1daagain 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 requiredfastgate remains green (verbatim output in the finish comment above).Starting browser-green on branch
browser-green, base173525d8358a2576e681576605a7a7c5f1b9ebdd(dev). I’ll integrateweb-perf-nowandfix-containers-503, preserve all existing browser coverage, fix the 320px clipping and any remaining real browser failures, then run the full browser gate andINFRATERAL_VERIFY_RUN_ID=browser-green scripts/verify fast. No merge gate will be run.Merged
web-perf-now(52fe3ae1dac77f1294e473d9d647cb93f40624a6) as1884249, thenfix-containers-503(82816b2a9531b54df8b16238cec90da9a2afc6bf) as3937900. 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.The inherited 320px diagnostic recorded
light/narrow: container table controls do not fit: the DataTable host-filter buttonSSH key rotation fix-containers-503-diagnosticmeasured 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.INFRATERMINAL_VERIFY_RUN_ID=browser-green scripts/verify fastreachedfast: cargo testand failed one test:native_http::tests::failed_native_scan_diagnostics_keep_counts_without_payload_or_pathpanicked atcrates/provider-bollard/src/native_http.rs:686:81because anOption::unwrap()receivedNone. 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.Finished
browser-greenon branchbrowser-greenat heada10c3e43a86a2cc2d6a6fca86afc225c906ff390(base173525d). 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/. Appliedemil-design-eng,better-interface,better-ui,better-layout,better-typography,better-colors,better-accessibility, andbetter-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:
The strict budget was not changed.
scripts/verifystops at that failure, so the separate terminal production first-load stage was not reached. Anuptimesample 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 finalverify-summary.txtreported total 355.116s. Gate output:The
browser-greenlabeled Docker and Podman container lists are empty.sshtargetauthorized_keys was restored withsudo -n cp -aand verified withcmp(PASS sshtarget authorized_keys restored with cp -a and cmp). Commits:5f38ae4(UI wrapping) anda10c3e4(strict browser fixture and frame diagnostics).