5.9 KiB
X1-wire — register Search in the shell and /search
Scope
Wired the landed SearchScreen into the normal PipelinesApp composition. No
search internals, features/pipelines, features/chat, features/graph,
features/artifacts, server, web, Android or iOS files were changed.
Behaviour
- The existing shell gains a native search action without a fifth tab:
Material
AppBarIconButton(tooltip: Search) and CupertinoCupertinoNavigationBartrailing button (semanticLabel: Search). The tab set staysPipelines / Runs / Chat / Settings. AppRouteKind.searchwith the total path/search./search/normalises,/search/1and other unknown paths still parse to/pipelines.- Search is a transient full-screen dialog page above the shell (standard
Material close icon, Cupertino
Cancel), so closing is a normal native action and the shell below is never remounted.openSearchrecords the previous route; Close, system Back (popRoute) andonDidRemovePagereturn to it. Browser Back/Forward go through the ordinary Router history. - Escape closes the page (the browser's search-panel shortcut) through
CallbackShortcuts. - The field is focused on open. Material mounts the screen immediately;
the Cupertino page waits for its entrance to complete, because a focus
request during that transition is dropped (the landing screen was visibly
unfocused without this). A post-frame then mounts
SearchScreen, whose existingautofocustakes effect. - Requests use the one shared
AppSessiongateway (session.gateway); the screen and page open no socket. Before the first connection the destination shows the existing nativeConnectionGatein the same title bar. - Results keep the screen's
onOpencontract: the server hit map is passed through unchanged. Only a run-family hit (run.id, orstep/field/artifact .run_id) is opened, through the existing/runs/:idroute. No route is invented for pipeline/version hits; those rows still callonOpenbut this app has no pipeline-detail route to open yet.
Files
lib/application/app_route.dart— search kind, path, parser branch.lib/application/app_router.dart— search page, open/close return route, native dialog chrome, system Back, page-removal callback.lib/application/pipelines_app.dart— registration, Escape shortcut, run-target passthrough,onSearchon the shell.lib/application/search_destination.dart(new) — connection gate, shared gateway, Cupertino focus mount,searchHitRunId.lib/shell/adaptive_shell.dart— optional native search action.test/application/app_route_test.dart—/searchparse/serialise/fallback.test/application/search_wiring_test.dart(new) — focus, close/state, result routing, one socket, Cupertino close, hit helper, system Back.tool/runs_probe_server.mjs— additivesearchbranch andsearchRequestsfixture state (the Runs probe behaviour is unchanged).tool/search_wiring_probe.mjs(new) — real-browser acceptance driver.
Checks
Run from app/ with /Users/alan/development/flutter/bin/flutter:
flutter analyze— No issues found.flutter test— 837 passed (whole app suite).flutter test test/application test/features/search test/widget_test.dart— 87 passed.flutter build web(defaultlib/main.dart) — succeeded.flutter build web -o build/search_wiring_web— succeeded for the probe.node --check tool/search_wiring_probe.mjsandnode --check tool/runs_probe_server.mjs— passed.- Probe exit 0. Evidence: both hosts opened
/searchwith the field as the focused browserINPUT; the exact request was{"query":"fixture","kind":"","limit":0}; the run row opened/runs/1; Escape returned to the same retained run detail withgetRununchanged (1); browser Back returned to/runswithlistRunsunchanged and the transient page gone; the fixture sawconnections: 1for the whole Material run; both boots subscribed on the existing socket (subscribed: 2). - Real Chrome (headless, CDP) against an isolated websocket fixture on an OS-assigned loopback port; no production or operator data.
Captures (shared artifacts, both hosts, phone and desktop):
x1-wire/x1-wire-material-search-phone.pngx1-wire/x1-wire-material-search-desktop.pngx1-wire/x1-wire-material-run-from-search-phone.pngx1-wire/x1-wire-material-escape-restored-phone.pngx1-wire/x1-wire-cupertino-search-phone.pngx1-wire/x1-wire-cupertino-search-desktop.pngx1-wire/x1-wire-cupertino-back-restored-phone.png
under /Users/alan/.local/share/pipelines/data/artifacts/88/public/.
Not verified / remaining
- Pipeline and version hits do not navigate: no pipeline-detail route exists in the app yet (PARITY target routing remains open). Step/field/artifact hits open their run but not the recorded visit/sequence or field tab.
- Mobile targets were not built, installed or exercised; only Web was rendered. The Cupertino focus handling is covered by widget tests and the macOS-UA web probe, not an iOS device.
- Live authenticated production search was not exercised.
- No commit, push, deployment or canonical URL change was made.
Manager completion after an infrastructure failure
This run ended with the server reporting constraint failed: UNIQUE constraint failed: step_file_changes.run_id, step_file_changes.sequence (1555) — a server
persistence bug in file-change capture, not a fault in this slice. The same
failure hit the parallel run-graph slice. The retained edits were complete: the
manager ran the application suite (45 tests pass), inspected the route/shell
changes, and merged them. The server defect is recorded in WORK.md and is being
fixed with a regression on the server side; no retry of this app slice was needed.
Evidence for the wiring is the focused suite plus the real-app probe run after landing; the server failure means this run's own stage evidence is incomplete.