Repository navigation
feat(search): search every connected AO machine from Cmd+K - #7378
illegalcall wants to merge 2 commits into
Conversation
🏆 Review leaderboardOct 21–28, 2026 · UTC
Ranked by distinct external PRs reviewed, then review rounds, then PR comments. Self-activity and bot activity are excluded. Show 7 more reviewers
|
8af8249 to
722c47d
Compare
ab01af7 to
14fcd67
Compare
722c47d to
45a71d8
Compare
14fcd67 to
6ae6f81
Compare
45a71d8 to
5c53754
Compare
6ae6f81 to
a9cb29c
Compare
5c53754 to
de748c3
Compare
a9cb29c to
db0e4f6
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Changes requested. 2 correctness issues are recorded inline. Reviewed the requested head against its PR base (using the merge base for #7362). Static inspection only; project code, tests, and builds were not executed.
db0e4f6 to
fd6b7a1
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Changes requested. The previous host-identity and effective-sort findings are fixed. The new exhaustion check can hide remaining pages after deduplication; the required finding is recorded inline. Static inspection only; project code, tests, and builds were not executed.
d3c6193 to
1e9735a
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Changes requested. The earlier host/sort and duplicate-row pagination cases are fixed. One remaining paging issue is recorded inline: exhausted sources can still have fetched matches beyond the displayed slice. Static inspection only; project code, tests, and builds were not executed.
1e9735a to
0466cdb
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready for this stacked diff; no additional required changes found. The buffered-results fix keeps Show more available when exhausted machines have fetched matches beyond the displayed page, while preserving the earlier deduplication, host-identity, and effective-sort fixes. The separate base-PR review contains one remaining navigation finding. Static inspection only; project code, tests, and builds were not executed.
d434340 to
d2e388f
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready; approving this stacked diff with no required changes found. The restack retains the repeated-reveal fixes and host-qualified navigation, and the previously reviewed remote paging and effective-sort fixes remain intact. Static inspection only; project code, tests, and builds were not executed.
d595935 to
b8307e9
Compare
2edfb83 to
22f208a
Compare
a8619b8 to
aa73971
Compare
12f74f9 to
8284f80
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready for the changes introduced by this stacked PR. No required findings in the remote search delta: fanout, pagination, merge order, cancellation, and host-qualified routing/reveal remain consistent with the updated base. The repeated-command reveal regression inherited from #7362 is reported on that base PR. Static inspection only; project programs, tests, and builds were not executed.
e543ee7 to
6b4514c
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready. No required findings. The seven remote-search patches are unchanged from the previously reviewed version after restacking onto the repeated-command reveal fix in #7362. Reviewed the pinned head against its updated base and verified the patch series remains equivalent. Static inspection only; project programs, tests, and builds were not executed.
6b4514c to
df68a6e
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready. No required findings. The seven remote-search patches are unchanged from the approved version after restacking onto the unused-argument cleanup in #7362. Reviewed the pinned head against its updated base and verified the patch series remains equivalent. Static inspection only; project programs, tests, and builds were not executed.
df68a6e to
aa7818a
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready. No required findings. The remote search changes remain consistent after removing the dedicated Search page: Cmd+K sends the query and its fixed short limit, typed operators remain in q, and merging follows the local daemon's reported sort. Removed paging/filter infrastructure has no remaining callers or dangling imports. Reviewed the pinned head against its updated base and compared the revised series with the previously approved version. Static inspection only; project programs, tests, and builds were not executed.
7e55a7d to
932277a
Compare
Every document recorded the daemon's host name so a machine: operator, a --machine flag and a machine API parameter could filter on it. An index only ever holds one machine's sessions, so the filter matched everything or nothing, and no client read the field on a result. Searching across machines (#7378) is a merge in the desktop, which labels rows by the host it asked; it does not use this column. Removed: the machine column in search.db, the two filter clauses and their arguments, the operator, the CLI flag, the API parameter and the result field (openapi.yaml and schema.ts regenerated), and the host label wiring in the daemon. The schema version stays 1: nothing has shipped, and an older development index only carries an unused column. Also shortens the fourteen longest comment blocks in these files and three that described earlier behaviour or one-off measurements. The stemmer's comment no longer says it is checked against Porter's full vocabulary: that was a manual test, removed in 8cab247; TestPorterStemKnownWords still pins it. Verified: go test for domain, sessionsearch, controllers, store, daemon and telemetrymeta after the filter removal; go build, vet and gofmt after the comment edits, which change no code. cli passes except TestBrowserRequiresSessionAndValidWait, which reaches the live daemon and fails the same way on main. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
932277a to
0bce936
Compare
Every document recorded the daemon's host name so a machine: operator, a --machine flag and a machine API parameter could filter on it. An index only ever holds one machine's sessions, so the filter matched everything or nothing, and no client read the field on a result. Searching across machines (#7378) is a merge in the desktop, which labels rows by the host it asked; it does not use this column. Removed: the machine column in search.db, the two filter clauses and their arguments, the operator, the CLI flag, the API parameter and the result field (openapi.yaml and schema.ts regenerated), and the host label wiring in the daemon. The schema version stays 1: nothing has shipped, and an older development index only carries an unused column. Also shortens the fourteen longest comment blocks in these files and three that described earlier behaviour or one-off measurements. The stemmer's comment no longer says it is checked against Porter's full vocabulary: that was a manual test, removed in 8cab247; TestPorterStemKnownWords still pins it. Verified: go test for domain, sessionsearch, controllers, store, daemon and telemetrymeta after the filter removal; go build, vet and gofmt after the comment edits, which change no code. cli passes except TestBrowserRequiresSessionAndValidWait, which reaches the live daemon and fails the same way on main. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
aa7818a to
c9ce61a
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready. No required findings. Reviewed the pinned head against its updated base and verified the five remote-search patches remain equivalent to the approved series apart from test import context. Host-qualified routing, reveal/reviewer focus, and reading-position scope remain consistent; palette import commands are preserved. Static inspection only; project programs, tests, and builds were not executed.
0bce936 to
cd48744
Compare
c9ce61a to
4d91df2
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready. No required findings. Reviewed the pinned head against its updated base and checked that squashing preserves the prior remote-search fixes. Runtime fanout, merge order, timeout/cancellation, host-qualified routing and reveal, and local-only resume actions remain intact; the updated base consumes the same reveal fields. Static inspection only; project programs, tests, and builds were not executed.
cd48744 to
f9ada36
Compare
4d91df2 to
99343b8
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Changes requested: one P2 integration issue with the new optional local index. A terminal local search failure causes the palette to discard otherwise successful remote results. The remaining remote-search patches preserve the previously reviewed behavior. Static inspection only; project programs, tests, and builds were not executed.
99343b8 to
082a163
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready. The previous P2 finding is resolved: a terminal local search failure now allows successful remote answers to render while retaining the local error notice. Pending/placeholder isolation remains intact, and remote-only merging follows the daemon-reported sort. The added palette regression test covers local unavailability plus a healthy remote hit. Reviewed the pinned head against its base and the fix against the prior reviewed head. No remaining required findings. Static inspection only; project programs, tests, and builds were not executed.
f9ada36 to
2136170
Compare
082a163 to
9407928
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready. No required findings. Reviewed the pinned head against its updated base and compared the restacked patches with the approved version. The local-failure fallback, remote-applied sort, host-qualified routing/reveal, and remote connection behavior are preserved alongside the new main UI behavior. Static inspection only; project programs, tests, and builds were not executed.
2136170 to
3e2ea96
Compare
… query namedForQuery is set when the session's name holds every typed word. A caller merging results from several machines puts those sessions first without judging words itself, and an older daemon without the field simply falls into the second tier. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cmd+K asks this machine and every connected remote AO machine at once and shows one merged list. - Fan-out from the desktop, which already holds each remote's credentials (clientForHost): one query per connected machine, each with a 6 s limit. Saved machines that are not connected are reported without being asked. - Merge: machines' bm25 scores are never compared; lists take turns, this machine first, with sessions named for the query first. A sort:recent query merges by time. - Remote rows name their machine and open there, at the matched message. "Not searched on ..." lists every machine that did not answer and why (offline, connecting, timed out, needs an AO update, password refused, error); a failing machine never fails the search. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9407928 to
94f55f4
Compare
illegalcall
left a comment
There was a problem hiding this comment.
Ready. No required findings. Reviewed the pinned head against its updated base and compared the restacked patches with the approved version. Publishing the saved-host snapshot preserves the new host-list settled state and account cleanup. Remote query/reveal behavior and the local-failure fallback remain intact. Static inspection only; project programs, tests, and builds were not executed.
Code changes: +436 -33
Tests: +364 -4
Others: +66 -0 (9 locale catalogs, OpenAPI +
schema.tsfor one field)Two commits:
namedForQueryon each result (backend and API), then the cross-machine search in Cmd+K.Stacked on #7362, which adds session search on one machine. Review that first; this PR's diff is against its branch.
What
Cmd+K now searches this machine and every connected remote AO machine at once, and shows one merged list.
/host/$hostId/…). Find in chat opens there and searches that machine.Why
You asked to search across your machines from one place. The design follows from also wanting cloud projects included later.
clientForHost).So the desktop does the fan-out, rather than a daemon reading other machines' passwords from
remotes.json(the earlier proof of concept). Cloud projects become one more source later.Before / After
AzureLinux · you · app · codexGET /api/v1/search/sessionshas no name-match fieldnamedForQuerywhen its session's name holds every typed wordNo screenshots: this Mac can't build the Electron dev app (see Testing).
How
hooks/useRemoteMachineSearch.ts).clientForHost, each with a 6 s limit./api/v1/search/*to an authenticated desktop; its LAN and tunnel listener blocks only control routes.useRemoteHostspublishes (lib/saved-remote-hosts.ts), so nothing connects a second time.lib/session-search-machines.ts).namedForQuery, so the desktop never judges words itself, and an older AO simply falls into the second tier.Reviewers might focus on:
useRemoteMachineSearch.ts(timeout, cancellation, outcomes), the merge, and the two consumers inCommandPalette.tsxandSessionSearchView.tsx.Intentional omissions:
ao_eventsin PostgreSQL full-text search, scoped to the organization. Deferred by request.ao searchand agents still search only the machine they run on.Also fixed:
SessionSearchView.test.tsx's workspace mock pointed at./useWorkspaceQuery, a path the component doesn't import, so it never applied. It now mocks../hooks/useWorkspaceQuery, and the existing tests still pass.Testing
On this head (restacked 10 Nov on #7362
002cf732e2, which is rebased ontomaind429710c18):schema.ts.typecheckandtypecheck:e2eare clean.go build,go vetand the tests ofstore,sessionsearch,controllersanddomainpass. The last restack only removed feat(search): search every past session from Cmd+K and ao search #7362's 43-search ranking suite and reworded comments under this PR, so the frontend results andapispecare from the restack before it.What changed in the restack:
ANALYSIS.md), so this PR's commit that added a section to it is dropped. Nothing else was in that commit.CommandPalette:mainaddednavigateto a callback's dependency list where this PR addshostSessionRoute; both are kept.SessionChatSurface(from the previous restack): feat(search): search every past session from Cmd+K and ao search #7362 holds a result's match until its conversation is shown; this PR keys that hand-off, and the held match's owner, by host and session.The list below describes the tests this PR adds. Its run results are from when the PR was first pushed (28 Oct), on an 8 GB MacBook Air:
go build ./...andgo veton the touched packages.go test -race -count=1:domain,service/sessionsearch(including the name-tier test, which now also checksnamedForQuery),httpd/controllers(the field on the wire),httpd/apispec(+ spec drift),storage/sqlite/store. All ok.schema.tswere regenerated: +3 lines.useRemoteHostspublishes them for search.npm run typecheckandtypecheck:e2eare clean.@T0|@P0, two workers): 132 of 133 passed. The one failure ischat-composer-text-selection.spec.ts:139, which also fails onmainon macOS (seen on feat(search): search every past session from Cmd+K and ao search #7362).better-sqlite3for Electron 44 needs C++20; Command Line Tools clang 14). A two-Mac test (28 Oct) checked the per-machine API across a tunnel, the merge rules and the outcomes, but through the earlier daemon fan-out, not this desktop path. A live check needs two machines running this branch's desktop.CI: main's workflows now run only for non-draft PRs targeting
main(!draft && base_ref == 'main'). This PR is stacked on #7362's branch, so its full CI runs once #7362 merges and this PR is retargeted tomain. The last full run was 29/29 green on14fcd67ff8, the previous head.Checklist
main(or continuing an existing PR branch). Stacked on feat(search): search every past session from Cmd+K and ao search #7362's branch.go, frontend, etc.)🤖 Generated with Claude Code