Skip to content

I3227 — A UI link a reader is about to follow is fetched ahead when the route is cheap and the connection allows it

First record from I3226's Server-Timing the document-fetch cost a prefetch would remove on a /ui navigation (documents are sent Cache-Control: no-cache, panels load as fragments) and the cockpit::csp directives a prefetch must satisfy; only if that cost is measured, prefetch on hover or focus the /ui links whose navigation carries it, skipping Save-Data and slow connections, with the prefetch list derived from the rendered links and the measurement, not kept. With no measured cost the issue closes as not needed and the criterion is withdrawn.

BLOCKED wave 1 · p3 · implementation profile · parallel safe

Part of the-ui-runs-and-explains — The UI runs any capability and explains what needs the owner, whose version it shows and where its time went.

Blocked. This issue cannot start until I3226 is done. The status is derived from that, not declared.

Objective

First record from I3226's Server-Timing the document-fetch cost a prefetch would remove on a /ui navigation (documents are sent Cache-Control: no-cache, panels load as fragments) and the cockpit::csp directives a prefetch must satisfy; only if that cost is measured, prefetch on hover or focus the /ui links whose navigation carries it, skipping Save-Data and slow connections, with the prefetch list derived from the rendered links and the measurement, not kept. With no measured cost the issue closes as not needed and the criterion is withdrawn.

Why

Owner, 2026-10-11: caching, preloading, URLs and a router. Prefetching a 50 s panel would harm, so it waits for I3226's measurement. Every system.http.ui.* screen is already under its 100 ms budget (I2489), so 'under its budget' alone separates nothing; ADR 0207 (proposed) keeps a mechanism without a measured problem open. Sources: chatgpt-majordomus:c223#2.

Current state

No prefetch in share/ui; panels already load as fragments after first paint.

Desired state

Either share/ui/ui.js prefetches only the links whose measured navigation cost a prefetch removes, proven by a browser case, or the issue is closed as not needed with the measurement recorded and the criterion withdrawn.

Scope

  • share/ui/ui.js
  • apps/majordomus-cli/src/ui/view.rs
  • apps/majordomus-cli/src/ui/mod.rs
  • .ai/repo/project/intents
  • .ai/repo/benchmarks/rust/policy.yaml
  • .ai/repo/benchmarks/rust/baseline.macos-aarch64-debug.json
  • .ai/repo/project/issues
  • apps/majordomus-cli/src/cockpit/mod.rs

Out of scope

  • Service workers
  • Prefetch on the published site
  • Prefetching /ui/panels fragments

Dependencies

Acceptance criteria

  • Repeat navigation to a prefetched screen is measured faster than without
  • No prefetch is issued under Save-Data
  • Before any prefetch code, the issue records I3226's Server-Timing measurement of the navigation cost a prefetch removes (a /ui document under Cache-Control: no-cache, panels excluded) and the cockpit::csp directives it must satisfy; if none is measured the issue closes as not needed and the criterion a-cheap-link-is-fetched-ahead is withdrawn from the intent
  • The proof is a browser case under test/cases numbered by scripts/case-numbers next that observes hover, focus and Save-Data; the PR rewrites the criterion to `evidence: test` with that case's path

Validation

  • majordomus bench --check
  • scripts/ui audit

Evidence required

  • browser case under test/cases observing hover, focus and Save-Data

Evidence

None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.

Timeline

started
—
verified
—
completed
—

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I3227.yaml. Read it back with majordomus plan show I3227.

Searches the titles and descriptions of every page this site publishes.