Skip to content

feat(settings): connected computers rows for session history indexing - #20728

Merged
Jinwoo-H merged 2 commits into
session-search-verifyfrom
session-search-settings-hosts
Sep 14, 2026
Merged

Jinwoo-H merged 2 commits into
session-search-verifyfrom
session-search-settings-hosts

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​389 $\color{#cf222e}{\Huge{\mathbf{−}}}$​56 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​333
Prod 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​582 $\color{#cf222e}{\Huge{\mathbf{−}}}$​222 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​360

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

State Status line Switch
This computer, on the existing local status copy, plus the unreadable-files line and the stop hint on
This computer, off Search is off. Any existing index copy is kept. off
Server, indexing Indexing… N files so far / Indexing · 55% · a of b files on
Server, settled Up to date · N files indexed on
Server, disabled Off off
Server, not connected Offline · index kept as it was, row dimmed last known value, disabled
Server, still being probed Checking index… disabled
Server, too old Update this server to enable session search. + an Update server link to Remote Servers, row dimmed disabled

Turning 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 existing role="alert" line as Could not change session search on {{host}}. Try again.

A rejection whose message carries host-too-old flips 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 from SessionHistoryIndexStatus.tsx so 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.tsx is deleted; it had no other caller once its status moved into the local row.

window.api.aiVault.setSearchEnabled is declared in both preload surfaces and bridged to aiVault:setSearchEnabled, because the type is satisfies-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, a host-too-old rejection 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

pnpm tc                              exit 0
pnpm test <3 changed test files>     Test Files 3 passed (3), Tests 34 passed (34)
pnpm run check:code-quality:changed  Changed-code quality gate passed since 875b86d1688f
verify:localization-catalog          exit 0
verify:localization-runtime-catalog  exit 0
verify:localization-extraction       exit 0
verify:localization-coverage         Localization coverage check passed with 13 allowlisted candidates

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.
@pullfrog

pullfrog Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant