Repository navigation
feat(settings): connected computers rows for session history indexing - #20728
Merged
Merged
Conversation
Agent Session History now lists every computer that can hold an index -- this computer first, then each paired Orca server -- as one row with an icon, a name, a single status line and its own switch. Indexing consent is stated once above the list, and each row carries the switch for the host it names, so turning search on for a server no longer means finding that server's own settings. Server rows poll aiVault.searchStatus on the same 2s/10s cadence as the local one while the pane is visible, and report what the host actually answered: Off, a sweep in progress, or an up-to-date count. A server that is not connected stays listed but dimmed, with its last known switch position and no claim about its index. A host that refuses the set call with host-too-old flips to an update prompt that links to Remote Servers. The old "Enable session history search" switch and the separate index-status row are gone; their status copy moved to session-history-status-copy.ts and their polling to use-session-search-status.ts, so every row shares one message builder and one poll. Advanced > Delete index copy is unchanged and still local-only, and a paired web client still sees this computer alone. window.api.aiVault.setSearchEnabled is declared and bridged here but implemented by the parallel backend PR.
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Agent Session History settings become one list of computers. Each computer that can hold an index gets a row: a lucide icon, its name, a paired server's
Orca v…version, one muted status line, and its own switch. This computer comes first, then every paired Orca server from the runtime environment catalog. Consent is stated once above the list.Layout follows the approved mockup (layout A, text-only progress). No progress bars.
Why
The old pane had a single switch that only governed this computer, and a separate "Index status" row. A server could not be turned on from here at all, so the only way to index a paired host was to sit at that host. One row per computer puts the switch next to the host it acts on.
Row states
Search is off. Any existing index copy is kept.Indexing… N files so far/Indexing · 55% · a of b filesUp to date · N files indexedOffOffline · index kept as it was, row dimmedChecking index…Update this server to enable session search.+ anUpdate serverlink to Remote Servers, row dimmedTurning a server on opens the confirm dialog naming the host, then calls
setSearchEnabled(hostId, true)and adopts the status it answers with. Turning one off calls it directly with no dialog. Only that row's switch is disabled while a call is in flight, and any other failure surfaces on the pane's existingrole="alert"line asCould not change session search on {{host}}. Try again.A rejection whose message carries
host-too-oldflips the row into the update state rather than the error line. The match is a substring because IPC wraps a rejection's message.No SSH rows; one muted line under the card says SSH hosts appear once indexing is available there. A paired web client still sees only this computer, with the existing unsupported copy and every control disabled.
Structure
session-history-status-copy.ts— the status message builder and the 2s/10s poll cadence, extracted fromSessionHistoryIndexStatus.tsxso every row shares one wording.use-session-search-status.ts— the per-host poll, visibility-gated, keeping its last answer when a host goes inactive so an offline row reports it rather than inventing "off".SessionHistoryComputerRow.tsx— the presentational row.SessionHistoryServerRow.tsx— one paired server: connection state, poll, confirm, set, too-old.SessionHistoryIndexStatus.tsxis deleted; it had no other caller once its status moved into the local row.window.api.aiVault.setSearchEnabledis declared in both preload surfaces and bridged toaiVault:setSearchEnabled, because the type issatisfies-checked against the bridge. The main-process handler comes from the parallel backend PR; expect a small conflict in those three files.Tests
34 tests across three files:
SessionHistorySettingsPane.test.tsx— the local confirm gate, decline, off without a dialog, retention passthrough, save failure, Advanced disclosure, delete confirm and failure, unmount fencing, one row per paired server plus the SSH note, and a web client seeing only this computer.SessionHistoryComputerRow.test.tsx— row anatomy, a reachable server's live status and version,Off, an offline row dimmed and never polled, consent naming the host, decline, off without a dialog, ahost-too-oldrejection reaching the update state and its link target, and any other failure reaching the alert.use-session-search-status.test.tsx— the polling contract inherited from the deleted component: sweep vs settled cadence, first-scan counts vs percentage, degraded detail lines, absent service, recovery after a failed read, a synchronous bridge throw, hidden and inactive gating, refresh re-reads, no overlapping reads, and no polling after unmount.Gates