diff --git a/.github/workflows/performance-contracts.yml b/.github/workflows/performance-contracts.yml index c2c330ea00f..e8132e2aa79 100644 --- a/.github/workflows/performance-contracts.yml +++ b/.github/workflows/performance-contracts.yml @@ -19,7 +19,6 @@ on: # Contracts without the .performance suffix. Keep in sync with config/vitest.performance.config.ts; # without these a rename lands green and only breaks the next nightly. - 'src/main/runtime/session-tabs/session-tabs-phone-layout-moves.test.ts' - - 'src/renderer/src/components/terminal-pane/pty-connection/startup/saved-resume-cancellation.test.ts' - 'src/main/native-chat/agent-session-wire/host/testing/structured-agent-session-terminal-writer-acquire.test.ts' - 'src/shared/agent-launch/permissions/tui-agent-permission-choice.test.ts' - 'src/main/runtime/rpc/methods/projects/repo.test.ts' diff --git a/config/main-sync-fs-baseline.txt b/config/main-sync-fs-baseline.txt index a4efe1beedc..67ac9d1f775 100644 --- a/config/main-sync-fs-baseline.txt +++ b/config/main-sync-fs-baseline.txt @@ -282,6 +282,7 @@ 1 src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-subscribe.ts 1 src/main/ipc/filesystem/watcher-process/rebinding-file-watch.ts 1 src/main/ipc/filesystem/watcher-process/watcher-event-root-path-rewrite.ts +1 src/main/ipc/floating-workspace-directory.ts 1 src/main/ipc/macos-keyboard-layout-snapshot.ts 1 src/main/ipc/notification-authorization-status.ts 1 src/main/ipc/pty/spawn-pane-env.ts diff --git a/config/reliability-gates.jsonc b/config/reliability-gates.jsonc index 66ecfbe88cb..ba5ff1a6f61 100644 --- a/config/reliability-gates.jsonc +++ b/config/reliability-gates.jsonc @@ -2175,30 +2175,23 @@ "providers": ["local", "daemon", "wsl", "ssh", "remote-runtime"], "coveredPlatforms": ["linux"], "coveredProviders": [], - "coverageNotes": "Audit2694 source-only review: Remove14 authored/14 expanded cases in the renderer completion wrapper family, including the complete bell/query-reply/stale-input factory, without replacement. Retain29 authored/34 expanded cases with unchanged callback bodies. Three removals are the existing pending2203 overlap and must be adopted/count-reconciled once; eleven are fresh removals. No current-source runtime or gate execution is supplied by this packet; dated evidence retains its original source scope and does not validate the reduced factory bytes. No equivalent replacement, physical provider, mixed-version, mobile, rendered UI, cross-platform, soak or measured-performance result is claimed. The retained directory-level discovery command continues to discover the reduced family; historical wrapper mentions are not fresh import-closure or execution evidence. Historical prior account (preserved verbatim): Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2065 (sources2063/2064): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/startup/pty-connection-startup-cwd-fallback-notice.spec.ts: prints a terminal notice when the startup cwd fell back to the workspace root. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-coalesce.test.ts: surfaces working frames when many spinner frames arrive in one chunk. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-spinner.test.ts: surfaces normalized working and idle labels across a spinner cycle; surfaces working even when a single chunk contains multiple spinner frames. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionStartupCwdFallbackNoticeTests } from '../startup/pty-connection-startup-cwd-fallback-notice.spec'; registerPtyConnectionStartupCwdFallbackNoticeTests(). Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2061 (sources2059/2060): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-agent-trust-hold.test.ts: spawns only after the answer, carrying \"let agents ask\" to main for this launch; reattaches a section terminal without asking or changing trust; spawns with today's default when the prompt is released without an answer. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-intent.test.ts: declares the intent only when the spawn resumes an agent; reports a deferral to the pane instead of an error toast. src/renderer/src/components/terminal-pane/pty-connection/startup/in-place-resume-hold.test.ts: owns the record while the start runs, through a nested start, and releases on settle; holds nothing for a start not resuming a record, or once the pane is disposed. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): The existing directory-level pnpm test selector includes eleven changed source files and automatically omits the three whole deletions. Keep this nonempty discovery command unchanged; no dated receipt uses this broad path. Removed agent admission fields, mock transport routing and terminal-id projection alarms are lost. Retained foreground state, actual headless xterm, redraw, abort/rebind reader and bridge claim progression remain scoped to their unchanged callbacks. No current-source execution, independent replacement, native transport or physical provider result is assigned. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Audit1417 intentionally reduces src/renderer/src/components/terminal-pane/pty-connection/main-pane-start-wait.test.ts: Loses joined waiter invocation/failure notification and raw terminal error/paired-host readable sentence alarms; survivors preserve hold detection and card clearing. deletes src/renderer/src/components/terminal-pane/pty-connection-hidden-tui-snapshot-replay.spec.ts: Loses rich hidden snapshot sequence replay/grid resize and forced repaint after hidden snapshot alarms, including live-trigger deduplication. deletes src/renderer/src/components/terminal-pane/pty-connection-pi-synchronized-input.test.ts: Loses typed-input forced synchronized-frame presentation alarm; setup implements the parser behavior it claims to exercise. deletes src/renderer/src/components/terminal-pane/pty-connection-unserved-ssh-pane.test.ts: Loses automatic SSH dial deduplication, passphrase gating, stale pane exclusion, and disposal cancellation alarms. deletes src/renderer/src/components/terminal-pane/pty-connection-remote-snapshot-source-grid.test.ts: Loses source grid before frame and destination grid restoration ordering alarm. deletes src/renderer/src/components/terminal-pane/pty-connection-restart-replacement.spec.ts: Loses wrapper-level hidden/visible restart resume, dispose/rebind suppression and finished-turn replay alarms; manual pipeline and mock-implemented binding invalidate the whole callbacks. No equivalent replacement coverage or fresh result is claimed. Historical coverage account: Audit1391 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1361 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1342 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): macOS daemon-backed Electron journey verifies same PID and terminal identity plus rendered output. Focused renderer contracts pass on Linux, Windows and WSL. Neighboring SSH model and replay contracts pass locally; no new live SSH or paired-runtime journey. Audit1342: src/renderer/src/components/terminal-pane/pty-connection-unanswered-command-finish.spec.ts removed. Unanswered SSH shell finish keeps/drops mocked agent row matrix disappears. src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts reduced. Happy inherited-cwd wait and transport-option forwarding sample loses its individual alarm. src/renderer/src/components/terminal-pane/pty-connection-command-input-agent-identity.spec.ts removed. Typed Droid versus process/launch identity and SSH/runtime process-evidence matrices disappear. src/renderer/src/components/terminal-pane/pty-connection/reattach-success-settle.test.ts removed. Success/no-ID/expired/superseded attach-settlement bag alarms disappear. src/renderer/src/components/terminal-pane/pty-transport-user-input.test.ts reduced. Every-write kind forwarding and synchronous driving-attempt observer/rejection/ACK call counts disappear. src/renderer/src/components/terminal-pane/pty-connection-codex-restart-input-lookup.spec.ts removed. No global tab enumeration on ordinary/stale input and known restart notice input-block mock-call alarms. src/renderer/src/components/terminal-pane/pty-connection-layout-owner-wake.test.ts removed. Hidden-to-visible single-pane start request, attach-only argument and negative local wake-record alarms are intentionally dropped; no real server wake/ack occurs. src/renderer/src/components/terminal-pane/pty-connection-completion-and-notification.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. src/renderer/src/components/terminal-pane/pty-connection-command-finished-cleanup.spec.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. src/renderer/src/components/terminal-pane/pty-connection-terminal-input-gating.spec.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Audit1361: src/renderer/src/components/terminal-pane/pty-connection/foreground-output-scan.test.ts reduced. Internal searched-character budget and ordinary/malformed no-op controls. No equivalent replacement coverage is claimed. Audit1365: focused Linux unit selection passed on source head 8880357cb420c45f1b808ae545a5bc609324624d. This new result has its own exact command; historical results keep their prior scope. Intentional test losses remain recorded in knownGaps. No physical-provider, native input, rendered E2E, p95, soak or replacement-coverage claim. Audit1369: src/renderer/src/components/terminal-pane/pty-connection/disposed-spawn-retention.test.ts removed. Rootless/removed/moved tabs, missing leaves, queued deletion and host-qualified/legacy deletion eligibility fixtures. No equivalent replacement coverage is claimed. Audit1391: src/renderer/src/components/terminal-pane/pty-connection-remote-pause-drop-notice.spec.ts reduced. Lose repeated quiet switches avoiding snapshots and legacy host without drop-report capability requesting a snapshot. Retained imported registrar uses fake transport/xterm writes, exercising real gap/restore lifecycle rather than actual terminal rendering. No equivalent replacement coverage is claimed. Audit1396: src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.spec.ts reduced. Lose standalone debug-state retention/log silence alarm. React StrictMode is not mounted; bindings manually simulate remount over mocked transport. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1400: src/renderer/src/components/terminal-pane/pty-connection/terminal-input-echo-delay.test.ts reduced. Removes two fabricated-binding pipeline registrations; retains timestamp-policy outcomes without wall-clock speed assertions. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1402: src/renderer/src/components/terminal-pane/pty-connection-park-reveal-model-snapshot.spec.ts reduced. Loses basic paired serialize/initial replay forwarding check; hidden alt-frame grid/precedence policy remains. No real terminal renderer claim. src/renderer/src/components/terminal-pane/pty-connection/main-pane-resume-banner.test.ts reduced. Loses subscription-budget and attach-start generation predicate alarms; actual restored-banner renderer is not exercised. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result.", + "coverageNotes": "Audit3086: the transport filename selector loses IPC suspension/input/reattach cases and the entire spawn-errors suite. Unique classification, ownership, fallback retirement, reply-limit, write-failure and teardown-branch alarms are intentionally retired without replacement. Remaining registrations are unchanged; no fresh execution or real provider result is claimed. Audit2694 source-only review: Remove14 authored/14 expanded cases in the renderer completion wrapper family, including the complete bell/query-reply/stale-input factory, without replacement. Retain29 authored/34 expanded cases with unchanged callback bodies. Three removals are the existing pending2203 overlap and must be adopted/count-reconciled once; eleven are fresh removals. No current-source runtime or gate execution is supplied by this packet; dated evidence retains its original source scope and does not validate the reduced factory bytes. No equivalent replacement, physical provider, mixed-version, mobile, rendered UI, cross-platform, soak or measured-performance result is claimed. The retained directory-level discovery command continues to discover the reduced family; historical wrapper mentions are not fresh import-closure or execution evidence. Historical prior account (preserved verbatim): Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2065 (sources2063/2064): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/startup/pty-connection-startup-cwd-fallback-notice.spec.ts: prints a terminal notice when the startup cwd fell back to the workspace root. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-coalesce.test.ts: surfaces working frames when many spinner frames arrive in one chunk. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-spinner.test.ts: surfaces normalized working and idle labels across a spinner cycle; surfaces working even when a single chunk contains multiple spinner frames. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionStartupCwdFallbackNoticeTests } from '../startup/pty-connection-startup-cwd-fallback-notice.spec'; registerPtyConnectionStartupCwdFallbackNoticeTests(). Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2061 (sources2059/2060): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-agent-trust-hold.test.ts: spawns only after the answer, carrying \"let agents ask\" to main for this launch; reattaches a section terminal without asking or changing trust; spawns with today's default when the prompt is released without an answer. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-intent.test.ts: declares the intent only when the spawn resumes an agent; reports a deferral to the pane instead of an error toast. src/renderer/src/components/terminal-pane/pty-connection/startup/in-place-resume-hold.test.ts: owns the record while the start runs, through a nested start, and releases on settle; holds nothing for a start not resuming a record, or once the pane is disposed. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): The existing directory-level pnpm test selector includes eleven changed source files and automatically omits the three whole deletions. Keep this nonempty discovery command unchanged; no dated receipt uses this broad path. Removed agent admission fields, mock transport routing and terminal-id projection alarms are lost. Retained foreground state, actual headless xterm, redraw, abort/rebind reader and bridge claim progression remain scoped to their unchanged callbacks. No current-source execution, independent replacement, native transport or physical provider result is assigned. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Audit1417 intentionally reduces src/renderer/src/components/terminal-pane/pty-connection/main-pane-start-wait.test.ts: Loses joined waiter invocation/failure notification and raw terminal error/paired-host readable sentence alarms; survivors preserve hold detection and card clearing. deletes src/renderer/src/components/terminal-pane/pty-connection-hidden-tui-snapshot-replay.spec.ts: Loses rich hidden snapshot sequence replay/grid resize and forced repaint after hidden snapshot alarms, including live-trigger deduplication. deletes src/renderer/src/components/terminal-pane/pty-connection-pi-synchronized-input.test.ts: Loses typed-input forced synchronized-frame presentation alarm; setup implements the parser behavior it claims to exercise. deletes src/renderer/src/components/terminal-pane/pty-connection-unserved-ssh-pane.test.ts: Loses automatic SSH dial deduplication, passphrase gating, stale pane exclusion, and disposal cancellation alarms. deletes src/renderer/src/components/terminal-pane/pty-connection-remote-snapshot-source-grid.test.ts: Loses source grid before frame and destination grid restoration ordering alarm. deletes src/renderer/src/components/terminal-pane/pty-connection-restart-replacement.spec.ts: Loses wrapper-level hidden/visible restart resume, dispose/rebind suppression and finished-turn replay alarms; manual pipeline and mock-implemented binding invalidate the whole callbacks. No equivalent replacement coverage or fresh result is claimed. Historical coverage account: Audit1391 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1361 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1342 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): macOS daemon-backed Electron journey verifies same PID and terminal identity plus rendered output. Focused renderer contracts pass on Linux, Windows and WSL. Neighboring SSH model and replay contracts pass locally; no new live SSH or paired-runtime journey. Audit1342: src/renderer/src/components/terminal-pane/pty-connection-unanswered-command-finish.spec.ts removed. Unanswered SSH shell finish keeps/drops mocked agent row matrix disappears. src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts reduced. Happy inherited-cwd wait and transport-option forwarding sample loses its individual alarm. src/renderer/src/components/terminal-pane/pty-connection-command-input-agent-identity.spec.ts removed. Typed Droid versus process/launch identity and SSH/runtime process-evidence matrices disappear. src/renderer/src/components/terminal-pane/pty-connection/reattach-success-settle.test.ts removed. Success/no-ID/expired/superseded attach-settlement bag alarms disappear. src/renderer/src/components/terminal-pane/pty-transport-user-input.test.ts reduced. Every-write kind forwarding and synchronous driving-attempt observer/rejection/ACK call counts disappear. src/renderer/src/components/terminal-pane/pty-connection-codex-restart-input-lookup.spec.ts removed. No global tab enumeration on ordinary/stale input and known restart notice input-block mock-call alarms. src/renderer/src/components/terminal-pane/pty-connection-layout-owner-wake.test.ts removed. Hidden-to-visible single-pane start request, attach-only argument and negative local wake-record alarms are intentionally dropped; no real server wake/ack occurs. src/renderer/src/components/terminal-pane/pty-connection-completion-and-notification.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. src/renderer/src/components/terminal-pane/pty-connection-command-finished-cleanup.spec.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. src/renderer/src/components/terminal-pane/pty-connection-terminal-input-gating.spec.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Audit1361: src/renderer/src/components/terminal-pane/pty-connection/foreground-output-scan.test.ts reduced. Internal searched-character budget and ordinary/malformed no-op controls. No equivalent replacement coverage is claimed. Audit1365: focused Linux unit selection passed on source head 8880357cb420c45f1b808ae545a5bc609324624d. This new result has its own exact command; historical results keep their prior scope. Intentional test losses remain recorded in knownGaps. No physical-provider, native input, rendered E2E, p95, soak or replacement-coverage claim. Audit1369: src/renderer/src/components/terminal-pane/pty-connection/disposed-spawn-retention.test.ts removed. Rootless/removed/moved tabs, missing leaves, queued deletion and host-qualified/legacy deletion eligibility fixtures. No equivalent replacement coverage is claimed. Audit1391: src/renderer/src/components/terminal-pane/pty-connection-remote-pause-drop-notice.spec.ts reduced. Lose repeated quiet switches avoiding snapshots and legacy host without drop-report capability requesting a snapshot. Retained imported registrar uses fake transport/xterm writes, exercising real gap/restore lifecycle rather than actual terminal rendering. No equivalent replacement coverage is claimed. Audit1396: src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.spec.ts reduced. Lose standalone debug-state retention/log silence alarm. React StrictMode is not mounted; bindings manually simulate remount over mocked transport. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1400: src/renderer/src/components/terminal-pane/pty-connection/terminal-input-echo-delay.test.ts reduced. Removes two fabricated-binding pipeline registrations; retains timestamp-policy outcomes without wall-clock speed assertions. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1402: src/renderer/src/components/terminal-pane/pty-connection-park-reveal-model-snapshot.spec.ts reduced. Loses basic paired serialize/initial replay forwarding check; hidden alt-frame grid/precedence policy remains. No real terminal renderer claim. src/renderer/src/components/terminal-pane/pty-connection/main-pane-resume-banner.test.ts reduced. Loses subscription-budget and attach-start generation predicate alarms; actual restored-banner renderer is not exercised. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result.", "motivatingLinks": [ "https://github.com/user-attachments/assets/e8c6d1dc-6150-4c3d-b55a-3d12efefdd04", "https://github.com/user-attachments/assets/b0328f88-34ac-4d51-8119-9efe17072435" ], "invariant": "Adopting a prestarted terminal preserves its existing process and paints snapshot-covered startup output once while retaining subsequent live output. Missing sequence proof or blank snapshots must not authorize dropping output.", - "oracle": "Audit2694 source-only review: Remove14 authored/14 expanded cases in the renderer completion wrapper family, including the complete bell/query-reply/stale-input factory, without replacement. Retain29 authored/34 expanded cases with unchanged callback bodies. Three removals are the existing pending2203 overlap and must be adopted/count-reconciled once; eleven are fresh removals. No current-source runtime or gate execution is supplied by this packet; dated evidence retains its original source scope and does not validate the reduced factory bytes. No equivalent replacement, physical provider, mixed-version, mobile, rendered UI, cross-platform, soak or measured-performance result is claimed. The retained directory-level discovery command continues to discover the reduced family; historical wrapper mentions are not fresh import-closure or execution evidence. Historical prior account (preserved verbatim): Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2065 (sources2063/2064): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/startup/pty-connection-startup-cwd-fallback-notice.spec.ts: prints a terminal notice when the startup cwd fell back to the workspace root. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-coalesce.test.ts: surfaces working frames when many spinner frames arrive in one chunk. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-spinner.test.ts: surfaces normalized working and idle labels across a spinner cycle; surfaces working even when a single chunk contains multiple spinner frames. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionStartupCwdFallbackNoticeTests } from '../startup/pty-connection-startup-cwd-fallback-notice.spec'; registerPtyConnectionStartupCwdFallbackNoticeTests(). Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2061 (sources2059/2060): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-agent-trust-hold.test.ts: spawns only after the answer, carrying \"let agents ask\" to main for this launch; reattaches a section terminal without asking or changing trust; spawns with today's default when the prompt is released without an answer. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-intent.test.ts: declares the intent only when the spawn resumes an agent; reports a deferral to the pane instead of an error toast. src/renderer/src/components/terminal-pane/pty-connection/startup/in-place-resume-hold.test.ts: owns the record while the start runs, through a nested start, and releases on settle; holds nothing for a start not resuming a record, or once the pane is disposed. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): The existing directory-level pnpm test selector includes eleven changed source files and automatically omits the three whole deletions. Keep this nonempty discovery command unchanged; no dated receipt uses this broad path. Removed agent admission fields, mock transport routing and terminal-id projection alarms are lost. Retained foreground state, actual headless xterm, redraw, abort/rebind reader and bridge claim progression remain scoped to their unchanged callbacks. No current-source execution, independent replacement, native transport or physical provider result is assigned. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Historical pre-audit oracle account for changed sources: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Pass snapshot sequence and proven zero keyboard flags through real IPC transport projection. Deliver snapshot-covered and newer output before reattach resolves; drain replay parse callbacks and require one startup marker and the newer output. Repeat with no sequence and blank snapshot to retain unproven bytes. In Electron select a prestarted workspace, type a generated marker and compare PID and stable terminal identities before and after.", + "oracle": "Audit3086: the transport filename selector loses IPC suspension/input/reattach cases and the entire spawn-errors suite. Unique classification, ownership, fallback retirement, reply-limit, write-failure and teardown-branch alarms are intentionally retired without replacement. Remaining registrations are unchanged; no fresh execution or real provider result is claimed. Audit2694 source-only review: Remove14 authored/14 expanded cases in the renderer completion wrapper family, including the complete bell/query-reply/stale-input factory, without replacement. Retain29 authored/34 expanded cases with unchanged callback bodies. Three removals are the existing pending2203 overlap and must be adopted/count-reconciled once; eleven are fresh removals. No current-source runtime or gate execution is supplied by this packet; dated evidence retains its original source scope and does not validate the reduced factory bytes. No equivalent replacement, physical provider, mixed-version, mobile, rendered UI, cross-platform, soak or measured-performance result is claimed. The retained directory-level discovery command continues to discover the reduced family; historical wrapper mentions are not fresh import-closure or execution evidence. Historical prior account (preserved verbatim): Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2065 (sources2063/2064): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/startup/pty-connection-startup-cwd-fallback-notice.spec.ts: prints a terminal notice when the startup cwd fell back to the workspace root. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-coalesce.test.ts: surfaces working frames when many spinner frames arrive in one chunk. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-spinner.test.ts: surfaces normalized working and idle labels across a spinner cycle; surfaces working even when a single chunk contains multiple spinner frames. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionStartupCwdFallbackNoticeTests } from '../startup/pty-connection-startup-cwd-fallback-notice.spec'; registerPtyConnectionStartupCwdFallbackNoticeTests(). Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2061 (sources2059/2060): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-agent-trust-hold.test.ts: spawns only after the answer, carrying \"let agents ask\" to main for this launch; reattaches a section terminal without asking or changing trust; spawns with today's default when the prompt is released without an answer. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-intent.test.ts: declares the intent only when the spawn resumes an agent; reports a deferral to the pane instead of an error toast. src/renderer/src/components/terminal-pane/pty-connection/startup/in-place-resume-hold.test.ts: owns the record while the start runs, through a nested start, and releases on settle; holds nothing for a start not resuming a record, or once the pane is disposed. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): The existing directory-level pnpm test selector includes eleven changed source files and automatically omits the three whole deletions. Keep this nonempty discovery command unchanged; no dated receipt uses this broad path. Removed agent admission fields, mock transport routing and terminal-id projection alarms are lost. Retained foreground state, actual headless xterm, redraw, abort/rebind reader and bridge claim progression remain scoped to their unchanged callbacks. No current-source execution, independent replacement, native transport or physical provider result is assigned. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Historical pre-audit oracle account for changed sources: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Pass snapshot sequence and proven zero keyboard flags through real IPC transport projection. Deliver snapshot-covered and newer output before reattach resolves; drain replay parse callbacks and require one startup marker and the newer output. Repeat with no sequence and blank snapshot to retain unproven bytes. In Electron select a prestarted workspace, type a generated marker and compare PID and stable terminal identities before and after.", "commands": [ - "pnpm test src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-hidden-replay.test.ts", - "pnpm test src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-hidden-replay.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-visibility-and-exit.test.ts", + "pnpm test src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-hidden-replay.test.ts", + "pnpm test src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-hidden-replay.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-visibility-and-exit.test.ts", "pnpm test src/renderer/src/components/terminal-pane/pty-connection src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport", "pnpm test src/shared/terminal/protocol/escape/terminal-synchronized-output-socket-splits.test.ts" ], "testFiles": [ - "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts", "src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-hidden-replay.test.ts" ], "assertionRefs": [ - { - "file": "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts", - "assertions": [ - "zero and nonzero snapshot sequence and proven zero keyboard flags survive IPC projection" - ] - }, { "file": "src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-hidden-replay.test.ts", "assertions": [ @@ -2242,6 +2235,7 @@ "Exercise live SSH and paired-runtime snapshot adoption before claiming full provider coverage." ], "knownGaps": [ + "Audit3077 retires the IPC zero/nonzero snapshot-sequence and zero-keyboard-proof examples and their direct selectors. The retained join projects only sequence 7 and flags 3. No equivalent replacement or fresh gate execution is claimed.", "Audit3069 retires nominal spawn/resume/banner wiring, first-fit and lookup-budget variants, private pending-map checks, the split-CWD disposal suite and startup command/draft baseline variants. Distinct regression alarms are intentionally lost without equivalent replacement; retained ownership, cancellation and recovery cases remain. Existing selectors and dated evidence retain their original scope.", "Audit3061 retires the park-model supplied snapshot suite and nominal mode, cursor, focus, geometry and remote resume metadata variants. Their distinct alarms are intentionally lost; six retained mode/remote cases preserve selected tail-order, authority and parse-readiness boundaries without equivalent replacement. Existing selectors and dated evidence retain their original scope.", "Audit3053 reduces hidden-replay coverage by retiring nominal overlap, resize, cursor metadata and standalone stalled-restore variants. Timeout, overflow, identity/generation fences and retained live-output coordination remain; the removed alarms are intentionally lost without equivalent replacement. Existing commands, assertion references and dated evidence retain their original scope.", @@ -2266,7 +2260,8 @@ "Audit1417 intentionally reduces src/renderer/src/components/terminal-pane/pty-connection/main-pane-start-wait.test.ts: Loses joined waiter invocation/failure notification and raw terminal error/paired-host readable sentence alarms; survivors preserve hold detection and card clearing. deletes src/renderer/src/components/terminal-pane/pty-connection-hidden-tui-snapshot-replay.spec.ts: Loses rich hidden snapshot sequence replay/grid resize and forced repaint after hidden snapshot alarms, including live-trigger deduplication. deletes src/renderer/src/components/terminal-pane/pty-connection-pi-synchronized-input.test.ts: Loses typed-input forced synchronized-frame presentation alarm; setup implements the parser behavior it claims to exercise. deletes src/renderer/src/components/terminal-pane/pty-connection-unserved-ssh-pane.test.ts: Loses automatic SSH dial deduplication, passphrase gating, stale pane exclusion, and disposal cancellation alarms. deletes src/renderer/src/components/terminal-pane/pty-connection-remote-snapshot-source-grid.test.ts: Loses source grid before frame and destination grid restoration ordering alarm. deletes src/renderer/src/components/terminal-pane/pty-connection-restart-replacement.spec.ts: Loses wrapper-level hidden/visible restart resume, dispose/rebind suppression and finished-turn replay alarms; manual pipeline and mock-implemented binding invalidate the whole callbacks. No equivalent replacement coverage or fresh result is claimed.", "Audit1939 (sources1934/1935): The existing directory-level pnpm test selector includes eleven changed source files and automatically omits the three whole deletions. Keep this nonempty discovery command unchanged; no dated receipt uses this broad path. Removed agent admission fields, mock transport routing and terminal-id projection alarms are lost. Retained foreground state, actual headless xterm, redraw, abort/rebind reader and bridge claim progression remain scoped to their unchanged callbacks. No current-source execution, independent replacement, native transport or physical provider result is assigned. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Exact retired authored alarms: 'bounds a startup title storm to one extra read ladder and never adopts the title as identity'; 'leaves untrackable providers free of client process scans'; 'keeps a legacy remote process hint unverifiable after a startup title'; 'releases a retained capability when disposed mid-read'; 'releases a retained capability when an exit schedules no successor read'; 'releases a retained capability when an untrackable $exit ends the read'; 'does not release when the cancelled read has a successor'; 'settles the visible confirmation when the pty id is gone before the read runs'; 'reports a read in flight when a command-finished read owns the pane'; 'reads the foreground once after a command starts and publishes the recognized agent'; 'does not replace known foreground identity with typed command inference'; 'revokes stale routing immediately while a known pane confirms a new command'; 'reads the foreground for a visible PTY so restored running Codex panes regain identity'; 'does not retry or publish visible PTY reads for an idle shell foreground'; 'retries visible PTY reads only while a foreground wrapper may resolve to an agent'; 'stops after the ladder and publishes no identity for a persistent unknown process'; 'does not treat a nested shell seen mid-command as prompt proof'; 'recognizes an agent started from a nested shell on a ladder re-read'; 'marks shell foreground on command finished without any foreground read'; 'trusts a rapid ordinary command finish without forcing a fresh scan'; 'still marks shell without a read for a duplicate D pair on an idle pane'; 'marks shell on a rapid command start->finish when the foreground is a shell'; 'marks shell foreground when the confirming read shows the agent is gone'; 'confirms a command finished for a launch-known agent pane before any read'; 'accepts a fresh shell result for a launch-known Droid pane'; 'marks a confirmed shell without repeating a post-boundary scan'; 'never reads or publishes for remote or ssh panes'; 'does not let forged OSC 133/777 output assert remote identity'; 'keeps command-only pane inference bounded for large pasted scripts'; 'skips jcode colors for command-only startup %s'; 'keeps explicit pane ownership ahead of a delayed command hint'; 'does not infer a TUI from %s'; 'survives a launch config registered before its identity lands'; 'prefers the tab launch agent over every later signal'; 'falls back through startup, then initial status, then the registered config'; 'ignores a registered agent name that is not a known TUI agent'; 'skips the OSC color answer for jcode and no one else'; 'drops a Done that landed before the command-finished fact'; 'keeps a program Done reported before the command-finished fact'; 'dismisses the kept result when the next command starts'; 'keeps a facet-less OSC Done from a non-agent program'; 'still drops a real agent Done'; 'still drops an interrupted program Done'; 'retires a hook-identified row the foreground tracker never read'; 'leaves a pane with an armed command-finished drop to its own confirming read'; 'leaves a remote pane to its execution host'; 'keeps the row when the host can verify the owner process itself'; 'keeps a row that belongs to a different agent'; 'does not watch the store for an owner it can never name'; 'control: a fresh host image repaints the pane without resizing the program'; 'asks the program to repaint when the image is %s'; 'asks the program to repaint when the host never answers the snapshot request'; 'repaints a full-screen TUI on the alternate screen the same way'; 'leaves the size alone while a phone or another desktop holds it'; 'grows a pane at the host minimum height instead of asking for the same clamped size'; 'does not nudge while the stream is still reconnecting'; 'mounts and remounts the tab owner while an unrelated workspace is active (%s)'; 'continues a recorded live folder owner despite ambiguous inventory (%s)'; 'resolves an encoded split surface using its parent tab and active leaf'; 'does not capture a remote revision for a local terminal'; 'omits incarnation and length for older runtime responses'; 'refuses %s owner before RPC'; 'refuses a resolved terminal belonging to another native PTY'; 'refuses a foreign remote terminal handle despite a matching native PTY ID'; 'refuses a remote handle owned by another environment'; 'refuses a remote terminal with no live native PTY'; 'does not fall back locally when remote lacks RPC'; 'rejects malformed or oversized encoded response %#'; 'maps a unified terminal tab id to its legacy owner id'; 'keeps non-terminal and unknown ids unchanged'; 'keeps an exact terminal owner ahead of a stale unified alias'; 'stays inert on a host that was not kept for the bridge'; 'stays inert for a pane main does not list, so it still dials the host'.", "Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-intent.test.ts: declares the intent only when the spawn resumes an agent; reports a deferral to the pane instead of an error toast. src/renderer/src/components/terminal-pane/pty-connection/startup/in-place-resume-hold.test.ts: owns the record while the start runs, through a nested start, and releases on settle; holds nothing for a start not resuming a record, or once the pane is disposed. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed.", - "Audit2061 (sources2059/2060): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-agent-trust-hold.test.ts: spawns only after the answer, carrying \"let agents ask\" to main for this launch; reattaches a section terminal without asking or changing trust; spawns with today's default when the prompt is released without an answer. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed." + "Audit2061 (sources2059/2060): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-agent-trust-hold.test.ts: spawns only after the answer, carrying \"let agents ask\" to main for this launch; reattaches a section terminal without asking or changing trust; spawns with today's default when the prompt is released without an answer. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed.", + "Audit3086: the transport filename selector loses IPC suspension/input/reattach cases and the entire spawn-errors suite. Unique classification, ownership, fallback retirement, reply-limit, write-failure and teardown-branch alarms are intentionally retired without replacement. Remaining registrations are unchanged; no fresh execution or real provider result is claimed." ], "demotionRule": "Keep experimental or demote if adoption duplicates covered output, drops newer or unproven output, changes terminal ownership, or flakes without explanation." }, @@ -4235,10 +4230,10 @@ "providers": ["remote-runtime"], "coveredPlatforms": ["macos"], "coveredProviders": ["remote-runtime"], - "coverageNotes": "Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Deterministic main-IPC contract tests cover disconnect-driven close delivery, exactly-once close, per-subscription teardown isolation against a failing socket close and a throwing liveness probe, containment of a throwing renderer send on the unguarded host-close path, and continued suppression of stale payloads from a retired transport. A headed paired-server journey (real Orca host plus a separate paired Orca desktop client) covers hidden-but-mounted reveal, cold-parked reveal, and cold-parked reveal across a disconnect/reconnect. Live Linux and Windows paired-server evidence and real sleep/wake transport loss remain uncollected.", + "coverageNotes": "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Deterministic main-IPC contract tests cover disconnect-driven close delivery, exactly-once close, per-subscription teardown isolation against a failing socket close and a throwing liveness probe, containment of a throwing renderer send on the unguarded host-close path, and continued suppression of stale payloads from a retired transport. A headed paired-server journey (real Orca host plus a separate paired Orca desktop client) covers hidden-but-mounted reveal, cold-parked reveal, and cold-parked reveal across a disconnect/reconnect. Live Linux and Windows paired-server evidence and real sleep/wake transport loss remain uncollected.", "motivatingLinks": ["tests/e2e/paired-remote-terminal-parked-reveal-interactivity.spec.ts"], "invariant": "Every renderer-held runtime subscription receives exactly one terminal close event when its transport is retired, including when the retirement advanced the transport generation first, and a single failing teardown never abandons that environment's remaining subscriptions nor escapes into the transport that reported the close. Payload frames from a retired transport stay suppressed. A revealed remote terminal therefore reattaches over a live multiplex connection: its buffer restores, typed input reaches the host PTY, the echo paints without a tab flip, and the PTY converges on the revealed pane grid.", - "oracle": "Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): The main IPC contract test subscribes terminal.multiplex through the real handler, disconnects the environment, and asserts the renderer received exactly one {type: close} subscription event. Two isolation tests subscribe a second stream to the same environment and make the first one fail -- in its socket close, and in the liveness probe inside notifyClosed -- then assert the disconnect does not throw, both transports closed, and every close the renderer could still receive was delivered. A third drives a host-initiated close through the transport callback, which is the one notifyClosed call site with no surrounding guard, with a renderer send that throws, and asserts it cannot escape into the WebSocket close handler. A fourth test asserts that after retirement a late response frame is not forwarded and a late transport close does not re-send. The paired-server journey runs three reveal scenarios against one real host and one real paired desktop client, and for each records buffer restore, host-side receipt of the typed marker through an out-of-band host sink file, live paint without a tab flip, and PTY-versus-pane grid convergence.", + "oracle": "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): The main IPC contract test subscribes terminal.multiplex through the real handler, disconnects the environment, and asserts the renderer received exactly one {type: close} subscription event. Two isolation tests subscribe a second stream to the same environment and make the first one fail -- in its socket close, and in the liveness probe inside notifyClosed -- then assert the disconnect does not throw, both transports closed, and every close the renderer could still receive was delivered. A third drives a host-initiated close through the transport callback, which is the one notifyClosed call site with no surrounding guard, with a renderer send that throws, and asserts it cannot escape into the WebSocket close handler. A fourth test asserts that after retirement a late response frame is not forwarded and a late transport close does not re-send. The paired-server journey runs three reveal scenarios against one real host and one real paired desktop client, and for each records buffer restore, host-side receipt of the typed marker through an out-of-band host sink file, live paint without a tab flip, and PTY-versus-pane grid convergence.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts", "pnpm exec playwright test tests/e2e/paired-remote-terminal-parked-reveal-interactivity.spec.ts --config tests/playwright.config.ts --project electron-headless --workers=1" @@ -4322,7 +4317,9 @@ "Audit2412 removes whole useVirtualizedScrollAnchor.marks-restore-signal.test.ts (six fake-hook geometry/mark/convergence/user-takeover/clamp alarms), use-task-creation-draft-retention original3/4 (immediate discard mock-call count/unopened no-write), use-terminal-bulk-close-actions.placement original6/7 (absent new-agent append and one real history-publication count at consumed3/30 scale), PendingNativeChatCreation original6 (unmounted abort completion/timer cleanup), and wsl-move-dialog-store original1/9/13 (default whole-distro count/reference/reuse and rejected-preview/start refusal recovery). The history counter measures genuine publication work without entries/order/reopen assertions; its unique batching alarm is intentionally retired. Fake React scroll tests ignore dependency scheduling and cleanup; unique simulated arithmetic alarms are deliberately lost. Retained existing-terminal reorder is not new-agent append coverage; mounted handoff timeout is not abort coverage. No equivalent complete replacement or fresh validation is claimed.", "Audit2417 removes commit-actions-real-git original3/4 (ordinary clean cherry-pick and revert content, subject and current-branch samples), and pty-startup-ingress-exited-asker original8/12 (actual foreground-group read budget across100queued queries, and zero foreground reads across100normal chunks plus final emitted/accepted raw cursor equality). Counters measure actual callback work and scale is consumed; these internal-work alarms are deliberately retired. Retained unborn, conflict and sequencer cases are not equivalent ordinary-success coverage. No equivalent complete replacement or fresh validation is claimed.", "Audit2425 removes use-workspace-copy-status original5, which returns a fixture-supplied readError string through statusReadError. No consumer blocker or attempted branch switch established refusal; the unique error-forwarding sample is intentionally retired. Other copy ownership and stale-refresh cases are not equivalent error-path coverage. No equivalent replacement or fresh validation is claimed.", - "Audit2432 removes BranchPicker.test.tsx original3, which only asserted onOpenChange(true/false) with an always-mounted mocked Popover. It never reopened the picker or consumed the callback in the parent status-refresh owner, despite its title. Lose that unique open/close notification alarm. Retained blocker/collision recovery and asynchronous post-unmount outcome cases are not equivalent replacement coverage. No fresh validation of the reduced selector is claimed." + "Audit2432 removes BranchPicker.test.tsx original3, which only asserted onOpenChange(true/false) with an always-mounted mocked Popover. It never reopened the picker or consumed the callback in the parent status-refresh owner, despite its title. Lose that unique open/close notification alarm. Retained blocker/collision recovery and asynchronous post-unmount outcome cases are not equivalent replacement coverage. No fresh validation of the reduced selector is claimed.", + "Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed.", + "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed." ], "demotionRule": "Demote if a retired runtime transport can leave a renderer subscription without a close event, if a close is delivered more than once, if one failing teardown strands its sibling subscriptions, if payload frames from a retired transport reach the renderer, or if a revealed remote terminal can stay blank or reject input after a reconnect." }, @@ -6089,6 +6086,7 @@ "Keep missing-proof mixed-version behavior identical to the incumbent client path." ], "knownGaps": [ + "Audit3077 deletes the Kitty restore/reset integration suite and its registrar. The input-and-repaint driver remains populated; the retired emission/mirror/host-request alarms have no equivalent replacement.", "Audit3061 retires the park-model supplied snapshot suite and nominal mode, cursor, focus, geometry and remote resume metadata variants. Their distinct alarms are intentionally lost; six retained mode/remote cases preserve selected tail-order, authority and parse-readiness boundaries without equivalent replacement. Existing selectors and dated evidence retain their original scope.", "Audit3053 reduces hidden-replay coverage by retiring nominal overlap, resize, cursor metadata and standalone stalled-restore variants. Timeout, overflow, identity/generation fences and retained live-output coordination remain; the removed alarms are intentionally lost without equivalent replacement. Existing commands, assertion references and dated evidence retain their original scope.", "Audit3037 removes seven supplied-input baseline cases from the terminal-input-gating registrar. Input-and-repaint wrapper selectors and unrelated assertions remain; historical receipts do not validate the reduced source bytes. Pane authority, acknowledgment refusal and quarantine recovery cases remain, without native or RPC execution claims.", @@ -6775,7 +6773,7 @@ "id": "terminal-session.startup-cwd-missing-dir-recovery", "title": "Terminal working-directory recovery stays scoped and provider-safe", "maturity": "experimental", - "protection": "partial", + "protection": "none", "owner": "terminal-runtime", "layer": "shared-main-renderer-and-posix-shell-contract", "surfaces": [ @@ -6787,9 +6785,9 @@ ], "platforms": ["macos", "linux", "windows", "mobile"], "providers": ["local", "daemon", "ssh", "wsl", "remote-runtime"], - "coveredPlatforms": ["linux"], + "coveredPlatforms": [], "coveredProviders": [], - "coverageNotes": "Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit1760 removes the standalone startup-cwd policy suite without equivalent replacement. One fresh Linux run passed21 retained IPC transport unit cases; cwd-specific coverage returns mocked fallback metadata only. Original receipts and scope are archived in knownGaps; current platform scope reflects this unit run, not a native provider. Historical coverage account (not current evidence): Audit1683 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1396 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Local macOS evidence covers the shared missing-dir fallback policy, main pty:spawn recovery and metadata, no-flag and reattach strictness, renderer IPC flag routing, SSH-tagged and remote-runtime omission, and the visibility-gated terminal notice. Real Bash and Zsh node-pty tests replace the active cwd inode and exercise the shared POSIX OMP wrapper; audit829 removes generated-file snapshots and their current byte-parity claim. No equivalent replacement for generated-script byte checks is claimed. Daemon shares the same pre-provider main cwd decision but lacks a live daemon-provider run; WSL UNC paths are exempt from the spawn probe and lack a live run; native PowerShell is unaffected; Linux/Windows and mobile/API strictness remain gaps. Audit1396: src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.spec.ts reduced. Lose standalone debug-state retention/log silence alarm. React StrictMode is not mounted; bindings manually simulate remount over mocked transport. No equivalent replacement coverage is claimed.", + "coverageNotes": "Audit3077 retires the sole active passed IPC receipt; no current execution evidence remains for this gate. Historical account (not current coverage): Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit1760 removes the standalone startup-cwd policy suite without equivalent replacement. One fresh Linux run passed21 retained IPC transport unit cases; cwd-specific coverage returns mocked fallback metadata only. Original receipts and scope are archived in knownGaps; current platform scope reflects this unit run, not a native provider. Historical coverage account (not current evidence): Audit1683 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1396 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Local macOS evidence covers the shared missing-dir fallback policy, main pty:spawn recovery and metadata, no-flag and reattach strictness, renderer IPC flag routing, SSH-tagged and remote-runtime omission, and the visibility-gated terminal notice. Real Bash and Zsh node-pty tests replace the active cwd inode and exercise the shared POSIX OMP wrapper; audit829 removes generated-file snapshots and their current byte-parity claim. No equivalent replacement for generated-script byte checks is claimed. Daemon shares the same pre-provider main cwd decision but lacks a live daemon-provider run; WSL UNC paths are exempt from the spawn probe and lack a live run; native PowerShell is unaffected; Linux/Windows and mobile/API strictness remain gaps. Audit1396: src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.spec.ts reduced. Lose standalone debug-state retention/log silence alarm. React StrictMode is not mounted; bindings manually simulate remount over mocked transport. No equivalent replacement coverage is claimed.", "motivatingLinks": [ "https://github.com/stablyai/orca/issues/7239", "https://github.com/stablyai/orca/pull/7750", @@ -6799,49 +6797,17 @@ ], "invariant": "A fresh local renderer terminal spawn may recover from a saved startup cwd whose directory no longer exists only by spawning at the selected workspace root and printing a generic in-terminal notice; existing directories — including ones outside the worktree (#7685) — spawn as requested, and reattach, SSH, remote-runtime, runtime/API, and mobile callers keep exact cwd semantics. A long-lived POSIX shell whose cwd inode was deleted and replaced may run a wrapped OMP command from the live path named by its logical PWD only in a subshell; the parent shell cwd, OMP argv, status extension, and exit status remain unchanged, while a genuinely unavailable path fails visibly without invoking OMP. A usable physical cwd remains authoritative when PWD is unset or names a removed logical symlink instead of being remapped to a workspace fallback.", "oracle": "Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit1683 retires changed-source assertion and execution scope without equivalent replacement coverage. Existing unchanged-selector receipts remain scoped to their original sources. Historical prior-source oracle: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The shared resolver falls back to the workspace root only when the injected existence probe reports the resolved cwd missing and the workspace root present, and never probes floating terminals or a cwd equal to the root. The renderer sends cwdFallback only for fresh local IPC spawns, main honors it only when connectionId and sessionId are absent, WSL UNC paths never engage the probe-based fallback, main returns fallback metadata only after an actual fallback, the IPC transport preserves that metadata, and the connection layer writes a generic notice that omits the missing path. In real interactive Bash and Zsh PTYs, unset PWD and remove a logical symlink while the physical cwd stays usable, requiring OMP to remain there; then delete and recreate the active project path, require extension-enabled and extension-skipping invocations to observe the replacement inode with byte-exact argv and nonzero status preserved, require the parent shell to remain on the stale inode, unset PWD and require recovery through ORCA_WORKTREE_PATH, clear every logical fallback and require an actionable failure without invoking OMP, and finally delete the replacement and require the same for the missing PWD path.", - "commands": [ - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts --maxWorkers=2", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/main/pty/shell-startup/omp-shell-wrapper.node-pty.test.ts src/main/pty/shell-startup/omp-shell-wrapper-alias-safety.test.ts" - ], - "testFiles": [ - "src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts", - "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts", - "src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts", - "src/main/pty/shell-startup/omp-shell-wrapper.node-pty.test.ts", - "src/main/pty/shell-startup/omp-shell-wrapper-alias-safety.test.ts" - ], - "assertionRefs": [ - { - "file": "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts", - "assertions": [ - "IPC transport returns startup cwd fallback metadata to the connection layer" - ] - }, - { - "file": "src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts", - "assertions": ["fresh local IPC worktree spawns are marked with cwdFallback worktree"] - } - ], - "evidenceRuns": [ - { - "date": "2026-11-07", - "runner": "local", - "platform": "linux", - "command": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts --maxWorkers=2", - "result": "passed", - "durationSeconds": 38.8, - "summary": "21 retained IPC transport unit cases passed on Linux, including return of mocked startupCwdFallback metadata. No live PTY, real missing directory, recovery notice, native shell, SSH/WSL, phone, p95 or soak evidence. Executed via pinned Node24 Vitest entry, same root config and selected file; no actual provider coverage claimed." - } - ], + "commands": [], + "testFiles": [], + "assertionRefs": [], + "evidenceRuns": [], "runtimeBudget": { "p95Seconds": 40, "scope": "Historical pre-audit selector budget; changed selectors have no new runtime measurement. Unchanged receipts remain scoped to their own commands." }, "flakeHistory": { "status": "unknown", - "evidence": "Audit1760: one Linux IPC transport unit run passed21 cases; no current soak evidence. Original flake history archived in knownGaps." + "evidence": "Audit3077: no current execution or soak result remains after retiring the reduced IPC source receipt. Historical account: Audit1760: one Linux IPC transport unit run passed21 cases; no current soak evidence. Original flake history archived in knownGaps." }, "redGreenEvidence": { "status": "missing", @@ -6858,6 +6824,9 @@ "Add WSL/mobile/API spawn provider-contract coverage or explicitly narrow their risk scope." ], "knownGaps": [ + "Audit3077 archives the remaining startup-CWD selectors and aliases because protection none permits no active selectors. These unchanged sources are unvalidated candidates, not current execution evidence. The worktree-marker alias remains mapping debt; this metadata retirement adds no test-removal credit. Original candidate fields verbatim:\ncommands: [\n \"pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts\",\n \"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts\",\n \"pnpm exec vitest run --config config/vitest.config.ts src/main/pty/shell-startup/omp-shell-wrapper.node-pty.test.ts src/main/pty/shell-startup/omp-shell-wrapper-alias-safety.test.ts\"\n ]\ntestFiles: [\n \"src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts\",\n \"src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts\",\n \"src/main/pty/shell-startup/omp-shell-wrapper.node-pty.test.ts\",\n \"src/main/pty/shell-startup/omp-shell-wrapper-alias-safety.test.ts\"\n ]\nassertionRefs: [\n {\n \"file\": \"src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts\",\n \"assertions\": [\"fresh local IPC worktree spawns are marked with cwdFallback worktree\"]\n }\n ]", + "Audit3077 retires the direct IPC startup-CWD metadata example, selector and alias. Other startup-CWD selectors and the existing worktree-marker mapping debt remain; no equivalent replacement is claimed.", + "Audit3077 retires this complete dated receipt because its selected source was reduced. It does not validate the reduced selector. Original receipt verbatim:\n{\n \"date\": \"2026-11-07\",\n \"runner\": \"local\",\n \"platform\": \"linux\",\n \"command\": \"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts --maxWorkers=2\",\n \"result\": \"passed\",\n \"durationSeconds\": 38.8,\n \"summary\": \"21 retained IPC transport unit cases passed on Linux, including return of mocked startupCwdFallback metadata. No live PTY, real missing directory, recovery notice, native shell, SSH/WSL, phone, p95 or soak evidence. Executed via pinned Node24 Vitest entry, same root config and selected file; no actual provider coverage claimed.\"\n }", "Audit3069 retires nominal spawn/resume/banner wiring, first-fit and lookup-budget variants, private pending-map checks, the split-CWD disposal suite and startup command/draft baseline variants. Distinct regression alarms are intentionally lost without equivalent replacement; retained ownership, cancellation and recovery cases remain. Existing selectors and dated evidence retain their original scope. The earlier generic-notice alias was already retired by audit3061; the remaining cwdFallback marker alias is unchanged mapping debt.", "Audit3061 retires the park-model supplied snapshot suite and nominal mode, cursor, focus, geometry and remote resume metadata variants. Their distinct alarms are intentionally lost; six retained mode/remote cases preserve selected tail-order, authority and parse-readiness boundaries without equivalent replacement. Existing selectors and dated evidence retain their original scope. The generic startup-cwd notice alias was already stale and is removed as pre-existing metadata debt; this batch receives no new removal credit for that alias. The separate cwdFallback marker alias remains outside this bounded reconciliation.", "Audit3037 retires the runtime-owner spawn-routing suite and its remote cwdFallback-absence assertion claim. Actual routing-composition alarms are intentionally lost; no replacement or renewed execution credit. Other historical claims and receipts retain their original scope.", @@ -8588,13 +8557,13 @@ "providers": ["paired-runtime", "ssh"], "coveredPlatforms": ["macos", "linux"], "coveredProviders": [], - "coverageNotes": "Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2162: Reduced inventory-authority source intentionally loses the examples recorded in knownGaps; historical execution is not validation of changed bytes. Historical prior account (preserved verbatim): Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2003: Remove SSH/absent-inventory attach refusal, later-subscriber retry, no-view adoption/takeback, provider-tail/unknown-read projections, failed-keystroke retry and simpler loss reattach examples. Keep the existing-subscriber inventory-ready retry alias only at its retained callback, plus retained held-input cancellation/replacement and overlapping attach/loss fences. The inventory driver also loses the whole empty-worktree-publication registration and folder-host/unverifiable scalar examples. Retire the entire dated10-case attach receipt; retain16 independent receipts only in their original scopes. No retained-memory or real-daemon measurement follows from supplied provider inventories. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1991: Remove initial-snapshot sequence-domain, limited-tail/truncation and unknown-output-sequence aliases whose callbacks are removed. The source retains partial-chunk replay and requested-snapshot retry/admission at supplied snapshot/data seams, not equivalent replacement or measured retained-memory proof. Preserve the existing stream/pending-wait capacity aliases only to their retained owning multiplex callbacks with supplied PTY resolutions. Removing the sibling-PTY heartbeat dedup work-count sample does not establish a new decorative fanout budget; the unrelated-PTY cancellation fence survives. Preserve17 unrelated dated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Remove the reasonless-close selector and narrow census aliases to actual retained runtime and injected-inventory callbacks. The removed synthetic census-dedup and isolated pre-boundary timing cases receive no replacement credit; preserve17 unrelated dated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): Delete the synthetic watcher-synchronization and partial-reconciliation suites. Retire all affected host-fact, capability-owner, activation-residue and retention-cap aliases because the remaining callbacks do not establish those full claims. Keep exact local hook/timer, byte-stream side effects, exit/disposal, scroll-intent cleanup and deterministic local rank/TTL progression callbacks within their mocked-host scope. No physical paired-host retention, resource budget or equivalent replacement evidence is assigned. The generic broad test command remains a runnable discovery command, never a dated execution receipt. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete the complete hook-agent-status projection suite and its two behavioral assertion aliases. Supplied stored hook/title/resume/staleness/rename/question/generation/PTY-retirement/snapshot-version projections are intentionally lost. The separate osc-status-scan gate mentions this source only in existing historical notes and receives no mutation. No measured hidden-output retention, CPU/RSS or resource budget result is claimed by the deleted source or this audit. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Module ownership cleanup retires the modeled cold-park private watcher/render/work-count suites under the current test policy. Their assertions are no longer active evidence. Retained lifecycle tests and headed/headless journeys do not establish equivalent coverage for those removed harness alarms. Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1634 removes low-value IPC, filesystem and runtime projections, argument inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained cancellation, ownership, authorization, filesystem and SQLite boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1627 removes low-value mocked daemon projections, scalar tables and duplicate terminal examples without equivalent replacement coverage. Per-source reviews record retained terminal content preservation, process ownership refusal and recovery boundaries together with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Audit1417 intentionally deletes src/renderer/src/components/terminal-pane/pty-connection-hidden-tui-snapshot-replay.spec.ts: Loses rich hidden snapshot sequence replay/grid resize and forced repaint after hidden snapshot alarms, including live-trigger deduplication. deletes src/renderer/src/components/terminal-pane/terminal-cold-park-verdict-loop.test.tsx: Loses modeled React oscillation alarm; real pane/watchers are not exercised. deletes src/renderer/src/runtime/remote-runtime-terminal-parse-backpressure.test.ts: Loses delayed credit until parsing, malformed frame/unknown stream handling, discarded transformed output recovery and failed ACK rearm alarms. No equivalent replacement coverage or fresh result is claimed. Historical coverage account: Audit1412 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): This audit removes the browser response-after-manual-disconnect example. Its distinct in-flight response fencing alarm is lost; retained queued-call disconnect tests are not an equivalent replacement. Historical commands and results remain historical. Deterministic headed macOS runs launch an isolated Orca desktop server and a separate paired web client. A byte-identical headless run uses an isolated `orca serve` host. Both create six real paired host PTYs with bounded high-output scrollback, prove sustained output while all six client xterms are warm-mounted but hidden causes zero renderer scheduler work, then drive 180 timed real-PTY spinner frames through a second production `session.tabs.subscribeAll` transport and the real Zustand store. Each worktree must publish and apply only its exact initial-working and final-idle titles. Both topologies ordinary-park five xterms without enabling the lossy retention budget, assert bounded cells/heap/timer lag, then restore the bounded authoritative tail exactly once on the original PTY including output produced while parked and continued input/output. The headed oracle additionally keeps every remote target workspace and terminal unmounted in the host renderer before and after client recovery. Production-parity React contracts reproduce and remove the independent cold-park watcher/title feedback loop, including memo-cache discard, StrictMode cleanup replay, detached split-PTY replacement, and the zero-park fast path. A deterministic cross-boundary contract drives 24 real PTY trackers in distinct worktrees through 2,880 decorative spinner and bare-native redraw chunks and counts host publications, serialized bytes, renderer apply calls, and store mutations while preserving exact per-PTY raw chunks and per-worktree semantic transitions. Fake-clock continuation beyond the 30-minute stale boundary requires one deduplicated refresh per worktree every 15 minutes, globally spaced by at least 50 ms, with every mirrored working status still fresh. Exact-identical Pi plus rotating normalized Pi/Grok frames renew coarse working/permission state; rich prompt/tool/question fields retain their original 30-minute lease, and `stateStartedAt`/acknowledgement identity remain stable across title/hook source swaps. A separate headed desktop-client journey relaunches the host main process while retaining the daemon and a daemon-backgrounded PTY, then requires first-observation foreground sync and continued input/output on the same PTY. Unit coverage keeps layout versions out of snapshot output high-waters when a restored snapshot has no output sequence and retries an existing subscriber only after authoritative provider inventory proves the retained PTY exists. Separate headed/headless ACK-starvation tests recover one stalled stream without replacing its PTY. A headed output-drop oracle proves a successful snapshot probe cannot certify a stale live stream when the authoritative PTY sequence advanced beyond the client high-water. Unit coverage requires an unsequenced client to establish a first-probe baseline, remain attached at the same sequence, and recover only after a later probe advances. A capability-disabled run proves legacy hosts retain the prior lossy limit/TTL fallback. Unit tests cover exact-owner capability routing, raw-stream release, singleton side-effect facts with timed handoff cleanup, 64 simultaneous synthetic-title sources with zero decorative client events after convergence, per-client late-subscribe recovery, semantic bell/title transitions, local animation-frame preservation, legacy no-output-pause delivery gating with exact snapshot restore, provider-authoritative snapshots, 128 active streams plus retry after a 129th-stream capacity rejection, capacity-pressure backoff, full split-leaf remint reconciliation, truncation, and manual-disconnect queue fencing. Linux, Windows, live SSH, and production-scale paired hosts remain gaps. The audit removed the E2E parking override/debug-handle suite. Override exposure guards, delay/retention independence, TTL filtering and debug-handle forwarding alarms are lost. Retained real parking journeys do not establish equivalent test-harness configuration coverage. The test-value audit removes separate responsive-stream, intervening-control-frame and capacity-error classification examples. Retained multiplexer checks use fake clocks and captured transport callbacks; their per-stream isolation, deadline and probe-baseline assertions do not prove an actual host restart or equivalent replacement coverage. Historical run commands and results remain historical. The test-value audit removes the standalone retained/live metadata projection and additive-preference negative example from runtime-client-events.test.ts. Its remaining case checks partial-authority event admission through a captured callback; it does not establish full-pair projection, actual peer delivery or equivalent replacement coverage. Historical commands and results remain historical. The isolated accepted-handle-events observer suite is removed. Its runtime/worktree/pane membership, once-only delivery and listener-release ledger alarms are lost. Live hidden-retention evidence does not establish equivalent observer coverage. Audit1292: The entire host-session mirror empty-inventory settle suite is removed. Live-unpublished versus genuinely-empty hydration, same-ID revision response/in-flight fencing and cleared-tracking pending-probe invalidation alarms are lost. The singleton store and inventories were mocked; no real host census or resume delivery or equivalent replacement coverage is claimed. Audit1302: src/main/runtime/session-tabs-inventory-publication.test.ts: Keep actual runtime public inventory authority across renderer epochs/resync, fallback, aborts and invalid graph publishers. Remove copied nonempty publication, private scan counters/collector and known-host replacement, fake refresh that performs the restoration itself, environment capability flag, and private resume-store characterization whose fixture supplies reservation/rollback ordering. Lose isolated refresh/churn/receiver/capability and copied-payload wiring alarms; no equivalent replacement. Reduced selectors require fresh validation; prior full-suite receipts do not validate removed or changed coverage. No equivalent replacement or physical-provider claim. Audit1312 removes low-value imported specs from aggregate test drivers; old whole-driver execution receipts are archived. Retained registrations are unchanged. No equivalent replacement coverage is claimed. Audit1318: src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts: Retain real local encrypted WebSocket regressions for pre-ready socket replacement preserving a request, close-before-ready logical subscription cleanup, unrelated RPC surviving another deadline, and pending setup abort leaving a sibling pending. Host server is synthetic and uses production crypto; kept scenarios also retain internal diagnostics/memory assertions unchanged. Remove happy routing, authority-envelope, unknown-ID/log, cleanup enum, binary, keepalive/liveness and production-budget/private socket inventories; intentionally lose those alarms, no physical host authorization, independent crypto or remote provider claim. Reduced selectors need fresh validation; historical full-suite receipts do not validate the changed coverage. No equivalent replacement or physical-provider claim. Audit1346 removes the entire private-state-injected session-tabs rich-status boundary suite. Its stale task/question, neutral-title preservation, owner-change and provider-generation alarms are intentionally lost. Retained real terminal journeys do not establish equivalent replacement coverage. The prior mixed 42-contract execution receipt is historical and must not validate the reduced current selector; fresh validation remains required. Audit1352: focused Linux unit selections validated on source head b638e07d395b76af3ba6b03761a1a0fe7e5e026e. Historical statements above retain their original scope. Intentional test losses are recorded in knownGaps; these runs claim no physical-provider, p95, rendered E2E or cross-platform validation. Audit1360: focused Linux unit selections validated on source head 415c9cffc2d10024131ec4b6721767a22195de6d. Historical statements above retain their original scope. Intentional test losses are recorded in knownGaps; these runs claim no physical-provider, p95, rendered E2E or cross-platform validation. Audit1383: src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts reduced. Lose command-list/receipt/default/background activation matrices whose provider spawn returns canned IDs. Retained test proves actual tab allocation separation, not terminal startup. No equivalent replacement coverage is claimed. Existing exact unaffected receipts and their platform/provider/budget claims remain scoped to unchanged selectors. Changed optional selectors have no new execution result. Audit1391: src/renderer/src/components/terminal-pane/pty-connection-remote-pause-drop-notice.spec.ts reduced. Lose repeated quiet switches avoiding snapshots and legacy host without drop-report capability requesting a snapshot. Retained imported registrar uses fake transport/xterm writes, exercising real gap/restore lifecycle rather than actual terminal rendering. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1396: src/renderer/src/components/terminal-pane/terminal-parked-watcher-reconciliation.test.ts reduced. Retire standalone reconcile set output and positive untouchedFreshSpawn/workspaceOwner copying alarms; no native watcher execution claim. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1401: src/main/runtime/orca-runtime-tests/mobile-session-tabs-duplicate-pty-repair.spec.ts removed. Loses listing-on-already-repaired-data alarm; it never established runtime repair invocation. src/main/runtime/orca-runtime-tests/mobile-session-tabs-split-agent-tab.spec.ts removed. Loses actual mobile split sibling shell versus recorded-agent resume command alarms; no equivalent coverage asserted. src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts removed. Loses separate setup/startup tab result in that manually assembled path. src/main/runtime/orca-runtime.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1402: src/renderer/src/components/terminal-pane/pty-connection-park-reveal-model-snapshot.spec.ts reduced. Loses basic paired serialize/initial replay forwarding check; hidden alt-frame grid/precedence policy remains. No real terminal renderer claim. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1412: src/main/runtime/mobile-session-tabs-agent-status-heartbeat.test.ts reduced. Loses FIFO fairness/spacing, semantic bypass/cancellation, delayed-boundary scheduling and teardown timer-cleanup alarms. Retained fixed emission cases do not replace those outcomes. No equivalent replacement coverage is claimed.", + "coverageNotes": "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. The direct side-effect-facts selector retains six cases: replay exclusion, live sequence handling, stale disposer ownership, one handoff drain, drain-before-snapshot, and stale replacement-snapshot refusal. Successful current-entry snapshot application is not witnessed by the retained snapshot case. Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2162: Reduced inventory-authority source intentionally loses the examples recorded in knownGaps; historical execution is not validation of changed bytes. Historical prior account (preserved verbatim): Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2003: Remove SSH/absent-inventory attach refusal, later-subscriber retry, no-view adoption/takeback, provider-tail/unknown-read projections, failed-keystroke retry and simpler loss reattach examples. Keep the existing-subscriber inventory-ready retry alias only at its retained callback, plus retained held-input cancellation/replacement and overlapping attach/loss fences. The inventory driver also loses the whole empty-worktree-publication registration and folder-host/unverifiable scalar examples. Retire the entire dated10-case attach receipt; retain16 independent receipts only in their original scopes. No retained-memory or real-daemon measurement follows from supplied provider inventories. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1991: Remove initial-snapshot sequence-domain, limited-tail/truncation and unknown-output-sequence aliases whose callbacks are removed. The source retains partial-chunk replay and requested-snapshot retry/admission at supplied snapshot/data seams, not equivalent replacement or measured retained-memory proof. Preserve the existing stream/pending-wait capacity aliases only to their retained owning multiplex callbacks with supplied PTY resolutions. Removing the sibling-PTY heartbeat dedup work-count sample does not establish a new decorative fanout budget; the unrelated-PTY cancellation fence survives. Preserve17 unrelated dated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Remove the reasonless-close selector and narrow census aliases to actual retained runtime and injected-inventory callbacks. The removed synthetic census-dedup and isolated pre-boundary timing cases receive no replacement credit; preserve17 unrelated dated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): Delete the synthetic watcher-synchronization and partial-reconciliation suites. Retire all affected host-fact, capability-owner, activation-residue and retention-cap aliases because the remaining callbacks do not establish those full claims. Keep exact local hook/timer, byte-stream side effects, exit/disposal, scroll-intent cleanup and deterministic local rank/TTL progression callbacks within their mocked-host scope. No physical paired-host retention, resource budget or equivalent replacement evidence is assigned. The generic broad test command remains a runnable discovery command, never a dated execution receipt. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete the complete hook-agent-status projection suite and its two behavioral assertion aliases. Supplied stored hook/title/resume/staleness/rename/question/generation/PTY-retirement/snapshot-version projections are intentionally lost. The separate osc-status-scan gate mentions this source only in existing historical notes and receives no mutation. No measured hidden-output retention, CPU/RSS or resource budget result is claimed by the deleted source or this audit. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Module ownership cleanup retires the modeled cold-park private watcher/render/work-count suites under the current test policy. Their assertions are no longer active evidence. Retained lifecycle tests and headed/headless journeys do not establish equivalent coverage for those removed harness alarms. Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1634 removes low-value IPC, filesystem and runtime projections, argument inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained cancellation, ownership, authorization, filesystem and SQLite boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1627 removes low-value mocked daemon projections, scalar tables and duplicate terminal examples without equivalent replacement coverage. Per-source reviews record retained terminal content preservation, process ownership refusal and recovery boundaries together with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Audit1417 intentionally deletes src/renderer/src/components/terminal-pane/pty-connection-hidden-tui-snapshot-replay.spec.ts: Loses rich hidden snapshot sequence replay/grid resize and forced repaint after hidden snapshot alarms, including live-trigger deduplication. deletes src/renderer/src/components/terminal-pane/terminal-cold-park-verdict-loop.test.tsx: Loses modeled React oscillation alarm; real pane/watchers are not exercised. deletes src/renderer/src/runtime/remote-runtime-terminal-parse-backpressure.test.ts: Loses delayed credit until parsing, malformed frame/unknown stream handling, discarded transformed output recovery and failed ACK rearm alarms. No equivalent replacement coverage or fresh result is claimed. Historical coverage account: Audit1412 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): This audit removes the browser response-after-manual-disconnect example. Its distinct in-flight response fencing alarm is lost; retained queued-call disconnect tests are not an equivalent replacement. Historical commands and results remain historical. Deterministic headed macOS runs launch an isolated Orca desktop server and a separate paired web client. A byte-identical headless run uses an isolated `orca serve` host. Both create six real paired host PTYs with bounded high-output scrollback, prove sustained output while all six client xterms are warm-mounted but hidden causes zero renderer scheduler work, then drive 180 timed real-PTY spinner frames through a second production `session.tabs.subscribeAll` transport and the real Zustand store. Each worktree must publish and apply only its exact initial-working and final-idle titles. Both topologies ordinary-park five xterms without enabling the lossy retention budget, assert bounded cells/heap/timer lag, then restore the bounded authoritative tail exactly once on the original PTY including output produced while parked and continued input/output. The headed oracle additionally keeps every remote target workspace and terminal unmounted in the host renderer before and after client recovery. Production-parity React contracts reproduce and remove the independent cold-park watcher/title feedback loop, including memo-cache discard, StrictMode cleanup replay, detached split-PTY replacement, and the zero-park fast path. A deterministic cross-boundary contract drives 24 real PTY trackers in distinct worktrees through 2,880 decorative spinner and bare-native redraw chunks and counts host publications, serialized bytes, renderer apply calls, and store mutations while preserving exact per-PTY raw chunks and per-worktree semantic transitions. Fake-clock continuation beyond the 30-minute stale boundary requires one deduplicated refresh per worktree every 15 minutes, globally spaced by at least 50 ms, with every mirrored working status still fresh. Exact-identical Pi plus rotating normalized Pi/Grok frames renew coarse working/permission state; rich prompt/tool/question fields retain their original 30-minute lease, and `stateStartedAt`/acknowledgement identity remain stable across title/hook source swaps. A separate headed desktop-client journey relaunches the host main process while retaining the daemon and a daemon-backgrounded PTY, then requires first-observation foreground sync and continued input/output on the same PTY. Unit coverage keeps layout versions out of snapshot output high-waters when a restored snapshot has no output sequence and retries an existing subscriber only after authoritative provider inventory proves the retained PTY exists. Separate headed/headless ACK-starvation tests recover one stalled stream without replacing its PTY. A headed output-drop oracle proves a successful snapshot probe cannot certify a stale live stream when the authoritative PTY sequence advanced beyond the client high-water. Unit coverage requires an unsequenced client to establish a first-probe baseline, remain attached at the same sequence, and recover only after a later probe advances. A capability-disabled run proves legacy hosts retain the prior lossy limit/TTL fallback. Unit tests cover exact-owner capability routing, raw-stream release, singleton side-effect facts with timed handoff cleanup, 64 simultaneous synthetic-title sources with zero decorative client events after convergence, per-client late-subscribe recovery, semantic bell/title transitions, local animation-frame preservation, legacy no-output-pause delivery gating with exact snapshot restore, provider-authoritative snapshots, 128 active streams plus retry after a 129th-stream capacity rejection, capacity-pressure backoff, full split-leaf remint reconciliation, truncation, and manual-disconnect queue fencing. Linux, Windows, live SSH, and production-scale paired hosts remain gaps. The audit removed the E2E parking override/debug-handle suite. Override exposure guards, delay/retention independence, TTL filtering and debug-handle forwarding alarms are lost. Retained real parking journeys do not establish equivalent test-harness configuration coverage. The test-value audit removes separate responsive-stream, intervening-control-frame and capacity-error classification examples. Retained multiplexer checks use fake clocks and captured transport callbacks; their per-stream isolation, deadline and probe-baseline assertions do not prove an actual host restart or equivalent replacement coverage. Historical run commands and results remain historical. The test-value audit removes the standalone retained/live metadata projection and additive-preference negative example from runtime-client-events.test.ts. Its remaining case checks partial-authority event admission through a captured callback; it does not establish full-pair projection, actual peer delivery or equivalent replacement coverage. Historical commands and results remain historical. The isolated accepted-handle-events observer suite is removed. Its runtime/worktree/pane membership, once-only delivery and listener-release ledger alarms are lost. Live hidden-retention evidence does not establish equivalent observer coverage. Audit1292: The entire host-session mirror empty-inventory settle suite is removed. Live-unpublished versus genuinely-empty hydration, same-ID revision response/in-flight fencing and cleared-tracking pending-probe invalidation alarms are lost. The singleton store and inventories were mocked; no real host census or resume delivery or equivalent replacement coverage is claimed. Audit1302: src/main/runtime/session-tabs-inventory-publication.test.ts: Keep actual runtime public inventory authority across renderer epochs/resync, fallback, aborts and invalid graph publishers. Remove copied nonempty publication, private scan counters/collector and known-host replacement, fake refresh that performs the restoration itself, environment capability flag, and private resume-store characterization whose fixture supplies reservation/rollback ordering. Lose isolated refresh/churn/receiver/capability and copied-payload wiring alarms; no equivalent replacement. Reduced selectors require fresh validation; prior full-suite receipts do not validate removed or changed coverage. No equivalent replacement or physical-provider claim. Audit1312 removes low-value imported specs from aggregate test drivers; old whole-driver execution receipts are archived. Retained registrations are unchanged. No equivalent replacement coverage is claimed. Audit1318: src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts: Retain real local encrypted WebSocket regressions for pre-ready socket replacement preserving a request, close-before-ready logical subscription cleanup, unrelated RPC surviving another deadline, and pending setup abort leaving a sibling pending. Host server is synthetic and uses production crypto; kept scenarios also retain internal diagnostics/memory assertions unchanged. Remove happy routing, authority-envelope, unknown-ID/log, cleanup enum, binary, keepalive/liveness and production-budget/private socket inventories; intentionally lose those alarms, no physical host authorization, independent crypto or remote provider claim. Reduced selectors need fresh validation; historical full-suite receipts do not validate the changed coverage. No equivalent replacement or physical-provider claim. Audit1346 removes the entire private-state-injected session-tabs rich-status boundary suite. Its stale task/question, neutral-title preservation, owner-change and provider-generation alarms are intentionally lost. Retained real terminal journeys do not establish equivalent replacement coverage. The prior mixed 42-contract execution receipt is historical and must not validate the reduced current selector; fresh validation remains required. Audit1352: focused Linux unit selections validated on source head b638e07d395b76af3ba6b03761a1a0fe7e5e026e. Historical statements above retain their original scope. Intentional test losses are recorded in knownGaps; these runs claim no physical-provider, p95, rendered E2E or cross-platform validation. Audit1360: focused Linux unit selections validated on source head 415c9cffc2d10024131ec4b6721767a22195de6d. Historical statements above retain their original scope. Intentional test losses are recorded in knownGaps; these runs claim no physical-provider, p95, rendered E2E or cross-platform validation. Audit1383: src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts reduced. Lose command-list/receipt/default/background activation matrices whose provider spawn returns canned IDs. Retained test proves actual tab allocation separation, not terminal startup. No equivalent replacement coverage is claimed. Existing exact unaffected receipts and their platform/provider/budget claims remain scoped to unchanged selectors. Changed optional selectors have no new execution result. Audit1391: src/renderer/src/components/terminal-pane/pty-connection-remote-pause-drop-notice.spec.ts reduced. Lose repeated quiet switches avoiding snapshots and legacy host without drop-report capability requesting a snapshot. Retained imported registrar uses fake transport/xterm writes, exercising real gap/restore lifecycle rather than actual terminal rendering. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1396: src/renderer/src/components/terminal-pane/terminal-parked-watcher-reconciliation.test.ts reduced. Retire standalone reconcile set output and positive untouchedFreshSpawn/workspaceOwner copying alarms; no native watcher execution claim. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1401: src/main/runtime/orca-runtime-tests/mobile-session-tabs-duplicate-pty-repair.spec.ts removed. Loses listing-on-already-repaired-data alarm; it never established runtime repair invocation. src/main/runtime/orca-runtime-tests/mobile-session-tabs-split-agent-tab.spec.ts removed. Loses actual mobile split sibling shell versus recorded-agent resume command alarms; no equivalent coverage asserted. src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts removed. Loses separate setup/startup tab result in that manually assembled path. src/main/runtime/orca-runtime.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1402: src/renderer/src/components/terminal-pane/pty-connection-park-reveal-model-snapshot.spec.ts reduced. Loses basic paired serialize/initial replay forwarding check; hidden alt-frame grid/precedence policy remains. No real terminal renderer claim. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1412: src/main/runtime/mobile-session-tabs-agent-status-heartbeat.test.ts reduced. Loses FIFO fairness/spacing, semantic bypass/cancellation, delayed-boundary scheduling and teardown timer-cleanup alarms. Retained fixed emission cases do not replace those outcomes. No equivalent replacement coverage is claimed.", "motivatingLinks": [ "https://github.com/stablyai/orca/issues/8652", "https://github.com/stablyai/orca/pull/10625" ], "invariant": "A host advertising terminal.paired-parking.v1 keeps the PTY and bounded authoritative history alive while an ordinary hidden-view park destroys the client xterm and releases its raw per-PTY stream. Reveal must restore up to the requested 5,000 rows, parked-time side effects/output, the same PTY identity, and continued input/output. Parked watcher synchronization compares parking semantics rather than fresh object identity, owns setup and cleanup across StrictMode replay, reconciles real PTY/layout changes, and performs no terminal-state scan when nothing is parked. After a host main-process relaunch, unknown local delivery-sync state must not be treated as proof that a surviving daemon PTY is already foregrounded. An empty headed session-tab inventory is authoritative only after the current renderer graph generation publishes a complete inventory and every execution host answers the PTY census; unpublished, resync-pending, transport-failed, and partially scoped inventories remain unverifiable, while genuinely authoritative empty and non-empty inventories settle and a scope-less legacy empty keeps its pre-authority best-effort settle so outdated hosts retain agent auto-resume. The unpublished-empty regression must keep the resume dispatch parked with exactly one daemon process/writer; restoring unconditional empty hydration must release one dispatch and create two live writers. If subscription precedes provider readiness, authoritative inventory must reconsider that existing subscriber without spawning, resizing, or changing reconnect state. A snapshot without an output high-water must keep it unknown rather than borrowing a layout version that can suppress newer live output. Hosts without the capability must gate hidden raw output before xterm scheduling and repaint from the authoritative snapshot on reveal while retaining the existing limit/TTL force-parking fallback. After the first semantic title state, decorative spinner frequency must add zero paired client-event frames and zero full session-tabs work between status-freshness leases regardless of hidden worktree count. Continuous working or permission evidence may refresh each affected worktree once per 15 minutes through one globally spaced FIFO so current and legacy viewers do not decay before 30 minutes; sibling PTYs share that worktree refresh, while local title animation, raw output, and semantic title, status, bell, completion, and query facts remain intact. A paired terminal stream whose delivery credits stop progressing must replace only that stream; command silence first probes authoritative state and replaces the stream if the probe times out or proves the PTY advanced beyond the client's delivered output sequence. When no comparable delivery high-water exists, the first sequenced probe establishes a baseline and only later advancement proves staleness. A same-sequence snapshot remains valid proof of a responsive silent command. A successful status probe may replace a pre-ready shared-control socket without rejecting or duplicating calls already waiting for that transport. Manual disconnect must retain pairing while preventing queued or passive calls and subscriptions from recreating transport until explicit Connect. A paired pane reconnecting to a relaunched host that has not yet published its window graph (an unpublished frame, bare or client-projected) must stay in recovery rather than retire, and the host's first published snapshot carrying the surface must reattach it; a published frame lacking the surface still retires it. The placeholder is only ever sent before the host's graph first publishes; afterwards a worktree with no tabs gets a real empty answer, pushed once to any client that asked during startup, so a paired client opening a never-opened host worktree still gets its first terminal.", - "oracle": "Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2003: Remove SSH/absent-inventory attach refusal, later-subscriber retry, no-view adoption/takeback, provider-tail/unknown-read projections, failed-keystroke retry and simpler loss reattach examples. Keep the existing-subscriber inventory-ready retry alias only at its retained callback, plus retained held-input cancellation/replacement and overlapping attach/loss fences. The inventory driver also loses the whole empty-worktree-publication registration and folder-host/unverifiable scalar examples. Retire the entire dated10-case attach receipt; retain16 independent receipts only in their original scopes. No retained-memory or real-daemon measurement follows from supplied provider inventories. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1991: Remove initial-snapshot sequence-domain, limited-tail/truncation and unknown-output-sequence aliases whose callbacks are removed. The source retains partial-chunk replay and requested-snapshot retry/admission at supplied snapshot/data seams, not equivalent replacement or measured retained-memory proof. Preserve the existing stream/pending-wait capacity aliases only to their retained owning multiplex callbacks with supplied PTY resolutions. Removing the sibling-PTY heartbeat dedup work-count sample does not establish a new decorative fanout budget; the unrelated-PTY cancellation fence survives. Preserve17 unrelated dated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Remove the reasonless-close selector and narrow census aliases to actual retained runtime and injected-inventory callbacks. The removed synthetic census-dedup and isolated pre-boundary timing cases receive no replacement credit; preserve17 unrelated dated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): Delete the synthetic watcher-synchronization and partial-reconciliation suites. Retire all affected host-fact, capability-owner, activation-residue and retention-cap aliases because the remaining callbacks do not establish those full claims. Keep exact local hook/timer, byte-stream side effects, exit/disposal, scroll-intent cleanup and deterministic local rank/TTL progression callbacks within their mocked-host scope. No physical paired-host retention, resource budget or equivalent replacement evidence is assigned. The generic broad test command remains a runnable discovery command, never a dated execution receipt. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete the complete hook-agent-status projection suite and its two behavioral assertion aliases. Supplied stored hook/title/resume/staleness/rename/question/generation/PTY-retirement/snapshot-version projections are intentionally lost. The separate osc-status-scan gate mentions this source only in existing historical notes and receives no mutation. No measured hidden-output retention, CPU/RSS or resource budget result is claimed by the deleted source or this audit. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Historical pre-audit oracle account for changed sources: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Run one byte-identical six-terminal oracle against an isolated headed desktop host and an isolated headless `orca serve` host. Stage at least 1,000,000 xterm cells, hide all six warm managers, emit an initial working title followed by 30 timed real-PTY spinner frames and a final idle title per worktree, and observe a second real session-tabs subscription plus the production renderer store. Require exactly two transport envelopes and two title mutations per worktree, no decorative title crossing either boundary, and positive decoded-envelope bytes. Enable ordinary parking with the lossy retention budget disabled, require exactly one mounted manager and five parked tabs, at most 45% retained cells, no more than 16 MiB heap growth, and under 500 ms timer drift. In headed mode, require the host renderer to remain on its original workspace with zero target terminal managers mounted throughout client park, reveal, and live I/O. While a tab is parked, require authoritative terminal.read to observe new PTY output; reveal it and require the original PTY, a marker within the requested 5,000-row history, the parked marker, and post-reveal input/output. Drive 24 real PTY title trackers in distinct worktrees through 40 decorative spinner frames each, then 40 spinner frames alternating with Cursor's bare native identity redraw, using fake clocks. Require all 2,880 raw chunks exactly and zero host session-tabs publications, serialized bytes, renderer apply calls, and renderer store mutations. Continue decorative evidence beyond 30 minutes, require exactly one refresh per worktree per 15-minute lease through a FIFO spaced by at least 50 ms, and require all 24 viewer statuses to remain working and fresh; then require one exact semantic idle transition and one visible-output chunk per PTY. Require ordinary and interior-Braille title changes to publish. Drive 64 host PTYs through ten 80 ms synthetic title frames, require zero paired client events after the first frame per PTY while all 640 local frames remain observable, attach a late client and require one current frame per PTY, then require semantic bell and idle transitions on both clients. Reconstruct a legacy subscribed stream with no outputPause capability, hide a chatty pane, require no hidden xterm writes, reveal it, and require one authoritative snapshot plus continued live output. Drop and acknowledge output only for one original paired-client stream, prove the fixture process consumed input while the host model advanced and the client stayed stale, then require the command snapshot probe to replace that stream, repaint exact fixture output, preserve authoritative PTY identity and target-tab cardinality, and resume live I/O. For a client without a delivered sequence, require the first numeric probe to establish a baseline without replacement, a same-sequence probe to remain attached, and a later advanced probe to replace only that stream. Withhold the first encrypted shared-control ready frame, start one RPC, trigger a status-probe refresh, and require two connections, one host delivery, successful response, and zero retained request bytes. Admit 128 active streams, reject the 129th as retryable, release one stream, then require the retry to attach and publish a snapshot without multiplying retained subscribers. Disable terminal.paired-parking.v1 and require the same oracle to fail before parking, while the legacy limit-one fallback separately passes. Also preserve truncated first paint, ACK-starved same-PTY recovery, responsive silent-command snapshot probes, dead-stream probe timeout recovery, and queued manual-disconnect fencing.", + "oracle": "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. The direct side-effect-facts selector retains six cases: replay exclusion, live sequence handling, stale disposer ownership, one handoff drain, drain-before-snapshot, and stale replacement-snapshot refusal. Successful current-entry snapshot application is not witnessed by the retained snapshot case. Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2003: Remove SSH/absent-inventory attach refusal, later-subscriber retry, no-view adoption/takeback, provider-tail/unknown-read projections, failed-keystroke retry and simpler loss reattach examples. Keep the existing-subscriber inventory-ready retry alias only at its retained callback, plus retained held-input cancellation/replacement and overlapping attach/loss fences. The inventory driver also loses the whole empty-worktree-publication registration and folder-host/unverifiable scalar examples. Retire the entire dated10-case attach receipt; retain16 independent receipts only in their original scopes. No retained-memory or real-daemon measurement follows from supplied provider inventories. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1991: Remove initial-snapshot sequence-domain, limited-tail/truncation and unknown-output-sequence aliases whose callbacks are removed. The source retains partial-chunk replay and requested-snapshot retry/admission at supplied snapshot/data seams, not equivalent replacement or measured retained-memory proof. Preserve the existing stream/pending-wait capacity aliases only to their retained owning multiplex callbacks with supplied PTY resolutions. Removing the sibling-PTY heartbeat dedup work-count sample does not establish a new decorative fanout budget; the unrelated-PTY cancellation fence survives. Preserve17 unrelated dated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Remove the reasonless-close selector and narrow census aliases to actual retained runtime and injected-inventory callbacks. The removed synthetic census-dedup and isolated pre-boundary timing cases receive no replacement credit; preserve17 unrelated dated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): Delete the synthetic watcher-synchronization and partial-reconciliation suites. Retire all affected host-fact, capability-owner, activation-residue and retention-cap aliases because the remaining callbacks do not establish those full claims. Keep exact local hook/timer, byte-stream side effects, exit/disposal, scroll-intent cleanup and deterministic local rank/TTL progression callbacks within their mocked-host scope. No physical paired-host retention, resource budget or equivalent replacement evidence is assigned. The generic broad test command remains a runnable discovery command, never a dated execution receipt. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete the complete hook-agent-status projection suite and its two behavioral assertion aliases. Supplied stored hook/title/resume/staleness/rename/question/generation/PTY-retirement/snapshot-version projections are intentionally lost. The separate osc-status-scan gate mentions this source only in existing historical notes and receives no mutation. No measured hidden-output retention, CPU/RSS or resource budget result is claimed by the deleted source or this audit. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Historical pre-audit oracle account for changed sources: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Run one byte-identical six-terminal oracle against an isolated headed desktop host and an isolated headless `orca serve` host. Stage at least 1,000,000 xterm cells, hide all six warm managers, emit an initial working title followed by 30 timed real-PTY spinner frames and a final idle title per worktree, and observe a second real session-tabs subscription plus the production renderer store. Require exactly two transport envelopes and two title mutations per worktree, no decorative title crossing either boundary, and positive decoded-envelope bytes. Enable ordinary parking with the lossy retention budget disabled, require exactly one mounted manager and five parked tabs, at most 45% retained cells, no more than 16 MiB heap growth, and under 500 ms timer drift. In headed mode, require the host renderer to remain on its original workspace with zero target terminal managers mounted throughout client park, reveal, and live I/O. While a tab is parked, require authoritative terminal.read to observe new PTY output; reveal it and require the original PTY, a marker within the requested 5,000-row history, the parked marker, and post-reveal input/output. Drive 24 real PTY title trackers in distinct worktrees through 40 decorative spinner frames each, then 40 spinner frames alternating with Cursor's bare native identity redraw, using fake clocks. Require all 2,880 raw chunks exactly and zero host session-tabs publications, serialized bytes, renderer apply calls, and renderer store mutations. Continue decorative evidence beyond 30 minutes, require exactly one refresh per worktree per 15-minute lease through a FIFO spaced by at least 50 ms, and require all 24 viewer statuses to remain working and fresh; then require one exact semantic idle transition and one visible-output chunk per PTY. Require ordinary and interior-Braille title changes to publish. Drive 64 host PTYs through ten 80 ms synthetic title frames, require zero paired client events after the first frame per PTY while all 640 local frames remain observable, attach a late client and require one current frame per PTY, then require semantic bell and idle transitions on both clients. Reconstruct a legacy subscribed stream with no outputPause capability, hide a chatty pane, require no hidden xterm writes, reveal it, and require one authoritative snapshot plus continued live output. Drop and acknowledge output only for one original paired-client stream, prove the fixture process consumed input while the host model advanced and the client stayed stale, then require the command snapshot probe to replace that stream, repaint exact fixture output, preserve authoritative PTY identity and target-tab cardinality, and resume live I/O. For a client without a delivered sequence, require the first numeric probe to establish a baseline without replacement, a same-sequence probe to remain attached, and a later advanced probe to replace only that stream. Withhold the first encrypted shared-control ready frame, start one RPC, trigger a status-probe refresh, and require two connections, one host delivery, successful response, and zero retained request bytes. Admit 128 active streams, reject the 129th as retryable, release one stream, then require the retry to attach and publish a snapshot without multiplying retained subscribers. Disable terminal.paired-parking.v1 and require the same oracle to fail before parking, while the legacy limit-one fallback separately passes. Also preserve truncated first paint, ACK-starved same-PTY recovery, responsive silent-command snapshot probes, dead-stream probe timeout recovery, and queued manual-disconnect fencing.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-unpublished-host-graph.test.ts", "ORCA_BACKGROUND_LAUNCH=1 pnpm exec playwright test tests/e2e/paired-remote-terminal-host-quit-reconnect-input.spec.ts --config tests/playwright.config.ts --project electron-headless --workers=1", @@ -9063,7 +9032,9 @@ "Audit2412 removes whole useVirtualizedScrollAnchor.marks-restore-signal.test.ts (six fake-hook geometry/mark/convergence/user-takeover/clamp alarms), use-task-creation-draft-retention original3/4 (immediate discard mock-call count/unopened no-write), use-terminal-bulk-close-actions.placement original6/7 (absent new-agent append and one real history-publication count at consumed3/30 scale), PendingNativeChatCreation original6 (unmounted abort completion/timer cleanup), and wsl-move-dialog-store original1/9/13 (default whole-distro count/reference/reuse and rejected-preview/start refusal recovery). The history counter measures genuine publication work without entries/order/reopen assertions; its unique batching alarm is intentionally retired. Fake React scroll tests ignore dependency scheduling and cleanup; unique simulated arithmetic alarms are deliberately lost. Retained existing-terminal reorder is not new-agent append coverage; mounted handoff timeout is not abort coverage. No equivalent complete replacement or fresh validation is claimed.", "Audit2417 removes commit-actions-real-git original3/4 (ordinary clean cherry-pick and revert content, subject and current-branch samples), and pty-startup-ingress-exited-asker original8/12 (actual foreground-group read budget across100queued queries, and zero foreground reads across100normal chunks plus final emitted/accepted raw cursor equality). Counters measure actual callback work and scale is consumed; these internal-work alarms are deliberately retired. Retained unborn, conflict and sequencer cases are not equivalent ordinary-success coverage. No equivalent complete replacement or fresh validation is claimed.", "Audit2425 removes use-workspace-copy-status original5, which returns a fixture-supplied readError string through statusReadError. No consumer blocker or attempted branch switch established refusal; the unique error-forwarding sample is intentionally retired. Other copy ownership and stale-refresh cases are not equivalent error-path coverage. No equivalent replacement or fresh validation is claimed.", - "Audit2432 removes BranchPicker.test.tsx original3, which only asserted onOpenChange(true/false) with an always-mounted mocked Popover. It never reopened the picker or consumed the callback in the parent status-refresh owner, despite its title. Lose that unique open/close notification alarm. Retained blocker/collision recovery and asynchronous post-unmount outcome cases are not equivalent replacement coverage. No fresh validation of the reduced selector is claimed." + "Audit2432 removes BranchPicker.test.tsx original3, which only asserted onOpenChange(true/false) with an always-mounted mocked Popover. It never reopened the picker or consumed the callback in the parent status-refresh owner, despite its title. Lose that unique open/close notification alarm. Retained blocker/collision recovery and asynchronous post-unmount outcome cases are not equivalent replacement coverage. No fresh validation of the reduced selector is claimed.", + "Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. The direct side-effect-facts selector retains six cases: replay exclusion, live sequence handling, stale disposer ownership, one handoff drain, drain-before-snapshot, and stale replacement-snapshot refusal. Successful current-entry snapshot application is not witnessed by the retained snapshot case.", + "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed." ], "demotionRule": "Keep experimental or demote to protection none if decorative title frequency changes paired client-event or session-tabs publication volume after convergence, a semantic fact is dropped, paired first paint is blank, passive work reconnects after manual disconnect, a capable hidden paired manager survives ordinary parking, a legacy hidden pane schedules raw xterm output or bypasses its fallback, reveal loses requested bounded history or live PTY identity, retained buffer cells do not fall, or either headed/headless scenario flakes." }, @@ -9241,7 +9212,7 @@ "providers": ["local", "daemon", "ssh", "remote-runtime"], "coveredPlatforms": ["macos"], "coveredProviders": [], - "coverageNotes": "Module layout SSH policy: Retire the multiplexer private-clock saturation registration, the writer saturation transition-count registration and the changed-source dated writer/backpressure receipt. Retained byte delivery, lane order, fairness, settlement and cancellation cases are unvalidated by that historical receipt. No equivalent replacement, new execution, measured performance, live SSH/WSL or cross-platform proof is claimed. The unchanged WSL protocol receipt retains only its original command scope. Historical prior account (preserved verbatim): Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2070 (sources2068/2069): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime.test.ts: ordinary registration cleanup removes only await import('./orca-runtime-tests/hooks-and-hosted-review.spec'). src/main/ssh/ssh-multiplexer-transport-writer.test.ts: reports saturated epochs and their drain boundary exactly once. src/main/runtime/orca-runtime-tests/worktree-removal-archive-hook-gate.spec.ts: removes and records the waiver when the failure is explicitly overridden; removes without an override record when the hook succeeds; removes when the hook is configured but not requested; removes when no archive hook is configured; holds a desktop removal in the same repo until this one is accepted; joins a desktop removal of the same worktree accepted while this one waited. src/main/runtime/orca-runtime-tests/worktree-ps-agent-row-dismissal.spec.ts: drops the row as soon as the user dismisses it, without waiting for the PTY to exit; tells paired clients to republish on the transition and on the dismissal; rejoins a row through its %s handle after pane ownership clears. src/main/runtime/orca-runtime-tests/hooks-and-hosted-review.spec.ts: reports an error when the SSH filesystem provider is unavailable; reports an SSH orca.yaml as an error without reading any filesystem; reports ok for a local repo hook check; reads SSH issue commands as absent and drops writes without touching any filesystem; allows host integration slug helpers for SSH repos through provider-aware GitHub clients; routes runtime GitHub repo identity helpers through the selected WSL project runtime; routes runtime GitHub issue and work-item actions through the selected WSL project runtime; pins explicit origin preference on runtime open-by-number work item lookups; forwards check-details cancellation without local Git overrides. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. The historical receipt/currentCommand selecting src/main/ssh/ssh-multiplexer-transport-writer.test.ts remains historical and is not a passing result for the reduced current command. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete the complete tail-wait memo suite: its sole current authored callback checks supplied fromTail/blocked field values. Retire all three broader memoization/equivalence/eviction assertion aliases; they are not backed by retained source callbacks. No scan-work budget, sustained output, physical terminal or resource measurement is assigned to this removed test. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1674 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1634 removes low-value IPC, filesystem and runtime projections, argument inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained cancellation, ownership, authorization, filesystem and SQLite boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Local macOS evidence covers main-process pending-output and projection-admission caps, saturated-tail wait detection, direct-SSH source retention/accounting, always-on V1 negotiation with legacy peer fallback, exact provider-generation pause ownership, renderer exit/data ordering, decoder input bounds, bounded reconnect scheduling, and WSL stdio transport settlement through deterministic unit contracts. A joined main/runtime oracle exercises renderer-sourced headed semantics and headless-model snapshot semantics without launching a live paired server. Separately, a macOS-hosted Docker OpenSSH run exercises only the deployed Linux relay and direct SSH provider with an exact 256 KiB source-credit plateau, concurrent PTY typing, fixed-size filesystem frames, Git churn, and owner-lease reconnect. Neither deterministic topology labels nor Docker SSH constitute live headed desktop, headless orca serve, or physical WSL evidence; local/daemon, prior-version daemons, Windows named pipes/ConPTY, folder workspaces, and mixed-version clients also remain uncovered. Audit1312 removes low-value imported specs from aggregate test drivers; old whole-driver execution receipts are archived. Retained registrations are unchanged. No equivalent replacement coverage is claimed. Audit1383: src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts reduced. Lose command-list/receipt/default/background activation matrices whose provider spawn returns canned IDs. Retained test proves actual tab allocation separation, not terminal startup. No equivalent replacement coverage is claimed. Existing exact unaffected receipts and their platform/provider/budget claims remain scoped to unchanged selectors. Changed optional selectors have no new execution result. Audit1401: src/main/runtime/orca-runtime-tests/mobile-session-tabs-duplicate-pty-repair.spec.ts removed. Loses listing-on-already-repaired-data alarm; it never established runtime repair invocation. src/main/runtime/orca-runtime-tests/mobile-session-tabs-split-agent-tab.spec.ts removed. Loses actual mobile split sibling shell versus recorded-agent resume command alarms; no equivalent coverage asserted. src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts removed. Loses separate setup/startup tab result in that manually assembled path. src/main/runtime/orca-runtime.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result.", + "coverageNotes": "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. Module layout SSH policy: Retire the multiplexer private-clock saturation registration, the writer saturation transition-count registration and the changed-source dated writer/backpressure receipt. Retained byte delivery, lane order, fairness, settlement and cancellation cases are unvalidated by that historical receipt. No equivalent replacement, new execution, measured performance, live SSH/WSL or cross-platform proof is claimed. The unchanged WSL protocol receipt retains only its original command scope. Historical prior account (preserved verbatim): Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2070 (sources2068/2069): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime.test.ts: ordinary registration cleanup removes only await import('./orca-runtime-tests/hooks-and-hosted-review.spec'). src/main/ssh/ssh-multiplexer-transport-writer.test.ts: reports saturated epochs and their drain boundary exactly once. src/main/runtime/orca-runtime-tests/worktree-removal-archive-hook-gate.spec.ts: removes and records the waiver when the failure is explicitly overridden; removes without an override record when the hook succeeds; removes when the hook is configured but not requested; removes when no archive hook is configured; holds a desktop removal in the same repo until this one is accepted; joins a desktop removal of the same worktree accepted while this one waited. src/main/runtime/orca-runtime-tests/worktree-ps-agent-row-dismissal.spec.ts: drops the row as soon as the user dismisses it, without waiting for the PTY to exit; tells paired clients to republish on the transition and on the dismissal; rejoins a row through its %s handle after pane ownership clears. src/main/runtime/orca-runtime-tests/hooks-and-hosted-review.spec.ts: reports an error when the SSH filesystem provider is unavailable; reports an SSH orca.yaml as an error without reading any filesystem; reports ok for a local repo hook check; reads SSH issue commands as absent and drops writes without touching any filesystem; allows host integration slug helpers for SSH repos through provider-aware GitHub clients; routes runtime GitHub repo identity helpers through the selected WSL project runtime; routes runtime GitHub issue and work-item actions through the selected WSL project runtime; pins explicit origin preference on runtime open-by-number work item lookups; forwards check-details cancellation without local Git overrides. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. The historical receipt/currentCommand selecting src/main/ssh/ssh-multiplexer-transport-writer.test.ts remains historical and is not a passing result for the reduced current command. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete the complete tail-wait memo suite: its sole current authored callback checks supplied fromTail/blocked field values. Retire all three broader memoization/equivalence/eviction assertion aliases; they are not backed by retained source callbacks. No scan-work budget, sustained output, physical terminal or resource measurement is assigned to this removed test. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1674 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1634 removes low-value IPC, filesystem and runtime projections, argument inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained cancellation, ownership, authorization, filesystem and SQLite boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Local macOS evidence covers main-process pending-output and projection-admission caps, saturated-tail wait detection, direct-SSH source retention/accounting, always-on V1 negotiation with legacy peer fallback, exact provider-generation pause ownership, renderer exit/data ordering, decoder input bounds, bounded reconnect scheduling, and WSL stdio transport settlement through deterministic unit contracts. A joined main/runtime oracle exercises renderer-sourced headed semantics and headless-model snapshot semantics without launching a live paired server. Separately, a macOS-hosted Docker OpenSSH run exercises only the deployed Linux relay and direct SSH provider with an exact 256 KiB source-credit plateau, concurrent PTY typing, fixed-size filesystem frames, Git churn, and owner-lease reconnect. Neither deterministic topology labels nor Docker SSH constitute live headed desktop, headless orca serve, or physical WSL evidence; local/daemon, prior-version daemons, Windows named pipes/ConPTY, folder workspaces, and mixed-version clients also remain uncovered. Audit1312 removes low-value imported specs from aggregate test drivers; old whole-driver execution receipts are archived. Retained registrations are unchanged. No equivalent replacement coverage is claimed. Audit1383: src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts reduced. Lose command-list/receipt/default/background activation matrices whose provider spawn returns canned IDs. Retained test proves actual tab allocation separation, not terminal startup. No equivalent replacement coverage is claimed. Existing exact unaffected receipts and their platform/provider/budget claims remain scoped to unchanged selectors. Changed optional selectors have no new execution result. Audit1401: src/main/runtime/orca-runtime-tests/mobile-session-tabs-duplicate-pty-repair.spec.ts removed. Loses listing-on-already-repaired-data alarm; it never established runtime repair invocation. src/main/runtime/orca-runtime-tests/mobile-session-tabs-split-agent-tab.spec.ts removed. Loses actual mobile split sibling shell versus recorded-agent resume command alarms; no equivalent coverage asserted. src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts removed. Loses separate setup/startup tab result in that manually assembled path. src/main/runtime/orca-runtime.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result.", "motivatingLinks": [ "https://github.com/stablyai/orca/pull/6836", "https://github.com/stablyai/orca/pull/6858", @@ -9249,7 +9220,7 @@ "https://github.com/stablyai/orca/pull/7054" ], "invariant": "High-volume terminal output must stay bounded across daemon socket writes, SSH relay writer/decoder/source retention/reconnect, main model and projection admission, runtime metadata, detectors, and tail checks, main-to-renderer in-flight bytes, renderer scheduler queues, and hidden-output restore without starving focused input. Every new SSH session offers V1 and every same-build relay supports it; legacy delivery is reachable only when capability negotiation proves the peer cannot use V1. Negotiated SSH spans remain exact and contiguous through activation, exit, cancellation, recovery, desktop projection, and required remote replacement; provisional activation data cannot project, reconnect may release it only into the exact attempt's private recovery quarantine after contract validation, and exit seals that quarantine against later same-token frames until ordered admission or exact cancellation proof. Reconnect checkpoint capture freezes exact provider-generation/PTy admission, cancels queued old work, and waits for the running raw completion before exposing its accepted checkpoint; timeout or failure detaches only that PTy's old model, makes the checkpoint unavailable, and releases the bounded fence without closing the shared provider, while the same failure outside an active exact migration remains generation-fatal and overlapping reconnects preserve any earlier outstanding fence. Pending renderer projection IDs are capped and compacted across split remainders, exit preparation owns its renderer fence through finalization, exit-time cancellation transfers published projections before proof commit, generation close fences late proof while draining exact projection waiters, closed-generation identity compacts without weakening stale rejection, canceled source-delivery retirement retains at most one ordered token per PTY, and pause/resume targets only the exact provider generation. Additional subscribers cannot stall the owner, while the required legacy primary retains backpressure.", - "oracle": "Module layout SSH policy: Retire the multiplexer private-clock saturation registration, the writer saturation transition-count registration and the changed-source dated writer/backpressure receipt. Retained byte delivery, lane order, fairness, settlement and cancellation cases are unvalidated by that historical receipt. No equivalent replacement, new execution, measured performance, live SSH/WSL or cross-platform proof is claimed. The unchanged WSL protocol receipt retains only its original command scope. Historical prior account (preserved verbatim): Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2070 (sources2068/2069): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime.test.ts: ordinary registration cleanup removes only await import('./orca-runtime-tests/hooks-and-hosted-review.spec'). src/main/ssh/ssh-multiplexer-transport-writer.test.ts: reports saturated epochs and their drain boundary exactly once. src/main/runtime/orca-runtime-tests/worktree-removal-archive-hook-gate.spec.ts: removes and records the waiver when the failure is explicitly overridden; removes without an override record when the hook succeeds; removes when the hook is configured but not requested; removes when no archive hook is configured; holds a desktop removal in the same repo until this one is accepted; joins a desktop removal of the same worktree accepted while this one waited. src/main/runtime/orca-runtime-tests/worktree-ps-agent-row-dismissal.spec.ts: drops the row as soon as the user dismisses it, without waiting for the PTY to exit; tells paired clients to republish on the transition and on the dismissal; rejoins a row through its %s handle after pane ownership clears. src/main/runtime/orca-runtime-tests/hooks-and-hosted-review.spec.ts: reports an error when the SSH filesystem provider is unavailable; reports an SSH orca.yaml as an error without reading any filesystem; reports ok for a local repo hook check; reads SSH issue commands as absent and drops writes without touching any filesystem; allows host integration slug helpers for SSH repos through provider-aware GitHub clients; routes runtime GitHub repo identity helpers through the selected WSL project runtime; routes runtime GitHub issue and work-item actions through the selected WSL project runtime; pins explicit origin preference on runtime open-by-number work item lookups; forwards check-details cancellation without local Git overrides. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. The historical receipt/currentCommand selecting src/main/ssh/ssh-multiplexer-transport-writer.test.ts remains historical and is not a passing result for the reduced current command. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete the complete tail-wait memo suite: its sole current authored callback checks supplied fromTail/blocked field values. Retire all three broader memoization/equivalence/eviction assertion aliases; they are not backed by retained source callbacks. No scan-work budget, sustained output, physical terminal or resource measurement is assigned to this removed test. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1674 retires changed-source assertion and execution scope without equivalent replacement coverage. Existing unchanged-selector receipts remain scoped to their original sources. Historical prior-source oracle: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The current executable slice injects main-process renderer backlog pressure, then asserts ordinary terminal-wait detection without a joined-tail allocation and with full prompt-family continuity, per-PTY and total pending-output caps, a 1,024-ID projection cap with split-remainder compaction, preserved sequenced-tail metadata, active-pending protection ahead of background trimming, exact provider-generation pause ownership, renderer exit/data ordering, and ACK-gated in-flight bounds. The negotiation seam proves every initial connection and reconnect offers V1, the same-build relay advertises V1 without launch flags, old clients remain token-free, and method-not-found peers fall back without installing source ACK publication. The joined source-intake/multiplex oracle blocks renderer or headless serialization, admits one snapshot-covered span and one trailing span, requires replacement reservation only after the authoritative sequence is known, advances upstream ACK eligibility exactly to the covered boundary after SnapshotEnd, and delivers then ACKs the trailing span through the ordinary live path without cancellation. Source-range ledger and multiplex seams additionally require cumulative byte ACK 40 then 100 for one 100-byte frame to release exact byte credit without early source settlement, admit a contiguous higher-generation recovered token while the prior token remains unsettled, and reject stale stream or source generations without releasing in-flight byte credit. Replacement reservation rolls back every earlier span on a later failure, commit requires the exact frozen transfer states, and an authoritatively reclaimed covered span rejects commit without local trim authority while rollback removes the reservation idempotently. The exit-deadline oracle publishes a source-backed desktop projection, advances a fake clock to cancellation, and requires one projection transfer, proof commit, preparation, and final exit with no provider close, retained obligation, duplicate finalization, or process-lifetime cancellation tombstone; a second controlled proof remains pending across generation close and must never publish final exit, while both paths release the renderer preparation lease exactly once. The model-migration oracle accepts span A, blocks span B's raw emulator completion, begins disconnect migration, and proves no checkpoint or reconnect attach can remain at A; releasing B advances the exact checkpoint to B and projects B once. Its fake-clock arm reaches the 10-second deadline, requires checkpoint-unavailable, one exact model reset, zero retained admission charge and timers, and no effect from late raw settlement. Its two-PTY failure arm rejects one running raw callback under an active exact migration and requires one checkpoint-unavailable result, one model reset, zero provider closes, retained sibling checkpoint and transport liveness, zero charges and timers, and an unaffected other generation; a non-migrating sibling oracle still requires generation close. The intake additionally closes 2,048 sequential provider generations into one exact range, rejects stale events across that range, and preserves an out-of-order live gap until its own close. Direct-SSH contracts additionally prove activation-response settlement before the first source frame, claim-gated projection under same-decoder-turn response/data delivery, exact early-ACK reservation through send settlement or same-token retry, recovery completion visible before lease-held frames transfers those frames only into the private quarantine and admits no output until exact checkpoint-to-recoveryEnd coverage, invalid-checkpoint restore retention through response settlement followed by fresh-token retry and one live source frame, isolated saturated-subscriber eviction with healthy owner liveness, preserved legacy-primary backpressure, one-write ownership across write(false)/drain, control selection ahead of queued ordinary PTY input with FIFO lanes and bounded fairness, liveness rebasing, failed-exit retention through late ACK or exact recovery, response-settlement cancellation authority, token-scoped exit cancellation, exact checkpoint-to-recoveryEnd continuity, stale-owner one-shot retry, no physical PTY teardown on recovery failure, exact provider-generation closure and once-only cleanup when recovery cancellation publication or proof rejects, 16 MiB-plus-1 MiB decoder caps, charged per-PTY/session retention budgets, and eight-wide isolated reattach. The live Electron perf oracle adds hidden-output floods, renderer scheduler queue depth, dropped-output-zero normal scenarios, and active key latency budgets before promotion.", + "oracle": "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. Module layout SSH policy: Retire the multiplexer private-clock saturation registration, the writer saturation transition-count registration and the changed-source dated writer/backpressure receipt. Retained byte delivery, lane order, fairness, settlement and cancellation cases are unvalidated by that historical receipt. No equivalent replacement, new execution, measured performance, live SSH/WSL or cross-platform proof is claimed. The unchanged WSL protocol receipt retains only its original command scope. Historical prior account (preserved verbatim): Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2070 (sources2068/2069): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime.test.ts: ordinary registration cleanup removes only await import('./orca-runtime-tests/hooks-and-hosted-review.spec'). src/main/ssh/ssh-multiplexer-transport-writer.test.ts: reports saturated epochs and their drain boundary exactly once. src/main/runtime/orca-runtime-tests/worktree-removal-archive-hook-gate.spec.ts: removes and records the waiver when the failure is explicitly overridden; removes without an override record when the hook succeeds; removes when the hook is configured but not requested; removes when no archive hook is configured; holds a desktop removal in the same repo until this one is accepted; joins a desktop removal of the same worktree accepted while this one waited. src/main/runtime/orca-runtime-tests/worktree-ps-agent-row-dismissal.spec.ts: drops the row as soon as the user dismisses it, without waiting for the PTY to exit; tells paired clients to republish on the transition and on the dismissal; rejoins a row through its %s handle after pane ownership clears. src/main/runtime/orca-runtime-tests/hooks-and-hosted-review.spec.ts: reports an error when the SSH filesystem provider is unavailable; reports an SSH orca.yaml as an error without reading any filesystem; reports ok for a local repo hook check; reads SSH issue commands as absent and drops writes without touching any filesystem; allows host integration slug helpers for SSH repos through provider-aware GitHub clients; routes runtime GitHub repo identity helpers through the selected WSL project runtime; routes runtime GitHub issue and work-item actions through the selected WSL project runtime; pins explicit origin preference on runtime open-by-number work item lookups; forwards check-details cancellation without local Git overrides. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. The historical receipt/currentCommand selecting src/main/ssh/ssh-multiplexer-transport-writer.test.ts remains historical and is not a passing result for the reduced current command. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete the complete tail-wait memo suite: its sole current authored callback checks supplied fromTail/blocked field values. Retire all three broader memoization/equivalence/eviction assertion aliases; they are not backed by retained source callbacks. No scan-work budget, sustained output, physical terminal or resource measurement is assigned to this removed test. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1674 retires changed-source assertion and execution scope without equivalent replacement coverage. Existing unchanged-selector receipts remain scoped to their original sources. Historical prior-source oracle: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The current executable slice injects main-process renderer backlog pressure, then asserts ordinary terminal-wait detection without a joined-tail allocation and with full prompt-family continuity, per-PTY and total pending-output caps, a 1,024-ID projection cap with split-remainder compaction, preserved sequenced-tail metadata, active-pending protection ahead of background trimming, exact provider-generation pause ownership, renderer exit/data ordering, and ACK-gated in-flight bounds. The negotiation seam proves every initial connection and reconnect offers V1, the same-build relay advertises V1 without launch flags, old clients remain token-free, and method-not-found peers fall back without installing source ACK publication. The joined source-intake/multiplex oracle blocks renderer or headless serialization, admits one snapshot-covered span and one trailing span, requires replacement reservation only after the authoritative sequence is known, advances upstream ACK eligibility exactly to the covered boundary after SnapshotEnd, and delivers then ACKs the trailing span through the ordinary live path without cancellation. Source-range ledger and multiplex seams additionally require cumulative byte ACK 40 then 100 for one 100-byte frame to release exact byte credit without early source settlement, admit a contiguous higher-generation recovered token while the prior token remains unsettled, and reject stale stream or source generations without releasing in-flight byte credit. Replacement reservation rolls back every earlier span on a later failure, commit requires the exact frozen transfer states, and an authoritatively reclaimed covered span rejects commit without local trim authority while rollback removes the reservation idempotently. The exit-deadline oracle publishes a source-backed desktop projection, advances a fake clock to cancellation, and requires one projection transfer, proof commit, preparation, and final exit with no provider close, retained obligation, duplicate finalization, or process-lifetime cancellation tombstone; a second controlled proof remains pending across generation close and must never publish final exit, while both paths release the renderer preparation lease exactly once. The model-migration oracle accepts span A, blocks span B's raw emulator completion, begins disconnect migration, and proves no checkpoint or reconnect attach can remain at A; releasing B advances the exact checkpoint to B and projects B once. Its fake-clock arm reaches the 10-second deadline, requires checkpoint-unavailable, one exact model reset, zero retained admission charge and timers, and no effect from late raw settlement. Its two-PTY failure arm rejects one running raw callback under an active exact migration and requires one checkpoint-unavailable result, one model reset, zero provider closes, retained sibling checkpoint and transport liveness, zero charges and timers, and an unaffected other generation; a non-migrating sibling oracle still requires generation close. The intake additionally closes 2,048 sequential provider generations into one exact range, rejects stale events across that range, and preserves an out-of-order live gap until its own close. Direct-SSH contracts additionally prove activation-response settlement before the first source frame, claim-gated projection under same-decoder-turn response/data delivery, exact early-ACK reservation through send settlement or same-token retry, recovery completion visible before lease-held frames transfers those frames only into the private quarantine and admits no output until exact checkpoint-to-recoveryEnd coverage, invalid-checkpoint restore retention through response settlement followed by fresh-token retry and one live source frame, isolated saturated-subscriber eviction with healthy owner liveness, preserved legacy-primary backpressure, one-write ownership across write(false)/drain, control selection ahead of queued ordinary PTY input with FIFO lanes and bounded fairness, liveness rebasing, failed-exit retention through late ACK or exact recovery, response-settlement cancellation authority, token-scoped exit cancellation, exact checkpoint-to-recoveryEnd continuity, stale-owner one-shot retry, no physical PTY teardown on recovery failure, exact provider-generation closure and once-only cleanup when recovery cancellation publication or proof rejects, 16 MiB-plus-1 MiB decoder caps, charged per-PTY/session retention budgets, and eight-wide isolated reattach. The live Electron perf oracle adds hidden-output floods, renderer scheduler queue depth, dropped-output-zero normal scenarios, and active key latency budgets before promotion.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts", "pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/construction/orca-runtime.test.ts", @@ -9390,7 +9361,9 @@ "Module layout SSH policy: Retire the multiplexer private-clock saturation registration, the writer saturation transition-count registration and the changed-source dated writer/backpressure receipt. Retained byte delivery, lane order, fairness, settlement and cancellation cases are unvalidated by that historical receipt. No equivalent replacement, new execution, measured performance, live SSH/WSL or cross-platform proof is claimed. The unchanged WSL protocol receipt retains only its original command scope.", "Historical original SSH assertion metadata before policy cuts, preserved verbatim; removed assertions are not current coverage:\n{\n \"file\": \"src/main/ssh/protocol/ssh-multiplexer-transport-writer.test.ts\",\n \"assertions\": [\n \"write(false) owns one frame and later ordinary traffic waits for drain\",\n \"queued control is selected before ordinary PTY backlog at drain while each lane remains FIFO\",\n \"four-control fairness guarantees ordinary progress without starving control\",\n \"one coalesced liveness bypass is allowed per saturated epoch\",\n \"saturation and drain transitions are reported exactly once\"\n ]\n }\n{\n \"file\": \"src/main/ssh/protocol/ssh-channel-multiplexer.test.ts\",\n \"assertions\": [\n \"self-imposed writer saturation suppresses false death and rebases both health clocks on drain\"\n ]\n }", "Historical complete dated writer/backpressure receipt retired after its source changed, preserved verbatim including executed command and path-only currentCommand; not current validation:\n{\n \"date\": \"2026-07-29\",\n \"runner\": \"local\",\n \"platform\": \"macos\",\n \"command\": \"pnpm exec vitest run --config config/vitest.config.ts src/main/ssh/ssh-multiplexer-transport-writer.test.ts src/main/ssh/ssh-channel-multiplexer-backpressure.test.ts --reporter=dot\",\n \"result\": \"passed\",\n \"durationSeconds\": 6.89,\n \"summary\": \"Thirteen current-head deterministic files passed 150 tests across exit-sealed private recovery, stale-transfer cancellation authority, bounded latest-token retirement, restore retirement, fail-closed recovery cancellation, partial ACK and token rotation, reclaimed-span replacement, mux lane fairness, provisional activation, and exit-proof ordering; no live topology was exercised.\",\n \"currentCommand\": \"pnpm exec vitest run --config config/vitest.config.ts src/main/ssh/protocol/ssh-multiplexer-transport-writer.test.ts src/main/ssh/protocol/ssh-channel-multiplexer-backpressure.test.ts --reporter=dot\"\n }", - "Historical provider scope before changed-source receipt retirement: [\"ssh\"]" + "Historical provider scope before changed-source receipt retirement: [\"ssh\"]", + "Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed.", + "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed." ], "demotionRule": "Cannot promote without metric artifacts and bounded-byte assertions." }, @@ -9626,7 +9599,7 @@ "providers": ["ssh", "remote-runtime", "wsl"], "coveredPlatforms": ["macos"], "coveredProviders": ["ssh", "remote-runtime"], - "coverageNotes": "Audit2709 removes src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts: intentionally retire waiting out an older inventory and sharing a fresh post-operation request among concurrent callers. No equivalent replacement or fresh execution is claimed. Dated receipts remain historical evidence for their unchanged selectors only; they do not validate the reduced commands or full current gate. Historical prior account (preserved verbatim): Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/ssh/connection/ssh-connection-manager.test.ts: tears a failed startup down quietly, so its error is not replaced by a disconnect; marks a dial that never reached the host, so setup reports SSH’s reason; removes the registration when bulk teardown fails; leaves a connection whose own reconnect is asking the user alone; clears the pool entry when the closed connection is still the registered one; still reuses a connection that is already up; dials a user's connection test. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2052 (sources2049/2050/2051): Remove complete low-value restored-pane-title and pane-visibility-identity suites and their current selectors. Their supplied snapshot/title and nullable identity-comparison alarms are intentionally lost without replacement. Unrelated dated evidenceRuns remain unchanged and do not validate the reduced commands. No fresh gate execution, actual PTY/provider, rendered, remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the terminal-create idempotency forwarding suite and its prospective selector. Preserve2 unrelated receipts without claiming the lost forwarding alarm was replaced. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete complete transport-unmount and queued-initial-CWD helper suites: despite lifecycle-shaped fixtures, the unmount owner returns a Boolean PTY-id predicate, while CWD cases check nullish field selection and callback counts. Lose their detach/destroy/teardown and one-shot-CWD supplied examples. Partial queued-pane-startup loses three identical/empty/nonowner identity examples, retaining four exact one-shot/replacement ownership callbacks. No assertion object maps to these three sources, so unrelated alias objects remain byte-exact. Preserve the current81ed prior removal of pane-split-startup; stale bd948 source metadata snapshots are not replayed. No actual process/PTY startup, transport shutdown, live SSH or rendered recovery is proven by this metadata change. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Delete the sole supplied public-SSH-state spread/sanitized-error projection and its provider-authority-pair alias. Also delete the complete tiny one-shot split-startup wrapper suite: callback-visible temporary field/reset, sequential payload and thrown-sentinel reset alarms disappear. No SSH provider epoch handoff, connection, process startup or actual terminal split was performed by either deleted suite. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1903 removes whole mocked detach, supplied geometry and/or close-request suites selected by this gate. Their pending-CWD/PTY-binding argument/order, fabricated hit-test and close bookkeeping alarms are intentionally lost without replacement. Valid remaining selectors/assertions and unchanged-selector execution receipts retain their original scope. Reduced unit selections have no fresh broad gate, real PTY/provider, rendered focus, or measured-budget validation. Historical prior account (preserved verbatim): Audit1645 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1342 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1301 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Deterministic renderer coverage proves retained native and runtime SSH payloads are admitted through production routes only with valid complete authority, stale cleanup cannot unregister a replacement runtime terminal, direct SSH Git and folder panes keep their PTY bindings through disconnect and reconnect, one authority chain stops after two automatic attempts even when each timeout exceeds the rolling window, rejected acknowledgements mutate no store maps, and one shared exact attempt admits every concurrent split-pane spawn and reattach while preserving the first PTY as the tab fallback. A later sibling failure rotates the tab once, stale callbacks from the prior attempt mutate no state, split remount activity suppression is counted per leaf, primary PTY exit promotes a bound survivor or preserves an empty continuation gap for a late sibling, and primary, non-primary, or null-PTY detach preserves exact authority on both resulting tabs. Intentional pane disposal cancels its settlement timer without breaking StrictMode remount timeout ownership. A mounted remote-runtime terminal survives repeated transport partitions without changing PTY identity. A real encrypted-WebSocket oracle proves a successful reachability probe can replace a pre-ready shared-control socket without rejecting or duplicating the waiting RPC. Direct SSH coordinator tests cover immediate terminal finalization, hydration correction, damping, bounded retry, and telemetry non-interference. Client/server heartbeat tests cover timer suspension, socket generations fence stale callbacks, cold restored-terminal attachment retries, cached pixels remain unhealthy until authoritative replay, automatic retries stop after one minute, manual reconnect preserves the PTY, and pane closure releases recovery UI state. Current-transport recovery clears every error that transport surfaced without clearing or displaying a sibling pane's errors, while transport suppression, pane retention, and the rendered surface are independently bounded. Current macOS Electron journeys against an ephemeral Linux Docker SSH target cover exact-authority repo/worktree hydration, live terminal recovery after disconnect/reconnect, and eager six-terminal remount after renderer reload. A Windows remote-runtime smoke covers reachability and PTY round-trip. Multi-target live fanout, paired-close, WSL, and patched live partition journeys remain gaps. The test-value audit narrowed resolved-worktree-execution-host.test.ts to cache reuse and invalidation. Its direct hydrated-worktree, missing-folder, restored-owner, host-stamp and empty-runtime selection alarms are lost. Other routing and recovery suites do not establish equivalent selector coverage; historical run commands and results remain historical. The test-value audit removes standalone unwritten/released renderer-authority and cross-scope request-count examples. The retained synthetic mirror/store/sidebar and pending-inventory checks do not establish real PTY byte ownership, SSH reconnection or equivalent replacement coverage; historical commands and results remain historical. The test-value audit removes direct join/label ledgers, immediate failure and negative-only stale/removal/partial-authority examples, plus the standalone retained/live event projection. Retained synthetic store/hydration compositions do not establish real SSH continuity, remote authority delivery or equivalent replacement alarms. Historical commands and results remain historical. The renderer scheduling fixture retains in-flight coalescing only. Its immediate publication and negative stale-SSH-cleanup call ledgers were removed; the retained SSH recovery evidence does not replace those alarms. The accepted-handle-events observer suite is removed, including its scoped listener and settlement-release assertions. These observer alarms are lost; retained SSH/transport journeys are not equivalent replacement coverage. The test-value audit removed repeated remote-handle rotation inventories and snapshot-first pending-restart migration examples from terminal-pty-identity-replacement.test.ts, plus direct foreground metadata setter, confirmation, evidence-enum, and prefix/worktree cleanup examples. Those rotation, pending-restart, snapshot-first migration, and foreground scalar-update alarms are lost. The retained replacement case observes pane and tab identities in one subscriber publication; it does not establish equivalent migration, process-evidence, or input-routing coverage. Historical commands and results remain historical. The test-value audit narrows terminals-hydration.test.ts to a real reconnect batch with one measured store publication and hydration-seeded history consumed by a subsequent visit/Back check. Direct split-layout, runtime/folder/floating restoration, dead-leaf focus, cold/known-absent SSH deferral, title, default-tab marker, navigation initialization, and hydrationSucceeded scalar examples are removed; those specific alarms are lost. No actual target-removal transition, live SSH connection, session writer, or persisted restart is exercised by the retained cases. The old target-scoped/snapshot assertion references are retired because the current file does not contain those oracles. Other suites and historical runs do not establish equivalent replacement coverage. Audit1299 removes tests/e2e/terminal-cold-activation-deferral.spec.ts. Private-state/work-budget/assembled-fixture alarms are intentionally lost; retained suites are not equivalent replacement coverage. No new runtime/platform evidence is claimed. Audit1301: src/renderer/src/runtime/remote-runtime-session-tabs-inflight.test.ts reduced. Direct dedupe eviction/count and equal receipt-position sample loses authored alarm. No equivalent replacement coverage is claimed. Audit1318: src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts: Retain real local encrypted WebSocket regressions for pre-ready socket replacement preserving a request, close-before-ready logical subscription cleanup, unrelated RPC surviving another deadline, and pending setup abort leaving a sibling pending. Host server is synthetic and uses production crypto; kept scenarios also retain internal diagnostics/memory assertions unchanged. Remove happy routing, authority-envelope, unknown-ID/log, cleanup enum, binary, keepalive/liveness and production-budget/private socket inventories; intentionally lose those alarms, no physical host authorization, independent crypto or remote provider claim. Reduced selectors need fresh validation; historical full-suite receipts do not validate the changed coverage. No equivalent replacement or physical-provider claim. Audit1342: src/renderer/src/hooks/ipc-events/direct-ssh-connect-reply-routing.test.ts removed. Initial and event-triggered partial-authority hydration fixture alarms disappear. src/renderer/src/components/terminal-pane/terminal-error-accumulation.test.ts removed. Multiline dedup/storm bounds, resource classification/collision, scoped clear/reconnect strip and1000-pane map count alarms disappear. No equivalent replacement coverage is claimed. Audit1396: src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.spec.ts reduced. Lose standalone debug-state retention/log silence alarm. React StrictMode is not mounted; bindings manually simulate remount over mocked transport. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1400: src/main/ipc/ssh/ssh.test.ts reduced. Lose trivial missing target and mocked publication inventory. Preexisting unresolved ../ssh/ssh-port-scanner mock is recorded, not fixed. src/renderer/src/runtime/sync-runtime-graph-scheduling.test.ts removed. Removes whole coalescing call-count suite; no newest-state delivery or replacement claim. src/renderer/src/store/slices/terminal-pty-identity-replacement.test.ts reduced. Removes three no-op/work-count registrations; retains externally observed ownership consistency. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1412: src/main/ssh/ssh-provider-authority.test.ts removed. Loses real AbortController revocation/target isolation/reentrancy outcomes, recreated-target generation-floor/session rollover behavior, stale mutation refusal and settled-registration cleanup alarms. These useful alarms are deliberately lost; no equivalent cancellation coverage is claimed. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1743 removes the standalone line-height clamp/default and pane cwd fallback helper tests (5 authored cases). These trivial-helper alarms are intentionally lost, with no equivalent replacement. Only current commands/testFiles lose the deleted selectors; historical receipts and evidenceRuns remain unchanged and do not validate the reduced commands.", + "coverageNotes": "Audit3096: remove the deleted reconnect-banner selector and its two UI aliases. The reduced recovery-state selector retains only the deadline cancelling pending backoff and explicit retry owning a new epoch alias; healthy-replacement stale-schedule and independent caller-cutoff cancellation aliases retire. Other retained state cases cover reentrant retry, owner settlement and same-epoch parked revival, without replacing those removed alarms. Prior admission-selector retirement, archived July 28 receipt, unrelated selectors/claims/receipts and old gaps remain unchanged; no fresh execution is claimed. Audit3086: retire the destroyed fresh-session fallback settlement/non-destructive reattach alias and its direct selector; retain the detach/attach selector and assertion unchanged. The retained admission cases cover adopt-before-data and explicitly buffered-death admission without a new spawn, without replacing fallback retirement. July 28 evidence was already archived by audit3077; no duplicate retirement or new execution is claimed. Audit2709 removes src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts: intentionally retire waiting out an older inventory and sharing a fresh post-operation request among concurrent callers. No equivalent replacement or fresh execution is claimed. Dated receipts remain historical evidence for their unchanged selectors only; they do not validate the reduced commands or full current gate. Historical prior account (preserved verbatim): Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/ssh/connection/ssh-connection-manager.test.ts: tears a failed startup down quietly, so its error is not replaced by a disconnect; marks a dial that never reached the host, so setup reports SSH’s reason; removes the registration when bulk teardown fails; leaves a connection whose own reconnect is asking the user alone; clears the pool entry when the closed connection is still the registered one; still reuses a connection that is already up; dials a user's connection test. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2052 (sources2049/2050/2051): Remove complete low-value restored-pane-title and pane-visibility-identity suites and their current selectors. Their supplied snapshot/title and nullable identity-comparison alarms are intentionally lost without replacement. Unrelated dated evidenceRuns remain unchanged and do not validate the reduced commands. No fresh gate execution, actual PTY/provider, rendered, remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the terminal-create idempotency forwarding suite and its prospective selector. Preserve2 unrelated receipts without claiming the lost forwarding alarm was replaced. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete complete transport-unmount and queued-initial-CWD helper suites: despite lifecycle-shaped fixtures, the unmount owner returns a Boolean PTY-id predicate, while CWD cases check nullish field selection and callback counts. Lose their detach/destroy/teardown and one-shot-CWD supplied examples. Partial queued-pane-startup loses three identical/empty/nonowner identity examples, retaining four exact one-shot/replacement ownership callbacks. No assertion object maps to these three sources, so unrelated alias objects remain byte-exact. Preserve the current81ed prior removal of pane-split-startup; stale bd948 source metadata snapshots are not replayed. No actual process/PTY startup, transport shutdown, live SSH or rendered recovery is proven by this metadata change. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Delete the sole supplied public-SSH-state spread/sanitized-error projection and its provider-authority-pair alias. Also delete the complete tiny one-shot split-startup wrapper suite: callback-visible temporary field/reset, sequential payload and thrown-sentinel reset alarms disappear. No SSH provider epoch handoff, connection, process startup or actual terminal split was performed by either deleted suite. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1903 removes whole mocked detach, supplied geometry and/or close-request suites selected by this gate. Their pending-CWD/PTY-binding argument/order, fabricated hit-test and close bookkeeping alarms are intentionally lost without replacement. Valid remaining selectors/assertions and unchanged-selector execution receipts retain their original scope. Reduced unit selections have no fresh broad gate, real PTY/provider, rendered focus, or measured-budget validation. Historical prior account (preserved verbatim): Audit1645 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1342 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1301 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Deterministic renderer coverage proves retained native and runtime SSH payloads are admitted through production routes only with valid complete authority, stale cleanup cannot unregister a replacement runtime terminal, direct SSH Git and folder panes keep their PTY bindings through disconnect and reconnect, one authority chain stops after two automatic attempts even when each timeout exceeds the rolling window, rejected acknowledgements mutate no store maps, and one shared exact attempt admits every concurrent split-pane spawn and reattach while preserving the first PTY as the tab fallback. A later sibling failure rotates the tab once, stale callbacks from the prior attempt mutate no state, split remount activity suppression is counted per leaf, primary PTY exit promotes a bound survivor or preserves an empty continuation gap for a late sibling, and primary, non-primary, or null-PTY detach preserves exact authority on both resulting tabs. Intentional pane disposal cancels its settlement timer without breaking StrictMode remount timeout ownership. A mounted remote-runtime terminal survives repeated transport partitions without changing PTY identity. A real encrypted-WebSocket oracle proves a successful reachability probe can replace a pre-ready shared-control socket without rejecting or duplicating the waiting RPC. Direct SSH coordinator tests cover immediate terminal finalization, hydration correction, damping, bounded retry, and telemetry non-interference. Client/server heartbeat tests cover timer suspension, socket generations fence stale callbacks, cold restored-terminal attachment retries, cached pixels remain unhealthy until authoritative replay, automatic retries stop after one minute, manual reconnect preserves the PTY, and pane closure releases recovery UI state. Current-transport recovery clears every error that transport surfaced without clearing or displaying a sibling pane's errors, while transport suppression, pane retention, and the rendered surface are independently bounded. Current macOS Electron journeys against an ephemeral Linux Docker SSH target cover exact-authority repo/worktree hydration, live terminal recovery after disconnect/reconnect, and eager six-terminal remount after renderer reload. A Windows remote-runtime smoke covers reachability and PTY round-trip. Multi-target live fanout, paired-close, WSL, and patched live partition journeys remain gaps. The test-value audit narrowed resolved-worktree-execution-host.test.ts to cache reuse and invalidation. Its direct hydrated-worktree, missing-folder, restored-owner, host-stamp and empty-runtime selection alarms are lost. Other routing and recovery suites do not establish equivalent selector coverage; historical run commands and results remain historical. The test-value audit removes standalone unwritten/released renderer-authority and cross-scope request-count examples. The retained synthetic mirror/store/sidebar and pending-inventory checks do not establish real PTY byte ownership, SSH reconnection or equivalent replacement coverage; historical commands and results remain historical. The test-value audit removes direct join/label ledgers, immediate failure and negative-only stale/removal/partial-authority examples, plus the standalone retained/live event projection. Retained synthetic store/hydration compositions do not establish real SSH continuity, remote authority delivery or equivalent replacement alarms. Historical commands and results remain historical. The renderer scheduling fixture retains in-flight coalescing only. Its immediate publication and negative stale-SSH-cleanup call ledgers were removed; the retained SSH recovery evidence does not replace those alarms. The accepted-handle-events observer suite is removed, including its scoped listener and settlement-release assertions. These observer alarms are lost; retained SSH/transport journeys are not equivalent replacement coverage. The test-value audit removed repeated remote-handle rotation inventories and snapshot-first pending-restart migration examples from terminal-pty-identity-replacement.test.ts, plus direct foreground metadata setter, confirmation, evidence-enum, and prefix/worktree cleanup examples. Those rotation, pending-restart, snapshot-first migration, and foreground scalar-update alarms are lost. The retained replacement case observes pane and tab identities in one subscriber publication; it does not establish equivalent migration, process-evidence, or input-routing coverage. Historical commands and results remain historical. The test-value audit narrows terminals-hydration.test.ts to a real reconnect batch with one measured store publication and hydration-seeded history consumed by a subsequent visit/Back check. Direct split-layout, runtime/folder/floating restoration, dead-leaf focus, cold/known-absent SSH deferral, title, default-tab marker, navigation initialization, and hydrationSucceeded scalar examples are removed; those specific alarms are lost. No actual target-removal transition, live SSH connection, session writer, or persisted restart is exercised by the retained cases. The old target-scoped/snapshot assertion references are retired because the current file does not contain those oracles. Other suites and historical runs do not establish equivalent replacement coverage. Audit1299 removes tests/e2e/terminal-cold-activation-deferral.spec.ts. Private-state/work-budget/assembled-fixture alarms are intentionally lost; retained suites are not equivalent replacement coverage. No new runtime/platform evidence is claimed. Audit1301: src/renderer/src/runtime/remote-runtime-session-tabs-inflight.test.ts reduced. Direct dedupe eviction/count and equal receipt-position sample loses authored alarm. No equivalent replacement coverage is claimed. Audit1318: src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts: Retain real local encrypted WebSocket regressions for pre-ready socket replacement preserving a request, close-before-ready logical subscription cleanup, unrelated RPC surviving another deadline, and pending setup abort leaving a sibling pending. Host server is synthetic and uses production crypto; kept scenarios also retain internal diagnostics/memory assertions unchanged. Remove happy routing, authority-envelope, unknown-ID/log, cleanup enum, binary, keepalive/liveness and production-budget/private socket inventories; intentionally lose those alarms, no physical host authorization, independent crypto or remote provider claim. Reduced selectors need fresh validation; historical full-suite receipts do not validate the changed coverage. No equivalent replacement or physical-provider claim. Audit1342: src/renderer/src/hooks/ipc-events/direct-ssh-connect-reply-routing.test.ts removed. Initial and event-triggered partial-authority hydration fixture alarms disappear. src/renderer/src/components/terminal-pane/terminal-error-accumulation.test.ts removed. Multiline dedup/storm bounds, resource classification/collision, scoped clear/reconnect strip and1000-pane map count alarms disappear. No equivalent replacement coverage is claimed. Audit1396: src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.spec.ts reduced. Lose standalone debug-state retention/log silence alarm. React StrictMode is not mounted; bindings manually simulate remount over mocked transport. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1400: src/main/ipc/ssh/ssh.test.ts reduced. Lose trivial missing target and mocked publication inventory. Preexisting unresolved ../ssh/ssh-port-scanner mock is recorded, not fixed. src/renderer/src/runtime/sync-runtime-graph-scheduling.test.ts removed. Removes whole coalescing call-count suite; no newest-state delivery or replacement claim. src/renderer/src/store/slices/terminal-pty-identity-replacement.test.ts reduced. Removes three no-op/work-count registrations; retains externally observed ownership consistency. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1412: src/main/ssh/ssh-provider-authority.test.ts removed. Loses real AbortController revocation/target isolation/reentrancy outcomes, recreated-target generation-floor/session rollover behavior, stale mutation refusal and settled-registration cleanup alarms. These useful alarms are deliberately lost; no equivalent cancellation coverage is claimed. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1743 removes the standalone line-height clamp/default and pane cwd fallback helper tests (5 authored cases). These trivial-helper alarms are intentionally lost, with no equivalent replacement. Only current commands/testFiles lose the deleted selectors; historical receipts and evidenceRuns remain unchanged and do not validate the reduced commands.", "motivatingLinks": [ "https://linear.app/stably/issue/STA-3107", "https://github.com/stablyai/orca/pull/12664", @@ -9641,13 +9614,13 @@ "https://github.com/stablyai/orca/issues/12902" ], "invariant": "SSH, WSL, and remote-runtime restore paths must treat provider listing failures and unknown liveness as unknown, not dead, while still avoiding duplicate spawn and clearing expired relay leases exactly once. Direct SSH disconnect, reconnect, and wake must keep PTY bindings and relay identity, and target snapshot hydration/reconnect cannot reset sibling SSH, local, WSL, or runtime-owned state. Every restored remote terminal must preserve its provider PTY identity, including the authoritative incarnation returned by a successful session-ID reattach. After a recoverable partition the same authenticated runtime must reattach the same PTY, reject detached input, apply the latest viewport, and report healthy only after authoritative replay. A successful one-shot reachability probe may replace a pre-ready shared-control socket, but waiting RPCs must continue onto the replacement under their original deadline without duplicate host delivery or retained request bytes. Automatic PTY recovery stops after one bounded minute without a fatal terminal error; a manual reconnect starts a newly fenced epoch against the same PTY, and closed panes retain no recovery UI state. Successful current-transport recovery must clear every stale error surfaced for that pane without clearing or displaying a sibling pane's error; a later genuine failure must remain visible. Each transport retains at most eight suppressed messages, each pane retains at most eight distinct messages, and the rendered surface retains at most 24 lines and 4,000 characters. One capability-gated terminal-create mutation must produce at most one host PTY across an unknown response outcome, remain manually retryable after cutoff, and never let a stale completion replace a newer pane lifecycle. Reconnect must alternate exact activation with authoritative inventory so neither a stale activation response nor an activation failure can strand or retire a pane, and activating a parked surface whose persisted binding was already retired must respawn it rather than report a changed owner after signalling its exit.", - "oracle": "Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/ssh/connection/ssh-connection-manager.test.ts: tears a failed startup down quietly, so its error is not replaced by a disconnect; marks a dial that never reached the host, so setup reports SSH’s reason; removes the registration when bulk teardown fails; leaves a connection whose own reconnect is asking the user alone; clears the pool entry when the closed connection is still the registered one; still reuses a connection that is already up; dials a user's connection test. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2052 (sources2049/2050/2051): Remove complete low-value restored-pane-title and pane-visibility-identity suites and their current selectors. Their supplied snapshot/title and nullable identity-comparison alarms are intentionally lost without replacement. Unrelated dated evidenceRuns remain unchanged and do not validate the reduced commands. No fresh gate execution, actual PTY/provider, rendered, remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the terminal-create idempotency forwarding suite and its prospective selector. Preserve2 unrelated receipts without claiming the lost forwarding alarm was replaced. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete complete transport-unmount and queued-initial-CWD helper suites: despite lifecycle-shaped fixtures, the unmount owner returns a Boolean PTY-id predicate, while CWD cases check nullish field selection and callback counts. Lose their detach/destroy/teardown and one-shot-CWD supplied examples. Partial queued-pane-startup loses three identical/empty/nonowner identity examples, retaining four exact one-shot/replacement ownership callbacks. No assertion object maps to these three sources, so unrelated alias objects remain byte-exact. Preserve the current81ed prior removal of pane-split-startup; stale bd948 source metadata snapshots are not replayed. No actual process/PTY startup, transport shutdown, live SSH or rendered recovery is proven by this metadata change. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Delete the sole supplied public-SSH-state spread/sanitized-error projection and its provider-authority-pair alias. Also delete the complete tiny one-shot split-startup wrapper suite: callback-visible temporary field/reset, sequential payload and thrown-sentinel reset alarms disappear. No SSH provider epoch handoff, connection, process startup or actual terminal split was performed by either deleted suite. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1903 removes whole mocked detach, supplied geometry and/or close-request suites selected by this gate. Their pending-CWD/PTY-binding argument/order, fabricated hit-test and close bookkeeping alarms are intentionally lost without replacement. Valid remaining selectors/assertions and unchanged-selector execution receipts retain their original scope. Reduced unit selections have no fresh broad gate, real PTY/provider, rendered focus, or measured-budget validation. Historical prior account (preserved verbatim): Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Deterministic tests cover bounded stale-handle replacement, suspended heartbeat clocks, cold and established subscription failure, ten partition/recovery cycles, automatic-recovery cutoff, manual reconnect, and direct SSH binding retention. They assert SSH state changes leave PTY bindings in place, relay identity survives, and another target/local/WSL/runtime panes remain byte-identical through target snapshot hydration and reconnect. Both remount callbacks consume split-count activity suppression, intentional dispose emits no failure/timeout, and a same-attempt StrictMode remount still owns one timeout. Hydration clears an untrusted PTY hint without clearing its current pending owner, healthy current-authority bindings suppress correction, hydration finalizes once, and reconnect emits no paired close lifecycle. A provider-level session-ID reattach returns an incarnation, then a legacy exit without an incarnation must resolve to that returned identity rather than minting a fallback identity. The shared-control oracle withholds the first encrypted ready frame, starts one RPC, triggers the successful-probe refresh, then requires exactly two client connections, one host request, a successful response, zero pending calls, and zero retained request bytes. Tests also assert one unsubscribe per remote-runtime epoch, observable recovery phases, stable PTY identity, resumed snapshot/output/input, no healthy state before replay, no retry or input after cutoff, a new manual epoch against the same PTY, quiet recovery UI with an explicit Reconnect action, pane-close state cleanup, one stable create mutation id, old-runtime no-retry behavior, cross-process PTY adoption, and bounded in-flight coordination. A focused recovery oracle surfaces two distinct failures through one transport, completes authoritative replay, and requires both matching clear callbacks; pane-state tests require only the active pane's error to render, matching-pane recovery to preserve sibling and unrelated errors, dismissal to re-admit later failures, and distinct storms to retain only the newest eight messages within 24 lines and 4,000 characters. The retained store replacement assertion observes one atomic pane/tab subscriber publication; repeated rotations and snapshot-first pending-restart migration no longer have their direct store examples.", + "oracle": "Audit3096: remove the deleted reconnect-banner selector and its two UI aliases. The reduced recovery-state selector retains only the deadline cancelling pending backoff and explicit retry owning a new epoch alias; healthy-replacement stale-schedule and independent caller-cutoff cancellation aliases retire. Other retained state cases cover reentrant retry, owner settlement and same-epoch parked revival, without replacing those removed alarms. Prior admission-selector retirement, archived July 28 receipt, unrelated selectors/claims/receipts and old gaps remain unchanged; no fresh execution is claimed. Audit3086: retire the destroyed fresh-session fallback settlement/non-destructive reattach alias and its direct selector; retain the detach/attach selector and assertion unchanged. The retained admission cases cover adopt-before-data and explicitly buffered-death admission without a new spawn, without replacing fallback retirement. July 28 evidence was already archived by audit3077; no duplicate retirement or new execution is claimed. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/ssh/connection/ssh-connection-manager.test.ts: tears a failed startup down quietly, so its error is not replaced by a disconnect; marks a dial that never reached the host, so setup reports SSH’s reason; removes the registration when bulk teardown fails; leaves a connection whose own reconnect is asking the user alone; clears the pool entry when the closed connection is still the registered one; still reuses a connection that is already up; dials a user's connection test. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2052 (sources2049/2050/2051): Remove complete low-value restored-pane-title and pane-visibility-identity suites and their current selectors. Their supplied snapshot/title and nullable identity-comparison alarms are intentionally lost without replacement. Unrelated dated evidenceRuns remain unchanged and do not validate the reduced commands. No fresh gate execution, actual PTY/provider, rendered, remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the terminal-create idempotency forwarding suite and its prospective selector. Preserve2 unrelated receipts without claiming the lost forwarding alarm was replaced. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete complete transport-unmount and queued-initial-CWD helper suites: despite lifecycle-shaped fixtures, the unmount owner returns a Boolean PTY-id predicate, while CWD cases check nullish field selection and callback counts. Lose their detach/destroy/teardown and one-shot-CWD supplied examples. Partial queued-pane-startup loses three identical/empty/nonowner identity examples, retaining four exact one-shot/replacement ownership callbacks. No assertion object maps to these three sources, so unrelated alias objects remain byte-exact. Preserve the current81ed prior removal of pane-split-startup; stale bd948 source metadata snapshots are not replayed. No actual process/PTY startup, transport shutdown, live SSH or rendered recovery is proven by this metadata change. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Delete the sole supplied public-SSH-state spread/sanitized-error projection and its provider-authority-pair alias. Also delete the complete tiny one-shot split-startup wrapper suite: callback-visible temporary field/reset, sequential payload and thrown-sentinel reset alarms disappear. No SSH provider epoch handoff, connection, process startup or actual terminal split was performed by either deleted suite. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1903 removes whole mocked detach, supplied geometry and/or close-request suites selected by this gate. Their pending-CWD/PTY-binding argument/order, fabricated hit-test and close bookkeeping alarms are intentionally lost without replacement. Valid remaining selectors/assertions and unchanged-selector execution receipts retain their original scope. Reduced unit selections have no fresh broad gate, real PTY/provider, rendered focus, or measured-budget validation. Historical prior account (preserved verbatim): Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Deterministic tests cover bounded stale-handle replacement, suspended heartbeat clocks, cold and established subscription failure, ten partition/recovery cycles, automatic-recovery cutoff, manual reconnect, and direct SSH binding retention. They assert SSH state changes leave PTY bindings in place, relay identity survives, and another target/local/WSL/runtime panes remain byte-identical through target snapshot hydration and reconnect. Both remount callbacks consume split-count activity suppression, intentional dispose emits no failure/timeout, and a same-attempt StrictMode remount still owns one timeout. Hydration clears an untrusted PTY hint without clearing its current pending owner, healthy current-authority bindings suppress correction, hydration finalizes once, and reconnect emits no paired close lifecycle. A provider-level session-ID reattach returns an incarnation, then a legacy exit without an incarnation must resolve to that returned identity rather than minting a fallback identity. The shared-control oracle withholds the first encrypted ready frame, starts one RPC, triggers the successful-probe refresh, then requires exactly two client connections, one host request, a successful response, zero pending calls, and zero retained request bytes. Tests also assert one unsubscribe per remote-runtime epoch, observable recovery phases, stable PTY identity, resumed snapshot/output/input, no healthy state before replay, no retry or input after cutoff, a new manual epoch against the same PTY, quiet recovery UI with an explicit Reconnect action, pane-close state cleanup, one stable create mutation id, old-runtime no-retry behavior, cross-process PTY adoption, and bounded in-flight coordination. A focused recovery oracle surfaces two distinct failures through one transport, completes authoritative replay, and requires both matching clear callbacks; pane-state tests require only the active pane's error to render, matching-pane recovery to preserve sibling and unrelated errors, dismissal to re-admit later failures, and distinct storms to retain only the newest eight messages within 24 lines and 4,000 characters. The retained store replacement assertion observes one atomic pane/tab subscriber publication; repeated rotations and snapshot-first pending-restart migration no longer have their direct store examples.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/paired-reconnect-multi-pane-materialization.test.ts src/renderer/src/runtime/web-session-tabs-sync/agent-status/paired-reconnect-sidebar-agent-count.test.ts --reporter=dot", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/resolved-worktree-execution-host.test.ts src/renderer/src/components/terminal/background-terminal-worktree-mount.test.ts src/renderer/src/components/terminal-pane/mounting/queued-pane-startup.test.ts src/renderer/src/components/terminal-pane/parking/one-shot-park-replay.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/store/terminals/terminal-pty-identity-replacement.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-reattach-admission.test.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-detach-attach-handoff.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-detach-attach-handoff.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-attach-subscription.test.ts --reporter=dot", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-attach-subscription.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-expired-pane-recovery.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-outcome-recovery.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/remote-runtime-pty-recovery-state.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/TerminalRemoteRuntimeReconnectBanner.test.tsx src/shared/remote-runtime/remote-runtime-socket-liveness.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-socket-generation.test.ts src/shared/remote-runtime/remote-runtime-client-error-classification.test.ts src/main/runtime/rpc/remote-runtime-server-heartbeat.test.ts src/main/runtime/terminal/launch/orca-runtime-terminal-create-idempotency.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-attach-subscription.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-expired-pane-recovery.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-outcome-recovery.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/remote-runtime-pty-recovery-state.test.ts src/shared/remote-runtime/remote-runtime-socket-liveness.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-socket-generation.test.ts src/shared/remote-runtime/remote-runtime-client-error-classification.test.ts src/main/runtime/rpc/remote-runtime-server-heartbeat.test.ts src/main/runtime/terminal/launch/orca-runtime-terminal-create-idempotency.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/store/slices/ui/workspace-navigation-history-hydration.test.ts src/renderer/src/store/repos/repos-ssh-host-reconciliation.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts --reporter=dot", "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/ssh/ssh.test.ts src/main/ipc/worktrees-ssh-repo-owner-resolution.test.ts src/main/ssh/connection/ssh-connection-manager.test.ts src/main/ssh/connection/ssh-connection.test.ts src/preload/ssh-authority-forwarding.test.ts src/renderer/src/runtime/rpc/subscriptions/runtime-client-events.test.ts src/renderer/src/runtime/hosts/ssh/runtime-environment-ssh-state.test.ts src/shared/ssh-retained-payload-admission.test.ts --reporter=dot", "pnpm exec electron-vite build --mode e2e", @@ -9662,7 +9635,6 @@ "src/renderer/src/components/terminal-pane/mounting/queued-pane-startup.test.ts", "src/renderer/src/components/terminal-pane/parking/one-shot-park-replay.test.ts", "src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts", - "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-reattach-admission.test.ts", "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-detach-attach-handoff.test.ts", "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-attach-subscription.test.ts", "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts", @@ -9671,7 +9643,6 @@ "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-outcome-recovery.test.ts", "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-handoff.test.ts", "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/remote-runtime-pty-recovery-state.test.ts", - "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/TerminalRemoteRuntimeReconnectBanner.test.tsx", "src/renderer/src/store/terminals/terminal-pty-identity-replacement.test.ts", "src/shared/remote-runtime/remote-runtime-socket-liveness.test.ts", "src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts", @@ -9747,16 +9718,7 @@ { "file": "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/remote-runtime-pty-recovery-state.test.ts", "assertions": [ - "a healthy replacement invalidates the prior recovery epoch so a slower failure cannot re-arm retry", - "the automatic-recovery deadline cancels pending backoff and a manual retry owns a new epoch", - "a caller-owned recovery cutoff cancels scheduled work and remains disconnected" - ] - }, - { - "file": "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/TerminalRemoteRuntimeReconnectBanner.test.tsx", - "assertions": [ - "automatic recovery renders as a quiet bounded status without a button", - "the disconnected state exposes one explicit Reconnect action" + "the automatic-recovery deadline cancels pending backoff and a manual retry owns a new epoch" ] }, { @@ -9828,12 +9790,6 @@ "a StrictMode remount joins the pending spawn instead of starting a second one" ] }, - { - "file": "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-reattach-admission.test.ts", - "assertions": [ - "a destroyed fresh session fallback settles retirement before it can publish handlers, and reattach remains non-destructive" - ] - }, { "file": "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-detach-attach-handoff.test.ts", "assertions": [ @@ -9851,16 +9807,6 @@ "durationSeconds": 2.54, "summary": "Seven deterministic STA-3107 contracts passed across six-pane multiplex rematerialization and client-owned sidebar-row retention after sleep/wake.", "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/paired-reconnect-multi-pane-materialization.test.ts src/renderer/src/runtime/web-session-tabs-sync/agent-status/paired-reconnect-sidebar-agent-count.test.ts --reporter=dot" - }, - { - "date": "2026-07-28", - "runner": "local", - "platform": "macos", - "command": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport-reattach-admission.test.ts src/renderer/src/components/terminal-pane/pty-transport-detach-attach-handoff.test.ts", - "result": "passed", - "durationSeconds": 1.48, - "summary": "All 90 transport tests passed, including pre-publication admission rejection, handler-complete non-destructive detach for obsolete SSH reattach transports, settled retirement of rejected or destroyed fresh fallbacks, and reported shutdown refusal.", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-reattach-admission.test.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-detach-attach-handoff.test.ts" } ], "runtimeBudget": { @@ -9885,6 +9831,8 @@ "Include reconnect/polling artifacts that identify provider, connection id, and lease state." ], "knownGaps": [ + "Audit3077 reduces the IPC handoff suite while retaining the obsolete-reattach detach observer case and its alias. Removed nominal no-kill and gauge-cleanup alarms have no equivalent replacement.", + "Audit3077 retires this complete dated receipt because its selected source was reduced. It does not validate the reduced selector. Original receipt verbatim:\n{\n \"date\": \"2026-07-28\",\n \"runner\": \"local\",\n \"platform\": \"macos\",\n \"command\": \"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport-reattach-admission.test.ts src/renderer/src/components/terminal-pane/pty-transport-detach-attach-handoff.test.ts\",\n \"result\": \"passed\",\n \"durationSeconds\": 1.48,\n \"summary\": \"All 90 transport tests passed, including pre-publication admission rejection, handler-complete non-destructive detach for obsolete SSH reattach transports, settled retirement of rejected or destroyed fresh fallbacks, and reported shutdown refusal.\",\n \"currentCommand\": \"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-reattach-admission.test.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-detach-attach-handoff.test.ts\"\n }", "Audit3069 retires nominal spawn/resume/banner wiring, first-fit and lookup-budget variants, private pending-map checks, the split-CWD disposal suite and startup command/draft baseline variants. Distinct regression alarms are intentionally lost without equivalent replacement; retained ownership, cancellation and recovery cases remain. Existing selectors and dated evidence retain their original scope.", "Audit3061 retires the park-model supplied snapshot suite and nominal mode, cursor, focus, geometry and remote resume metadata variants. Their distinct alarms are intentionally lost; six retained mode/remote cases preserve selected tail-order, authority and parse-readiness boundaries without equivalent replacement. Existing selectors and dated evidence retain their original scope.", "Audit2133 current-parent preparation (988 authored removals; independently reviewed2099/2107/2115/2116 decisions; upstream clear-buffer and recovery-image regressions retained): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: remove only literal registration import/call pairs import { registerPtyConnectionTerminalBellAttentionTests } from '../notifications/pty-connection-terminal-bell-attention.spec', registerPtyConnectionTerminalBellAttentionTests(); no additional authored credit. src/renderer/src/store/terminals/workspace-terminal-reconnect-hydration.test.ts: restores daemon terminal wake hints before declaring the session ready. src/main/ssh/connection/ssh-connection.test.ts: transitions to connected on successful connect; captures the negotiated SSH server key fingerprint; allows concurrent exec commands for ssh2 transport; removes startup listeners after ssh2 connect succeeds; scopes lifecycle events and pending handshake timers to one mock client; enables TCP_NODELAY on the new ssh2 client after a reconnect cycle; transitions through connecting → connected states; reports error state on connection failure; disconnect cleans up and sets state to disconnected; getTarget returns a copy of the target; getState returns a copy of the state; throws when connecting a disposed connection. src/renderer/src/components/terminal-pane/pty-connection/notifications/pty-connection-terminal-bell-attention.spec.ts: forwards onBell to pane attention and notification policy; hands the bell to the attention module with its pane even when pane attention is off. Current changed source bytes, wrapper registrations and reduced selectors have no fresh execution or red/green credit. Unrelated surviving receipt objects keep their original narrow scope; current literal graph reachability does not establish historical import closure or equivalent replacement coverage. Current conservative command/import graph reaches src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts, src/renderer/src/components/terminal-pane/pty-connection/notifications/pty-connection-terminal-bell-attention.spec.ts, src/renderer/src/store/terminals/workspace-terminal-reconnect-hydration.test.ts, src/main/ssh/connection/ssh-connection.test.ts. Unresolved local/computed edges remain explicit debt. Retired active assertionRefs (raw original objects retained as historical only): {\n \"file\": \"src/renderer/src/store/terminals/workspace-terminal-reconnect-hydration.test.ts\",\n \"assertions\": [\"restores daemon terminal wake hints before declaring the session ready\"]\n }", @@ -9933,7 +9881,9 @@ "Audit1983 historical original testFiles object, preserved verbatim; retired objects are not active execution evidence or replacement coverage:\n\"src/main/runtime/rpc/methods/terminal/terminal-create-idempotency.test.ts\"", "Audit2052 (sources2049/2050/2051): Remove complete low-value restored-pane-title and pane-visibility-identity suites and their current selectors. Their supplied snapshot/title and nullable identity-comparison alarms are intentionally lost without replacement. Unrelated dated evidenceRuns remain unchanged and do not validate the reduced commands. No fresh gate execution, actual PTY/provider, rendered, remote/mobile or cross-platform result is claimed.", "Audit2195 removes the low-value startup admission boolean and host deferral predicate inventories from background-terminal-worktree-mount.test.ts. The reduced source retains concrete targeted mount, prune and reveal ownership transitions, not those oracle assertions. Existing selectors remain unexecuted here; no equivalent replacement or new runtime/provider/platform/budget result is claimed. Original retired assertion object verbatim:\n{\n \"file\": \"src/renderer/src/components/terminal/background-terminal-worktree-mount.test.ts\",\n \"assertions\": [\n \"startup waits for hydration before mounting terminal panes while degraded mode remains interactive\",\n \"only an explicit local execution host can defer cold activation\",\n \"SSH, remote-runtime, and unresolved owners remain eager\"\n ]\n }", - "Audit2709 removes src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts: intentionally retire waiting out an older inventory and sharing a fresh post-operation request among concurrent callers. No equivalent replacement or fresh execution is claimed. Dated receipts remain historical evidence for their unchanged selectors only; they do not validate the reduced commands or full current gate. Original prospective command before removal: pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/resolved-worktree-execution-host.test.ts src/renderer/src/components/terminal/background-terminal-worktree-mount.test.ts src/renderer/src/components/terminal-pane/mounting/queued-pane-startup.test.ts src/renderer/src/components/terminal-pane/parking/one-shot-park-replay.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts src/renderer/src/store/terminals/terminal-pty-identity-replacement.test.ts" + "Audit2709 removes src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts: intentionally retire waiting out an older inventory and sharing a fresh post-operation request among concurrent callers. No equivalent replacement or fresh execution is claimed. Dated receipts remain historical evidence for their unchanged selectors only; they do not validate the reduced commands or full current gate. Original prospective command before removal: pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/resolved-worktree-execution-host.test.ts src/renderer/src/components/terminal/background-terminal-worktree-mount.test.ts src/renderer/src/components/terminal-pane/mounting/queued-pane-startup.test.ts src/renderer/src/components/terminal-pane/parking/one-shot-park-replay.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts src/renderer/src/store/terminals/terminal-pty-identity-replacement.test.ts", + "Audit3086: retire the destroyed fresh-session fallback settlement/non-destructive reattach alias and its direct selector; retain the detach/attach selector and assertion unchanged. The retained admission cases cover adopt-before-data and explicitly buffered-death admission without a new spawn, without replacing fallback retirement. July 28 evidence was already archived by audit3077; no duplicate retirement or new execution is claimed.", + "Audit3096: remove the deleted reconnect-banner selector and its two UI aliases. The reduced recovery-state selector retains only the deadline cancelling pending backoff and explicit retry owning a new epoch alias; healthy-replacement stale-schedule and independent caller-cutoff cancellation aliases retire. Other retained state cases cover reentrant retry, owner settlement and same-epoch parked revival, without replacing those removed alarms. Prior admission-selector retirement, archived July 28 receipt, unrelated selectors/claims/receipts and old gaps remain unchanged; no fresh execution is claimed." ], "demotionRule": "Cannot promote if provider failure can close panes or if the oracle is screenshot-only." }, @@ -11886,14 +11836,14 @@ "providers": ["local", "daemon", "ssh"], "coveredPlatforms": ["macos"], "coveredProviders": ["local"], - "coverageNotes": "Audit1878 retires the dated reduced-source unit receipt. Only the unchanged macOS local Electron receipts remain current, scoped to their exact commands; reduced unit selectors and SSH have no current execution receipt. Historical pre-audit coverageNotes: Deterministic renderer and IPC-transport tests prove count and text ceilings, oldest-reply shedding, explicit query-reply source routing, ordinary-input preservation, acknowledged-write FIFO barriers, single-worker drain reentrancy, one-reply-per-write delivery for OSC, DA1, and CPR replies, real xterm OSC reply generation, drain-failure containment, teardown settlement, and clear/reuse generation fencing. Remote-runtime tests preserve separate query-reply writes across pending input, async validation, and viewport-claim buffering. Host-contract tests prove a later DA1/CPR reply cannot overtake a deferred OSC reply, including a coalesced legacy-client payload. Live macOS Electron tests cover local PTY OSC replies and interactive typing; a macOS-hosted Docker OpenSSH test proves an upstream-node-pty Linux relay keeps OSC/DA1 replies out of the next fish child's stdin. No live daemon, paired-runtime, WSL, physical Linux/Windows client, or binary mixed-version run is registered.", + "coverageNotes": "Audit3086: retire the immediate-reply ceiling and thrown renderer-write recovery aliases. Narrow FIFO coverage to deferred preconnect validation and teardown coverage to natural-exit stale ordinary/accepted tails; live acknowledged barriers and disconnect/detach branches are intentionally retired. Prior queue cleanup and unchanged Electron receipts remain exact; no replacement or fresh execution is claimed. Audit1878 retires the dated reduced-source unit receipt. Only the unchanged macOS local Electron receipts remain current, scoped to their exact commands; reduced unit selectors and SSH have no current execution receipt. Historical pre-audit coverageNotes: Deterministic renderer and IPC-transport tests prove count and text ceilings, oldest-reply shedding, explicit query-reply source routing, ordinary-input preservation, acknowledged-write FIFO barriers, single-worker drain reentrancy, one-reply-per-write delivery for OSC, DA1, and CPR replies, real xterm OSC reply generation, drain-failure containment, teardown settlement, and clear/reuse generation fencing. Remote-runtime tests preserve separate query-reply writes across pending input, async validation, and viewport-claim buffering. Host-contract tests prove a later DA1/CPR reply cannot overtake a deferred OSC reply, including a coalesced legacy-client payload. Live macOS Electron tests cover local PTY OSC replies and interactive typing; a macOS-hosted Docker OpenSSH test proves an upstream-node-pty Linux relay keeps OSC/DA1 replies out of the next fish child's stdin. No live daemon, paired-runtime, WSL, physical Linux/Windows client, or binary mixed-version run is registered.", "motivatingLinks": [ "https://github.com/stablyai/orca/issues/13137", "https://github.com/stablyai/orca/issues/7329", "https://github.com/stablyai/orca/issues/13892" ], "invariant": "The desktop PTY input queue retains at most 64 explicitly sourced pending terminal query replies and 4096 UTF-16 code units. Every retained reply reaches the provider as one atomic write, and ordinary, acknowledged, and reply input share one invocation-ordered FIFO so no later write overtakes an acknowledged write. Reentrant write callbacks cannot start a second drain worker or strand input admitted after clear/reuse. A reply's own echo is contained on the output side by projecting its known echo shapes; the ESC-initial verbatim shape is matched only when complete, never held as a partial, so a query torn at its own ESC is still answered. Overflow removes only the oldest query replies, never ordinary input except the documented modified-F3/CPR byte collision, and failure or teardown cannot clear a newer queue generation or strand an acknowledged promise.", - "oracle": "Audit1878 retires the dated reduced-source unit receipt. Only the unchanged macOS local Electron receipts remain current, scoped to their exact commands; reduced unit selectors and SSH have no current execution receipt. Historical pre-audit oracle: Synchronously enqueue separate 10,000-entry OSC and DA1 reply floods before the scheduled drain and assert that only the initial immediate reply and newest 64 pending replies are written, each as one provider write, before a trailing keystroke. Stall an acknowledged write between earlier and later ordinary/reply input, then require teardown to settle it and same-id reuse to receive no stale tail. Reenter the queue synchronously from an acknowledged write with both enqueue and clear/reuse, requiring one drain and fresh input delivery only after the stale acknowledged write settles false. At the host boundary, defer an OSC reply and assert that separate or legacy-coalesced DA1/CPR replies flush after it in observed query order. At the remote-runtime boundary, preserve separate writes around pending ordinary input, async validation, and viewport-claim buffering. Repeat behind 10,000 ordinary inputs and exercise the text ceiling, real xterm generation, provider-write failure, rejected yield, and clear/reuse generation fencing.", + "oracle": "Audit3086: retire the immediate-reply ceiling and thrown renderer-write recovery aliases. Narrow FIFO coverage to deferred preconnect validation and teardown coverage to natural-exit stale ordinary/accepted tails; live acknowledged barriers and disconnect/detach branches are intentionally retired. Prior queue cleanup and unchanged Electron receipts remain exact; no replacement or fresh execution is claimed. Audit1878 retires the dated reduced-source unit receipt. Only the unchanged macOS local Electron receipts remain current, scoped to their exact commands; reduced unit selectors and SSH have no current execution receipt. Historical pre-audit oracle: Synchronously enqueue separate 10,000-entry OSC and DA1 reply floods before the scheduled drain and assert that only the initial immediate reply and newest 64 pending replies are written, each as one provider write, before a trailing keystroke. Stall an acknowledged write between earlier and later ordinary/reply input, then require teardown to settle it and same-id reuse to receive no stale tail. Reenter the queue synchronously from an acknowledged write with both enqueue and clear/reuse, requiring one drain and fresh input delivery only after the stale acknowledged write settles false. At the host boundary, defer an OSC reply and assert that separate or legacy-coalesced DA1/CPR replies flush after it in observed query order. At the remote-runtime boundary, preserve separate writes around pending ordinary input, async validation, and viewport-claim buffering. Repeat behind 10,000 ordinary inputs and exercise the text ceiling, real xterm generation, provider-write failure, rejected yield, and clear/reuse generation fencing.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/input/pty-input-write-queue.test.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-input-write.test.ts src/shared/terminal/protocol/queries/terminal-query-reply.test.ts src/shared/terminal/pty/ingress/pty-startup-ingress-live-query-reply.test.ts src/shared/terminal/pty/ingress/pty-startup-reply-echo-shapes.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/output/remote-runtime-pty-batching.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-query-reply-immediate.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-input-coalescing.test.ts", @@ -11916,14 +11866,8 @@ { "file": "src/renderer/src/components/terminal-pane/pty-transport/input/pty-input-write-queue.test.ts", "assertions": [ - "a synchronous 10,000-reply flood writes only the immediate first and newest 64 pending replies before a trailing keystroke", - "10,000 ordinary queued inputs survive a later reply flood while reply retention remains bounded", - "reply-shaped bytes from the ordinary input path never enter the shed-able reply budget", - "reply count and text overflow remove only the oldest pending replies", - "real xterm OSC 10/11 query handlers remain subject to the same retention ceiling", - "retained OSC, DA1, and CPR replies stay one provider write each and both OSC and DA1 floods remain bounded", "provider-write and yield failures settle without unhandled rejection, repeated same-generation admission, or stale-generation clearing", - "clear releases saturated reply accounting and fences in-flight validation before later input", + "clear fences in-flight validation before later input", "acknowledged input is serialized between earlier and later ordinary/reply writes", "clear settles active and pending acknowledged input before same-id queue reuse", "reentrant enqueue cannot start a second drain worker past an unacknowledged write", @@ -11933,10 +11877,8 @@ { "file": "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-input-write.test.ts", "assertions": [ - "sendInputImmediate applies the reply ceiling while sendInput preserves a reply-shaped ordinary payload in exact IPC write order", - "a thrown renderer write triggers one owning-transport recovery callback and rejects later input in that queue generation", - "live and preconnect acknowledged writes remain FIFO barriers for later ordinary and immediate input", - "disconnect, detach, and natural exit settle acknowledged writes and fence same-id stale chunks" + "deferred preconnect validation preserves queued bytes before later accepted, ordinary, and immediate input", + "natural exit settles active acknowledged input and fences ordinary and accepted stale chunks before same-id reuse" ] }, { @@ -12026,11 +11968,13 @@ "Accumulate the normal soak window with zero unexplained flakes." ], "knownGaps": [ + "Audit3077 deletes the delivery-watchdog suite and retires queue flood, conservation, atomicity, retention, echo and heap examples plus preconnect cap/seed/abandon examples. The remaining queue failure/FIFO/reentrancy/generation and preconnect lifetime cases are narrower; no equivalent replacement is claimed.", "No live daemon, paired-runtime, WSL, physical Linux/Windows client, mixed-version, or network-fault run is registered.", "Ordinary-input queue growth predates this change and is outside this reply-only gate.", "Reply overload intentionally sheds the oldest synthetic replies; the modified-F3/CPR byte collision shares that budget, and live application behavior under a pathological query flood is not measured.", "Audit1878 retires this complete dated receipt because a source in its selector was reduced. It does not validate the reduced selector. Original receipt verbatim:\n{\n \"date\": \"2026-08-30\",\n \"runner\": \"local\",\n \"platform\": \"macos\",\n \"command\": \"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-input-write-queue.test.ts src/renderer/src/components/terminal-pane/pty-transport-input-write.test.ts src/shared/terminal-query-reply.test.ts src/shared/pty-startup-ingress-live-query-reply.test.ts src/shared/pty-startup-reply-echo-shapes.test.ts\",\n \"currentCommand\": \"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/input/pty-input-write-queue.test.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-input-write.test.ts src/shared/terminal/protocol/queries/terminal-query-reply.test.ts src/shared/terminal/pty/ingress/pty-startup-ingress-live-query-reply.test.ts src/shared/terminal/pty/ingress/pty-startup-reply-echo-shapes.test.ts\",\n \"result\": \"passed\",\n \"durationSeconds\": 15,\n \"summary\": \"Five files and 149 tests passed in 15.16 seconds, including explicit IPC reply-source routing, the 10,000-reply count and text ceilings, 10,000-entry ordinary backlog preservation, acknowledged-write FIFO barriers, synchronous reentrancy fencing, prompt teardown settlement, same-id generation fencing, real xterm OSC query floods, single-shot drain-failure recovery, and one-reply-per-write echo containment.\"\n }", - "Audit1878 removes standalone reply-classifier inventory, ordinary-keystroke helper/no-write checks and a latency-order title that never executes the host path from pty-startup-ingress-live-query-reply.test.ts. It also removes projection needle/refusal/holdPartial and ConPTY/WSL string/array inventories from pty-startup-reply-echo-shapes.test.ts, including the direct short-needle and ESC-hold guard alarms. Captured echo matching and actual ingress writes/output state remain, without equivalent replacement coverage. Only the two unchanged macOS local Electron receipts remain active; neither proves the reduced five-file unit selector, SSH, a new soak result, or a new measured budget." + "Audit1878 removes standalone reply-classifier inventory, ordinary-keystroke helper/no-write checks and a latency-order title that never executes the host path from pty-startup-ingress-live-query-reply.test.ts. It also removes projection needle/refusal/holdPartial and ConPTY/WSL string/array inventories from pty-startup-reply-echo-shapes.test.ts, including the direct short-needle and ESC-hold guard alarms. Captured echo matching and actual ingress writes/output state remain, without equivalent replacement coverage. Only the two unchanged macOS local Electron receipts remain active; neither proves the reduced five-file unit selector, SSH, a new soak result, or a new measured budget.", + "Audit3086: retire the immediate-reply ceiling and thrown renderer-write recovery aliases. Narrow FIFO coverage to deferred preconnect validation and teardown coverage to natural-exit stale ordinary/accepted tails; live acknowledged barriers and disconnect/detach branches are intentionally retired. Prior queue cleanup and unchanged Electron receipts remain exact; no replacement or fresh execution is claimed." ], "demotionRule": "Keep experimental or revert if ordinary input is evicted, pending replies exceed either ceiling, retained replies are coalesced, a trailing key sits behind more than the bounded reply window, or the gate develops unexplained flakes." }, @@ -12689,7 +12633,7 @@ "https://github.com/stablyai/orca/pull/8034" ], "invariant": "After a renderer lifecycle reset (main-frame did-start-navigation / render-process-gone / destroyed), no surviving PTY remains delivery-gated by pre-reset unacked bytes: main's in-flight counters and pending backlog equal the true state of the new page (zero in-flight, zero pending). Delivery then resumes only once the reloaded page's pty:data dispatcher re-registers and signals pty:rendererDispatcherReady; during the boot window before that handshake main holds all sends (data accrues losslessly in the capped pending backlog) so bytes cannot be dropped into a listener-less page and re-pin the gate. The hold itself cannot become a permanent freeze: a one-shot ~10s watchdog armed on each reset force-opens the gate (incrementing rendererDispatcherReadyForcedCount) if the handshake is lost, and the real handshake or a re-registration cancels it. The reset fires only for a new-document main-frame navigation: did-start-navigation carries exact frame and same-document details, so overlapping subframe or in-page navigation never clears accounting or holds the gate on the still-alive page. If a renderer lifecycle edge is otherwise missed, a backstop still recovers: because the handshake is one-shot per page load, receiving pty:rendererDispatcherReady while the gate is already open proves a reset was missed (or the watchdog force-opened the gate), so the handler reconciles by clearing the stale accounting before re-opening. The renderer sends that handshake exactly once per page load, after its pty:data listener registers.", - "oracle": "Ingest more than 512 KB of PTY output with no renderer ACKs and assert the per-PTY gate closes (sends stop at the 512 KB high-water, remainder accrues as pending). Fire the registered main-frame did-start-navigation listener and assert rendererInFlightChars and pendingChars are zero and the new diagnostics record the reset (rendererLifecycleResetCount 1, lastLifecycleResetClearedChars 512 KB). Then, before any dispatcher-ready handshake, ingest another chunk and assert it is NOT sent and NOT counted in-flight (held for the boot window, accruing in pending). Finally fire the pty:rendererDispatcherReady handshake and assert the held chunk is delivered to the renderer. Counters-zero without proving both the boot-window hold and that delivery resumes is insufficient. Additional cases prove the boot-window hold also covers the interactive direct-send fast path (input-primed keystroke echo is held, not sent, until the handshake) and that the self-heal watchdog force-opens the gate (rendererDispatcherReadyForcedCount 1) when no handshake arrives, while a timely handshake cancels the watchdog and leaves no orphaned timer. A further case opens the new page with a main-frame navigation and dispatcher handshake, then fires an overlapping subframe navigation and asserts the gate stays ready, the reset count stays at exactly one, and fresh output delivers without the watchdog — proving an iframe cannot reclose the live page. A backstop case saturates the gate, then fires pty:rendererDispatcherReady while the gate is still open (ready true) with no preceding reset — modeling a missed lifecycle edge — and asserts the handler reconciles: in-flight and pending clear, rendererLifecycleResetCount increments, and fresh output flows immediately (a straggler ACK is clamped and cannot underflow). A renderer-side case (pty-dispatcher-pi-routing.test.ts) asserts ensurePtyDispatcher() sends pty:rendererDispatcherReady exactly once across two attach calls — proving the send fires (it is optional-chained) and the one-shot guard holds.", + "oracle": "Ingest more than 512 KB of PTY output with no renderer ACKs and assert the per-PTY gate closes (sends stop at the 512 KB high-water, remainder accrues as pending). Fire the registered main-frame did-start-navigation listener and assert rendererInFlightChars and pendingChars are zero and the new diagnostics record the reset (rendererLifecycleResetCount 1, lastLifecycleResetClearedChars 512 KB). Then, before any dispatcher-ready handshake, ingest another chunk and assert it is NOT sent and NOT counted in-flight (held for the boot window, accruing in pending). Finally fire the pty:rendererDispatcherReady handshake and assert the held chunk is delivered to the renderer. Counters-zero without proving both the boot-window hold and that delivery resumes is insufficient. Additional cases prove the boot-window hold also covers the interactive direct-send fast path (input-primed keystroke echo is held, not sent, until the handshake) and that the self-heal watchdog force-opens the gate (rendererDispatcherReadyForcedCount 1) when no handshake arrives, while a timely handshake cancels the watchdog and leaves no orphaned timer. A further case opens the new page with a main-frame navigation and dispatcher handshake, then fires an overlapping subframe navigation and asserts the gate stays ready, the reset count stays at exactly one, and fresh output delivers without the watchdog — proving an iframe cannot reclose the live page. A backstop case saturates the gate, then fires pty:rendererDispatcherReady while the gate is still open (ready true) with no preceding reset — modeling a missed lifecycle edge — and asserts the handler reconciles: in-flight and pending clear, rendererLifecycleResetCount increments, and fresh output flows immediately (a straggler ACK is clamped and cannot underflow).", "commands": [], "testFiles": [], "assertionRefs": [], @@ -12716,6 +12660,7 @@ "Add an Electron-level reload survival test that proves a saturated pane resumes rendering and input after Cmd+R / crash recovery." ], "knownGaps": [ + "Audit3077 retires the renderer once-per-page dispatcher-ready request example. It called ensurePtyDispatcher twice, without proving two attach calls or handshake ordering. Main-side lifecycle/hold/watchdog evidence and the desired invariant retain their original scope.", "Audit1634 removes low-value IPC, filesystem and runtime projections, argument inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained cancellation, ownership, authorization, filesystem and SQLite boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded.", "The unit oracle drives a local mock PTY; daemon and WSL coverage rides the same pipeline but has no dedicated provider-contract test yet.", "The dev repro covers the output-delivery freeze only; the arrow-key input symptom and mouse-mode flood observed in the same incident are out of scope and need their own repros.", @@ -12794,14 +12739,14 @@ "providers": ["local", "remote-runtime", "ssh"], "coveredPlatforms": ["macos", "linux"], "coveredProviders": ["local", "remote-runtime", "ssh"], - "coverageNotes": "Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/runtime/files/watching/runtime-file-client-watch.test.ts: delivers remote file changes to listeners for the same worktree. src/main/runtime/orca-runtime.test.ts: ordinary registration cleanup removes only await import('./orca-runtime-tests/mobile-session-tabs-part-14.spec'). src/main/runtime/orca-runtime-tests/terminal-side-effect-facts-part-03.spec.ts: arms the stale-title timer for a seeded working title; arms the Command Code scrape from the noted spawn command; prefers the tracked title over a stale renderer lastTitle in the hydration seed; writes recent output into the current runtime output map; uses a later title handler replacement with the runtime receiver; calls the current injected listener with the runtime receiver; keeps optional reconciliation lazy after its callback is removed. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-14.spec.ts: lists them, so a paired client can mirror a migrated editor; closes one by retiring it from the host session; keeps an unsaved draft unless the close is forced; shares aggregate work but leaves a replacement pending promise alone; lets a targeted refresh finish while an aggregate refresh waits; refuses a close when the store lacks %s before the guard; keeps a later missing %s on the original caught failure path. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Exact retired assertionRefs, preserved as historical objects only: {\n \"file\": \"src/renderer/src/runtime/files/watching/runtime-file-client-watch.test.ts\",\n \"assertions\": [\n \"terminal watcher error and setup failure evict the shared entry before retrying callbacks run\",\n \"an old stream end cannot evict the replacement stream, which still delivers to its listener\",\n \"two same-worktree listeners share a synthetic subscription until the final stop unsubscribes and sends unwatch\"\n ]\n } Historical prior account (preserved verbatim): Audit1973: Delete the standalone mocked watcher cleanup suite and its entire sole-file prospective command. Retire the removed file-command transport-abort alias; preserve the independent cancellation suite and final-overflow/error/end cleanup callback, and13 unrelated receipt objects. Whole original changed dated receipts are retired, never narrowed or transferred. This metadata review claims no fresh execution, equivalent replacement, provider/PTY, live remote/mobile, rendered, cross-platform, soak or measured-budget result. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Partial runtime files-watch suite retains controlled Windows close-event waiting, shared-client survival, late physical-exit ownership/deadline cleanup and shutdown joining. Its combined Windows close/deadline/late-exit alias remains backed by unchanged callbacks. Retire native-error-close, pre-publication setup ownership and failed-delete rearm aliases; associated delegation, failure forwarding, removal routing and recovery examples are lost. These tests inject watch/subscription seams and do not observe an actual native watcher or physical process. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Partial runtime watcher-host suite loses mocked option/event/overflow/resubscription forwarding, supplied teardown-error propagation, aborted-signal/no-call and private ten-thousand-waiter-count inventories. Retire the 10,000-caller bound and failed-recovery-subscriber-ending assertion aliases. Keep same-root owner cancellation, pre-ready replacement, held root-close join, stale-generation recovery delivery and initial failed-root ownership mappings backed by retained real-host callbacks with injected subscription/error/physical-exit promises. No actual native watcher, process termination or resource bound was observed. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1683 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1645 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1634 removes low-value IPC, filesystem and runtime projections, argument inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained cancellation, ownership, authorization, filesystem and SQLite boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1627 removes low-value mocked daemon projections, scalar tables and duplicate terminal examples without equivalent replacement coverage. Per-source reviews record retained terminal content preservation, process ownership refusal and recovery boundaries together with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1623 removes low-value mocked daemon projections, scalar tables and duplicate terminal examples without equivalent replacement coverage. Per-source reviews record retained terminal content preservation, process ownership refusal and recovery boundaries together with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1516 removes package-electron-runtime-contract.test.mjs, a copied release-workflow platform and marker matrix. Its workflow wiring alarm is intentionally retired; no actual packaged watcher delivery was exercised and no equivalent replacement is claimed. Unaffected dated execution receipts retain their original scope; changed optional selectors have no fresh full-gate execution result. This audit removes the paired-web stopped-during-outage and late-ready direct-branch examples. The retained pre-ready cancellation, failed-unwatch retry and replay-continuity cases are not equivalent replacements for those ordering alarms. Current web-runtime-client.test.ts assertions below name only its retained pre-ready callback case; replay cases remain in their separate suite. Historical commands and results remain historical. Deterministic tests cover one shared healthy child per runtime process plus at most four bounded fault-quarantine children, native desktop, paired-runtime, and WSL snapshot processes sharing the same eight-physical-child reservation with typed serialized event-driven capacity recovery, including recursive re-wait when crash recovery reclaims an announced slot, one quarantine attempt per watch lifetime, generation-scoped cancellation, bounded termination with removable deadline waiters, replacement-crawl errors that cannot be blessed by a late readiness ack, pre-ready paired-web cancellation registered before an unbounded capacity wait, already-resolved and late physical-exit retry of a rejected paired-web teardown, physical desktop-install and local/SSH PTY teardown, stale-generation rejection, per-child stat bounds, final-overflow RPC delivery, and renderer eviction before terminal callbacks can retry. Destructive local and SSH removal fences both ID-derived and resolved-cwd terminal roots, including sibling-root/cwd combinations with reverse admission rollback, closes descendant relay watches before parent deletion, enumerates authoritative provider/cwd ownership, falls back to daemon spawn cwd before OSC 7, and keeps daemon/relay immediate shutdown pending until native exit or a bounded fail-closed error; a dead relay PID discovered during attach also settles concurrent shutdown before its stale entry is reaped, while Windows runtime watcher deadlines retain one removable physical-close waiter, treat Node's error-close path as positive physical-exit proof, and clear root ownership on late close. The relay policy test maps a standard repository's base, Git common directory, and worktree roots to one healthy supervisor, then proves a shared-child failure recovers those roots in separate quarantine supervisors with overflow and resumed events. Abortable capacity, quarantine, runtime-root, relay, SSH, and relay pre-install setup waits attach one reaction to each shared promise and explicitly remove 10,000 cancelled caller closures while one anchor remains. Built-entry macOS harnesses kill the desktop/runtime and SSH relay watcher children, then require automatic resubscription and later events while the host process and relay PTY survive. SSH bundles the child boundary beside relay.js, requires both artifacts for install completeness, and preserves registration-owned same-root cancellation. The test-value audit corrects the active renderer watch command/file reference to the existing runtime-file-client-watch.test.ts, whose three cases are retained unchanged. They observe synthetic subscription retry/fanout and unsubscribe/unwatch calls, not actual preload/main bookkeeping or physical watcher-process cleanup. The separate read/preview client suite loses forwarding, supplied-error and negative-only examples, retaining binary detection and Unicode SVG decoding. Historical evidence commands/results are unchanged. Test-value audit1293 removes src/main/providers/local-pty/local-pty-provider-session-inventory.test.ts (2 authored cases). Their isolated assertions no longer run; surviving tests are not claimed as equivalent coverage. Fresh execution against the candidate SHA is required. Audit1312 removes low-value imported specs from aggregate test drivers; old whole-driver execution receipts are archived. Retained registrations are unchanged. No equivalent replacement coverage is claimed. Audit1383: src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts reduced. Lose command-list/receipt/default/background activation matrices whose provider spawn returns canned IDs. Retained test proves actual tab allocation separation, not terminal startup. No equivalent replacement coverage is claimed. Existing exact unaffected receipts and their platform/provider/budget claims remain scoped to unchanged selectors. Changed optional selectors have no new execution result. Audit1401: src/main/runtime/orca-runtime-tests/mobile-session-tabs-duplicate-pty-repair.spec.ts removed. Loses listing-on-already-repaired-data alarm; it never established runtime repair invocation. src/main/runtime/orca-runtime-tests/mobile-session-tabs-split-agent-tab.spec.ts removed. Loses actual mobile split sibling shell versus recorded-agent resume command alarms; no equivalent coverage asserted. src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts removed. Loses separate setup/startup tab result in that manually assembled path. src/main/runtime/orca-runtime.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1412: src/main/workspaces/removal/watcher-removal-gate.test.ts reduced. Loses exact removal-error compatibility with renderer predicate under shared message constants. Kept public refusal outcomes do not establish that renderer classification. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result.", + "coverageNotes": "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/runtime/files/watching/runtime-file-client-watch.test.ts: delivers remote file changes to listeners for the same worktree. src/main/runtime/orca-runtime.test.ts: ordinary registration cleanup removes only await import('./orca-runtime-tests/mobile-session-tabs-part-14.spec'). src/main/runtime/orca-runtime-tests/terminal-side-effect-facts-part-03.spec.ts: arms the stale-title timer for a seeded working title; arms the Command Code scrape from the noted spawn command; prefers the tracked title over a stale renderer lastTitle in the hydration seed; writes recent output into the current runtime output map; uses a later title handler replacement with the runtime receiver; calls the current injected listener with the runtime receiver; keeps optional reconciliation lazy after its callback is removed. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-14.spec.ts: lists them, so a paired client can mirror a migrated editor; closes one by retiring it from the host session; keeps an unsaved draft unless the close is forced; shares aggregate work but leaves a replacement pending promise alone; lets a targeted refresh finish while an aggregate refresh waits; refuses a close when the store lacks %s before the guard; keeps a later missing %s on the original caught failure path. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Exact retired assertionRefs, preserved as historical objects only: {\n \"file\": \"src/renderer/src/runtime/files/watching/runtime-file-client-watch.test.ts\",\n \"assertions\": [\n \"terminal watcher error and setup failure evict the shared entry before retrying callbacks run\",\n \"an old stream end cannot evict the replacement stream, which still delivers to its listener\",\n \"two same-worktree listeners share a synthetic subscription until the final stop unsubscribes and sends unwatch\"\n ]\n } Historical prior account (preserved verbatim): Audit1973: Delete the standalone mocked watcher cleanup suite and its entire sole-file prospective command. Retire the removed file-command transport-abort alias; preserve the independent cancellation suite and final-overflow/error/end cleanup callback, and13 unrelated receipt objects. Whole original changed dated receipts are retired, never narrowed or transferred. This metadata review claims no fresh execution, equivalent replacement, provider/PTY, live remote/mobile, rendered, cross-platform, soak or measured-budget result. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Partial runtime files-watch suite retains controlled Windows close-event waiting, shared-client survival, late physical-exit ownership/deadline cleanup and shutdown joining. Its combined Windows close/deadline/late-exit alias remains backed by unchanged callbacks. Retire native-error-close, pre-publication setup ownership and failed-delete rearm aliases; associated delegation, failure forwarding, removal routing and recovery examples are lost. These tests inject watch/subscription seams and do not observe an actual native watcher or physical process. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Partial runtime watcher-host suite loses mocked option/event/overflow/resubscription forwarding, supplied teardown-error propagation, aborted-signal/no-call and private ten-thousand-waiter-count inventories. Retire the 10,000-caller bound and failed-recovery-subscriber-ending assertion aliases. Keep same-root owner cancellation, pre-ready replacement, held root-close join, stale-generation recovery delivery and initial failed-root ownership mappings backed by retained real-host callbacks with injected subscription/error/physical-exit promises. No actual native watcher, process termination or resource bound was observed. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1683 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1645 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1634 removes low-value IPC, filesystem and runtime projections, argument inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained cancellation, ownership, authorization, filesystem and SQLite boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1627 removes low-value mocked daemon projections, scalar tables and duplicate terminal examples without equivalent replacement coverage. Per-source reviews record retained terminal content preservation, process ownership refusal and recovery boundaries together with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1623 removes low-value mocked daemon projections, scalar tables and duplicate terminal examples without equivalent replacement coverage. Per-source reviews record retained terminal content preservation, process ownership refusal and recovery boundaries together with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1516 removes package-electron-runtime-contract.test.mjs, a copied release-workflow platform and marker matrix. Its workflow wiring alarm is intentionally retired; no actual packaged watcher delivery was exercised and no equivalent replacement is claimed. Unaffected dated execution receipts retain their original scope; changed optional selectors have no fresh full-gate execution result. This audit removes the paired-web stopped-during-outage and late-ready direct-branch examples. The retained pre-ready cancellation, failed-unwatch retry and replay-continuity cases are not equivalent replacements for those ordering alarms. Current web-runtime-client.test.ts assertions below name only its retained pre-ready callback case; replay cases remain in their separate suite. Historical commands and results remain historical. Deterministic tests cover one shared healthy child per runtime process plus at most four bounded fault-quarantine children, native desktop, paired-runtime, and WSL snapshot processes sharing the same eight-physical-child reservation with typed serialized event-driven capacity recovery, including recursive re-wait when crash recovery reclaims an announced slot, one quarantine attempt per watch lifetime, generation-scoped cancellation, bounded termination with removable deadline waiters, replacement-crawl errors that cannot be blessed by a late readiness ack, pre-ready paired-web cancellation registered before an unbounded capacity wait, already-resolved and late physical-exit retry of a rejected paired-web teardown, physical desktop-install and local/SSH PTY teardown, stale-generation rejection, per-child stat bounds, final-overflow RPC delivery, and renderer eviction before terminal callbacks can retry. Destructive local and SSH removal fences both ID-derived and resolved-cwd terminal roots, including sibling-root/cwd combinations with reverse admission rollback, closes descendant relay watches before parent deletion, enumerates authoritative provider/cwd ownership, falls back to daemon spawn cwd before OSC 7, and keeps daemon/relay immediate shutdown pending until native exit or a bounded fail-closed error; a dead relay PID discovered during attach also settles concurrent shutdown before its stale entry is reaped, while Windows runtime watcher deadlines retain one removable physical-close waiter, treat Node's error-close path as positive physical-exit proof, and clear root ownership on late close. The relay policy test maps a standard repository's base, Git common directory, and worktree roots to one healthy supervisor, then proves a shared-child failure recovers those roots in separate quarantine supervisors with overflow and resumed events. Abortable capacity, quarantine, runtime-root, relay, SSH, and relay pre-install setup waits attach one reaction to each shared promise and explicitly remove 10,000 cancelled caller closures while one anchor remains. Built-entry macOS harnesses kill the desktop/runtime and SSH relay watcher children, then require automatic resubscription and later events while the host process and relay PTY survive. SSH bundles the child boundary beside relay.js, requires both artifacts for install completeness, and preserves registration-owned same-root cancellation. The test-value audit corrects the active renderer watch command/file reference to the existing runtime-file-client-watch.test.ts, whose three cases are retained unchanged. They observe synthetic subscription retry/fanout and unsubscribe/unwatch calls, not actual preload/main bookkeeping or physical watcher-process cleanup. The separate read/preview client suite loses forwarding, supplied-error and negative-only examples, retaining binary detection and Unicode SVG decoding. Historical evidence commands/results are unchanged. Test-value audit1293 removes src/main/providers/local-pty/local-pty-provider-session-inventory.test.ts (2 authored cases). Their isolated assertions no longer run; surviving tests are not claimed as equivalent coverage. Fresh execution against the candidate SHA is required. Audit1312 removes low-value imported specs from aggregate test drivers; old whole-driver execution receipts are archived. Retained registrations are unchanged. No equivalent replacement coverage is claimed. Audit1383: src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts reduced. Lose command-list/receipt/default/background activation matrices whose provider spawn returns canned IDs. Retained test proves actual tab allocation separation, not terminal startup. No equivalent replacement coverage is claimed. Existing exact unaffected receipts and their platform/provider/budget claims remain scoped to unchanged selectors. Changed optional selectors have no new execution result. Audit1401: src/main/runtime/orca-runtime-tests/mobile-session-tabs-duplicate-pty-repair.spec.ts removed. Loses listing-on-already-repaired-data alarm; it never established runtime repair invocation. src/main/runtime/orca-runtime-tests/mobile-session-tabs-split-agent-tab.spec.ts removed. Loses actual mobile split sibling shell versus recorded-agent resume command alarms; no equivalent coverage asserted. src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts removed. Loses separate setup/startup tab result in that manually assembled path. src/main/runtime/orca-runtime.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1412: src/main/workspaces/removal/watcher-removal-gate.test.ts reduced. Loses exact removal-error compatibility with renderer predicate under shared message constants. Kept public refusal outcomes do not establish that renderer classification. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result.", "motivatingLinks": [ "https://github.com/stablyai/orca/issues/5308", "https://github.com/stablyai/orca/issues/7547", "https://github.com/stablyai/orca/issues/8212" ], "invariant": "Local runtime and SSH relay roots share one watcher child per host process while healthy and use at most four quarantine children after shard failure; native desktop, paired-runtime, and direct WSL snapshot children consume the same process-wide eight-child reservation and retry transient exhaustion without permanently disabling a root. Cancellation remains owned by its child generation and settles only after acknowledgement or bounded physical exit; paired-web retains cleanup ownership and can cancel before readiness even while capacity is exhausted, retries a failed unwatch after already-resolved or late physical exit without duplicating stream termination, replacements never overlap a still-retiring generation, and aborted or timed-out callers detach immediately even while queued behind same-root relay teardown. Destructive local and SSH cleanup holds one containment-aware watcher/terminal removal fence through descendant watcher and PTY physical exit plus parent Git/filesystem deletion; daemon and relay kill requests retain ownership until the actual subprocess exit callback or an equivalent positive dead-PID proof and propagate rejected signals or a bounded failure otherwise. A crash-fused shared shard moves affected roots into the bounded quarantine pool, a second fused quarantine ends those watch lifetimes, interrupted setup emits overflow after recovery, metadata work stays bounded, and the SSH relay, PTYs, Git, and other filesystem operations never load the watcher native addon or share its fault boundary.", - "oracle": "Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/runtime/files/watching/runtime-file-client-watch.test.ts: delivers remote file changes to listeners for the same worktree. src/main/runtime/orca-runtime.test.ts: ordinary registration cleanup removes only await import('./orca-runtime-tests/mobile-session-tabs-part-14.spec'). src/main/runtime/orca-runtime-tests/terminal-side-effect-facts-part-03.spec.ts: arms the stale-title timer for a seeded working title; arms the Command Code scrape from the noted spawn command; prefers the tracked title over a stale renderer lastTitle in the hydration seed; writes recent output into the current runtime output map; uses a later title handler replacement with the runtime receiver; calls the current injected listener with the runtime receiver; keeps optional reconciliation lazy after its callback is removed. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-14.spec.ts: lists them, so a paired client can mirror a migrated editor; closes one by retiring it from the host session; keeps an unsaved draft unless the close is forced; shares aggregate work but leaves a replacement pending promise alone; lets a targeted refresh finish while an aggregate refresh waits; refuses a close when the store lacks %s before the guard; keeps a later missing %s on the original caught failure path. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Exact retired assertionRefs, preserved as historical objects only: {\n \"file\": \"src/renderer/src/runtime/files/watching/runtime-file-client-watch.test.ts\",\n \"assertions\": [\n \"terminal watcher error and setup failure evict the shared entry before retrying callbacks run\",\n \"an old stream end cannot evict the replacement stream, which still delivers to its listener\",\n \"two same-worktree listeners share a synthetic subscription until the final stop unsubscribes and sends unwatch\"\n ]\n } Historical prior account (preserved verbatim): Audit1973: Delete the standalone mocked watcher cleanup suite and its entire sole-file prospective command. Retire the removed file-command transport-abort alias; preserve the independent cancellation suite and final-overflow/error/end cleanup callback, and13 unrelated receipt objects. Whole original changed dated receipts are retired, never narrowed or transferred. This metadata review claims no fresh execution, equivalent replacement, provider/PTY, live remote/mobile, rendered, cross-platform, soak or measured-budget result. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Partial runtime files-watch suite retains controlled Windows close-event waiting, shared-client survival, late physical-exit ownership/deadline cleanup and shutdown joining. Its combined Windows close/deadline/late-exit alias remains backed by unchanged callbacks. Retire native-error-close, pre-publication setup ownership and failed-delete rearm aliases; associated delegation, failure forwarding, removal routing and recovery examples are lost. These tests inject watch/subscription seams and do not observe an actual native watcher or physical process. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Partial runtime watcher-host suite loses mocked option/event/overflow/resubscription forwarding, supplied teardown-error propagation, aborted-signal/no-call and private ten-thousand-waiter-count inventories. Retire the 10,000-caller bound and failed-recovery-subscriber-ending assertion aliases. Keep same-root owner cancellation, pre-ready replacement, held root-close join, stale-generation recovery delivery and initial failed-root ownership mappings backed by retained real-host callbacks with injected subscription/error/physical-exit promises. No actual native watcher, process termination or resource bound was observed. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1683 retires changed-source assertion and execution scope without equivalent replacement coverage. Existing unchanged-selector receipts remain scoped to their original sources. Historical prior-source oracle: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Fill the global watcher-child reservation, require native desktop, paired-runtime, and WSL setup to retain typed transient capacity and retry after one serialized release, then cancel pending desktop and paired-client watches and require no retry. Hold one live anchor while aborting 10,000 callers at the capacity, quarantine-assignment, runtime-root, relay-setup, and SSH-registration layers; require exactly one explicit waiter and one base-promise reaction to remain, then zero after settlement. Hold an old relay unsubscribe, queue one same-root setup leader and one anchor, then abort 10,000 joiners; require every cancellation to settle before teardown releases, exactly one anchor waiter, and only one later physical install. Advance the former paired-web callback deadline while capacity remains full, require cancellation ownership to stay live, publish the server token before ready, and require files.unwatch to abort setup before a later slot release can install a native root. Reject the first ready-watch unwatch with a physical-exit promise, resolve that exit later, and require a fresh physical unwatch attempt, registry release, and exactly one stream end. Fill one healthy shared child with multiple roots, map a standard SSH repository's base, Git common directory, and worktree roots to one relay supervisor, then inject IPC disconnect-before-exit, queued and active cancellation, operations during termination, kill-without-exit, repeated unkillable generations, initial and recovery timeouts, and shard failure. During local and SSH deletion, attempt a late terminal spawn whose worktree identity and cwd name different roots, enumerate a non-prefix remote PTY by authoritative worktree ownership, withhold daemon/relay exit callbacks, make attach positively prove a concurrent-shutdown PID dead, and make the provider unavailable; require every acquired admission to roll back on rejection, dead-PID proof to settle physical exit before reaping, timeout to retain ownership, and Git/filesystem deletion never to start. Require bounded watcher process count, physical-exit settlement, healthy-root recovery, stale-generation rejection, overflow plus later events, and fail-closed destructive cleanup. Verify relay build hashes and remote install probes require both relay.js and relay-watcher.js. Launch the built relay with a real PTY and Parcel watch, kill only the watcher child, and require the same relay PID and PTY to answer before a replacement child delivers overflow and a post-crash event.", + "oracle": "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/runtime/files/watching/runtime-file-client-watch.test.ts: delivers remote file changes to listeners for the same worktree. src/main/runtime/orca-runtime.test.ts: ordinary registration cleanup removes only await import('./orca-runtime-tests/mobile-session-tabs-part-14.spec'). src/main/runtime/orca-runtime-tests/terminal-side-effect-facts-part-03.spec.ts: arms the stale-title timer for a seeded working title; arms the Command Code scrape from the noted spawn command; prefers the tracked title over a stale renderer lastTitle in the hydration seed; writes recent output into the current runtime output map; uses a later title handler replacement with the runtime receiver; calls the current injected listener with the runtime receiver; keeps optional reconciliation lazy after its callback is removed. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-14.spec.ts: lists them, so a paired client can mirror a migrated editor; closes one by retiring it from the host session; keeps an unsaved draft unless the close is forced; shares aggregate work but leaves a replacement pending promise alone; lets a targeted refresh finish while an aggregate refresh waits; refuses a close when the store lacks %s before the guard; keeps a later missing %s on the original caught failure path. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Exact retired assertionRefs, preserved as historical objects only: {\n \"file\": \"src/renderer/src/runtime/files/watching/runtime-file-client-watch.test.ts\",\n \"assertions\": [\n \"terminal watcher error and setup failure evict the shared entry before retrying callbacks run\",\n \"an old stream end cannot evict the replacement stream, which still delivers to its listener\",\n \"two same-worktree listeners share a synthetic subscription until the final stop unsubscribes and sends unwatch\"\n ]\n } Historical prior account (preserved verbatim): Audit1973: Delete the standalone mocked watcher cleanup suite and its entire sole-file prospective command. Retire the removed file-command transport-abort alias; preserve the independent cancellation suite and final-overflow/error/end cleanup callback, and13 unrelated receipt objects. Whole original changed dated receipts are retired, never narrowed or transferred. This metadata review claims no fresh execution, equivalent replacement, provider/PTY, live remote/mobile, rendered, cross-platform, soak or measured-budget result. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Partial runtime files-watch suite retains controlled Windows close-event waiting, shared-client survival, late physical-exit ownership/deadline cleanup and shutdown joining. Its combined Windows close/deadline/late-exit alias remains backed by unchanged callbacks. Retire native-error-close, pre-publication setup ownership and failed-delete rearm aliases; associated delegation, failure forwarding, removal routing and recovery examples are lost. These tests inject watch/subscription seams and do not observe an actual native watcher or physical process. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Partial runtime watcher-host suite loses mocked option/event/overflow/resubscription forwarding, supplied teardown-error propagation, aborted-signal/no-call and private ten-thousand-waiter-count inventories. Retire the 10,000-caller bound and failed-recovery-subscriber-ending assertion aliases. Keep same-root owner cancellation, pre-ready replacement, held root-close join, stale-generation recovery delivery and initial failed-root ownership mappings backed by retained real-host callbacks with injected subscription/error/physical-exit promises. No actual native watcher, process termination or resource bound was observed. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1683 retires changed-source assertion and execution scope without equivalent replacement coverage. Existing unchanged-selector receipts remain scoped to their original sources. Historical prior-source oracle: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Fill the global watcher-child reservation, require native desktop, paired-runtime, and WSL setup to retain typed transient capacity and retry after one serialized release, then cancel pending desktop and paired-client watches and require no retry. Hold one live anchor while aborting 10,000 callers at the capacity, quarantine-assignment, runtime-root, relay-setup, and SSH-registration layers; require exactly one explicit waiter and one base-promise reaction to remain, then zero after settlement. Hold an old relay unsubscribe, queue one same-root setup leader and one anchor, then abort 10,000 joiners; require every cancellation to settle before teardown releases, exactly one anchor waiter, and only one later physical install. Advance the former paired-web callback deadline while capacity remains full, require cancellation ownership to stay live, publish the server token before ready, and require files.unwatch to abort setup before a later slot release can install a native root. Reject the first ready-watch unwatch with a physical-exit promise, resolve that exit later, and require a fresh physical unwatch attempt, registry release, and exactly one stream end. Fill one healthy shared child with multiple roots, map a standard SSH repository's base, Git common directory, and worktree roots to one relay supervisor, then inject IPC disconnect-before-exit, queued and active cancellation, operations during termination, kill-without-exit, repeated unkillable generations, initial and recovery timeouts, and shard failure. During local and SSH deletion, attempt a late terminal spawn whose worktree identity and cwd name different roots, enumerate a non-prefix remote PTY by authoritative worktree ownership, withhold daemon/relay exit callbacks, make attach positively prove a concurrent-shutdown PID dead, and make the provider unavailable; require every acquired admission to roll back on rejection, dead-PID proof to settle physical exit before reaping, timeout to retain ownership, and Git/filesystem deletion never to start. Require bounded watcher process count, physical-exit settlement, healthy-root recovery, stale-generation rejection, overflow plus later events, and fail-closed destructive cleanup. Verify relay build hashes and remote install probes require both relay.js and relay-watcher.js. Launch the built relay with a real PTY and Parcel watch, kill only the watcher child, and require the same relay PID and PTY to answer before a replacement child delivers overflow and a post-crash event.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-unsubscribe-timeout.test.ts --reporter=dot", "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watchers/filesystem-watcher.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-native-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-registry.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-child-launch.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watcher-process/runtime-watcher-pending-assignment.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-event-delivery.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-delete-pty-teardown.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/main/runtime/rpc/methods/files/files-watch-cancellation.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/shared/physical-exit-tracker.test.ts src/shared/promise-settlement-waiters.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/providers/adapter/testing/daemon-pty-adapter.test.ts src/main/daemon/pty-subprocess/testing/pty-subprocess.test.ts src/main/daemon/sessions/testing/session.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts --reporter=dot", @@ -13218,7 +13163,9 @@ "Audit2412 removes whole useVirtualizedScrollAnchor.marks-restore-signal.test.ts (six fake-hook geometry/mark/convergence/user-takeover/clamp alarms), use-task-creation-draft-retention original3/4 (immediate discard mock-call count/unopened no-write), use-terminal-bulk-close-actions.placement original6/7 (absent new-agent append and one real history-publication count at consumed3/30 scale), PendingNativeChatCreation original6 (unmounted abort completion/timer cleanup), and wsl-move-dialog-store original1/9/13 (default whole-distro count/reference/reuse and rejected-preview/start refusal recovery). The history counter measures genuine publication work without entries/order/reopen assertions; its unique batching alarm is intentionally retired. Fake React scroll tests ignore dependency scheduling and cleanup; unique simulated arithmetic alarms are deliberately lost. Retained existing-terminal reorder is not new-agent append coverage; mounted handoff timeout is not abort coverage. No equivalent complete replacement or fresh validation is claimed.", "Audit2417 removes commit-actions-real-git original3/4 (ordinary clean cherry-pick and revert content, subject and current-branch samples), and pty-startup-ingress-exited-asker original8/12 (actual foreground-group read budget across100queued queries, and zero foreground reads across100normal chunks plus final emitted/accepted raw cursor equality). Counters measure actual callback work and scale is consumed; these internal-work alarms are deliberately retired. Retained unborn, conflict and sequencer cases are not equivalent ordinary-success coverage. No equivalent complete replacement or fresh validation is claimed.", "Audit2425 removes use-workspace-copy-status original5, which returns a fixture-supplied readError string through statusReadError. No consumer blocker or attempted branch switch established refusal; the unique error-forwarding sample is intentionally retired. Other copy ownership and stale-refresh cases are not equivalent error-path coverage. No equivalent replacement or fresh validation is claimed.", - "Audit2432 removes BranchPicker.test.tsx original3, which only asserted onOpenChange(true/false) with an always-mounted mocked Popover. It never reopened the picker or consumed the callback in the parent status-refresh owner, despite its title. Lose that unique open/close notification alarm. Retained blocker/collision recovery and asynchronous post-unmount outcome cases are not equivalent replacement coverage. No fresh validation of the reduced selector is claimed." + "Audit2432 removes BranchPicker.test.tsx original3, which only asserted onOpenChange(true/false) with an always-mounted mocked Popover. It never reopened the picker or consumed the callback in the parent status-refresh owner, despite its title. Lose that unique open/close notification alarm. Retained blocker/collision recovery and asynchronous post-unmount outcome cases are not equivalent replacement coverage. No fresh validation of the reduced selector is claimed.", + "Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed.", + "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed." ], "demotionRule": "Demote or quarantine if the fault harness flakes without a product or harness bug, if healthy operation exceeds one runtime watcher child, if total physical operation exceeds eight children including retiring generations, if quarantine children outlive their roots or repeat after fusing, if event delivery becomes unbounded, or if metadata/stat work returns to the serve process." }, @@ -14462,10 +14409,10 @@ "providers": ["paired-runtime"], "coveredPlatforms": ["linux"], "coveredProviders": ["paired-runtime"], - "coverageNotes": "Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit1579 removes workflow/manifest/regex/private binary-header and diagnostic metric inventories, fixture selectors, injected forwarding/platform/signature/process examples, unproven overlap and internal churn counters without equivalent replacement coverage. Retains actual Git trust/diffs; filesystem hash/ELF-region/native discovery; child CLI module repair; compiler/lock/publication/rollback and synthetic Electron install/cache ownership; executable shell quoting/exit; controlled notary/timer cleanup; local patched extractor file/AST freshness; real Chromium/WebKit CSP/sandbox/HTTPS image/referrer/link/preservation controls under parsed Android headers. Five unchanged setup-pnpm/VM request-cleanup definitions reviewed and not rerun. GitHub, installer/archive, OS metric, client, native delegate, compressor, builder and Apple boundaries injected or absent where recorded. No actual native PTY, shipped full/native app, real Actions/cache/npm signature authority, downloaded Electron archive, real objdump/linker/native CLI/AppImage, signing/NSIS/notary/upload/updater or live freeze proof. Historical scope before this audit: Published Linux 1.4.188 desktop against current source in both directions; scheduled weekly and manually runnable. No required PR check.", + "coverageNotes": "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit1579 removes workflow/manifest/regex/private binary-header and diagnostic metric inventories, fixture selectors, injected forwarding/platform/signature/process examples, unproven overlap and internal churn counters without equivalent replacement coverage. Retains actual Git trust/diffs; filesystem hash/ELF-region/native discovery; child CLI module repair; compiler/lock/publication/rollback and synthetic Electron install/cache ownership; executable shell quoting/exit; controlled notary/timer cleanup; local patched extractor file/AST freshness; real Chromium/WebKit CSP/sandbox/HTTPS image/referrer/link/preservation controls under parsed Android headers. Five unchanged setup-pnpm/VM request-cleanup definitions reviewed and not rerun. GitHub, installer/archive, OS metric, client, native delegate, compressor, builder and Apple boundaries injected or absent where recorded. No actual native PTY, shipped full/native app, real Actions/cache/npm signature authority, downloaded Electron archive, real objdump/linker/native CLI/AppImage, signing/NSIS/notary/upload/updater or live freeze proof. Historical scope before this audit: Published Linux 1.4.188 desktop against current source in both directions; scheduled weekly and manually runnable. No required PR check.", "motivatingLinks": ["https://github.com/stablyai/orca/actions/runs/34069063016"], "invariant": "A paired client and host without client-hosted browser capabilities retain server-hosted browser placement across supported version skew.", - "oracle": "Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Require both existing named browser placement scenarios to pass three times with one attempt, zero skips, zero failures, and no report errors.", + "oracle": "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Require both existing named browser placement scenarios to pass three times with one attempt, zero skips, zero failures, and no report errors.", "commands": [ "gh workflow run packaged-browser-e2e.yml", "pnpm exec playwright test tests/e2e/packaged-mixed-version-browser-placement.spec.ts --config tests/playwright.config.ts --project=electron-headless --workers=1 --repeat-each=3 --retries=0", @@ -14530,7 +14477,9 @@ "Audit2412 removes whole useVirtualizedScrollAnchor.marks-restore-signal.test.ts (six fake-hook geometry/mark/convergence/user-takeover/clamp alarms), use-task-creation-draft-retention original3/4 (immediate discard mock-call count/unopened no-write), use-terminal-bulk-close-actions.placement original6/7 (absent new-agent append and one real history-publication count at consumed3/30 scale), PendingNativeChatCreation original6 (unmounted abort completion/timer cleanup), and wsl-move-dialog-store original1/9/13 (default whole-distro count/reference/reuse and rejected-preview/start refusal recovery). The history counter measures genuine publication work without entries/order/reopen assertions; its unique batching alarm is intentionally retired. Fake React scroll tests ignore dependency scheduling and cleanup; unique simulated arithmetic alarms are deliberately lost. Retained existing-terminal reorder is not new-agent append coverage; mounted handoff timeout is not abort coverage. No equivalent complete replacement or fresh validation is claimed.", "Audit2417 removes commit-actions-real-git original3/4 (ordinary clean cherry-pick and revert content, subject and current-branch samples), and pty-startup-ingress-exited-asker original8/12 (actual foreground-group read budget across100queued queries, and zero foreground reads across100normal chunks plus final emitted/accepted raw cursor equality). Counters measure actual callback work and scale is consumed; these internal-work alarms are deliberately retired. Retained unborn, conflict and sequencer cases are not equivalent ordinary-success coverage. No equivalent complete replacement or fresh validation is claimed.", "Audit2425 removes use-workspace-copy-status original5, which returns a fixture-supplied readError string through statusReadError. No consumer blocker or attempted branch switch established refusal; the unique error-forwarding sample is intentionally retired. Other copy ownership and stale-refresh cases are not equivalent error-path coverage. No equivalent replacement or fresh validation is claimed.", - "Audit2432 removes BranchPicker.test.tsx original3, which only asserted onOpenChange(true/false) with an always-mounted mocked Popover. It never reopened the picker or consumed the callback in the parent status-refresh owner, despite its title. Lose that unique open/close notification alarm. Retained blocker/collision recovery and asynchronous post-unmount outcome cases are not equivalent replacement coverage. No fresh validation of the reduced selector is claimed." + "Audit2432 removes BranchPicker.test.tsx original3, which only asserted onOpenChange(true/false) with an always-mounted mocked Popover. It never reopened the picker or consumed the callback in the parent status-refresh owner, despite its title. Lose that unique open/close notification alarm. Retained blocker/collision recovery and asynchronous post-unmount outcome cases are not equivalent replacement coverage. No fresh validation of the reduced selector is claimed.", + "Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed.", + "Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed." ], "demotionRule": "Keep experimental if any direction skips or fails; do not extend timeouts or retry to green." }, diff --git a/config/scripts/ci/sharding/ci-shard-timings.json b/config/scripts/ci/sharding/ci-shard-timings.json index 83440c55a25..8df31614436 100644 --- a/config/scripts/ci/sharding/ci-shard-timings.json +++ b/config/scripts/ci/sharding/ci-shard-timings.json @@ -5802,9 +5802,6 @@ "src/renderer/src/components/terminal-pane/layout/close/RunningTerminalCloseDialog.test.tsx": 2303, "src/renderer/src/components/terminal-pane/session-fork/TerminalAgentSessionForkDialog.test.tsx": 266, "src/renderer/src/components/terminal-pane/titles/TerminalPaneHeaderOverlay.test.tsx": 1104, - "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/TerminalPaneRecoveryPortals.test.tsx": 670, - "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/TerminalRemoteRuntimeReconnectBanner.test.tsx": 812, - "src/renderer/src/components/terminal-pane/pty-transport/recovery/ssh/TerminalSshReconnectOverlay.test.tsx": 2354, "src/renderer/src/components/terminal-pane/account-restart/detached/account-restart-queue-progress.test.ts": 1988, "src/renderer/src/components/terminal-pane/agent-completion/agent-completion-coordinator-attention-dispatch.test.ts": 301, "src/renderer/src/components/terminal-pane/agent-completion/agent-completion-coordinator-completion-replay-guard.test.ts": 318, @@ -5897,7 +5894,6 @@ "src/renderer/src/components/terminal-pane/pty-connection/spawn/main-pane-start-wait.test.ts": 76, "src/renderer/src/components/terminal-pane/pty-connection/serialization/pane-serializer-register.test.ts": 123, "src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-kitty-file-reader.test.ts": 297, - "src/renderer/src/components/terminal-pane/pty-connection/startup/saved-resume-cancellation.test.ts": 1882, "src/renderer/src/components/terminal-pane/pty-connection/output-restore/snapshot-covered-terminal-queries.test.ts": 150, "src/renderer/src/components/terminal-pane/pty-connection/output/terminal-input-echo-delay.test.ts": 132, "src/renderer/src/components/terminal-pane/pty-connection/host-ownership/unserved-ssh-pane-bridge.test.ts": 70, @@ -5925,7 +5921,6 @@ "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-coalesce.test.ts": 683, "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-reattach-admission.test.ts": 1636, "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-recycled-pty-incarnation.test.ts": 787, - "src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-errors.test.ts": 1218, "src/renderer/src/components/terminal-pane/input/focus/regular-terminal-focus-ownership.test.ts": 208, "src/renderer/src/components/terminal-pane/pty-connection/output-restore/remote-hidden-output-restore-outcomes.test.ts": 2794, "src/renderer/src/components/terminal-pane/pty-connection/output-restore/remote-hidden-output-restore-unavailable-banner.repro.test.ts": 2355, @@ -5992,7 +5987,6 @@ "src/renderer/src/components/terminal-pane/emulation/terminal-capability-replies.test.ts": 131, "src/renderer/src/components/terminal-pane/clipboard/terminal-clipboard-paste.test.ts": 76, "src/renderer/src/components/terminal-pane/parking/retention/terminal-cold-park-timer-rearm.test.tsx": 701, - "src/renderer/src/components/terminal-pane/pty-transport/delivery/terminal-delivery-watchdog.test.ts": 111, "src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-handler.test.ts": 638, "src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-image-path.test.ts": 61, "src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-internal-handler.test.ts": 800, @@ -6265,8 +6259,8 @@ "src/renderer/src/hooks/useMacTccAttributionSeveredNotice.test.tsx": 2358, "src/renderer/src/hooks/useMetadataListRequest.test.tsx": 266, "src/renderer/src/hooks/useModalReturnFocus.test.tsx": 1938, - "src/renderer/src/hooks/usePrimarySelectionPaste.terminal-native-paste.test.tsx": 388, - "src/renderer/src/hooks/usePrimarySelectionPaste.test.tsx": 411, + "src/renderer/src/hooks/clipboard/primary-selection/usePrimarySelectionPaste.terminal-native-paste.test.tsx": 388, + "src/renderer/src/hooks/clipboard/primary-selection/usePrimarySelectionPaste.test.tsx": 411, "src/renderer/src/hooks/useReadOnScreenAttention.away.test.ts": 2420, "src/renderer/src/hooks/useReadOnScreenAttention.clock-skew.test.ts": 2093, "src/renderer/src/hooks/useReadOnScreenAttention.floating-panel.test.ts": 2157, @@ -6340,9 +6334,9 @@ "src/renderer/src/lib/agent-session/resume/history/ai-vault-session-resume-preparation.test.ts": 408, "src/renderer/src/lib/agent-session/history/title-sync/ai-vault-tab-title-sync-inputs.test.ts": 476, "src/renderer/src/lib/agent-session/history/title-sync/ai-vault-tab-title-sync.test.ts": 925, - "src/renderer/src/lib/app-command-dispatch.test.ts": 64, - "src/renderer/src/lib/app-keyboard-router.test.ts": 187, - "src/renderer/src/lib/app-menu-paste.test.ts": 229, + "src/renderer/src/lib/app-commands/app-command-dispatch.test.ts": 64, + "src/renderer/src/lib/keyboard/app-keyboard-router.test.ts": 187, + "src/renderer/src/lib/clipboard/menu/app-menu-paste.test.ts": 229, "src/renderer/src/lib/automation-session-reuse.test.ts": 70, "src/renderer/src/lib/automation-terminal-ownership.test.ts": 1795, "src/renderer/src/lib/bounded-generation-map.test.ts": 35, @@ -6358,7 +6352,7 @@ "src/renderer/src/lib/source-control/checks/check-run-details-log-normalization.test.ts": 75, "src/renderer/src/lib/claude-account-switch-sessions.test.ts": 782, "src/renderer/src/lib/claude-session-account-move.test.ts": 1816, - "src/renderer/src/lib/clipboard-image-copy.test.ts": 243, + "src/renderer/src/lib/clipboard/images/clipboard-image-copy.test.ts": 243, "src/renderer/src/lib/cmd-j-host-qualified-candidate-ownership.test.ts": 526, "src/renderer/src/lib/cmd-j-linear-issue-intent.test.ts": 42, "src/renderer/src/lib/code-host-error-copy.test.ts": 297, @@ -6367,8 +6361,7 @@ "src/renderer/src/lib/agent-session/accounts/codex/codex-session-restart.test.ts": 2039, "src/renderer/src/lib/codex-stale-pane-account-identity.test.ts": 1823, "src/renderer/src/lib/codex-stale-pane-sweep.test.ts": 1817, - "src/renderer/src/lib/comment-body-line-count.test.ts": 84, - "src/renderer/src/lib/comment-body-submit-state.test.ts": 55, + "src/renderer/src/lib/source-control/review/comments/comment-body-submit-state.test.ts": 55, "src/renderer/src/lib/composer-submit-cancellation.test.ts": 41, "src/renderer/src/lib/workspace/ownership/connection-context.test.ts": 1817, "src/renderer/src/lib/crash-diagnostics.test.ts": 176, @@ -6391,9 +6384,9 @@ "src/renderer/src/lib/finished-agent-resume-resurrection.test.ts": 1872, "src/renderer/src/lib/focus-terminal-tab-surface.split-focus.test.ts": 331, "src/renderer/src/lib/foreground-terminal-tabs.test.ts": 55, - "src/renderer/src/lib/github-links.test.ts": 76, - "src/renderer/src/lib/github-source-runtime-context.test.ts": 62, - "src/renderer/src/lib/gitlab-links.test.ts": 56, + "src/shared/new-workspace/github-links.test.ts": 76, + "src/renderer/src/lib/work-items/github/github-source-runtime-context.test.ts": 62, + "src/shared/new-workspace/gitlab-links.test.ts": 56, "src/renderer/src/lib/hook-command-delayed-delivery.test.ts": 1904, "src/renderer/src/lib/host-chat-program.test.ts": 2419, "src/renderer/src/lib/host-mirror-handle-gap-drain.test.ts": 1706, @@ -6401,11 +6394,10 @@ "src/renderer/src/lib/host-mirrored-pane-resume-replay.test.ts": 1814, "src/renderer/src/lib/browser/navigation/http-link-completion.test.ts": 1760, "src/renderer/src/lib/browser/navigation/http-link-routing-store.test.ts": 2211, - "src/renderer/src/lib/image-blob-png.test.ts": 253, - "src/renderer/src/lib/ime-composition-keyboard-event.test.ts": 274, - "src/renderer/src/lib/ime-text-field.test.tsx": 739, + "src/renderer/src/lib/text-input/ime/ime-composition-keyboard-event.test.ts": 274, + "src/renderer/src/lib/text-input/ime/ime-text-field.test.tsx": 739, "src/renderer/src/lib/keyboard-layout/layout-base-character.test.ts": 48, - "src/renderer/src/lib/large-text-control-paste.test.ts": 220, + "src/renderer/src/lib/text-input/paste/large-text-control-paste.test.ts": 220, "src/renderer/src/lib/agent-session/launch/background/launch-agent-background-session-launch-parity.test.ts": 2792, "src/renderer/src/lib/agent-session/launch/background/launch-agent-background-session.test.ts": 1040, "src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-in-new-tab-main-surface.test.ts": 1821, @@ -6422,11 +6414,10 @@ "src/renderer/src/lib/lazy-with-retry.never-landed-reload.test.ts": 194, "src/renderer/src/lib/lazy-with-retry.preload.test.tsx": 208, "src/renderer/src/lib/lazy-with-retry.test.ts": 282, - "src/renderer/src/lib/linear-board-drag-payload.test.ts": 58, - "src/renderer/src/lib/work-items/linear/linear-issue-context-snapshot.test.ts": 55, + "src/renderer/src/lib/work-items/linear/linear-board-drag-payload.test.ts": 58, "src/renderer/src/lib/work-items/linear/linear-issue-workspace-attachment.test.ts": 99, "src/renderer/src/lib/link-source-local-open-owner.test.ts": 433, - "src/renderer/src/lib/linked-work-item-context.test.ts": 64, + "src/renderer/src/lib/work-items/linked-work-item-context.test.ts": 64, "src/renderer/src/lib/editor/monaco/monaco-editor-gutter-disposal.test.ts": 295, "src/renderer/src/lib/monaco-languages/markdown-heading-outline.test.ts": 70, "src/renderer/src/lib/monaco-languages/monarch-embed-entry-recursion.test.ts": 697, @@ -6510,14 +6501,14 @@ "src/renderer/src/lib/pane-manager/xterm-write-callback-guard.test.ts": 53, "src/renderer/src/lib/pane-spawn-deferral-drain.test.ts": 61, "src/renderer/src/lib/parked-terminal-host-hydration.test.ts": 274, - "src/renderer/src/lib/paste-payload-metadata.test.ts": 53, + "src/renderer/src/lib/text-input/paste/paste-payload-metadata.test.ts": 53, "src/renderer/src/lib/path-head-elision.test.ts": 53, "src/renderer/src/lib/path.test.ts": 55, "src/renderer/src/lib/plugin-command-keybindings.test.ts": 1909, "src/renderer/src/lib/plugin-command-replacements.test.ts": 95, "src/renderer/src/lib/plugin-icons/plugin-icon-svg.test.ts": 231, "src/renderer/src/lib/plugin-monaco-token-rules.test.ts": 51, - "src/renderer/src/lib/pr-bot-author-overrides.test.ts": 349, + "src/renderer/src/lib/source-control/review/pr-bot-author-overrides.test.ts": 349, "src/renderer/src/lib/source-control/review/comments/pr-comment-thread-resolution.test.ts": 48, "src/renderer/src/lib/project-clone-url-prefill.test.ts": 61, "src/renderer/src/lib/project-host-workspace-target.jira-mapping.test.ts": 76, @@ -6579,8 +6570,8 @@ "src/renderer/src/lib/task-provider-error-copy.test.ts": 363, "src/renderer/src/lib/terminal-app-theme.test.ts": 301, "src/renderer/src/lib/terminal-input-activity-coalescing.test.ts": 43, - "src/renderer/src/lib/text-control-paste-ownership.test.ts": 217, - "src/renderer/src/lib/text-control-paste.test.ts": 222, + "src/renderer/src/lib/text-input/paste/text-control-paste-ownership.test.ts": 217, + "src/renderer/src/lib/text-input/paste/text-control-paste.test.ts": 222, "src/renderer/src/lib/text-generation-error-copy.test.ts": 466, "src/renderer/src/lib/typing-latency/echo-instrumentation.test.ts": 145, "src/renderer/src/lib/typing-latency/renderer-long-tasks.test.ts": 75, diff --git a/config/vitest.performance.config.ts b/config/vitest.performance.config.ts index f05c41e95f5..ceb2d73b083 100644 --- a/config/vitest.performance.config.ts +++ b/config/vitest.performance.config.ts @@ -6,7 +6,6 @@ import { nodeRuntimePool } from './scripts/test-runtime/node-worker/vitest-node- const contracts = [ 'src/main/runtime/session-tabs/session-tabs-phone-layout-moves.test.ts', - 'src/renderer/src/components/terminal-pane/pty-connection/startup/saved-resume-cancellation.test.ts', 'src/main/native-chat/agent-session-wire/host/testing/structured-agent-session-terminal-writer-acquire.test.ts', 'src/shared/agent-launch/permissions/tui-agent-permission-choice.test.ts', 'src/main/runtime/rpc/methods/projects/repo.test.ts', diff --git a/docs/STYLEGUIDE.md b/docs/STYLEGUIDE.md index 8befb02e39a..ee8a8c1e177 100644 --- a/docs/STYLEGUIDE.md +++ b/docs/STYLEGUIDE.md @@ -44,7 +44,7 @@ Tokens pair a **surface** with a **foreground** that meets contrast on it; alway - Body letter-spacing is set globally on `body`; don't override per component. - Use Tailwind's scale. Common: 14px body/default buttons, 13px sidebar items and dense rows, 12px sub-text and paths, 11px uppercase meta/captions. - Use `text-2xs` (11px) and `text-3xs` (10px), not `text-[11px]` / `text-[10px]`. -- Category labels: 11px, `font-semibold`, `uppercase`, `tracking-wider` (0.05em). +- Category labels: 11px, `font-semibold`, `uppercase`, `tracking-wider` (0.05em). Settings content uses sentence case without tracking: 14px row labels, `text-settings-detail` (12.5px) help, and `text-settings-heading` (15px) semibold section headings. Settings form rows use about 9px vertical padding (44px minimum), selects are 28px, and the centered content column is at most 720px with at least 32px side gutters. These density rules are scoped to `.settings-view-shell`; shared primitives retain their defaults elsewhere. - Native chat has its own lint-enforced scale and colours: see [native-chat.md](./styleguide/native-chat.md). ## Radius and elevation diff --git a/docs/assets/readme-downloads.svg b/docs/assets/readme-downloads.svg index 968f6560164..5d3b3001552 100644 --- a/docs/assets/readme-downloads.svg +++ b/docs/assets/readme-downloads.svg @@ -1,5 +1,5 @@ - - downloads: 162m + + downloads: 163m @@ -15,7 +15,7 @@ downloads downloads - 162m - 162m + 163m + 163m diff --git a/docs/assets/star-history.png b/docs/assets/star-history.png index 27a763163ca..04839af4982 100644 Binary files a/docs/assets/star-history.png and b/docs/assets/star-history.png differ diff --git a/src/main/agent-hooks/server/testing/identity/server-claude-resume-record-continuity.test.ts b/src/main/agent-hooks/server/testing/identity/server-claude-resume-record-continuity.test.ts index 6ba51d5812e..6c356e7b35b 100644 --- a/src/main/agent-hooks/server/testing/identity/server-claude-resume-record-continuity.test.ts +++ b/src/main/agent-hooks/server/testing/identity/server-claude-resume-record-continuity.test.ts @@ -73,3 +73,20 @@ it('records where a resumed process really started over the folder its seed name expect(recordedSession()?.cwd).toBe('/elsewhere') }) + +it('names the pane session from a --fork-session start, which Claude 2.1.214+ reports as fork', async () => { + // Captured from Claude 2.1.321 `claude --resume --fork-session` before any message. + await claudeHook({ + session_id: 'b47ec7fc-07e4-4012-8b28-1d5daa938f52', + transcript_path: + '/Users/u/.claude/projects/-private-tmp-w39942fork/b47ec7fc-07e4-4012-8b28-1d5daa938f52.jsonl', + cwd: '/private/tmp/w39942fork', + hook_event_name: 'SessionStart', + source: 'fork' + }) + + expect(recordedSession()).toMatchObject({ + id: 'b47ec7fc-07e4-4012-8b28-1d5daa938f52', + cwd: '/private/tmp/w39942fork' + }) +}) diff --git a/src/main/native-chat/agent-model-catalog/agent-model-catalog-lister.ts b/src/main/native-chat/agent-model-catalog/agent-model-catalog-lister.ts index c6f1e3196cd..6aebf3e875e 100644 --- a/src/main/native-chat/agent-model-catalog/agent-model-catalog-lister.ts +++ b/src/main/native-chat/agent-model-catalog/agent-model-catalog-lister.ts @@ -31,17 +31,28 @@ export type AgentModelCatalogListModels = ( owner: StructuredAgentResolutionOperation ) => Promise -/** The refresh that starts a listing gives it its budget; joining never extends or shortens it. */ +/** Covers the gap between one waiting read and the next, so a following reader keeps its place. */ +const AGENT_MODEL_CATALOG_RELEASE_GRACE_MS = 5_000 + +/** Queued listings need a holder; admitted probes run to their own timeout. */ export type AgentModelCatalogListingBudget = { /** Expiry withdraws it from admission, stops its process and drops its late answer. */ deadline?: number + /** This caller's interest; a queued listing is withdrawn a grace after no holder is left. */ signal?: AbortSignal + /** Service shutdown retires the listing immediately, without the holder release grace. */ + lifetime?: AbortSignal + admission?: PrioritySemaphore + /** Execution time after admission. */ + timeoutMs?: number } export type InFlightListing = { agent: string targets: Set current: () => boolean + /** Adds a queued holder until its signal aborts; admitted probes need none. */ + hold: (signal: AbortSignal | undefined) => void promise: Promise finish: (entry: AgentModelCatalogEntry | null) => void cleanup: () => void @@ -93,47 +104,91 @@ export function refreshAgentModelCatalogListing(input: { ) => AgentModelCatalogEntry | null }): Promise { const { fingerprint, agent, listModels } = input - const { deadline, signal } = input.budget ?? {} + const { signal, lifetime, admission, timeoutMs, deadline: budgetDeadline } = input.budget ?? {} + let deadline = budgetDeadline const existing = input.refreshes.get(fingerprint) if (existing) { + existing.hold(signal) demandAgentModelEfforts(existing, input.selectedModel, input.maxTargets) return existing.promise } const result = Promise.withResolvers() - // Ending the flight (its budget, the account or CLI retired, shutdown) stops its process too. const stopped = new AbortController() - const expiry = - deadline === undefined - ? undefined - : setTimeout(() => retire(), Math.max(0, deadline - Date.now())) + let expiry: ReturnType | undefined + const holders = new Map void>() + // A listing started without a signal is held until it settles. + let held = signal === undefined + const setDeadline = (next: number | undefined): void => { + deadline = next + clearTimeout(expiry) + if (deadline !== undefined) { + expiry = setTimeout(retire, Math.max(0, deadline - Date.now())) + } + } const flight: InFlightListing = { agent, targets: new Set(input.selectedModel ? [input.selectedModel] : []), - current: () => !signal?.aborted && (deadline === undefined || Date.now() < deadline), + current: () => !lifetime?.aborted && (deadline === undefined || Date.now() < deadline), + hold: (holder) => { + if (!held && holder && !holder.aborted && !holders.has(holder)) { + setDeadline(budgetDeadline) + const abandon = (): void => { + holders.delete(holder) + if (!held && holders.size === 0) { + setDeadline( + Math.min( + budgetDeadline ?? Infinity, + Date.now() + AGENT_MODEL_CATALOG_RELEASE_GRACE_MS + ) + ) + } + } + holders.set(holder, abandon) + holder.addEventListener('abort', abandon, { once: true }) + } + }, promise: result.promise, finish: result.resolve, cleanup: () => { clearTimeout(expiry) - signal?.removeEventListener('abort', retire) + lifetime?.removeEventListener('abort', retire) + for (const [holder, abandon] of holders) { + holder.removeEventListener('abort', abandon) + } stopped.abort() } } const retire = (): void => retireAgentModelCatalogListing(input.refreshes, input.listingWaiters, fingerprint, flight) const current = (): boolean => input.refreshes.get(fingerprint) === flight && flight.current() - const owner: StructuredAgentResolutionOperation = { current, signal: stopped.signal, deadline } input.refreshes.set(fingerprint, flight) - signal?.addEventListener('abort', retire, { once: true }) - if (!flight.current()) { + setDeadline(budgetDeadline) + flight.hold(signal) + lifetime?.addEventListener('abort', retire, { once: true }) + if (signal?.aborted || !flight.current()) { retire() } const span = startSpan('agentModelCatalog.discovery', { attributes: { agent, lister: 'probe' } }) void Promise.resolve().then(async () => { + let release: (() => void) | undefined try { + release = await admission?.acquire(0, stopped.signal) if (!current()) { span.end() return } + held = true + // Admission replaces the abandonment deadline with the probe's own execution budget. + setDeadline( + timeoutMs === undefined + ? budgetDeadline + : Math.min(budgetDeadline ?? Infinity, Date.now() + timeoutMs) + ) + const owner: StructuredAgentResolutionOperation = { + current, + signal: stopped.signal, + deadline + } let targets = input.selectedModel ? [input.selectedModel] : undefined let entry: AgentModelCatalogEntry | null = null do { @@ -165,6 +220,7 @@ export function refreshAgentModelCatalogListing(input: { } } finally { retire() + release?.() } }) return flight.promise @@ -172,20 +228,17 @@ export function refreshAgentModelCatalogListing(input: { export function scopedAgentModelCatalogLister(input: { legacy?: boolean - admission: PrioritySemaphore signal: AbortSignal resolved: AgentModelCatalogResolvedProbe | undefined probe: AgentModelCatalogProbe | undefined probeHome: AgentSessionAccountHome | null workspacePath: string | undefined }): AgentModelCatalogListModels { - const { legacy, admission, resolved, probe, probeHome, workspacePath } = input + const { legacy, resolved, probe, probeHome, workspacePath } = input return async (selectedModels, operation) => { const signal = operation.signal ? AbortSignal.any([input.signal, operation.signal]) : input.signal - // Waiting for a slot spends the listing's own budget; expiry withdraws it from the queue. - const release = legacy ? () => {} : await admission.acquire(0, signal) const deadline = new AbortController() // Share the retry budget and await bounded provider teardown before settling. const timer = legacy ? setTimeout(() => deadline.abort(), 30_000) : undefined @@ -211,8 +264,6 @@ export function scopedAgentModelCatalogLister(input: { throw signal.aborted ? new AgentModelCatalogListingStoppedError(String(error)) : error } finally { clearTimeout(timer) - // The slot is held until the provider's teardown finishes. - release() } } } diff --git a/src/main/native-chat/agent-model-catalog/agent-model-catalog-operation.ts b/src/main/native-chat/agent-model-catalog/agent-model-catalog-operation.ts index 0e8d5646f5b..897d9427738 100644 --- a/src/main/native-chat/agent-model-catalog/agent-model-catalog-operation.ts +++ b/src/main/native-chat/agent-model-catalog/agent-model-catalog-operation.ts @@ -12,7 +12,7 @@ export type AgentModelCatalogReadOperation = { deadline?: number retirement: number signal: AbortSignal - current: () => boolean + current: (options?: { ignoreDeadline: true }) => boolean controller: AbortController } @@ -35,9 +35,9 @@ export function captureAgentModelCatalogRead( retirement, signal, controller, - current: () => + current: (options) => !signal.aborted && - (deadline === undefined || Date.now() < deadline) && + (options?.ignoreDeadline || deadline === undefined || Date.now() < deadline) && deps.store.retirementRevision(params.agent) === retirement && agentModelCatalogRequestKey(deps, original) === identity } diff --git a/src/main/native-chat/agent-model-catalog/agent-model-catalog-refresh.ts b/src/main/native-chat/agent-model-catalog/agent-model-catalog-refresh.ts index 4f8d39458ad..202174b0d1b 100644 --- a/src/main/native-chat/agent-model-catalog/agent-model-catalog-refresh.ts +++ b/src/main/native-chat/agent-model-catalog/agent-model-catalog-refresh.ts @@ -16,6 +16,7 @@ import { import { resolveAgentModelCatalogScope } from './agent-model-catalog-scope' import { scopedAgentModelCatalogLister } from './agent-model-catalog-lister' import { seedAccountList } from './agent-model-catalog-account-list' +import type { AgentModelCatalogEntry } from './agent-model-catalog-entry' import { agentModelCatalogReleasedOwner, bindAgentModelCatalogScope, @@ -23,7 +24,7 @@ import { } from './agent-model-catalog-snapshot' import { AGENT_MODEL_CATALOG_PICKER_WAIT_MS } from './agent-model-catalog-listing-waiters' -/** One budget for a whole refresh: setup, the folder's settings, admission and the listing. */ +/** Bounds scope resolution and the folder's settings; listings own their execution budget. */ const AGENT_MODEL_CATALOG_REFRESH_MS = AGENT_MODEL_CATALOG_PICKER_WAIT_MS /** What a refresh resolves, captured when it starts; no reader's session, deadline or callback. */ @@ -54,7 +55,7 @@ export type AgentModelCatalogRefresh = { type Held = AgentModelCatalogRefresh & { workspaceId?: string; end: () => void } /** Equivalent requests share one refresh that belongs to no reader. It ends when it finishes, at - * its fixed budget, on its agent's or workspace's retirement, or with the service; readers only + * its setup budget, on its agent's or workspace's retirement, or with the service; readers only * wait on it, each until its own deadline or cancellation, and never extend or end it. */ export function createAgentModelCatalogRefreshes(context: { deps: AgentModelCatalogServiceDeps @@ -155,6 +156,7 @@ export function createAgentModelCatalogRefreshes(context: { Object.assign(bound, { fingerprint, exact, cwd }) bindAgentModelCatalogScope(bindings, launch.bindingKey, bound, requestKey) const probe = deps.probes?.[agent] + let completion: Promise | undefined if ( !launch.passive && (exact || !agentModelCatalogReleasedOwner(scoped)) && @@ -163,7 +165,6 @@ export function createAgentModelCatalogRefreshes(context: { ) { const lister = scopedAgentModelCatalogLister({ legacy: launch.legacy, - admission, signal: lifetime, resolved, probe, @@ -177,8 +178,8 @@ export function createAgentModelCatalogRefreshes(context: { deps.store.efforts.due(fingerprint, model) || deps.store.isListing(fingerprint)) ) { - // A listing another refresh started keeps that refresh's budget. - void deps.store.refresh( + // This refresh holds the listing while it runs; once admitted, the listing runs on. + completion = deps.store.refresh( fingerprint, agent, (selected, owner) => { @@ -187,7 +188,13 @@ export function createAgentModelCatalogRefreshes(context: { void task.finally(() => tasks.delete(task)).catch(() => {}) return task }, - { deadline, signal: lifetime }, + { + signal, + lifetime, + ...(launch.legacy + ? { deadline } + : { admission, timeoutMs: AGENT_MODEL_CATALOG_REFRESH_MS }) + }, model ) } @@ -195,16 +202,18 @@ export function createAgentModelCatalogRefreshes(context: { for (const model of targets.size > 0 ? [...targets] : [undefined]) { list(model) } - listing.resolve() - await bounded( - deps.store.pendingListing(fingerprint, true, true, signal) ?? Promise.resolve(null) - ) } listing.resolve() if (launch.passive) { await bound.projecting - } else if (current()) { - seedAccountList(deps, scope, agent) + } else { + // Discovery may finish after this refresh's setup budget ends. + const seeded = Promise.resolve(completion).then((entry) => { + if (entry !== null && bound.current()) { + seedAccountList(deps, scope, agent) + } + }) + await bounded(seeded) } } const end = (): void => ended.abort() diff --git a/src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts b/src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts index 35b005e03a7..71d60ff9a0d 100644 --- a/src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts +++ b/src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts @@ -112,13 +112,26 @@ export function createAgentModelCatalogService( binding: () => bindings.get(requestKey(params)) }) } - const result = snapshot(params) - // A waiting read that used its whole budget is final; work still running doesn't reopen it. - const { listingInProgress: _, ...settled } = result - const answer = waits && Date.now() >= deadline ? settled : result - return lifetime.signal.aborted - ? answer - : readAccountList(deps, params, answer, () => memoryBinding({ agent: params.agent })?.base) + const expired = waits && Date.now() >= deadline + // Expiry ends the wait, but a still-current scope can describe the listing left behind. + const answerParams = + expired && params.operation?.current({ ignoreDeadline: true }) + ? { ...params, operation: undefined } + : params + const result = snapshot(answerParams) + const answer = lifetime.signal.aborted + ? result + : readAccountList( + deps, + answerParams, + result, + () => memoryBinding({ agent: params.agent })?.base + ) + if (!expired || !answer.listingInProgress) { + return answer + } + // Expiring a reader cannot settle the listing, including for clients predating waitExpired. + return { ...answer, waitExpired: true } }, recordLiveListing: live.recordLiveListing, async prewarm() { diff --git a/src/main/native-chat/agent-model-catalog/agent-model-catalog-shared-listing.test.ts b/src/main/native-chat/agent-model-catalog/agent-model-catalog-shared-listing.test.ts index a0f0e749d2c..4b72c349a15 100644 --- a/src/main/native-chat/agent-model-catalog/agent-model-catalog-shared-listing.test.ts +++ b/src/main/native-chat/agent-model-catalog/agent-model-catalog-shared-listing.test.ts @@ -6,10 +6,7 @@ import { } from '../structured-agent-command-resolution' import { AgentModelCatalogStore, type AgentModelCatalogSuccess } from './agent-model-catalog-store' import type { AgentSessionAccountHome } from '../../../shared/agent-session/lifecycle/agent-session-account-home' -import { - joinHostModelListingWait, - isHostModelListingWaitInFlight -} from '../../../shared/host-model-listing-waits' +import { agentModelCatalogFingerprint } from './agent-model-catalog-fingerprint' function listing(id: string): AgentModelCatalogSuccess { return { @@ -98,7 +95,6 @@ it('finishes a shared listing for a folder that joined before the first reader g vi.useRealTimers() }) const h = sharedListingHarness() - const started = Date.now() void h.service.demand({ agent: 'codex', workspacePath: '/a', deadline: Date.now() + 1_000 }) await vi.waitFor(() => expect(h.run).toHaveBeenCalledOnce()) const b = h.service.read({ @@ -110,8 +106,6 @@ it('finishes a shared listing for a folder that joined before the first reader g await vi.advanceTimersByTimeAsync(2_000) // The first reader is gone, but the listing it started is still running for the folder that joined. expect(h.runs[0]?.signal?.aborted).toBe(false) - // Its requests carry the refresh's own budget, not the first reader's deadline. - expect(h.runs[0]?.deadline).toBe(started + 30_000) h.discovery.resolve({ ...listing('shared'), complete: true, configured: {} }) await vi.advanceTimersByTimeAsync(0) expect(await b).toMatchObject({ models: [{ id: 'shared' }] }) @@ -138,51 +132,79 @@ it.each(['retired', 'stopped'] as const)( } ) -it('never starts a queued shared listing once its budget has run out, nor a replacement', async () => { +it('keeps a queued listing only while a refresh or reader still waits on it', async () => { vi.useFakeTimers() onTestFinished(() => { vi.useRealTimers() }) const h = sharedListingHarness() - // Two other CLIs hold both discovery slots past every budget below. + // Two other CLIs hold both discovery slots. for (const busy of ['/busy-1', '/busy-2']) { void h.service.demand({ agent: 'codex', workspacePath: busy }) } await vi.waitFor(() => expect(h.run).toHaveBeenCalledTimes(2)) - void h.service.demand({ agent: 'codex', workspacePath: '/a', deadline: Date.now() + 1_000 }) - void h.service.demand({ agent: 'codex', workspacePath: '/b', deadline: Date.now() + 2_000 }) - await vi.advanceTimersByTimeAsync(31_000) + void h.service.demand({ agent: 'codex', workspacePath: '/own-dropped' }) + void h.service.demand({ agent: 'codex', workspacePath: '/own-waited' }) + await vi.advanceTimersByTimeAsync(25_000) + void h.service.read({ agent: 'codex', workspacePath: '/own-waited', waitForListing: true }) + await vi.advanceTimersByTimeAsync(15_000) h.listingFor('/busy-1').resolve(listing('busy')) h.listingFor('/busy-2').resolve(listing('busy')) await vi.advanceTimersByTimeAsync(60_000) + expect(h.runs.map((entry) => entry.identity)).toEqual(['/busy-1', '/busy-2', '/own-waited']) +}) + +it('retires queued discovery before shutdown releases an admission slot', async () => { + vi.useFakeTimers() + onTestFinished(() => { + vi.useRealTimers() + }) + const h = sharedListingHarness() + for (const workspacePath of ['/busy-1', '/busy-2', '/own-queued']) { + void h.service.demand({ agent: 'codex', workspacePath }) + } + await vi.advanceTimersByTimeAsync(0) + expect(h.service.snapshot({ agent: 'codex', workspacePath: '/own-queued' })).toMatchObject({ + listingInProgress: true + }) + + const stopped = h.service.stop() + h.listingFor('/busy-1').resolve(listing('busy')) + h.listingFor('/busy-2').resolve(listing('busy')) + await vi.advanceTimersByTimeAsync(0) + await stopped + expect(h.runs.map((entry) => entry.identity)).toEqual(['/busy-1', '/busy-2']) }) -it.each([5, 50])( - 'runs two of %i folders with their own CLIs at a time, starts none after its budget, and leaves nothing behind', - async (folders) => { - vi.useFakeTimers() - onTestFinished(() => { - vi.useRealTimers() - }) - const h = sharedListingHarness() - for (let index = 0; index < folders; index++) { - void h.service.demand({ agent: 'codex', workspacePath: `/own-${index}` }) - } - await vi.advanceTimersByTimeAsync(0) - expect(h.run).toHaveBeenCalledTimes(2) - await vi.advanceTimersByTimeAsync(30_000) - expect(h.runs.every((entry) => entry.signal?.aborted)).toBe(true) - // No reader asked again, so nothing replaces the expired work. - await vi.advanceTimersByTimeAsync(60_000) - expect(h.run).toHaveBeenCalledTimes(2) - for (let index = 0; index < folders; index++) { - expect( - h.service.snapshot({ agent: 'codex', workspacePath: `/own-${index}` }) - ).not.toHaveProperty('listingInProgress') - } +it('reports an expired captured wait and lets the next reader finish its queued listing', async () => { + vi.useFakeTimers() + onTestFinished(() => { + vi.useRealTimers() + }) + const h = sharedListingHarness() + for (const workspacePath of ['/busy-1', '/busy-2']) { + void h.service.demand({ agent: 'codex', workspacePath }) } -) + await vi.advanceTimersByTimeAsync(0) + const params = { agent: 'codex', workspacePath: '/own-waited', waitForListing: true } + const operation = h.service.captureRead(params) + const request = { ...params, operation, deadline: operation.deadline } + const first = h.service.read(request) + await vi.advanceTimersByTimeAsync(30_000) + expect(await first).toEqual({ origin: 'unknown', listingInProgress: true, waitExpired: true }) + + operation.controller.abort() + expect(await h.service.read(request)).toEqual({ origin: 'unknown' }) + + const next = h.service.read(params) + await vi.advanceTimersByTimeAsync(0) + h.listingFor('/busy-1').resolve(listing('busy')) + h.listingFor('/own-waited').resolve(listing('fresh')) + await vi.advanceTimersByTimeAsync(0) + expect(await next).toMatchObject({ origin: 'probe', models: [{ id: 'fresh' }] }) + expect(await next).not.toHaveProperty('waitExpired') +}) it("never answers a newly picked folder with the previous folder's late listing", async () => { const h = sharedListingHarness() @@ -326,98 +348,88 @@ it('settles each reader at its own deadline or cancellation, and stops the listi expect(h.service.snapshot({ agent: 'codex', workspacePath: '/a' }).origin).toBe('unknown') }) -it.each(['cold', 'warm'] as const)( - 'ends queued %s discovery within its original deadline and preserves existing observations', - async (mode) => { - vi.useFakeTimers() - const store = new AgentModelCatalogStore() - let failing = false - const run = vi.fn( - ( - _home: AgentSessionAccountHome, - options?: { signal?: AbortSignal; workspacePath?: string } - ) => - new Promise((resolve, reject) => { - const timer = setTimeout( - () => - failing - ? reject(new Error('offline')) - : resolve({ - ...listing(options?.workspacePath ?? 'listed'), - complete: true, - configured: {} - }), - 12_000 - ) - options?.signal?.addEventListener( - 'abort', - () => { - clearTimeout(timer) - reject(new Error('stopped')) - }, - { once: true } - ) - }) - ) - const service = createAgentModelCatalogService({ - store, - getConversation: () => undefined, - getRecord: () => undefined, - drivesRecord: () => true, - resolveAccountHome: async () => ({ variable: 'CODEX_HOME', path: '/account' }), - // Each folder resolves its own CLI (a project-local install), so each lists separately. - probes: { - codex: Object.assign(run, { - resolve: async ( - home: AgentSessionAccountHome, - _cwd: string, - _lookup?: unknown, - _operation?: unknown, - launchDirectory?: string - ) => ({ - identity: launchDirectory, - run: (signal?: AbortSignal) => run(home, { signal, workspacePath: launchDirectory }) - }) - }) - } - }) - const read = (path: string, waitForListing = false) => - waitForListing - ? service.read({ agent: 'codex', workspacePath: path, waitForListing }) - : discover(service, { agent: 'codex', workspacePath: path }) - const replies: unknown[] = [] - let leave = () => {} - try { - if (mode === 'warm') { - const initial = read('/5', true) - await vi.advanceTimersByTimeAsync(12_000) - await initial - await vi.advanceTimersByTimeAsync(120_001) - } - failing = false - await Promise.all(['/1', '/2', '/3', '/4', '/5'].map((path) => read(path))) - const follow = vi.fn(() => read('/5', true)) - const owner = { close() {} } - leave = joinHostModelListingWait('queued', follow, (reply) => replies.push(reply), owner) - const second = joinHostModelListingWait('queued', follow, () => {}, owner) - await vi.advanceTimersByTimeAsync(30_000) - expect(replies[0]).not.toHaveProperty('listingInProgress') - expect(follow).toHaveBeenCalledTimes(1) - - await vi.advanceTimersByTimeAsync(7_000) - expect(replies.at(-1)).not.toHaveProperty('listingInProgress') - expect(isHostModelListingWaitInFlight('queued', owner)).toBe(false) - if (mode === 'warm') { - expect(replies.at(-1)).toMatchObject({ models: [{ id: '/5' }] }) - } else { - expect(replies.at(-1)).toEqual({ origin: 'unknown' }) - } - expect(run).toHaveBeenCalledTimes(mode === 'warm' ? 6 : 5) - second() - } finally { - leave() - service.stop() - vi.useRealTimers() +it('publishes cached catalogs immediately and completes queued discoveries after admission', async () => { + vi.useFakeTimers() + const store = new AgentModelCatalogStore() + let warming = true + const probe = + (agent: string) => (_home: AgentSessionAccountHome, options?: { signal?: AbortSignal }) => + new Promise((resolve, reject) => { + // ast-grep-ignore: test-no-real-time-wait -- Fake timers simulate probe execution after queued admission. + const timer = setTimeout( + () => + resolve({ + ...listing(warming ? 'saved' : `${agent}-fresh`), + complete: true, + configured: {} + }), + agent === 'pi' || agent === 'gemini' ? 20_000 : 15_000 + ) + options?.signal?.addEventListener( + 'abort', + () => { + clearTimeout(timer) + reject(new Error('stopped')) + }, + { once: true } + ) + }) + const service = createAgentModelCatalogService({ + store, + getConversation: () => undefined, + getRecord: () => undefined, + drivesRecord: () => true, + resolveAccountHome: async () => ({ variable: 'CODEX_HOME', path: '/account' }), + probes: { + pi: probe('pi'), + gemini: probe('gemini'), + claude: probe('claude'), + codex: probe('codex') } + }) + try { + const saved = service.read({ agent: 'claude', waitForListing: true }) + await vi.advanceTimersByTimeAsync(15_000) + await saved + warming = false + await vi.advanceTimersByTimeAsync(120_001) + + for (const agent of ['pi', 'gemini', 'claude', 'codex']) { + await discover(service, { agent }) + } + expect(await service.read({ agent: 'claude' })).toMatchObject({ + models: [{ id: 'saved' }], + listingInProgress: true + }) + + const expired = service.read({ + agent: 'claude', + waitForListing: true, + deadline: Date.now() + 5_000 + }) + await vi.advanceTimersByTimeAsync(5_000) + expect(await expired).toMatchObject({ + models: [{ id: 'saved' }], + listingInProgress: true, + waitExpired: true + }) + + await vi.advanceTimersByTimeAsync(15_000) + const warm = service.read({ agent: 'claude', waitForListing: true }) + const cold = service.read({ agent: 'codex', waitForListing: true }) + await vi.advanceTimersByTimeAsync(15_000) + expect(await warm).toMatchObject({ models: [{ id: 'claude-fresh' }] }) + expect(await cold).toMatchObject({ models: [{ id: 'codex-fresh' }] }) + const account = agentModelCatalogFingerprint({ + agent: 'claude', + accountHome: { variable: 'CODEX_HOME', path: '/account' }, + wslDistro: null + }) + expect(store.observation(account)).toMatchObject({ + models: [{ id: 'claude-fresh', isDefault: false }] + }) + } finally { + await service.stop() + vi.useRealTimers() } -) +}) diff --git a/src/main/native-chat/agent-model-catalog/agent-model-catalog-store.ts b/src/main/native-chat/agent-model-catalog/agent-model-catalog-store.ts index 753084a7cf9..781ced64ed5 100644 --- a/src/main/native-chat/agent-model-catalog/agent-model-catalog-store.ts +++ b/src/main/native-chat/agent-model-catalog/agent-model-catalog-store.ts @@ -310,6 +310,8 @@ export class AgentModelCatalogStore { pendingListing( ...wait: Parameters ): ReturnType { + // Waiting on a queued listing keeps it queued. + this.refreshes.get(wait[0])?.hold(wait[3]) return this.listingWaiters.wait(...wait) } diff --git a/src/renderer/src/app-shell/plugin-settings-shortcut-handler.ts b/src/renderer/src/app-shell/plugin-settings-shortcut-handler.ts index cc45a4aace2..6892d4d237a 100644 --- a/src/renderer/src/app-shell/plugin-settings-shortcut-handler.ts +++ b/src/renderer/src/app-shell/plugin-settings-shortcut-handler.ts @@ -1,5 +1,5 @@ import { isPairedWebClientWindow } from '@/lib/desktop-window-chrome' -import { isEditableTarget, isNativeChatPromptTarget } from '@/lib/editable-target' +import { isEditableTarget, isNativeChatPromptTarget } from '@/lib/text-input/focus/editable-target' export function createPluginsSettingsShortcutHandler( target: EventTarget | null | undefined, diff --git a/src/renderer/src/app-shell/use-app-shell-services.ts b/src/renderer/src/app-shell/use-app-shell-services.ts index 0d984d7fc06..93465e308d8 100644 --- a/src/renderer/src/app-shell/use-app-shell-services.ts +++ b/src/renderer/src/app-shell/use-app-shell-services.ts @@ -2,13 +2,13 @@ import { useAppStore } from '../store' import { useClosedEditorTabCleanup } from '../components/editor/model-lifetime/retention/useClosedEditorTabCleanup' import { useIpcEvents } from '../hooks/useIpcEvents' import { useReadOnScreenAttention } from '../hooks/useReadOnScreenAttention' -import { useAppMenuPaste } from '../hooks/useAppMenuPaste' -import { useAppMenuSelectionActions } from '../hooks/useAppMenuSelectionActions' -import { useLargeTextControlPaste } from '../hooks/useLargeTextControlPaste' +import { useAppMenuPaste } from '../hooks/clipboard/menu/useAppMenuPaste' +import { useAppMenuSelectionActions } from '../hooks/app-commands/useAppMenuSelectionActions' +import { useLargeTextControlPaste } from '../hooks/text-input/paste/useLargeTextControlPaste' import { resolvePrimarySelectionMiddleClickPaste, usePrimarySelectionPaste -} from '../hooks/usePrimarySelectionPaste' +} from '../hooks/clipboard/primary-selection/usePrimarySelectionPaste' import { useRadixBodyPointerEventsRecovery } from '../hooks/useRadixBodyPointerEventsRecovery' import { useOsc52ClipboardDefaultOnNotice } from '../components/terminal-pane/clipboard/osc52-clipboard-default-on-notice' import { useWindowsTerminalFontWeightNotice } from '../components/terminal-pane/appearance/windows-terminal-font-weight-notice' diff --git a/src/renderer/src/app-shell/use-global-keybindings.ts b/src/renderer/src/app-shell/use-global-keybindings.ts index 5c6479de315..ec2c0578ece 100644 --- a/src/renderer/src/app-shell/use-global-keybindings.ts +++ b/src/renderer/src/app-shell/use-global-keybindings.ts @@ -3,7 +3,7 @@ import { toast } from 'sonner' import { translate } from '@/i18n/i18n' import { canShowRightSidebarForView } from '@/lib/right-sidebar-visibility' import { getSelectedTextForFileSearch } from '../lib/file-search-selection' -import { registerAppCommandDispatcher } from '@/lib/app-command-dispatch' +import { registerAppCommandDispatcher } from '@/lib/app-commands/app-command-dispatch' import { executePluginCommand } from '@/lib/plugin-command-execution' import { runBuiltInOrReplacement } from '@/lib/plugin-command-replacements' import { @@ -34,7 +34,7 @@ import { } from './app-command-handlers' import type { AppChromeLayout } from './use-app-chrome-layout' import type { FloatingWorkspacePanelState } from './use-floating-workspace-panel' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' import { textInputOwnsComposition } from '../../../shared/text-input-shortcut-policy' import { isAgentTerminalPreviewTarget } from '../components/dashboard-popout/agent-terminal-preview-target' diff --git a/src/renderer/src/assets/main.css b/src/renderer/src/assets/main.css index 59c6fd15fb5..e446274885a 100644 --- a/src/renderer/src/assets/main.css +++ b/src/renderer/src/assets/main.css @@ -49,6 +49,10 @@ --text-2xs--line-height: calc(1 / 0.6875); --text-3xs: 0.625rem; --text-3xs--line-height: calc(0.875 / 0.625); + --text-settings-detail: 0.78125rem; + --text-settings-detail--line-height: 1.35; + --text-settings-heading: 0.9375rem; + --text-settings-heading--line-height: 1.4; --text-chat-code: 0.75rem; --text-chat-code--line-height: calc(1 / 0.75); } @@ -1059,7 +1063,9 @@ body[data-modal-overlay-open] [data-slot='command-dialog-content'], [data-slot='sheet-content'], [data-onboarding-overlay] - ):has(~ [data-slot='dialog-overlay'], ~ [data-slot='sheet-overlay']) { + ):has( + ~ :is([data-slot='dialog-overlay'], [data-slot='sheet-overlay']):not([data-state='closed']) + ) { filter: blur(2px); } @@ -2149,6 +2155,43 @@ html.native-shell .app-layout { animation: settings-shell-enter 180ms ease-out; } +/* Shared row primitives also render outside Settings; their density stays local to this page. */ +.settings-view-shell > :not(aside) [data-slot='label'], +.settings-view-shell > :not(aside) [data-source-title] { + font-size: var(--text-sm); + line-height: 1.4; +} + +.settings-view-shell > :not(aside) p.text-xs, +.settings-view-shell > :not(aside) p.text-2xs, +.settings-view-shell > :not(aside) p[class~='text-[10px]'], +.settings-view-shell > :not(aside) p[class~='text-[11px]'], +.settings-view-shell > :not(aside) p[class~='text-[12px]'], +.settings-view-shell > :not(aside) p[class~='text-[13px]'], +.settings-view-shell > :not(aside) [data-source-path] { + font-size: var(--text-settings-detail); + line-height: 1.35; +} + +.settings-view-shell > :not(aside) [data-slot='select-trigger'], +.settings-view-shell > :not(aside) button[role='combobox'] { + min-height: 28px; + height: 28px; +} + +.settings-view-shell > :not(aside) [data-settings-row]:not(:has([data-settings-row])) { + padding-block: 9px; + min-height: 44px; +} + +.settings-view-shell > :not(aside) [data-settings-group-heading] { + font-size: var(--text-settings-heading); +} + +.settings-view-shell > :not(aside) [data-settings-group-description] { + font-size: var(--text-settings-detail); +} + .repo-icon-emoji-picker .EmojiPickerReact { --epr-bg-color: var(--card); --epr-category-label-bg-color: var(--card); diff --git a/src/renderer/src/components/JiraIssueWorkspace.tsx b/src/renderer/src/components/JiraIssueWorkspace.tsx index 6740918308b..45cc2029fd4 100644 --- a/src/renderer/src/components/JiraIssueWorkspace.tsx +++ b/src/renderer/src/components/JiraIssueWorkspace.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useMemo } from 'react' import { toast } from 'sonner' import * as VisuallyHidden from 'radix-ui/visually-hidden' import { Sheet, SheetContent, SheetDescription, SheetTitle } from '@/components/ui/sheet' -import { hasBoundedCommentBodyText } from '@/lib/comment-body-submit-state' +import { hasBoundedCommentBodyText } from '@/lib/source-control/review/comments/comment-body-submit-state' import { useAppStore } from '@/store' import { jiraGetIssueForTarget, @@ -20,7 +20,7 @@ import { JiraIssueCommentComposer, JiraIssueWorkspaceContent } from './jira-issu import { useJiraIssueWorkspaceActions } from './jira-issue-workspace-actions' import { getJiraReadIdentity } from '@/store/slices/jira/jira-read-coordination' import { defaultScopeHost } from '@/runtime/hosts/selection/default-creation-host' -import { taskSourceRuntimeTarget } from '@/lib/task-source-runtime-target' +import { taskSourceRuntimeTarget } from '@/lib/work-items/task-source-runtime-target' import { getEnvironmentRuntimeContextKey } from '@/runtime/hosts/observations/provider-runtime-context' import { runtimeTargetEnvironmentId } from '@/runtime/rpc/targets/runtime-client-target' import { editedJiraIssueFields } from './jira-issue-workspace-hydration' diff --git a/src/renderer/src/components/LinearIssueTextEditor.tsx b/src/renderer/src/components/LinearIssueTextEditor.tsx index 595a2123c0c..110eb89794b 100644 --- a/src/renderer/src/components/LinearIssueTextEditor.tsx +++ b/src/renderer/src/components/LinearIssueTextEditor.tsx @@ -1,6 +1,6 @@ import { writeLinearIssue } from '@/lib/work-items/linear/linear-issue-write' -import { taskProviderErrorMessage } from '@/lib/task-provider-error-copy' -import { ImeTextarea } from '@/lib/ime-text-field' +import { taskProviderErrorMessage } from '@/lib/work-items/task-provider-error-copy' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import React, { useCallback, useRef, useState } from 'react' import { LoaderCircle } from 'lucide-react' import { toast } from 'sonner' diff --git a/src/renderer/src/components/NewWorkspaceComposerModal.tsx b/src/renderer/src/components/NewWorkspaceComposerModal.tsx index a30a54562d8..1c0169e1b1b 100644 --- a/src/renderer/src/components/NewWorkspaceComposerModal.tsx +++ b/src/renderer/src/components/NewWorkspaceComposerModal.tsx @@ -43,7 +43,7 @@ import { getWorkspaceComposerInitialFocusTarget } from '@/lib/workspace-composer import '@/components/sidebar/workspace-creation/folder/folder-workspace-source-repos' import { getFolderWorkspacePrimaryActionLabel } from '@/components/sidebar/workspace-creation/folder/folder-workspace-source-selection' import { useAgentMenuObservation } from '@/components/tab-bar/use-new-tab-agent-menu-rows' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' // Keep Add Project’s clone/SSH machinery outside the composer entry render, matching App loading. const HostedAddRepoDialog = lazyWithRetry( diff --git a/src/renderer/src/components/SelectedTextCopyMenu.tsx b/src/renderer/src/components/SelectedTextCopyMenu.tsx index 4fe4f173a14..6049aeca2e4 100644 --- a/src/renderer/src/components/SelectedTextCopyMenu.tsx +++ b/src/renderer/src/components/SelectedTextCopyMenu.tsx @@ -3,7 +3,7 @@ import { createPortal } from 'react-dom' import { Copy } from 'lucide-react' import { useTranslate } from '@/i18n/use-translate' import { addViewportSizeChangeListener } from '@/hooks/viewport-size-change-listener' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' type SelectedTextCopyMenuProps = { children: React.ReactNode diff --git a/src/renderer/src/components/TerminalSearch.tsx b/src/renderer/src/components/TerminalSearch.tsx index b22321e66d5..7d0cb2b2254 100644 --- a/src/renderer/src/components/TerminalSearch.tsx +++ b/src/renderer/src/components/TerminalSearch.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import { useEffect, useState, useCallback } from 'react' import { ChevronUp, ChevronDown, X, CaseSensitive, Regex } from 'lucide-react' import type { SearchAddon } from '@xterm/addon-search' diff --git a/src/renderer/src/components/activity/ActivityPrototypePage.tsx b/src/renderer/src/components/activity/ActivityPrototypePage.tsx index f822f763156..d3cd16377ec 100644 --- a/src/renderer/src/components/activity/ActivityPrototypePage.tsx +++ b/src/renderer/src/components/activity/ActivityPrototypePage.tsx @@ -21,7 +21,7 @@ import { useActivityTerminalPortalStatus } from './activity-terminal-portal-status' import type { ActivityTerminalPortalSlotId } from './activity-thread-types' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' import { selectDetectedWorktreesByRepo, selectFolderWorkspaces, diff --git a/src/renderer/src/components/activity/activity-event-build-cache.ts b/src/renderer/src/components/activity/activity-event-build-cache.ts index 9193f3b4ade..0b8fbf54313 100644 --- a/src/renderer/src/components/activity/activity-event-build-cache.ts +++ b/src/renderer/src/components/activity/activity-event-build-cache.ts @@ -13,6 +13,23 @@ import type { ActivityLiveAgentState } from './activity-thread-types' import { buildPaneActivityEvents } from './activity-pane-events' +import { + buildActivityTabContext, + buildActivityTabHostIndex, + type ActivityTabContext, + type ActivityTabHostIndex +} from './activity-event-builder-context' +import type { BuildActivityEventsArgs } from './activity-event-builder' + +type ActivityTabInputs = Pick< + BuildActivityEventsArgs, + 'tabsByWorktree' | 'unifiedTabsByWorktree' | 'chatNames' +> + +type ActivityTabIndexes = ActivityTabInputs & { + context: Map + hosts: ActivityTabHostIndex +} type PaneActivityCacheEntry = { source: unknown @@ -29,12 +46,46 @@ type PaneActivityCacheEntry = { export type ActivityEventBuildCache = { panes: Map + tabs?: ActivityTabIndexes } export function createActivityEventBuildCache(): ActivityEventBuildCache { return { panes: new Map() } } +export function resolveActivityTabIndexes( + args: ActivityTabInputs, + cache: ActivityEventBuildCache | undefined +): ActivityTabIndexes { + const previous = cache?.tabs + if ( + previous && + previous.tabsByWorktree === args.tabsByWorktree && + previous.unifiedTabsByWorktree === args.unifiedTabsByWorktree && + previous.chatNames === args.chatNames + ) { + return previous + } + const next: ActivityTabIndexes = { + tabsByWorktree: args.tabsByWorktree, + unifiedTabsByWorktree: args.unifiedTabsByWorktree, + chatNames: args.chatNames, + context: buildActivityTabContext( + args.tabsByWorktree, + args.unifiedTabsByWorktree, + args.chatNames + ), + hosts: + previous && previous.unifiedTabsByWorktree === args.unifiedTabsByWorktree + ? previous.hosts + : buildActivityTabHostIndex(args.unifiedTabsByWorktree) + } + if (cache) { + cache.tabs = next + } + return next +} + export type PaneBuildRequest = { cacheKey: string source: unknown diff --git a/src/renderer/src/components/activity/activity-event-builder.ts b/src/renderer/src/components/activity/activity-event-builder.ts index b1375164901..57b65b1fc25 100644 --- a/src/renderer/src/components/activity/activity-event-builder.ts +++ b/src/renderer/src/components/activity/activity-event-builder.ts @@ -18,14 +18,13 @@ import { capActivityEvents } from './activity-event-cap' import { newestActivityHistoryEntries } from './activity-pane-events' import { createActivityEventBuildCache, + resolveActivityTabIndexes, resolvePaneBuild, type ActivityEventBuildCache } from './activity-event-build-cache' import { appendUnsupportedAndRetainedEvents } from './activity-event-builder-sources' import { attributedActivityTabContext, - buildActivityTabContext, - buildActivityTabHostIndex, resolveActivityEventOwner, type ActivityEventOwner } from './activity-event-builder-context' @@ -63,12 +62,7 @@ export function buildActivityEvents( const events: ActivityEvent[] = [] const paneEntryByPaneKey: Record = {} const seenEventIds = new Set() - const tabContext = buildActivityTabContext( - args.tabsByWorktree, - args.unifiedTabsByWorktree, - args.chatNames - ) - const tabHostIndex = buildActivityTabHostIndex(args.unifiedTabsByWorktree) + const { context: tabContext, hosts: tabHostIndex } = resolveActivityTabIndexes(args, cache) const ownerCache = new Map() const liveAgentByPaneKey: Record = {} const seenCacheKeys = cache ? new Set() : null diff --git a/src/renderer/src/components/activity/activity-thread-context-menu.tsx b/src/renderer/src/components/activity/activity-thread-context-menu.tsx index a91d6436a18..725fceb20b7 100644 --- a/src/renderer/src/components/activity/activity-thread-context-menu.tsx +++ b/src/renderer/src/components/activity/activity-thread-context-menu.tsx @@ -11,7 +11,7 @@ import { import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' import { CLOSE_ALL_CONTEXT_MENUS_EVENT } from '@/lib/close-all-context-menus' -import { formatClipboardFilePath } from '@/lib/clipboard-file-path' +import { formatClipboardFilePath } from '@/lib/clipboard/clipboard-file-path' import { getWorktreeRowLocalPathOpenOwner } from '@/lib/workspace/ownership/worktree-row-open-in-owner' import { useAppStore } from '@/store' import { diff --git a/src/renderer/src/components/activity/activity-thread-hover-card-summary.tsx b/src/renderer/src/components/activity/activity-thread-hover-card-summary.tsx index f62405cbfa1..663bc53bed5 100644 --- a/src/renderer/src/components/activity/activity-thread-hover-card-summary.tsx +++ b/src/renderer/src/components/activity/activity-thread-hover-card-summary.tsx @@ -9,7 +9,7 @@ import { getWorktreeGitIdentityDisplay } from '../../../../shared/worktree/git-i import { jumpToWorktreeFromSidebar } from '@/lib/workspace/activation/worktree-jump-navigation' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' -import { formatClipboardFilePath } from '@/lib/clipboard-file-path' +import { formatClipboardFilePath } from '@/lib/clipboard/clipboard-file-path' import { getWorktreeRowLocalPathOpenOwner } from '@/lib/workspace/ownership/worktree-row-open-in-owner' import { cn } from '@/lib/utils' import { diff --git a/src/renderer/src/components/activity/use-agent-pane-threads.ts b/src/renderer/src/components/activity/use-agent-pane-threads.ts index 66406c57320..5f0f444d29d 100644 --- a/src/renderer/src/components/activity/use-agent-pane-threads.ts +++ b/src/renderer/src/components/activity/use-agent-pane-threads.ts @@ -67,6 +67,7 @@ export function useAllAgentPaneThreads({ badgeOnly = false }: { badgeOnly?: bool ) ) { eventBuildCacheRef.current.panes.clear() + eventBuildCacheRef.current.tabs = undefined return EMPTY_ACTIVITY_BUILD } // Global history caps affect live-thread unread and search state. diff --git a/src/renderer/src/components/agent/AgentLaunchSetupFooter.tsx b/src/renderer/src/components/agent/AgentLaunchSetupFooter.tsx index a8d9c48a463..82edb8b3792 100644 --- a/src/renderer/src/components/agent/AgentLaunchSetupFooter.tsx +++ b/src/renderer/src/components/agent/AgentLaunchSetupFooter.tsx @@ -6,7 +6,7 @@ import { cn } from '@/lib/utils' import { ShortcutKeyCombo } from '@/components/ShortcutKeyCombo' import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import type { NativeChatComposerHandle } from '../native-chat/composer/native-chat-composer-types' import { AgentLaunchPromptComposer } from './AgentLaunchPromptComposer' import { diff --git a/src/renderer/src/components/agent/AgentLaunchSetupPanel.tsx b/src/renderer/src/components/agent/AgentLaunchSetupPanel.tsx index 89b074176b1..7f15b22356f 100644 --- a/src/renderer/src/components/agent/AgentLaunchSetupPanel.tsx +++ b/src/renderer/src/components/agent/AgentLaunchSetupPanel.tsx @@ -23,7 +23,7 @@ import { import { useTranslate } from '@/i18n/use-translate' import { agentModelChoiceChips } from './launch-settings/agent-model-choice-chips' import { isScreenSubmitShortcut } from '@/lib/screen-submit-shortcut' -import { isImeOwnedKeyboardEvent } from '@/lib/ime-composition-keyboard-event' +import { isImeOwnedKeyboardEvent } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { AgentDefaultArgsInput } from './launch-settings/AgentLaunchDefaultsEditor' import { NativeChatSessionOptionRows } from '../native-chat/session/options/controls/NativeChatSessionOptionRows' import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@/components/ui/collapsible' diff --git a/src/renderer/src/components/agent/agent-launch-picker-acquisition.test.ts b/src/renderer/src/components/agent/agent-launch-picker-acquisition.test.ts index 6c24aa71d81..52f5a4e436c 100644 --- a/src/renderer/src/components/agent/agent-launch-picker-acquisition.test.ts +++ b/src/renderer/src/components/agent/agent-launch-picker-acquisition.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest' +import { expect, it, onTestFinished, vi } from 'vitest' import { createAgentPickerInventorySource, currentAgentPickerAcquisition, @@ -87,8 +87,16 @@ it('settles closed catalog reads and resumes their refresh when the picker reope models: [model('saved')] }) await expect - .poll(() => currentAgentPickerAcquisition('closed-catalog')?.map((entry) => entry.catalogRead)) - .toEqual(['settled', 'settled']) + .poll(() => currentAgentPickerAcquisition('closed-catalog')?.map((entry) => entry.catalog)) + .toEqual([ + { origin: 'unknown', listingInProgress: true }, + { + origin: 'probe', + fetchedAt: 1, + listingInProgress: true, + models: [{ id: 'saved', label: 'saved', isDefault: false, efforts: [] }] + } + ]) const stopReopened = observeAgentPickerAcquisition('closed-catalog', entries, reads, observer) expect(published.map((entry) => entry.catalogRead)).toEqual(['pending', 'pending']) @@ -190,3 +198,99 @@ it('admits the selected agent’s usable CLI job before another agent after its other.resolve({ origin: 'unknown' }) } }) + +it('waits again only when a wait outlasted its budget, then stops once the listing has ended', async () => { + vi.useFakeTimers() + onTestFinished(() => { + vi.useRealTimers() + }) + const saved = { origin: 'probe' as const, fetchedAt: 1, models: [model('saved')] } + // A floating folder's quick read always reports a listing; only waiting reads know it ended. + const waits = [{ ...saved, waitExpired: true as const }, saved] + const reads: boolean[] = [] + let published: AgentPickerEntry[] = [] + const stop = observeAgentPickerAcquisition( + 'outlasting-listing', + [codex], + { + catalog: async (_entry, waitForListing) => { + reads.push(waitForListing) + return waitForListing ? (waits.shift() ?? saved) : { ...saved, listingInProgress: true } + }, + support: async () => undefined + }, + { selected: () => undefined, publish: (entries) => (published = entries) } + ) + try { + await vi.advanceTimersByTimeAsync(60_000) + expect(reads).toEqual([false, true, true]) + expect(published[0]).toMatchObject({ catalogRead: 'settled', catalog: saved }) + } finally { + stop() + } +}) + +it('publishes every saved catalog while earlier refreshes are still pending', async () => { + const fresh = Promise.withResolvers() + const entries: AgentPickerEntry[] = [ + codex, + { ...codex, agent: 'claude', label: 'Claude', rows: [{ agent: 'claude', kind: 'cli' }] }, + { ...codex, agent: 'gemini', label: 'Gemini', rows: [{ agent: 'gemini', kind: 'cli' }] } + ] + let published: AgentPickerEntry[] = [] + const stop = observeAgentPickerAcquisition( + 'independent-saved-catalogs', + entries, + { + catalog: async (entry, waitForListing) => + waitForListing + ? fresh.promise + : { + origin: 'probe', + fetchedAt: 1, + listingInProgress: true, + models: [model(entry.agent)] + }, + support: async () => undefined + }, + { selected: () => 'codex', publish: (next) => (published = next) } + ) + try { + await expect + .poll(() => published.map((entry) => entry.catalog)) + .toMatchObject([ + { models: [{ id: 'codex' }] }, + { models: [{ id: 'claude' }] }, + { models: [{ id: 'gemini' }] } + ]) + } finally { + stop() + fresh.resolve({ origin: 'probe', fetchedAt: 2, models: [model('fresh')] }) + } +}) + +it('keeps an unflagged saved catalog provisional when its read fails', async () => { + const fresh = Promise.withResolvers() + let published: AgentPickerEntry[] = [] + const stop = observeAgentPickerAcquisition( + 'failed-unflagged-catalog', + [{ ...codex, catalog: { origin: 'probe', fetchedAt: 1, models: [model('saved')] } }], + { catalog: () => fresh.promise, support: async () => undefined }, + { selected: () => undefined, publish: (next) => (published = next) } + ) + try { + expect(published[0]).toMatchObject({ + catalogRead: 'pending', + catalog: { models: [{ id: 'saved' }] } + }) + fresh.reject(new Error('refresh failed')) + await expect + .poll(() => published[0]) + .toMatchObject({ + catalogRead: 'failed', + catalog: { models: [{ id: 'saved' }] } + }) + } finally { + stop() + } +}) diff --git a/src/renderer/src/components/agent/agent-launch-picker-acquisition.ts b/src/renderer/src/components/agent/agent-launch-picker-acquisition.ts index de59368d455..b3f400a50f4 100644 --- a/src/renderer/src/components/agent/agent-launch-picker-acquisition.ts +++ b/src/renderer/src/components/agent/agent-launch-picker-acquisition.ts @@ -19,6 +19,7 @@ import type { /** Pending local IPC outlives observers; matching menus must retain its physical owner. */ const pending = new Map() +type ReadKind = 'catalog' | 'refresh' | 'support' type SupportRead = { state: 'queued' | 'pending' | 'settled' value?: AgentPickerEntry['structured'] @@ -28,9 +29,8 @@ class AgentPickerAcquisition { readonly observers = new Set() entries: AgentPickerEntry[] settingsPending = false - private outstanding = { catalog: 0, support: 0 } - private queued: Record<'catalog' | 'support', Set> - private deferredCatalogs = new Set() + private outstanding = { catalog: 0, refresh: 0, support: 0 } + private queued: Record> private supports = new Map() private jobs: AgentPickerCatalogJob[] private defaults: AgentPickerEntry[] @@ -54,6 +54,7 @@ class AgentPickerAcquisition { } this.queued = { catalog: new Set(this.jobs.map((_, index) => index)), + refresh: new Set(), support: new Set(this.supports.keys()) } } @@ -84,9 +85,9 @@ class AgentPickerAcquisition { const view = agentPickerSourceView(this.entries[job.index], job.source) if ( view.catalogRead !== 'pending' && - (this.deferredCatalogs.has(index) || - view.catalog.origin === 'unknown' || + (view.catalog.origin === 'unknown' || view.catalogRead === 'failed' || + view.catalogRead === 'unsupported' || view.catalog.unavailable !== undefined || view.catalog.listingInProgress) ) { @@ -106,9 +107,13 @@ class AgentPickerAcquisition { } this.entries = this.project() } - const stopDemand = observer.subscribeDemand?.(() => this.admit('catalog')) + const stopDemand = observer.subscribeDemand?.(() => { + this.admit('catalog') + this.admit('refresh') + }) observer.publish(this.entries) this.admit('catalog') + this.admit('refresh') this.admit('support') return () => { stopDemand?.() @@ -174,28 +179,26 @@ class AgentPickerAcquisition { }) } - private async readCatalog(entry: AgentPickerEntry, index: number) { - this.deferredCatalogs.delete(index) + private async readCatalog(entry: AgentPickerEntry, index: number, waitForListing: boolean) { const job = this.jobs[index] - const saved = await this.reads.catalog(entry, false, job.source) - if (!saved?.listingInProgress) { - return saved + const catalog = await this.reads.catalog(entry, waitForListing, job.source) + // An open picker waits on a running listing, and again when a wait used its whole budget. + const refresh = + this.observers.size > 0 && + (waitForListing ? catalog?.waitExpired : catalog?.listingInProgress) === true + if (refresh) { + this.queued.refresh.add(index) } - if (saved.origin !== 'unknown') { - this.entries = updateAgentPickerCatalog(this.entries, job, { catalog: saved }) - this.publish() - } - if (!this.observers.size) { - this.deferredCatalogs.add(index) - return saved - } - return this.reads.catalog(entry, true, job.source) + this.entries = updateAgentPickerCatalog(this.entries, job, { + ...(catalog ? { catalog } : {}), + catalogRead: !catalog ? 'failed' : refresh ? 'pending' : 'settled' + }) } - private admit(kind: 'catalog' | 'support') { + private admit(kind: ReadKind) { while (this.observers.size && this.outstanding[kind] < 2 && this.queued[kind].size) { const usable = [...this.queued[kind]].filter((index) => { - if (kind !== 'catalog') { + if (kind === 'support') { return true } const job = this.jobs[index], @@ -214,7 +217,7 @@ class AgentPickerAcquisition { const index = usable.find((index) => priorities.includes( - this.entries[kind === 'catalog' ? this.jobs[index].index : index].agent + this.entries[kind !== 'support' ? this.jobs[index].index : index].agent ) ) ?? usable[0] if (index === undefined) { @@ -222,35 +225,24 @@ class AgentPickerAcquisition { } this.queued[kind].delete(index) this.outstanding[kind]++ - const entry = this.entries[kind === 'catalog' ? this.jobs[index].index : index] + const entry = this.entries[kind !== 'support' ? this.jobs[index].index : index] if (kind === 'support') { this.supports.set(index, { state: 'pending' }) } const read = - kind === 'catalog' - ? this.readCatalog(entry, index) - .then((catalog) => { - const resume = this.deferredCatalogs.has(index) && this.observers.size > 0 - if (resume) { - this.queued.catalog.add(index) - } - this.entries = updateAgentPickerCatalog(this.entries, this.jobs[index], { - ...(catalog ? { catalog } : {}), - catalogRead: resume ? 'pending' : 'settled' - }) - }) - .catch((error: unknown) => { - const unsupported = - typeof error === 'object' && - error !== null && - 'code' in error && - (error.code === 'method_not_found' || - error.code === 'structured_agent_session_unsupported' || - error.code === 'forbidden') - this.entries = updateAgentPickerCatalog(this.entries, this.jobs[index], { - catalogRead: unsupported ? 'unsupported' : 'failed' - }) + kind !== 'support' + ? this.readCatalog(entry, index, kind === 'refresh').catch((error: unknown) => { + const unsupported = + typeof error === 'object' && + error !== null && + 'code' in error && + (error.code === 'method_not_found' || + error.code === 'structured_agent_session_unsupported' || + error.code === 'forbidden') + this.entries = updateAgentPickerCatalog(this.entries, this.jobs[index], { + catalogRead: unsupported ? 'unsupported' : 'failed' }) + }) : this.reads .support(entry) .catch(() => undefined) @@ -264,6 +256,9 @@ class AgentPickerAcquisition { this.outstanding[kind]-- this.publish() this.admit(kind) + if (kind === 'catalog') { + this.admit('refresh') + } this.retire() }) } @@ -274,6 +269,7 @@ class AgentPickerAcquisition { !this.observers.size && !this.settingsPending && !this.outstanding.catalog && + !this.outstanding.refresh && !this.outstanding.support ) { pending.delete(this.key) diff --git a/src/renderer/src/components/agent/agent-launch-picker-host-reads.ts b/src/renderer/src/components/agent/agent-launch-picker-host-reads.ts index db40b79e37f..82cf5d2ffc7 100644 --- a/src/renderer/src/components/agent/agent-launch-picker-host-reads.ts +++ b/src/renderer/src/components/agent/agent-launch-picker-host-reads.ts @@ -54,11 +54,13 @@ export function agentPickerModelCatalogReads(input: { return { catalog: async ( entry: AgentPickerEntry, - _wait = false, + waitForListing = false, source: ModelCatalogSource = 'structured' ) => resolveScope(entry, source).then((scope) => - scope ? hostModelMenuCatalog(scope).read(source === 'cli') : { origin: 'unknown' as const } + scope + ? hostModelMenuCatalog(scope).read(source === 'cli', waitForListing) + : { origin: 'unknown' as const } ), observeCatalog: ( entry: AgentPickerEntry, diff --git a/src/renderer/src/components/agent/agent-launch-picker-queued-waits.test.ts b/src/renderer/src/components/agent/agent-launch-picker-queued-waits.test.ts new file mode 100644 index 00000000000..879770fad33 --- /dev/null +++ b/src/renderer/src/components/agent/agent-launch-picker-queued-waits.test.ts @@ -0,0 +1,93 @@ +import { expect, it, vi } from 'vitest' +import type { AgentPickerEntry } from '../../../../shared/agent-launch/picker/agent-launch-picker' +import type { AgentSessionModelCatalogResult } from '../../../../shared/agent-session/agent-session-wire' +const transport = vi.hoisted(() => ({ call: vi.fn() })) +vi.mock('@/runtime/native-chat/requests/structured-agent-session-call', () => ({ + callStructuredAgentSession: transport.call +})) +import { agentPickerModelCatalogReads } from './agent-launch-picker-host-reads' +import { observeAgentPickerAcquisition } from './agent-launch-picker-acquisition' +import { resetHostModelCatalogSnapshotsForTests } from '@/runtime/native-chat/model-catalogs/host-model-catalog-snapshots' + +it('publishes all saved source catalogs before waiting, and follows an expired wait through the host adapter', async () => { + resetHostModelCatalogSnapshotsForTests() + const expired = Promise.withResolvers() + const fresh = Promise.withResolvers() + let codexWaited = false + transport.call.mockImplementation((_target, _method, params) => { + if (params.waitForListing) { + if (params.agent === 'codex' && !codexWaited) { + codexWaited = true + return expired.promise + } + return fresh.promise + } + return Promise.resolve({ + origin: 'probe', + fetchedAt: 1, + listingInProgress: true, + listingNamesConfiguredModel: false, + models: [{ id: `${params.agent}-saved`, label: 'Saved', isDefault: false, efforts: [] }] + }) + }) + const entries: AgentPickerEntry[] = (['codex', 'claude', 'gemini'] as const).map((agent) => ({ + agent, + label: agent, + rows: [], + surfaces: ['chat'], + defaultSurface: 'chat', + terminal: {}, + structured: {}, + catalog: { origin: 'unknown' } + })) + let published = entries + const stop = observeAgentPickerAcquisition( + 'queued-waits-through-host-owner', + entries, + { + ...agentPickerModelCatalogReads({ + target: { kind: 'local' }, + nativeRuntime: true, + selector: 'id:queued', + settings: {} + }), + support: async () => undefined + }, + { selected: () => 'codex', publish: (next) => (published = next) } + ) + try { + await expect + .poll(() => + published.map((entry) => + entry.catalog.origin !== 'unknown' ? entry.catalog.models[0]?.id : undefined + ) + ) + .toEqual(['codex-saved', 'claude-saved', 'gemini-saved']) + expired.resolve({ origin: 'unknown', listingInProgress: true, waitExpired: true }) + await expect + .poll(() => + transport.call.mock.calls + .filter(([, , params]) => params.agent === 'codex') + .map(([, , params]) => params.waitForListing ?? false) + ) + .toEqual([false, true, true]) + fresh.resolve({ + origin: 'probe', + fetchedAt: 2, + listingNamesConfiguredModel: false, + models: [{ id: 'fresh', label: 'Fresh', isDefault: false, efforts: [] }] + }) + await expect + .poll(() => published.map((entry) => entry.catalogRead)) + .toEqual(['settled', 'settled', 'settled']) + expect( + published.map((entry) => + entry.catalog.origin !== 'unknown' ? entry.catalog.models[0]?.id : undefined + ) + ).toEqual(['fresh', 'fresh', 'fresh']) + } finally { + stop() + expired.resolve({ origin: 'unknown' }) + fresh.resolve({ origin: 'unknown' }) + } +}) diff --git a/src/renderer/src/components/agent/agent-launch-picker-retirement.test.ts b/src/renderer/src/components/agent/agent-launch-picker-retirement.test.ts new file mode 100644 index 00000000000..19dc9dfa69a --- /dev/null +++ b/src/renderer/src/components/agent/agent-launch-picker-retirement.test.ts @@ -0,0 +1,144 @@ +import { expect, it } from 'vitest' +import type { AgentPickerRetainedSetup } from '../../../../shared/agent-launch/picker/agent-launch-picker-authority' +import type { AgentPickerEntry } from '../../../../shared/agent-launch/picker/agent-launch-picker' +import { retireAgentPickerSetups } from './agent-launch-picker-retirement' + +const entry: AgentPickerEntry = { + agent: 'codex', + label: 'Codex', + rows: [{ agent: 'codex', kind: 'cli' }], + surfaces: ['terminal'], + defaultSurface: 'terminal', + terminal: {}, + structured: {}, + catalog: { + origin: 'probe', + fetchedAt: 1, + models: [{ id: 'saved', label: 'Saved', isDefault: false, efforts: [] }] + } +} + +it('preserves edited presets until a completed catalog confirms their model or effort was removed', () => { + const setups = new Map([ + [ + 'missing-model', + { + target: undefined, + agent: 'codex', + preset: { model: 'fresh' }, + source: undefined, + draft: { + agent: 'codex', + surface: 'terminal', + choices: { model: 'saved' }, + arguments: '--add-dir model-edits' + }, + active: false + } + ], + [ + 'missing-effort', + { + target: undefined, + agent: 'codex', + preset: { model: 'saved', effort: 'high' }, + source: undefined, + draft: { + agent: 'codex', + surface: 'terminal', + choices: { model: 'saved', options: { effort: 'low' } }, + arguments: '--add-dir effort-edits' + }, + active: false + } + ] + ]) + for (const catalogRead of ['pending', 'failed', 'unsupported'] as const) { + retireAgentPickerSetups([{ ...entry, catalogRead }], setups, undefined, 'select') + expect([...setups.values()].map(({ draft }) => draft.arguments)).toEqual([ + '--add-dir model-edits', + '--add-dir effort-edits' + ]) + } + + retireAgentPickerSetups( + [ + { + ...entry, + catalogRead: 'settled', + catalog: { + origin: 'probe', + fetchedAt: 2, + models: [ + { id: 'fresh', label: 'Fresh', isDefault: false, efforts: [] }, + { + id: 'saved', + label: 'Saved', + isDefault: false, + efforts: [{ value: 'high', label: 'High' }] + } + ] + } + } + ], + setups, + undefined, + 'select' + ) + expect([...setups.values()].map(({ draft }) => draft.arguments)).toEqual([ + '--add-dir model-edits', + '--add-dir effort-edits' + ]) + + retireAgentPickerSetups([{ ...entry, catalogRead: 'settled' }], setups, undefined, 'select') + expect([...setups.keys()]).toEqual([]) +}) + +it('retires a terminal preset only after that source completes, independently of its chat catalog', () => { + const pending: AgentPickerEntry = { + ...entry, + agent: 'antigravity', + surfaces: ['chat', 'terminal'], + defaultSurface: 'chat', + sourceCatalogs: { + cli: { + catalog: { origin: 'probe', fetchedAt: 1, models: [] }, + catalogRead: 'pending' + } + } + } + const setups = new Map([ + [ + 'terminal', + { + target: undefined, + agent: 'antigravity', + preset: { model: 'saved' }, + source: undefined, + draft: { + agent: 'antigravity', + surface: 'terminal', + choices: { model: 'saved' }, + arguments: '--kept' + }, + active: false + } + ] + ]) + retireAgentPickerSetups([pending], setups, undefined, 'select') + expect(setups.get('terminal')?.draft.arguments).toBe('--kept') + retireAgentPickerSetups( + [ + { + ...pending, + sourceCatalogs: { + cli: { catalog: { origin: 'probe', fetchedAt: 2, models: [] }, catalogRead: 'settled' } + } + } + ], + setups, + undefined, + 'select' + ) + expect([...setups.keys()]).toEqual([]) +}) diff --git a/src/renderer/src/components/agent/agent-launch-picker-retirement.ts b/src/renderer/src/components/agent/agent-launch-picker-retirement.ts index f417616789e..96b95de2dbd 100644 --- a/src/renderer/src/components/agent/agent-launch-picker-retirement.ts +++ b/src/renderer/src/components/agent/agent-launch-picker-retirement.ts @@ -1,5 +1,8 @@ import { agentPickerCatalogView } from '../../../../shared/agent-launch/picker/agent-launch-picker-source' -import type { AgentPickerRetainedSetup } from '../../../../shared/agent-launch/picker/agent-launch-picker-authority' +import { + agentPickerCatalogAuthoritative, + type AgentPickerRetainedSetup +} from '../../../../shared/agent-launch/picker/agent-launch-picker-authority' import type { AgentPickerEntry } from '../../../../shared/agent-launch/picker/agent-launch-picker' import { launchDraftSources } from '../native-chat/drafts/native-chat-launch-draft-source' @@ -28,9 +31,10 @@ export function retireAgentPickerSetups( const entry = entriesByKey.get( currentKey ?? JSON.stringify([retained.target?.key, retained.agent]) ) - const catalog = entry && agentPickerCatalogView(entry, retained.draft.surface).catalog + const view = entry && agentPickerCatalogView(entry, retained.draft.surface) + const catalog = view && agentPickerCatalogAuthoritative(view) ? view.catalog : undefined let models = catalog && memberships.get(catalog) - if (!models && catalog && catalog.origin !== 'unknown' && !catalog.listingInProgress) { + if (!models && catalog) { models = new Map( catalog.models.map((model) => [ model.id, diff --git a/src/renderer/src/components/agent/agent-launch-setup-option-rows.ts b/src/renderer/src/components/agent/agent-launch-setup-option-rows.ts index 7eecb5fad9b..dc3f31dd055 100644 --- a/src/renderer/src/components/agent/agent-launch-setup-option-rows.ts +++ b/src/renderer/src/components/agent/agent-launch-setup-option-rows.ts @@ -1,3 +1,4 @@ +import { agentPickerCatalogAuthoritative } from '../../../../shared/agent-launch/picker/agent-launch-picker-authority' import { agentPickerCatalogView } from '../../../../shared/agent-launch/picker/agent-launch-picker-source' import { agentPickerModelMenu } from '../../../../shared/agent-launch/picker/agent-launch-picker-catalog' import { @@ -264,13 +265,7 @@ export function agentLaunchSetupCatalogState( agent: entry.label }) : null - const canSearch = - hasModels && - entry.catalog.origin !== 'unknown' && - !entry.catalog.listingInProgress && - entry.catalogRead !== 'pending' && - entry.catalogRead !== 'failed' && - entry.catalogRead !== 'unsupported' + const canSearch = hasModels && agentPickerCatalogAuthoritative(entry) return { hasModels, catalogPending, catalogMessage, canSearch } } diff --git a/src/renderer/src/components/automations/AutomationEditorPromptSection.tsx b/src/renderer/src/components/automations/AutomationEditorPromptSection.tsx index 9e010cff1ee..b1a57ce5f17 100644 --- a/src/renderer/src/components/automations/AutomationEditorPromptSection.tsx +++ b/src/renderer/src/components/automations/AutomationEditorPromptSection.tsx @@ -1,4 +1,4 @@ -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import React from 'react' import { Pencil } from 'lucide-react' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/automations/AutomationTimeField.tsx b/src/renderer/src/components/automations/AutomationTimeField.tsx index 30bf12207a9..68e4a13cadd 100644 --- a/src/renderer/src/components/automations/AutomationTimeField.tsx +++ b/src/renderer/src/components/automations/AutomationTimeField.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React from 'react' import { Clock } from 'lucide-react' import { cn } from '@/lib/utils' diff --git a/src/renderer/src/components/automations/automation-run-history-keyboard-navigation.ts b/src/renderer/src/components/automations/automation-run-history-keyboard-navigation.ts index b9f4d04a853..5b61eab7ff0 100644 --- a/src/renderer/src/components/automations/automation-run-history-keyboard-navigation.ts +++ b/src/renderer/src/components/automations/automation-run-history-keyboard-navigation.ts @@ -1,5 +1,5 @@ import type { AutomationRun } from '../../../../shared/automations/history/automation-run' -import { isImeOwnedKeyboardEvent } from '@/lib/ime-composition-keyboard-event' +import { isImeOwnedKeyboardEvent } from '@/lib/text-input/ime/ime-composition-keyboard-event' export type AutomationRunHistoryArrowKey = 'ArrowUp' | 'ArrowDown' diff --git a/src/renderer/src/components/automations/use-automations-page-escape.ts b/src/renderer/src/components/automations/use-automations-page-escape.ts index c501399c876..36656ad6fe7 100644 --- a/src/renderer/src/components/automations/use-automations-page-escape.ts +++ b/src/renderer/src/components/automations/use-automations-page-escape.ts @@ -2,7 +2,7 @@ import { useEffect } from 'react' import { hasVisibleOverlay } from '@/lib/visible-overlay' import type { AutomationsPageLocalState } from './use-automations-page-local-state' import type { AutomationsPageStoreState } from './use-automations-page-store-state' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' export function useAutomationsPageEscape({ store, diff --git a/src/renderer/src/components/browser-pane/annotate/MarkupOverlay.tsx b/src/renderer/src/components/browser-pane/annotate/MarkupOverlay.tsx index e7f7a1aa083..73c73aac099 100644 --- a/src/renderer/src/components/browser-pane/annotate/MarkupOverlay.tsx +++ b/src/renderer/src/components/browser-pane/annotate/MarkupOverlay.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React, { useCallback, useRef, useState } from 'react' import { createPortal } from 'react-dom' import { Check, X } from 'lucide-react' diff --git a/src/renderer/src/components/browser-pane/annotate/browser-page-annotation-tray.tsx b/src/renderer/src/components/browser-pane/annotate/browser-page-annotation-tray.tsx index 5c2e09ec6b4..46c1fbb77b4 100644 --- a/src/renderer/src/components/browser-pane/annotate/browser-page-annotation-tray.tsx +++ b/src/renderer/src/components/browser-pane/annotate/browser-page-annotation-tray.tsx @@ -1,4 +1,4 @@ -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import { useState } from 'react' import { ChevronDown, diff --git a/src/renderer/src/components/browser-pane/annotate/browser-page-grab-toast.tsx b/src/renderer/src/components/browser-pane/annotate/browser-page-grab-toast.tsx index 455ce434517..ace3bcf7bfd 100644 --- a/src/renderer/src/components/browser-pane/annotate/browser-page-grab-toast.tsx +++ b/src/renderer/src/components/browser-pane/annotate/browser-page-grab-toast.tsx @@ -8,7 +8,7 @@ import { DropdownMenuTrigger } from '@/components/ui/dropdown-menu' import { useTranslate } from '@/i18n/use-translate' -import { imageCopyFailedMessage } from '@/lib/clipboard-image-copy' +import { imageCopyFailedMessage } from '@/lib/clipboard/images/clipboard-image-copy' import type { BrowserPageGrabAnnotations, BrowserPageGrabToastState diff --git a/src/renderer/src/components/browser-pane/annotate/pending-browser-annotation-card.tsx b/src/renderer/src/components/browser-pane/annotate/pending-browser-annotation-card.tsx index 71f7627a02c..7da77dff10c 100644 --- a/src/renderer/src/components/browser-pane/annotate/pending-browser-annotation-card.tsx +++ b/src/renderer/src/components/browser-pane/annotate/pending-browser-annotation-card.tsx @@ -1,4 +1,4 @@ -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import { useEffect, useState } from 'react' import { CornerDownLeft, MessageSquarePlus } from 'lucide-react' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/browser-pane/annotate/use-browser-page-grab-annotations.ts b/src/renderer/src/components/browser-pane/annotate/use-browser-page-grab-annotations.ts index a782d563b57..2802b62f08c 100644 --- a/src/renderer/src/components/browser-pane/annotate/use-browser-page-grab-annotations.ts +++ b/src/renderer/src/components/browser-pane/annotate/use-browser-page-grab-annotations.ts @@ -2,7 +2,7 @@ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react import { translate } from '@/i18n/i18n' import { useMountedRef } from '@/hooks/useMountedRef' import { useAppStore } from '@/store' -import { imageCopyFailedMessage } from '@/lib/clipboard-image-copy' +import { imageCopyFailedMessage } from '@/lib/clipboard/images/clipboard-image-copy' import { isBrowserAnnotationPageFull, type BrowserAnnotationIntent, diff --git a/src/renderer/src/components/browser-pane/annotate/useGrabMode.ts b/src/renderer/src/components/browser-pane/annotate/useGrabMode.ts index b390a9cbf39..955e04d099c 100644 --- a/src/renderer/src/components/browser-pane/annotate/useGrabMode.ts +++ b/src/renderer/src/components/browser-pane/annotate/useGrabMode.ts @@ -7,7 +7,7 @@ import type { import { useMountedRef } from '@/hooks/useMountedRef' import { translate } from '@/i18n/i18n' import { isEditableKeyboardTarget } from '../host-guest/browser-keyboard' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' import { useGuestEscape } from '../host-guest/use-guest-escape' export type GrabModeState = 'idle' | 'armed' | 'awaiting' | 'confirming' | 'error' diff --git a/src/renderer/src/components/browser-pane/assemble-chrome/BrowserFind.tsx b/src/renderer/src/components/browser-pane/assemble-chrome/BrowserFind.tsx index 050014a426d..30ab022f4ad 100644 --- a/src/renderer/src/components/browser-pane/assemble-chrome/BrowserFind.tsx +++ b/src/renderer/src/components/browser-pane/assemble-chrome/BrowserFind.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import { useCallback, useEffect, useRef, useState } from 'react' import { ChevronUp, ChevronDown, X } from 'lucide-react' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/browser-pane/assemble-chrome/browser-page-context-menu.tsx b/src/renderer/src/components/browser-pane/assemble-chrome/browser-page-context-menu.tsx index cca92a6846e..076f6934cb1 100644 --- a/src/renderer/src/components/browser-pane/assemble-chrome/browser-page-context-menu.tsx +++ b/src/renderer/src/components/browser-pane/assemble-chrome/browser-page-context-menu.tsx @@ -9,7 +9,7 @@ import { } from 'react' import { createPortal } from 'react-dom' import type { BrowserPageContextMenuState } from '../describe-page/browser-page-types' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' import { BrowserPageContextMenuItems } from './browser-page-context-menu-items' export function BrowserPageContextMenu({ diff --git a/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-address-bar-escape.ts b/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-address-bar-escape.ts index 7fb16815969..686b9fcb672 100644 --- a/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-address-bar-escape.ts +++ b/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-address-bar-escape.ts @@ -1,5 +1,5 @@ import { useCallback, useLayoutEffect, useRef, type RefObject } from 'react' -import { isImeOwnedKeyboardEvent } from '@/lib/ime-composition-keyboard-event' +import { isImeOwnedKeyboardEvent } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { requestBrowserFocus } from '../host-guest/browser-focus' /** Escape in the bar, in the order of Chromium's OmniboxEditModel::OnEscapeKeyPressed. */ diff --git a/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.ts b/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.ts index 1a7537329ca..d4b2684c694 100644 --- a/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.ts +++ b/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.ts @@ -20,7 +20,7 @@ import { browserChromeShortcutOwnsEvent } from '../describe-page/browser-overlay import type { BrowserChromeShortcutScope } from '../describe-page/browser-page-types' import type { BrowserAddressBarSelection } from './browser-address-bar-edit-session' import type { BrowserPageGuestFocus } from './browser-page-guest-focus' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' import { useBrowserHistoryShortcut } from '../history/use-browser-history-shortcut' import { useWebviewDragPassthroughActive } from '../host-guest/use-webview-drag-passthrough-active' diff --git a/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-find-shortcuts.ts b/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-find-shortcuts.ts index fc9178d22b2..114dd272f6a 100644 --- a/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-find-shortcuts.ts +++ b/src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-find-shortcuts.ts @@ -4,7 +4,7 @@ import { useAppStore } from '@/store' import { keybindingMatchesAction } from '../../../../../shared/keybindings' import { browserChromeShortcutOwnsEvent } from '../describe-page/browser-overlay-shortcut-target' import type { BrowserChromeShortcutScope } from '../describe-page/browser-page-types' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' export function useBrowserPageFindShortcuts({ browserTabId, diff --git a/src/renderer/src/components/browser-pane/history/browser-history-row-removal.ts b/src/renderer/src/components/browser-pane/history/browser-history-row-removal.ts index cb8266f14a1..d610616c990 100644 --- a/src/renderer/src/components/browser-pane/history/browser-history-row-removal.ts +++ b/src/renderer/src/components/browser-pane/history/browser-history-row-removal.ts @@ -1,5 +1,5 @@ import { useCallback } from 'react' -import { isImeOwnedKeyboardEvent } from '@/lib/ime-composition-keyboard-event' +import { isImeOwnedKeyboardEvent } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { useAppStore } from '@/store' import type { BrowserAddressBarSuggestion } from '../assemble-chrome/browser-address-bar-suggestions' diff --git a/src/renderer/src/components/browser-pane/history/use-browser-history-shortcut.ts b/src/renderer/src/components/browser-pane/history/use-browser-history-shortcut.ts index e0802f8acc4..0997bc032ff 100644 --- a/src/renderer/src/components/browser-pane/history/use-browser-history-shortcut.ts +++ b/src/renderer/src/components/browser-pane/history/use-browser-history-shortcut.ts @@ -1,7 +1,7 @@ import { useEffect } from 'react' import { useAppStore } from '@/store' import { getShortcutPlatform } from '@/hooks/useShortcutLabel' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' import { keybindingMatchesAction } from '../../../../../shared/keybindings' import { browserChromeShortcutOwnsEvent } from '../describe-page/browser-overlay-shortcut-target' import type { BrowserChromeShortcutScope } from '../describe-page/browser-page-types' diff --git a/src/renderer/src/components/browser-pane/host-guest/use-browser-page-keyboard-shortcuts.ts b/src/renderer/src/components/browser-pane/host-guest/use-browser-page-keyboard-shortcuts.ts index fe79b0c7444..5d77b5de61f 100644 --- a/src/renderer/src/components/browser-pane/host-guest/use-browser-page-keyboard-shortcuts.ts +++ b/src/renderer/src/components/browser-pane/host-guest/use-browser-page-keyboard-shortcuts.ts @@ -7,7 +7,7 @@ import type { BrowserChromeShortcutScope } from '../describe-page/browser-page-t import type { GrabIntent } from '../../../../../shared/browser/element-grab/browser-grab-types' import { isEditableKeyboardTarget } from './browser-keyboard' import { useBrowserPageWebviewShortcuts } from './use-browser-page-webview-shortcuts' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' export function useBrowserPageKeyboardShortcuts({ browserTabId, diff --git a/src/renderer/src/components/browser-pane/host-guest/use-browser-page-webview-shortcuts.ts b/src/renderer/src/components/browser-pane/host-guest/use-browser-page-webview-shortcuts.ts index 7e669c902b7..1ef17342481 100644 --- a/src/renderer/src/components/browser-pane/host-guest/use-browser-page-webview-shortcuts.ts +++ b/src/renderer/src/components/browser-pane/host-guest/use-browser-page-webview-shortcuts.ts @@ -10,7 +10,7 @@ import { publishBrowserPageSiteDisplay, type BrowserPageZoomCommand } from './browser-page-zoom' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' /** Handle chrome chords in the renderer and guest chords through main’s IPC; focused guests own a separate WebContents. */ export function useBrowserPageWebviewShortcuts({ diff --git a/src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-context-menu.tsx b/src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-context-menu.tsx index 9ff0d9d6f05..0c35b2407ea 100644 --- a/src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-context-menu.tsx +++ b/src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-context-menu.tsx @@ -16,7 +16,7 @@ import { type RemoteBrowserPaneNotice, type RemoteBrowserRuntimeTarget } from './remote-browser-page-input-model' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' export function useRemoteBrowserPageContextMenu({ busy, diff --git a/src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-chrome-chords.ts b/src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-chrome-chords.ts index e21ddca989a..54d55532b8d 100644 --- a/src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-chrome-chords.ts +++ b/src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-chrome-chords.ts @@ -10,7 +10,7 @@ import { REMOTE_BROWSER_FIND_UNAVAILABLE_NOTICE_ID, type RemoteBrowserPaneNotice } from './remote-browser-page-input-model' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' const FIND_UNAVAILABLE_NOTICE_MS = 4000 diff --git a/src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.tsx b/src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.tsx index c56fe70029f..8f3d5dceeb5 100644 --- a/src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.tsx +++ b/src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.tsx @@ -34,7 +34,7 @@ import { useDocPreviewWebviewHistory } from './doc-preview-webview-history' import { useDocPreviewGuestFocus } from './use-doc-preview-guest-focus' import { useDocPreviewGuestTools } from './use-doc-preview-guest-tools' import { useConfirmationDialog } from '@/components/confirmation-dialog-context' -import { formatClipboardFilePath } from '@/lib/clipboard-file-path' +import { formatClipboardFilePath } from '@/lib/clipboard/clipboard-file-path' import { getOpenFileRevealOwner } from '@/lib/reveal-in-file-manager' import { subscribeDocPreviewExternalLinkConfirmation } from './doc-preview-external-link-confirmation' diff --git a/src/renderer/src/components/browser-pane/workspace-doc/doc-preview-document-chip.tsx b/src/renderer/src/components/browser-pane/workspace-doc/doc-preview-document-chip.tsx index 36c64b7a1e4..c0b6acb1699 100644 --- a/src/renderer/src/components/browser-pane/workspace-doc/doc-preview-document-chip.tsx +++ b/src/renderer/src/components/browser-pane/workspace-doc/doc-preview-document-chip.tsx @@ -1,7 +1,7 @@ import { Check, FileCode2 } from 'lucide-react' import { Badge } from '@/components/ui/badge' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' -import { useClipboardTextCopyFeedback } from '@/hooks/use-clipboard-text-copy-feedback' +import { useClipboardTextCopyFeedback } from '@/hooks/clipboard/use-clipboard-text-copy-feedback' import { useTranslate } from '@/i18n/use-translate' import type { DocPreviewDocumentIdentity } from './doc-preview-document-identity' diff --git a/src/renderer/src/components/cmd-j/PaletteFilterFieldOptions.tsx b/src/renderer/src/components/cmd-j/PaletteFilterFieldOptions.tsx index 5fa06bbd497..f3af842801a 100644 --- a/src/renderer/src/components/cmd-j/PaletteFilterFieldOptions.tsx +++ b/src/renderer/src/components/cmd-j/PaletteFilterFieldOptions.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useVirtualizer } from '@tanstack/react-virtual' import { Check, ChevronLeft, SearchIcon } from 'lucide-react' diff --git a/src/renderer/src/components/cmd-j/quick-actions.ts b/src/renderer/src/components/cmd-j/quick-actions.ts index 2925bb5c6cb..f101601efeb 100644 --- a/src/renderer/src/components/cmd-j/quick-actions.ts +++ b/src/renderer/src/components/cmd-j/quick-actions.ts @@ -1,4 +1,4 @@ -import { gitGraphSupport, openGitGraph } from '@/lib/git-graph-tab' +import { gitGraphSupport, openGitGraph } from '@/lib/source-control/graph/git-graph-tab' import { GitGraph, FileText, diff --git a/src/renderer/src/components/cmd-j/task-search-activation.ts b/src/renderer/src/components/cmd-j/task-search-activation.ts index 19ab530753b..2b7989e3d56 100644 --- a/src/renderer/src/components/cmd-j/task-search-activation.ts +++ b/src/renderer/src/components/cmd-j/task-search-activation.ts @@ -11,7 +11,7 @@ import { getLinkedWorkItemSuggestedName, type LinkedWorkItemSummary } from '@/lib/new-workspace' -import { buildLinearIssueLinkedWorkItem } from '@/lib/linear-linked-work-item' +import { buildLinearIssueLinkedWorkItem } from '@/lib/work-items/linear/linear-linked-work-item' import type { Worktree } from '../../../../shared/worktree/types' import { haveConflictingTaskSourceAccounts, diff --git a/src/renderer/src/components/cmd-j/task-search-requests.ts b/src/renderer/src/components/cmd-j/task-search-requests.ts index e0530de53bc..46145b59e35 100644 --- a/src/renderer/src/components/cmd-j/task-search-requests.ts +++ b/src/renderer/src/components/cmd-j/task-search-requests.ts @@ -8,7 +8,7 @@ import { jiraStatusForTarget } from '@/runtime/jira/runtime-jira-project-client' import { ipcOrRuntimeTargetForHostId } from '@/runtime/rpc/targets/runtime-client-target' import { gitLabApiFor } from '@/runtime/repository-gitlab/gitlab-owner-api' import { resolveJiraSourceHostId } from '../../../../shared/jira/jira-source-host' -import { getJiraAccountLabel } from '@/lib/jira-account-label' +import { getJiraAccountLabel } from '@/lib/work-items/jira/jira-account-label' import { getRepoExecutionHostId, parseExecutionHostId, @@ -28,7 +28,7 @@ import type { GlobalSettings } from '../../../../shared/global-settings-types' import type { PaletteFilterState } from './palette-filter' import { getTaskEligibleRepos } from '../task-page/task-page-default-repo-selection' import { getRepoBackedProviderAvailability } from '../task-source-provider-availability' -import { getTaskPageRepoSourceContext } from '../../lib/task-repo-source-context' +import { getTaskPageRepoSourceContext } from '../../lib/work-items/task-repo-source-context' import { searchJiraIssuesByKeyOrText } from '../jira-key-or-text-search' import { bindTaskPageJiraItemSourceContext } from '../task-page/jira/task-page-jira-item-source-context' import { makeCmdJTaskSearchResult, type CmdJTaskSearchResult } from './task-search-results' diff --git a/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.tsx b/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.tsx index 059e2c1a276..e4184bb60b3 100644 --- a/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.tsx +++ b/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.tsx @@ -28,7 +28,7 @@ import { type ContextualTourFloatingPosition } from './contextual-tour-floating-position' import { useTranslate } from '@/i18n/use-translate' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' import { hasVisibleOverlay } from '@/lib/visible-overlay' import { getMeasurableContextualTourTarget } from './contextual-tour-gate' diff --git a/src/renderer/src/components/contextual-tours/contextual-tour-step-copy.ts b/src/renderer/src/components/contextual-tours/contextual-tour-step-copy.ts index fdf872d9272..d7b780715b6 100644 --- a/src/renderer/src/components/contextual-tours/contextual-tour-step-copy.ts +++ b/src/renderer/src/components/contextual-tours/contextual-tour-step-copy.ts @@ -1,5 +1,5 @@ import { translate } from '@/i18n/i18n' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import type { ContextualTourStepId } from '../../../../shared/contextual-tours' export type LocalizedContextualTourStepCopy = { diff --git a/src/renderer/src/components/dashboard-popout/AgentTerminalPreview.clipboard-routes.test.tsx b/src/renderer/src/components/dashboard-popout/AgentTerminalPreview.clipboard-routes.test.tsx index 7b1d8bec869..e8c49b42fec 100644 --- a/src/renderer/src/components/dashboard-popout/AgentTerminalPreview.clipboard-routes.test.tsx +++ b/src/renderer/src/components/dashboard-popout/AgentTerminalPreview.clipboard-routes.test.tsx @@ -4,16 +4,10 @@ import '@testing-library/jest-dom/vitest' import type { ITerminalOptions } from '@xterm/xterm' import { act, cleanup, render, waitFor } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { - TERMINAL_PASTE_CHUNK_MAX_BYTES, - TERMINAL_PASTE_DIRECT_MAX_BYTES -} from '@/components/terminal-pane/input/paste/terminal-paste-limits' + import '@/components/terminal-pane/input/paste/terminal-bracketed-paste' -import { - BRACKETED_PASTE_END, - BRACKETED_PASTE_START -} from '../../../../shared/terminal/input/terminal-bracketed-paste-text' -import { dispatchAppMenuPasteEvent } from '@/lib/app-menu-paste' + +import { dispatchAppMenuPasteEvent } from '@/lib/clipboard/menu/app-menu-paste' const terminalHarness = vi.hoisted(() => ({ instances: [] as { @@ -117,7 +111,7 @@ vi.mock('@/components/terminal-pane/input/terminal-user-input-signal', () => ({ vi.mock('@/hooks/theme/use-system-prefers-dark', () => ({ useSystemPrefersDark: () => false })) -vi.mock('@/lib/shortcut-platform', () => ({ +vi.mock('@/lib/keyboard/shortcut-platform', () => ({ getShortcutPlatform: () => platformState.value })) vi.mock('@/components/terminal-pane/input/ime/terminal-ime-native-text-forwarder', () => ({ @@ -238,58 +232,4 @@ describe('AgentTerminalPreview clipboard routes', () => { expect(terminal.paste).not.toHaveBeenCalled() expect(input).not.toHaveBeenCalled() }) - - it('streams large pastes as bounded IPC payloads instead of one renderer-blocking write', async () => { - const encoder = new TextEncoder() - const multibytePrefix = '😀'.repeat(TERMINAL_PASTE_DIRECT_MAX_BYTES / 4 + 1) - const largePaste = `${multibytePrefix}\r\nnext\n` - const expectedPaste = `${multibytePrefix}\rnext\r` - readClipboardText.mockResolvedValueOnce(largePaste) - const view = render() - await waitFor(() => expect(terminalHarness.instances).toHaveLength(1)) - const terminal = terminalHarness.instances[0]! - focusInsidePreview(view.container) - - act(() => { - dispatchAppMenuPasteEvent() - }) - const expectedChunks = Math.ceil( - encoder.encode(expectedPaste).byteLength / TERMINAL_PASTE_CHUNK_MAX_BYTES - ) - await waitFor(() => expect(input).toHaveBeenCalledTimes(expectedChunks)) - - const payloads = input.mock.calls.map(([, data]) => data as string) - expect(terminal.paste).not.toHaveBeenCalled() - expect(payloads.join('')).toBe(expectedPaste) - expect( - payloads.every( - (payload) => encoder.encode(payload).byteLength <= TERMINAL_PASTE_CHUNK_MAX_BYTES - ) - ).toBe(true) - }) - - it('closes a bracketed large paste when focus changes between chunks', async () => { - readClipboardText.mockResolvedValueOnce('x'.repeat(TERMINAL_PASTE_DIRECT_MAX_BYTES + 1)) - const view = render() - await waitFor(() => expect(terminalHarness.instances).toHaveLength(1)) - const terminal = terminalHarness.instances[0]! - terminal.modes.bracketedPasteMode = true - focusInsidePreview(view.container) - const outsideInput = document.createElement('input') - view.container.appendChild(outsideInput) - input.mockImplementationOnce(async () => { - outsideInput.focus() - return true - }) - - act(() => { - dispatchAppMenuPasteEvent() - }) - await waitFor(() => expect(input).toHaveBeenCalledTimes(2)) - - expect(input.mock.calls.map(([, data]) => data)).toEqual([ - BRACKETED_PASTE_START, - BRACKETED_PASTE_END - ]) - }) }) diff --git a/src/renderer/src/components/dashboard-popout/AgentTerminalPreview.test.tsx b/src/renderer/src/components/dashboard-popout/AgentTerminalPreview.test.tsx index 108b72f1764..8a78d7a3b65 100644 --- a/src/renderer/src/components/dashboard-popout/AgentTerminalPreview.test.tsx +++ b/src/renderer/src/components/dashboard-popout/AgentTerminalPreview.test.tsx @@ -109,7 +109,7 @@ vi.mock('@/components/terminal-pane/input/terminal-user-input-signal', () => ({ vi.mock('@/hooks/theme/use-system-prefers-dark', () => ({ useSystemPrefersDark: () => false })) -vi.mock('@/lib/shortcut-platform', () => ({ +vi.mock('@/lib/keyboard/shortcut-platform', () => ({ getShortcutPlatform: () => platformState.value })) vi.mock('@/components/terminal-pane/input/ime/terminal-ime-native-text-forwarder', () => ({ @@ -384,28 +384,4 @@ describe('AgentTerminalPreview', () => { expect(terminalHarness.userInputDispose).toHaveBeenCalledTimes(1) expect(unsubscribe).toHaveBeenCalledWith('pty-1') }) - - it('delays repeated capture after an overflow and cancels the retry on unmount', async () => { - vi.useFakeTimers() - connect.mockResolvedValue({ - snapshot: { data: 'screen', cols: 80, rows: 24, seq: 1 }, - replay: [], - resyncRequired: true - }) - const view = render() - await vi.waitFor(() => expect(terminalHarness.instances).toHaveLength(1)) - const terminal = terminalHarness.instances[0]! - expect(connect).toHaveBeenCalledTimes(1) - - act(() => terminal.writeCallbacks.splice(0).forEach((callback) => callback())) - await vi.advanceTimersByTimeAsync(149) - expect(connect).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(1) - expect(connect).toHaveBeenCalledTimes(2) - - act(() => terminal.writeCallbacks.splice(0).forEach((callback) => callback())) - view.unmount() - await vi.advanceTimersByTimeAsync(150) - expect(connect).toHaveBeenCalledTimes(2) - }) }) diff --git a/src/renderer/src/components/dashboard-popout/DashboardPopoutRoot.tsx b/src/renderer/src/components/dashboard-popout/DashboardPopoutRoot.tsx index 4c10712d8fa..21826639e31 100644 --- a/src/renderer/src/components/dashboard-popout/DashboardPopoutRoot.tsx +++ b/src/renderer/src/components/dashboard-popout/DashboardPopoutRoot.tsx @@ -1,5 +1,5 @@ -import { useAppMenuPaste } from '@/hooks/useAppMenuPaste' -import { useAppMenuSelectionActions } from '@/hooks/useAppMenuSelectionActions' +import { useAppMenuPaste } from '@/hooks/clipboard/menu/useAppMenuPaste' +import { useAppMenuSelectionActions } from '@/hooks/app-commands/useAppMenuSelectionActions' import { AgentKanbanBoard } from './AgentKanbanBoard' import { useDashboardSnapshot } from './useDashboardSnapshot' import { useAgentDashboardTelemetry } from './use-agent-dashboard-telemetry' diff --git a/src/renderer/src/components/dashboard-popout/dashboard-preview-dom-test-fixture.ts b/src/renderer/src/components/dashboard-popout/dashboard-preview-dom-test-fixture.ts index 90dce83bcd2..563b9c0589a 100644 --- a/src/renderer/src/components/dashboard-popout/dashboard-preview-dom-test-fixture.ts +++ b/src/renderer/src/components/dashboard-popout/dashboard-preview-dom-test-fixture.ts @@ -54,86 +54,6 @@ export function installPreviewDomFixture(): () => void { return () => style.remove() } -export function observePreviewListeners(elements: HTMLElement[]) { - type Registration = { - target: EventTarget - type: string - listener: EventListenerOrEventListenerObject - capture: boolean - wrapped: EventListener - } - const active = new Set() - let callbacks = 0 - const spies = [document, window, ...elements].flatMap((target) => { - const nativeAdd: EventTarget['addEventListener'] = target.addEventListener - const nativeRemove: EventTarget['removeEventListener'] = target.removeEventListener - const add = vi.spyOn(target, 'addEventListener').mockImplementation(function ( - this: EventTarget, - type: string, - listener: EventListenerOrEventListenerObject | null, - options?: boolean | AddEventListenerOptions - ) { - if (!listener) { - return - } - const capture = typeof options === 'boolean' ? options : Boolean(options?.capture) - if ( - Array.from(active).some( - (r) => - r.target === this && r.type === type && r.listener === listener && r.capture === capture - ) - ) { - return - } - const wrapped: EventListener = function (this: EventTarget, event) { - if (this === document || this === window) { - callbacks++ - } - if (typeof listener === 'function') { - listener.call(this, event) - } else { - listener.handleEvent(event) - } - } - active.add({ target: this, type, listener, capture, wrapped }) - nativeAdd.call(this, type, wrapped, options) - }) - const remove = vi.spyOn(target, 'removeEventListener').mockImplementation(function ( - this: EventTarget, - type: string, - listener: EventListenerOrEventListenerObject | null, - options?: boolean | EventListenerOptions - ) { - const capture = typeof options === 'boolean' ? options : Boolean(options?.capture) - const registration = Array.from(active).find( - (r) => - r.target === this && r.type === type && r.listener === listener && r.capture === capture - ) - if (registration) { - nativeRemove.call(this, type, registration.wrapped, options) - active.delete(registration) - } else { - nativeRemove.call(this, type, listener, options) - } - }) - return [add, remove] - }) - return { - active, - get callbacks() { - return callbacks - }, - resetCallbacks: () => { - callbacks = 0 - }, - restore: () => { - for (const spy of spies) { - spy.mockRestore() - } - } - } -} - export function mountPreviewLinkInteraction( source: DashboardPreviewLinkSource, readSettings: () => GlobalSettings | null, diff --git a/src/renderer/src/components/dashboard-popout/dashboard-preview-link-composition.test.tsx b/src/renderer/src/components/dashboard-popout/dashboard-preview-link-composition.test.tsx index 4994fbe105d..bf688a8de9d 100644 --- a/src/renderer/src/components/dashboard-popout/dashboard-preview-link-composition.test.tsx +++ b/src/renderer/src/components/dashboard-popout/dashboard-preview-link-composition.test.tsx @@ -8,17 +8,14 @@ import { } from '@testing-library/react' import { afterEach, beforeEach, expect, it, vi } from 'vitest' import type { RemoteRuntimeMultiplexedTerminalCallbacks } from '@/runtime/hosted-terminals/streams/remote-terminal-stream-contracts' -import { TooltipProvider } from '@/components/ui/tooltip' + import { parseRemoteRuntimePtyId } from '../../../../shared/remote-runtime/remote-runtime-pty-id' import { resetRemoteRuntimeTerminalPreviewSessionsForTests } from './remote-runtime-terminal-preview-api' import { installPreviewDomFixture, mountPreviewLinkInteraction } from './dashboard-preview-dom-test-fixture' -import { verifyPreviewLinkPopulation } from './dashboard-preview-link-population-test-fixture' -import { toast } from 'sonner' -import { runtimeStatuses } from '@/store/slices/browser/browser-slice-test-harness' import type { openStandaloneTerminal } from '../standalone-terminal/open-standalone-terminal' import { getDefaultSettings } from '../../../../shared/constants' @@ -33,14 +30,12 @@ import { registerWorkspaceHttpLinkBrowserOpener } from '@/lib/browser/navigation/http-link-routing' import { openWorkspaceBrowserTabForLink } from '@/lib/browser/workspace/workspace-browser-tab-open' -import { AgentTerminalPreview } from './AgentTerminalPreview' + import { terminalPreviewApiFor } from './terminal-preview-api' import { AgentKanbanBoard } from './AgentKanbanBoard' import type { DashboardCard } from '../../../../shared/dashboard-snapshot' import type { GlobalSettings } from '../../../../shared/global-settings-types' -import type { ExecutionHostId } from '../../../../shared/execution-host' -import type { DashboardPreviewLinkSource } from './dashboard-preview-http-actions' const mocks = vi.hoisted(() => ({ getState: vi.fn(), @@ -76,9 +71,7 @@ vi.mock( }) }) ) -function render(ui: React.ReactElement) { - return renderWithoutApp(ui, { wrapper: TooltipProvider }) -} + vi.mock('@/store', () => ({ useAppStore: Object.assign( (selector: (state: ReturnType) => unknown) => selector(mocks.getState()), @@ -88,7 +81,7 @@ vi.mock('@/store', () => ({ vi.mock('@/hooks/theme/use-system-prefers-dark', () => ({ useSystemPrefersDark: () => false })) -vi.mock('@/lib/shortcut-platform', () => ({ getShortcutPlatform: () => 'linux' })) +vi.mock('@/lib/keyboard/shortcut-platform', () => ({ getShortcutPlatform: () => 'linux' })) vi.mock('sonner', () => ({ toast: { error: vi.fn(), success: vi.fn(), info: vi.fn(), warning: vi.fn() } })) @@ -215,104 +208,6 @@ async function output(data: string, ptyId = 'pty-1') { } const osc = `\x1b]8;;${URL_TO_OPEN}\x07hidden label\x1b]8;;\x07` -it.each(['actions', 'open'] as const)( - 'retains the provider-owned hidden OSC target across unrelated live row output for %s and context', - async (behavior) => { - store.setState((state) => ({ - settings: { ...state.settings!, terminalLinkClickBehavior: behavior } - })) - const view = render() - await waitFor(() => screenFor(view.container)) - await output(`\x1b[?1000h\x1b[?1006h${osc}\x1b[3;1Hprogress 1`) - const screen = screenFor(view.container) - const terminal = view.container.querySelector('.xterm')! - pointer(screen, 'mousemove', { buttons: 0 }) - await waitFor(() => expect(terminal.getAttribute('title')).toBe(URL_TO_OPEN)) - await output('\x1b[3;1Hprogress 2') - await waitFor(() => expect(view.container.textContent).toContain('progress 2')) - expect(terminal.getAttribute('title')).toBe(URL_TO_OPEN) - // Keep the pointer stationary: the retained provider does not emit another hover. - pointer(screen, 'mousedown') - pointer(screen, 'mouseup') - if (behavior === 'actions') { - const system = await view.findByRole('button', { name: /System Browser/ }) - expect(document.querySelector('[data-terminal-link-destination]')?.textContent).toBe( - URL_TO_OPEN - ) - fireEvent.click(system) - } - await waitFor(() => expect(openUrl).toHaveBeenCalledExactlyOnceWith(URL_TO_OPEN)) - expect(input.mock.calls.map(([, data]) => data)).toEqual([]) - await output('\x1b[3;1Hprogress 3') - const context = pointer(screen, 'contextmenu', { button: 2, buttons: 0 }) - expect(context.defaultPrevented).toBe(true) - const copy = await view.findByRole('button', { name: 'Copy link' }) - expect(document.querySelector('[data-terminal-link-destination]')?.textContent).toBe( - URL_TO_OPEN - ) - fireEvent.click(copy) - await waitFor(() => expect(window.api.ui.writeClipboardText).toHaveBeenCalledWith(URL_TO_OPEN)) - pointer(screen, 'mouseleave', { buttons: 0 }) - expect(terminal.hasAttribute('title')).toBe(false) - } -) - -function seedRemoteWorkspace( - hostId: ExecutionHostId, - environmentId: string, - streaming: boolean -): void { - store.setState((state) => ({ - activeWorkspaceExecutionHostId: hostId, - worktreesByRepo: { - repo1: state.worktreesByRepo.repo1!.map((row) => ({ - ...row, - hostId, - runtimeOwnerEnvironmentId: environmentId - })) - }, - unifiedTabsByWorktree: { - [WORKSPACE]: state.unifiedTabsByWorktree[WORKSPACE]!.map((tab) => ({ - ...tab, - executionHostId: hostId - })) - }, - runtimeStatusByEnvironmentId: new Map([ - [environmentId, runtimeStatuses(streaming ? ['browser.screencast.v1'] : []).get('env-1')!] - ]), - settings: { ...state.settings!, browserClientHostedRemoteEnabled: false, openLinksInApp: true } - })) -} - -it('gives one useful refusal when a real saved chooser action loses runtime browser eligibility', async () => { - const hostId = 'runtime:e' - const ptyId = 'remote:e@@handle-1' - const linkSource = { - ...source, - executionHostId: hostId, - ptyId - } satisfies DashboardPreviewLinkSource - const foreground = vi.fn() - seedRemoteWorkspace(hostId, 'e', true) - const props = { ptyId, linkSource, onBrowserForeground: foreground } - const view = render() - await waitFor(() => screenFor(view.container)) - await output(osc, ptyId) - const screen = screenFor(view.container) - pointer(screen, 'mousedown') - pointer(screen, 'mouseup') - const savedAction = await view.findByRole('button', { name: /Orca Browser/ }) - // Actual failed-status refresh shape, after the real request has captured its action. - store.setState({ runtimeStatusByEnvironmentId: new Map([['e', { status: null, checkedAt: 2 }]]) }) - fireEvent.click(savedAction) - await waitFor(() => expect(toast.error).toHaveBeenCalledExactlyOnceWith('Unable to open URL.')) - expect(document.querySelector('[data-link-action-popover]')).toBeNull() - expect(store.getState().browserPagesByWorkspace).toEqual({}) - expect(openUrl).not.toHaveBeenCalled() - expect(foreground).not.toHaveBeenCalled() - expect(input.mock.calls.map(([, data]) => data)).toEqual([]) -}) - function mountedInteraction() { return mountPreviewLinkInteraction( source, @@ -321,22 +216,6 @@ function mountedInteraction() { ) } -it.each([10, 100])( - 'bounds actual registration, document callbacks and target input/output at P=%s; reset/dispose leave zero adapter residue', - async (population) => { - await verifyPreviewLinkPopulation( - population, - source, - () => store.getState().settings, - (instance) => instances.push(instance), - osc, - URL_TO_OPEN, - pointer, - screenFor - ) - } -) - it('retains actual boolean/Promise forwarding results and flushes unclaimed reports in order, with finite overflow and cleanup', async () => { const preview = mountedInteraction() const interaction = preview.install() diff --git a/src/renderer/src/components/dashboard-popout/dashboard-preview-link-population-test-fixture.ts b/src/renderer/src/components/dashboard-popout/dashboard-preview-link-population-test-fixture.ts deleted file mode 100644 index fd534a58981..00000000000 --- a/src/renderer/src/components/dashboard-popout/dashboard-preview-link-population-test-fixture.ts +++ /dev/null @@ -1,267 +0,0 @@ -import { expect, vi } from 'vitest' -import { waitFor } from '@testing-library/react' -import { Terminal } from '@xterm/xterm' -import type { GlobalSettings } from '../../../../shared/global-settings-types' -import type { openStandaloneTerminal } from '../standalone-terminal/open-standalone-terminal' -import type { DashboardPreviewLinkSource } from './dashboard-preview-http-actions' -import { - mountPreviewLinkInteraction, - observePreviewListeners -} from './dashboard-preview-dom-test-fixture' - -function observePreviewTimers() { - type NativeId = ReturnType - type Callback = Parameters[0] - type Record = { - callback: Callback - callbackId: number - name: string - delay: number | undefined - stack: string | undefined - id?: NativeId - executed: number - canceled: number - } - const records: Record[] = [] - const callbackIds = new Map() - const clears: Parameters[0][] = [] - let peakFallbacks = 0 - const ownerOf = (record: Record) => { - if ( - record.name === 'finishDeferredInput' && - record.stack?.includes('terminal-link-pty-mouse-suppression.ts') - ) { - return 'adapter-fallback' - } - if ( - record.delay === 300000 && - record.stack?.includes('/@xterm/xterm/') && - record.stack.includes('_resetIdleTimer') - ) { - return 'xterm-cursor-idle' - } - return 'unattributed' - } - const microtasks: { name: string; executed: boolean }[] = [] - const nativeSet = window.setTimeout - const nativeClear = window.clearTimeout - const nativeQueue = globalThis.queueMicrotask - const set = vi.spyOn(window, 'setTimeout').mockImplementation(function ( - this: Window, - callback, - delay, - ...args - ) { - let callbackId = callbackIds.get(callback) - if (callbackId === undefined) { - callbackId = callbackIds.size + 1 - callbackIds.set(callback, callbackId) - } - const record: Record = { - callback, - callbackId, - name: typeof callback === 'function' ? callback.name : 'string', - delay, - stack: new Error('Preview timer owner registration').stack, - executed: 0, - canceled: 0 - } - records.push(record) - const wrapped = - typeof callback === 'function' - ? function (this: unknown, ...values: Parameters) { - try { - return callback.apply(this, values) - } finally { - record.executed++ - } - } - : callback - record.id = nativeSet.call(this, wrapped, delay, ...args) - peakFallbacks = Math.max( - peakFallbacks, - records.filter( - (r) => ownerOf(r) === 'adapter-fallback' && r.canceled === 0 && r.executed === 0 - ).length - ) - return record.id - }) - const clear = vi.spyOn(window, 'clearTimeout').mockImplementation(function (this: Window, id) { - clears.push(id) - for (const record of records) { - if (record.id === id) { - record.canceled++ - } - } - return nativeClear.call(this, id) - }) - const queue = vi.spyOn(globalThis, 'queueMicrotask').mockImplementation(function ( - this: typeof globalThis, - callback - ) { - const record = { name: callback.name, executed: false } - microtasks.push(record) - return nativeQueue.call(this, function (this: unknown) { - try { - return callback.call(this) - } finally { - record.executed = true - } - }) - }) - const summary = () => ({ - timers: records.map((record, index) => ({ - id: index + 1, - callbackId: record.callbackId, - name: record.name, - delay: record.delay, - stack: record.stack, - owner: ownerOf(record), - canceled: record.canceled, - executed: record.executed, - matchingClearCalls: clears.filter((id) => id === record.id).length - })), - microtasks - }) - return { - records, - microtasks, - ownerOf, - get peakFallbacks() { - return peakFallbacks - }, - summary, - restore: () => { - set.mockRestore() - clear.mockRestore() - queue.mockRestore() - } - } -} - -export async function verifyPreviewLinkPopulation( - population: number, - source: DashboardPreviewLinkSource, - readSettings: () => GlobalSettings | null, - trackInstance: (instance: ReturnType) => void, - osc: string, - uri: string, - pointer: (screen: HTMLElement, type: string, options?: MouseEventInit) => MouseEvent, - screenFor: (container: HTMLElement) => HTMLElement -) { - const baseline = Array.from({ length: population }, () => - mountPreviewLinkInteraction(source, readSettings, trackInstance, false) - ) - const defaultFirst = baseline[0]! - await new Promise((resolve) => - defaultFirst.instance.write(osc, { live: true, onDone: resolve }) - ) - const defaultScreen = screenFor(defaultFirst.container) - pointer(defaultScreen, 'mousemove', { buttons: 0 }) - await waitFor(() => - expect(defaultFirst.instance.terminal.element?.getAttribute('title')).toBe(uri) - ) - const defaults = observePreviewTimers() - pointer(defaultScreen, 'mousedown') - pointer(defaultScreen, 'mouseup') - for (const preview of baseline) { - preview.instance.dispose() - } - await Promise.resolve() - const defaultSummary = defaults.summary() - expect(defaults.records.every((record) => defaults.ownerOf(record) === 'xterm-cursor-idle')).toBe( - true - ) - expect(defaults.records.every((record) => record.canceled > 0 || record.executed > 0)).toBe(true) - defaults.restore() - const provider = vi.spyOn(Terminal.prototype, 'registerLinkProvider') - const previews = Array.from({ length: population }, () => - mountPreviewLinkInteraction(source, readSettings, trackInstance) - ) - expect(provider).toHaveBeenCalledTimes(population) - const observation = observePreviewListeners(previews.map((p) => p.instance.terminal.element!)) - const { active } = observation - const interactions = previews.map((preview) => preview.install()) - expect(provider).toHaveBeenCalledTimes(population) - expect(active.size).toBe(9 * population) - document.dispatchEvent(new MouseEvent('mousemove', { bubbles: true })) - expect(observation.callbacks).toBe(population) - observation.resetCallbacks() - const first = previews[0]! - await new Promise((resolve) => first.instance.write(osc, { live: true, onDone: resolve })) - const gettersBefore = previews.map((p) => [ - p.getSource.mock.calls.length, - p.getSettings.mock.calls.length - ]) - for (let i = 0; i < 10; i++) { - first.instance.terminal.input('typed') - } - expect(first.sink).toHaveBeenCalledTimes(10) - expect(previews.slice(1).every((p) => p.sink.mock.calls.length === 0)).toBe(true) - await new Promise((resolve) => - first.instance.write(' output', { live: true, onDone: resolve }) - ) - expect( - previews.map((p) => [p.getSource.mock.calls.length, p.getSettings.mock.calls.length]) - ).toEqual(gettersBefore) - expect(first.instance.terminal.buffer.active.getLine(0)?.translateToString(true)).toContain( - 'output' - ) - const screen = screenFor(first.container) - const timers = observePreviewTimers() - try { - pointer(screen, 'mousedown') - expect(active.size).toBeLessThanOrEqual(9 * population + 16) - pointer(screen, 'mouseup') - expect(first.request).toHaveBeenCalledOnce() - const adapterTimers = timers.records.filter( - (record) => timers.ownerOf(record) === 'adapter-fallback' - ) - const nativeTimers = timers.records.filter( - (record) => timers.ownerOf(record) === 'xterm-cursor-idle' - ) - expect(timers.records.some((record) => timers.ownerOf(record) === 'unattributed')).toBe(false) - expect(adapterTimers.length).toBeGreaterThan(0) - expect(adapterTimers.length).toBeLessThanOrEqual(3) - expect(timers.peakFallbacks).toBeLessThanOrEqual(1) - expect(nativeTimers).toHaveLength(defaultSummary.timers.length) - for (const interaction of interactions) { - interaction.dispose() - } - expect(adapterTimers.every((record) => record.canceled > 0)).toBe(true) - expect(active.size).toBe(0) - const reset = previews.map((p) => p.install()) - expect(provider).toHaveBeenCalledTimes(population) - expect(active.size).toBe(9 * population) - for (const interaction of reset) { - interaction.dispose() - } - expect(active.size).toBe(0) - for (const preview of previews) { - preview.instance.dispose() - } - await Promise.resolve() - expect(nativeTimers.every((record) => record.canceled > 0 || record.executed > 0)).toBe(true) - const gestureClears = timers.microtasks.filter((task) => task.name === 'clear') - expect(gestureClears).toHaveLength(population) - expect(gestureClears.every((task) => task.executed)).toBe(true) - console.info( - 'TIMER-OWNER-IDENTITIES', - JSON.stringify({ - population, - default: defaultSummary, - adapter: timers.summary(), - peakFallbacks: timers.peakFallbacks - }) - ) - } finally { - for (const interaction of interactions) { - interaction.dispose() - } - for (const preview of previews) { - preview.instance.dispose() - } - timers.restore() - observation.restore() - } -} diff --git a/src/renderer/src/components/dashboard-popout/preview-terminal-app-menu-clipboard.ts b/src/renderer/src/components/dashboard-popout/preview-terminal-app-menu-clipboard.ts index a3891cb0fbd..9b154afdbfb 100644 --- a/src/renderer/src/components/dashboard-popout/preview-terminal-app-menu-clipboard.ts +++ b/src/renderer/src/components/dashboard-popout/preview-terminal-app-menu-clipboard.ts @@ -1,10 +1,10 @@ import type { Terminal } from '@xterm/xterm' -import { isEditableTarget } from '@/lib/editable-target' -import { APP_MENU_PASTE_EVENT } from '@/lib/app-menu-paste' +import { isEditableTarget } from '@/lib/text-input/focus/editable-target' +import { APP_MENU_PASTE_EVENT } from '@/lib/clipboard/menu/app-menu-paste' import { APP_MENU_SELECTION_ACTION_EVENT, type AppMenuSelectionAction -} from '@/lib/app-menu-selection-actions' +} from '@/lib/app-commands/app-menu-selection-actions' import { copyTerminalSelection } from '@/components/terminal-pane/clipboard/terminal-selection-copy' import type { PreviewTerminalPasteSource } from './preview-terminal-paste' diff --git a/src/renderer/src/components/dashboard-popout/preview-terminal-ime-bridge-kitty-bytes.test.ts b/src/renderer/src/components/dashboard-popout/preview-terminal-ime-bridge-kitty-bytes.test.ts index 77b897f3742..99642873d34 100644 --- a/src/renderer/src/components/dashboard-popout/preview-terminal-ime-bridge-kitty-bytes.test.ts +++ b/src/renderer/src/components/dashboard-popout/preview-terminal-ime-bridge-kitty-bytes.test.ts @@ -3,7 +3,7 @@ import { Terminal } from '@xterm/xterm' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { installPreviewImeBridge } from './preview-terminal-ime-bridge' -vi.mock('@/lib/shortcut-platform', () => ({ +vi.mock('@/lib/keyboard/shortcut-platform', () => ({ getShortcutPlatform: () => 'darwin' })) @@ -11,13 +11,10 @@ const COMMA = { key: ',', code: 'Comma', keyCode: 188 } type Session = { emitted: string[] - flagReads: number setFlags: (flags: number) => void keydown: (init?: { shiftKey?: boolean; repeat?: boolean; key?: string; code?: string }) => void keyup: (init?: { shiftKey?: boolean; key?: string; code?: string }) => void commit: (text: string) => void - /** An input event the text system produced without committing text. */ - swallow: () => void dispose: () => void } @@ -28,12 +25,8 @@ function open(initialFlags: number): Session { terminal.open(container) const textarea = terminal.textarea! let flags = initialFlags - let flagReads = 0 const bridge = installPreviewImeBridge(terminal, { - getKittyKeyboardFlags: () => { - flagReads += 1 - return flags - } + getKittyKeyboardFlags: () => flags })! terminal.attachCustomKeyEventHandler((event) => !bridge.claimKeyEvent(event)) const emitted: string[] = [] @@ -66,16 +59,12 @@ function open(initialFlags: number): Session { return { emitted, - get flagReads() { - return flagReads - }, setFlags: (next) => { flags = next }, keydown: (init = {}) => key('keydown', init), keyup: (init = {}) => key('keyup', init), commit: (text) => input(text), - swallow: () => input(null), dispose: () => { bridge.dispose() terminal.dispose() @@ -94,70 +83,6 @@ describe('preview IME bridge outbound bytes', () => { document.body.replaceChildren() }) - describe.each([ - ['keydown -> insertText -> keyup', false], - // Some macOS input sources commit after keyup; preserve press ownership until then. - ['keydown -> keyup -> insertText', true] - ])('in %s order', (_name, keyupFirst) => { - const type = (session: Session): void => { - session.keydown() - if (keyupFirst) { - session.keyup() - session.commit(',') - } else { - session.commit(',') - session.keyup() - } - } - - it.each([ - ['no flags', 0, ','], - ['disambiguate only', 1, ','], - ['event types', 2, ',\x1b[44;1:3u'], - ['all keys as escape codes', 8, '\x1b[44u'], - ['all keys + event types', 10, '\x1b[44u\x1b[44;1:3u'] - ])('emits the %s byte shape', (_flagName, flags, expected) => { - const session = open(flags) - type(session) - expect(session.emitted.join('')).toBe(expected) - session.dispose() - }) - - it('reads the mutable getter exactly once, at commit time', () => { - const session = open(0) - session.keydown() - expect(session.flagReads).toBe(0) - session.setFlags(8) - if (keyupFirst) { - session.keyup() - expect(session.flagReads).toBe(0) - session.commit(',') - } else { - session.commit(',') - session.keyup() - } - expect(session.flagReads).toBe(1) - // The commit-time read is what both the press AND its release encode from. - expect(session.emitted.join('')).toBe('\x1b[44u') - session.dispose() - }) - - it('emits nothing when the input source swallowed the press', () => { - const session = open(10) - session.keydown() - if (keyupFirst) { - session.keyup() - session.swallow() - } else { - session.swallow() - session.keyup() - } - // A release describes a press the app received; none did. - expect(session.emitted.join('')).toBe('') - session.dispose() - }) - }) - it('encodes the release from the keyup state when Shift is released first', () => { const session = open(10) // `!` on Digit1: the press reports the base key with the Shift modifier. diff --git a/src/renderer/src/components/dashboard-popout/preview-terminal-ime-bridge.ts b/src/renderer/src/components/dashboard-popout/preview-terminal-ime-bridge.ts index b1d6b05fcfe..9dfee2124b5 100644 --- a/src/renderer/src/components/dashboard-popout/preview-terminal-ime-bridge.ts +++ b/src/renderer/src/components/dashboard-popout/preview-terminal-ime-bridge.ts @@ -1,5 +1,5 @@ import type { Terminal } from '@xterm/xterm' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { installTerminalImeCompositionTracker } from '@/components/terminal-pane/input/ime/terminal-ime-composition-tracker' import { installTerminalImeNativeTextForwarder } from '@/components/terminal-pane/input/ime/terminal-ime-native-text-forwarder' diff --git a/src/renderer/src/components/dashboard-popout/preview-terminal-key-handler.ts b/src/renderer/src/components/dashboard-popout/preview-terminal-key-handler.ts index a7846026550..11ce1df7f38 100644 --- a/src/renderer/src/components/dashboard-popout/preview-terminal-key-handler.ts +++ b/src/renderer/src/components/dashboard-popout/preview-terminal-key-handler.ts @@ -1,5 +1,5 @@ import type { Terminal } from '@xterm/xterm' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { keybindingMatchesAction } from '../../../../shared/keybindings' import { useAppStore } from '@/store' import { diff --git a/src/renderer/src/components/dashboard-popout/preview-terminal-paste.ts b/src/renderer/src/components/dashboard-popout/preview-terminal-paste.ts index 10187880d5e..aa757c946b3 100644 --- a/src/renderer/src/components/dashboard-popout/preview-terminal-paste.ts +++ b/src/renderer/src/components/dashboard-popout/preview-terminal-paste.ts @@ -1,5 +1,5 @@ import type { Terminal } from '@xterm/xterm' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { executeTerminalPastePlan } from '@/components/terminal-pane/input/paste/terminal-paste-executor' import { planTerminalPasteWithYield } from '@/components/terminal-pane/input/paste/terminal-paste-coordinator' import { resolveTerminalPasteRuntime } from '@/components/terminal-pane/input/paste/terminal-paste-runtime' diff --git a/src/renderer/src/components/dashboard/AgentDashboardExperimentalSetting.tsx b/src/renderer/src/components/dashboard/AgentDashboardExperimentalSetting.tsx index a2e48e51396..4f5f74314ae 100644 --- a/src/renderer/src/components/dashboard/AgentDashboardExperimentalSetting.tsx +++ b/src/renderer/src/components/dashboard/AgentDashboardExperimentalSetting.tsx @@ -27,7 +27,7 @@ export function AgentDashboardExperimentalSetting({ 'auto.components.settings.ExperimentalPane.agentDashboard.description', 'Kanban board for monitoring agents across worktrees, in-window or as a pop-out.' )} - keywords={getExperimentalSearchEntry(t).agentDashboard.keywords} + keywords={getExperimentalSearchEntry().agentDashboard.keywords} className="space-y-3 py-3" id="experimental-agent-dashboard" > diff --git a/src/renderer/src/components/dashboard/dashboard-card-context.ts b/src/renderer/src/components/dashboard/dashboard-card-context.ts index 61a7d836f30..7895505d95c 100644 --- a/src/renderer/src/components/dashboard/dashboard-card-context.ts +++ b/src/renderer/src/components/dashboard/dashboard-card-context.ts @@ -1,4 +1,4 @@ -import { branchName } from '@/lib/git-utils' +import { branchName } from '@/lib/source-control/branches/branch-name' import { getHostedReviewCacheKey } from '@/store/slices/hosted-review/hosted-review-cache-identity' import type { AppState } from '@/store/types' import type { DashboardCardReview } from '../../../../shared/dashboard-snapshot' diff --git a/src/renderer/src/components/dictation/dictation-insertion-target.test.ts b/src/renderer/src/components/dictation/dictation-insertion-target.test.ts index 1ec6d27e188..703cfe5e473 100644 --- a/src/renderer/src/components/dictation/dictation-insertion-target.test.ts +++ b/src/renderer/src/components/dictation/dictation-insertion-target.test.ts @@ -5,7 +5,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { TEXT_CONTROL_PASTE_DIRECT_MAX_BYTES, TEXT_CONTROL_PASTE_MAX_BYTES -} from '@/lib/text-control-paste' +} from '@/lib/text-input/paste/text-control-paste-model' import { captureInsertionTarget, insertText } from './dictation-insertion-target' type DocumentWithExecCommand = Document & { diff --git a/src/renderer/src/components/dictation/dictation-insertion-target.ts b/src/renderer/src/components/dictation/dictation-insertion-target.ts index 4756c950859..35e2f39ce8b 100644 --- a/src/renderer/src/components/dictation/dictation-insertion-target.ts +++ b/src/renderer/src/components/dictation/dictation-insertion-target.ts @@ -3,11 +3,13 @@ import { getUtf8ChunkEndIndex } from '../../../../shared/utf8-byte-limits' import { TEXT_CONTROL_PASTE_CHUNK_MAX_BYTES, TEXT_CONTROL_PASTE_DIRECT_MAX_BYTES, - TEXT_CONTROL_PASTE_MAX_BYTES, + TEXT_CONTROL_PASTE_MAX_BYTES +} from '@/lib/text-input/paste/text-control-paste-model' +import { measureTextControlPasteByteLength, measureTextControlPasteByteLengthWithYield, pasteTextIntoTextControl -} from '@/lib/text-control-paste' +} from '@/lib/text-input/paste/text-control-paste' import { DICTATION_TEXT_BLOCK_SELECTOR, dictationSeparators diff --git a/src/renderer/src/components/dictation/dictation-transcript-delivery.ts b/src/renderer/src/components/dictation/dictation-transcript-delivery.ts index 0b890d3bf31..3cfeadbae95 100644 --- a/src/renderer/src/components/dictation/dictation-transcript-delivery.ts +++ b/src/renderer/src/components/dictation/dictation-transcript-delivery.ts @@ -1,6 +1,6 @@ import { toast } from 'sonner' import { translate } from '@/i18n/i18n' -import { describeClipboardWriteFailure } from '@/lib/clipboard-write-failure' +import { describeClipboardWriteFailure } from '@/lib/clipboard/clipboard-write-failure' import { appendDictationText } from '../../../../shared/dictation-transcript-spacing' import { insertText, type DictationInsertionTarget } from './dictation-insertion-target' diff --git a/src/renderer/src/components/dictation/use-dictation-controls.ts b/src/renderer/src/components/dictation/use-dictation-controls.ts index 654c00bd82e..799f9aced5c 100644 --- a/src/renderer/src/components/dictation/use-dictation-controls.ts +++ b/src/renderer/src/components/dictation/use-dictation-controls.ts @@ -1,6 +1,6 @@ import { useEffect, useEffectEvent } from 'react' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' -import { isImeOwnedKeyboardEvent } from '@/lib/ime-composition-keyboard-event' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' +import { isImeOwnedKeyboardEvent } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { isPlainEscapeKeyEvent } from '../terminal-pane/input/keyboard/agent-interrupt-key-event' import { DICTATION_CONTROL_EVENT, type DictationControlAction } from './dictation-control-events' import type { DictationState } from '../../../../shared/speech-types' diff --git a/src/renderer/src/components/dictation/use-hold-dictation-gesture.ts b/src/renderer/src/components/dictation/use-hold-dictation-gesture.ts index 42d29175ea1..5186b7ba380 100644 --- a/src/renderer/src/components/dictation/use-hold-dictation-gesture.ts +++ b/src/renderer/src/components/dictation/use-hold-dictation-gesture.ts @@ -1,5 +1,5 @@ import { useEffect, useEffectEvent, useRef } from 'react' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { keybindingMatchesAction, normalizeTerminalShortcutPolicy, @@ -8,7 +8,7 @@ import { import { textInputOwnsComposition } from '../../../../shared/text-input-shortcut-policy' import type { GlobalSettings } from '../../../../shared/global-settings-types' import { dictationShortcutMode } from '../../../../shared/dictation-shortcut-mode' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' import { showTerminalShortcutCaptureNotification } from '@/lib/terminal-shortcut-capture-notification' import { getKeybindingContext } from '../terminal-workspace-model' diff --git a/src/renderer/src/components/diff-comments/DiffCommentCard.tsx b/src/renderer/src/components/diff-comments/DiffCommentCard.tsx index 6e13895d1a3..e475fe2568a 100644 --- a/src/renderer/src/components/diff-comments/DiffCommentCard.tsx +++ b/src/renderer/src/components/diff-comments/DiffCommentCard.tsx @@ -1,4 +1,4 @@ -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import { CornerDownLeft, Pencil, Trash } from 'lucide-react' import { useLayoutEffect, useRef, useState, type ReactNode } from 'react' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/diff-comments/DiffCommentDraftCard.tsx b/src/renderer/src/components/diff-comments/DiffCommentDraftCard.tsx index 2f91ffcf48d..6db2470e6b6 100644 --- a/src/renderer/src/components/diff-comments/DiffCommentDraftCard.tsx +++ b/src/renderer/src/components/diff-comments/DiffCommentDraftCard.tsx @@ -1,7 +1,7 @@ import { useGitHubTextareaImages } from '@/components/github/use-github-textarea-images' import { useGitHubImagePending } from '@/components/github/use-github-image-uploads' import type { GitHubImageIntake } from '@/components/github/use-github-image-uploads' -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from 'react' import { CornerDownLeft } from 'lucide-react' import { Button } from '@/components/ui/button' @@ -10,7 +10,7 @@ import { useTranslate } from '@/i18n/use-translate' import { getCommentBodySubmitState, hasBoundedCommentBodyText -} from '@/lib/comment-body-submit-state' +} from '@/lib/source-control/review/comments/comment-body-submit-state' import { toast } from 'sonner' import { installOpenDraftAddReviewNoteGuard } from '../editor/editor-shortcuts' diff --git a/src/renderer/src/components/diff-comments/DiffCommentPopover.tsx b/src/renderer/src/components/diff-comments/DiffCommentPopover.tsx index bbf20089622..179641303d5 100644 --- a/src/renderer/src/components/diff-comments/DiffCommentPopover.tsx +++ b/src/renderer/src/components/diff-comments/DiffCommentPopover.tsx @@ -1,4 +1,4 @@ -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from 'react' import { CornerDownLeft } from 'lucide-react' import { toast } from 'sonner' @@ -7,7 +7,7 @@ import { useMountedRef } from '@/hooks/useMountedRef' import { getCommentBodySubmitState, hasBoundedCommentBodyText -} from '@/lib/comment-body-submit-state' +} from '@/lib/source-control/review/comments/comment-body-submit-state' import { useTranslate } from '@/i18n/use-translate' import { installOpenDraftAddReviewNoteGuard } from '../editor/editor-shortcuts' import { resolveDiffCommentPopoverTop } from './diff-comment-popover-position' diff --git a/src/renderer/src/components/diff-comments/diff-comment-popover-outside-click.test.tsx b/src/renderer/src/components/diff-comments/diff-comment-popover-outside-click.test.tsx index 9de8cabc908..1e07143007d 100644 --- a/src/renderer/src/components/diff-comments/diff-comment-popover-outside-click.test.tsx +++ b/src/renderer/src/components/diff-comments/diff-comment-popover-outside-click.test.tsx @@ -3,7 +3,7 @@ import { act } from 'react' import { createRoot, type Root } from 'react-dom/client' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { COMMENT_BODY_NONBLANK_SCAN_MAX_BYTES } from '@/lib/comment-body-submit-state' +import { COMMENT_BODY_NONBLANK_SCAN_MAX_BYTES } from '@/lib/source-control/review/comments/comment-body-submit-state' import { DiffCommentPopover } from './DiffCommentPopover' const roots: Root[] = [] diff --git a/src/renderer/src/components/diff-comments/useDiffCommentDecorator.tsx b/src/renderer/src/components/diff-comments/useDiffCommentDecorator.tsx index 0a85789676d..e61ebac7a0c 100644 --- a/src/renderer/src/components/diff-comments/useDiffCommentDecorator.tsx +++ b/src/renderer/src/components/diff-comments/useDiffCommentDecorator.tsx @@ -6,7 +6,7 @@ import { import { useCallback, useEffect, useMemo, useRef } from 'react' import type { editor as monacoEditor } from 'monaco-editor' import { createRoot, type Root } from 'react-dom/client' -import { getCommentBodyLayoutLineCount } from '@/lib/comment-body-line-count' +import { getCommentBodyLayoutLineCount } from '@/lib/source-control/review/comments/comment-body-line-count' import { translate } from '@/i18n/i18n' import { useAppStore } from '@/store' import { diff --git a/src/renderer/src/components/editor/EditorPanel.tsx b/src/renderer/src/components/editor/EditorPanel.tsx index 252570c45c0..a1c18c97924 100644 --- a/src/renderer/src/components/editor/EditorPanel.tsx +++ b/src/renderer/src/components/editor/EditorPanel.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useMemo, useRef, useState } from 'react' import { useAppStore } from '@/store' import { getConnectionId } from '@/lib/workspace/ownership/connection-context' -import { formatClipboardFilePath } from '@/lib/clipboard-file-path' +import { formatClipboardFilePath } from '@/lib/clipboard/clipboard-file-path' import { getOpenFileRevealOwner } from '@/lib/reveal-in-file-manager' import { canShowWorkspaceFileBrowserAction } from '@/lib/browser/documents/file-preview' import { openEditorHtmlPreview } from './open-editor-html-preview' diff --git a/src/renderer/src/components/editor/EditorPanelHeaderPath.tsx b/src/renderer/src/components/editor/EditorPanelHeaderPath.tsx index c1a023e792a..9db39932b01 100644 --- a/src/renderer/src/components/editor/EditorPanelHeaderPath.tsx +++ b/src/renderer/src/components/editor/EditorPanelHeaderPath.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import { useEffect, useRef, useState } from 'react' import { Eye, Pencil } from 'lucide-react' import { @@ -10,7 +10,7 @@ import { DropdownMenuTrigger } from '@/components/ui/dropdown-menu' import { useShortcutLabel } from '@/hooks/useShortcutLabel' -import { isImeCompositionKeyDown } from '@/lib/ime-composition-keyboard-event' +import { isImeCompositionKeyDown } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { useTranslate } from '@/i18n/use-translate' import type { OpenFile } from '@/store/slices/editor/types/open-file' import { isVirtualEditorFile } from '@/store/slices/editor/tabs/editor-tab-content-type' diff --git a/src/renderer/src/components/editor/MonacoGutterContextMenu.tsx b/src/renderer/src/components/editor/MonacoGutterContextMenu.tsx index 869a71c7f24..e8f5725801c 100644 --- a/src/renderer/src/components/editor/MonacoGutterContextMenu.tsx +++ b/src/renderer/src/components/editor/MonacoGutterContextMenu.tsx @@ -13,7 +13,7 @@ import { getConnectionId } from '@/lib/workspace/ownership/connection-context' import { findFirstIndexedWorktree } from '@/lib/workspace/ownership/worktree-runtime-owner-index' import { getRuntimeGitRemoteFileUrl } from '@/runtime/source-control/git/runtime-git-working-tree-client' import { formatPathLineReference } from './line-copy-path' -import { formatClipboardFilePath } from '@/lib/clipboard-file-path' +import { formatClipboardFilePath } from '@/lib/clipboard/clipboard-file-path' import { getOpenFileRevealOwner } from '@/lib/reveal-in-file-manager' import { useTranslate } from '@/i18n/use-translate' import { selectWorktreesByRepo } from '@/store/workspaces/catalog/workspace-record-fields' diff --git a/src/renderer/src/components/editor/PanZoomImageDialog.tsx b/src/renderer/src/components/editor/PanZoomImageDialog.tsx index 61e08bfec27..3159fc4c776 100644 --- a/src/renderer/src/components/editor/PanZoomImageDialog.tsx +++ b/src/renderer/src/components/editor/PanZoomImageDialog.tsx @@ -10,7 +10,7 @@ import { useAppStore } from '@/store' import { clipboardImageCopyErrorDescription, imageCopyFailedMessage -} from '@/lib/clipboard-image-copy' +} from '@/lib/clipboard/images/clipboard-image-copy' import { IMAGE_VIEWER_ZOOM_STEP } from './image-viewer-zoom' import { imageClipboardPngDataUrl } from './image-png-export' import type { PanZoomSize } from '../../../../shared/pan-zoom-view' diff --git a/src/renderer/src/components/editor/PdfFind.tsx b/src/renderer/src/components/editor/PdfFind.tsx index db6f0df30fc..ff1ab22bd53 100644 --- a/src/renderer/src/components/editor/PdfFind.tsx +++ b/src/renderer/src/components/editor/PdfFind.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import { useCallback, useEffect, useState } from 'react' import { ChevronUp, ChevronDown, X } from 'lucide-react' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/editor/check-details/actions/check-run-details-fix-with-ai.ts b/src/renderer/src/components/editor/check-details/actions/check-run-details-fix-with-ai.ts index 0d48367b4ae..bb6ecb75dc3 100644 --- a/src/renderer/src/components/editor/check-details/actions/check-run-details-fix-with-ai.ts +++ b/src/renderer/src/components/editor/check-details/actions/check-run-details-fix-with-ai.ts @@ -10,7 +10,7 @@ import { } from './check-run-details-fix-context' import { openSourceControlAiSettingsTarget } from '@/components/right-sidebar/source-control/panel/source-control-ai-settings-navigation' import { getConnectionId } from '@/lib/workspace/ownership/connection-context' -import { startFixChecksAgent } from '@/lib/fix-checks-agent-launch' +import { startFixChecksAgent } from '@/lib/source-control/checks/fix-checks-agent-launch' import { readSourceControlLaunchRecipeAgentId } from '../../../../../../shared/source-control/ai/source-control-launch-agent-selection' import { resolveRepoWorktreeLaunchPlatform } from '@/runtime/hosts/platform/execution-host-facts' import { useAppStore } from '@/store/index' diff --git a/src/renderer/src/components/editor/check-details/panel/CheckRunCopyButton.tsx b/src/renderer/src/components/editor/check-details/panel/CheckRunCopyButton.tsx index 9d4554b7758..88711bbd39f 100644 --- a/src/renderer/src/components/editor/check-details/panel/CheckRunCopyButton.tsx +++ b/src/renderer/src/components/editor/check-details/panel/CheckRunCopyButton.tsx @@ -1,6 +1,6 @@ import React from 'react' import { Check, Copy } from 'lucide-react' -import { useClipboardTextCopyFeedback } from '@/hooks/use-clipboard-text-copy-feedback' +import { useClipboardTextCopyFeedback } from '@/hooks/clipboard/use-clipboard-text-copy-feedback' import { useTranslate } from '@/i18n/use-translate' import { cn } from '@/lib/utils' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/editor/combined-diff/browse-files/combined-diff-file-tree-row.tsx b/src/renderer/src/components/editor/combined-diff/browse-files/combined-diff-file-tree-row.tsx index 2f42ab264e8..71909b98da0 100644 --- a/src/renderer/src/components/editor/combined-diff/browse-files/combined-diff-file-tree-row.tsx +++ b/src/renderer/src/components/editor/combined-diff/browse-files/combined-diff-file-tree-row.tsx @@ -1,6 +1,6 @@ import { createElement, memo } from 'react' import { ChevronDown } from 'lucide-react' -import { STATUS_COLORS } from '@/lib/git-path-decoration' +import { STATUS_COLORS } from '@/lib/source-control/paths/git-path-decoration' import { STATUS_LABELS } from '../../../../../../shared/git/status/git-status-labels' import type { SourceControlTreeNode } from '../../../../../../shared/source-control/listing/source-control-tree' import { FileTypeIcon, FolderIcon } from '@/components/FileTypeIcon' diff --git a/src/renderer/src/components/editor/combined-diff/review-controls/combined-diff-notes-popover.tsx b/src/renderer/src/components/editor/combined-diff/review-controls/combined-diff-notes-popover.tsx index cbf6f80755d..04fee3e0759 100644 --- a/src/renderer/src/components/editor/combined-diff/review-controls/combined-diff-notes-popover.tsx +++ b/src/renderer/src/components/editor/combined-diff/review-controls/combined-diff-notes-popover.tsx @@ -9,7 +9,7 @@ import { DialogHeader, DialogTitle } from '@/components/ui/dialog' -import { getDiffCommentLineLabel } from '@/lib/diff-comment-compat' +import { getDiffCommentLineLabel } from '@/lib/source-control/review/comments/diff-comment-compat' import { useTranslate } from '@/i18n/use-translate' import type { DiffComment } from '../../../../../../shared/diff-comment-types' diff --git a/src/renderer/src/components/editor/combined-diff/review-controls/use-combined-diff-notes-actions.ts b/src/renderer/src/components/editor/combined-diff/review-controls/use-combined-diff-notes-actions.ts index 32715254740..a07398b270b 100644 --- a/src/renderer/src/components/editor/combined-diff/review-controls/use-combined-diff-notes-actions.ts +++ b/src/renderer/src/components/editor/combined-diff/review-controls/use-combined-diff-notes-actions.ts @@ -4,7 +4,7 @@ import { useOwnedDiffComments } from '@/components/diff-comments/use-diff-commen import { withoutMarkdownReviewNotes } from '@/lib/editor/markdown/review-notes/markdown-review-notes-setting' import React, { useCallback, useEffect, useRef, useState } from 'react' import { toast } from 'sonner' -import { formatDiffComments } from '@/lib/diff-comments-format' +import { formatDiffComments } from '../../../../../../shared/diff-comments-format' import { translate } from '@/i18n/i18n' import type { DiffComment } from '../../../../../../shared/diff-comment-types' diff --git a/src/renderer/src/components/editor/csv/CsvViewer.editing.test.tsx b/src/renderer/src/components/editor/csv/CsvViewer.editing.test.tsx index 5363d38d6ee..07011de9507 100644 --- a/src/renderer/src/components/editor/csv/CsvViewer.editing.test.tsx +++ b/src/renderer/src/components/editor/csv/CsvViewer.editing.test.tsx @@ -9,7 +9,7 @@ import { flushPendingEditorBuffer, hasPendingEditorBufferChange } from '../save/flush/editor-pending-flush' -import { APP_MENU_PASTE_EVENT } from '@/lib/app-menu-paste' +import { APP_MENU_PASTE_EVENT } from '@/lib/clipboard/menu/app-menu-paste' import { ORCA_EDITOR_FILE_SAVED_EVENT } from '../autosave/editor-autosave' import { EMPTY_EDITOR_BUFFER_VIEW_INDEX as NO_SHARING } from '@/store/slices/editor/buffers/editor-buffer-views' @@ -104,29 +104,6 @@ describe('editable CSV table', () => { expect(screen.getByTestId('dirty').textContent).toBe('true') }) - it('saves the current cell value and reports a failed write without dropping the draft', async () => { - const { save } = setup() - save.mockResolvedValue(false) - fireEvent.keyDown(edit('B', 'saved value'), { key: 's', ctrlKey: true, metaKey: true }) - expect(save).toHaveBeenCalledWith('\ufeffname,value\r\nsaved value,2\r\nA,1') - expect((await screen.findByRole('alert')).textContent).toContain( - 'Your edits remain in the draft' - ) - expect(screen.getByTestId('source').textContent).toContain('saved value') - }) - - it('pastes atomically into selected cells and does not partially apply an oversized rectangle', () => { - const { changes } = setup() - const cell = screen.getByRole('gridcell', { name: 'B' }) - fireEvent.pointerDown(cell, { button: 0 }) - const grid = screen.getByRole('grid') - fireEvent.paste(grid, { clipboardData: { getData: () => 'new\t3\nother\t4' } }) - expect(screen.getByTestId('source').textContent).toBe('\ufeffname,value\r\nnew,3\r\nother,4') - fireEvent.paste(grid, { clipboardData: { getData: () => 'one\ttwo\tthree' } }) - expect(changes).toHaveBeenCalledTimes(1) - expect(screen.getByRole('alert').textContent).toContain('Paste exceeds the table') - }) - it('edits a filtered row in its original source position', () => { setup() fireEvent.change(screen.getByRole('textbox', { name: 'Filter rows' }), { @@ -136,17 +113,6 @@ describe('editable CSV table', () => { expect(screen.getByTestId('source').textContent).toBe('\ufeffname,value\r\nB,2\r\nA,updated') }) - it('keeps the chosen table delimiter when an edit would change the Auto guess', () => { - setup('first;second\nvalue;two') - fireEvent.doubleClick(screen.getByRole('columnheader', { name: 'first' })) - const input = screen.getByRole('textbox', { name: /Edit row/ }) - fireEvent.change(input, { target: { value: 'tabs\there\ttoo' } }) - fireEvent.keyDown(input, { key: 'Enter' }) - expect(screen.getByRole('grid').getAttribute('aria-colcount')).toBe('3') - expect(screen.getByRole('columnheader', { name: 'tabs\there\ttoo' })).toBeTruthy() - expect(screen.getByRole('combobox', { name: 'Delimiter' }).textContent).toBe('Semicolon (;)') - }) - it('cancels only the new cell after an earlier save completes', () => { setup() fireEvent.keyDown(edit('B', 'saved base'), { key: 'Enter' }) @@ -199,29 +165,6 @@ describe('editable CSV table', () => { expect(result.current.interaction?.editing).toBeNull() }) - it('rejects a delayed paste if typing starts before the clipboard read completes', async () => { - let resolveRead: (value: string) => void = () => {} - const pending = new Promise((resolve) => { - resolveRead = resolve - }) - Object.defineProperty(window, 'api', { - configurable: true, - value: { ui: { readClipboardText: () => pending } } - }) - const { changes } = setup() - fireEvent.pointerDown(screen.getByRole('gridcell', { name: 'B' }), { button: 0 }) - fireEvent.click(screen.getByRole('button', { name: 'Paste' })) - edit('B', 'new pending input') - await act(async () => { - resolveRead('old clipboard') - await pending - }) - expect(changes).not.toHaveBeenCalled() - expect(screen.getByRole('alert').textContent).toContain('CSV changed before paste completed') - const retained = screen.getByRole('textbox', { name: /Edit row/ }) - expect(retained instanceof HTMLTextAreaElement && retained.value).toBe('new pending input') - }) - it('routes menu paste only to the focused grid when two file panes are mounted', async () => { const first = vi.fn() const second = vi.fn() diff --git a/src/renderer/src/components/editor/csv/useCsvClipboard.ts b/src/renderer/src/components/editor/csv/useCsvClipboard.ts index caccc649b9b..f87ddc8951e 100644 --- a/src/renderer/src/components/editor/csv/useCsvClipboard.ts +++ b/src/renderer/src/components/editor/csv/useCsvClipboard.ts @@ -1,5 +1,5 @@ import { useEffect, useLayoutEffect, useRef, type ClipboardEvent } from 'react' -import { APP_MENU_PASTE_EVENT } from '@/lib/app-menu-paste' +import { APP_MENU_PASTE_EVENT } from '@/lib/clipboard/menu/app-menu-paste' import { copyCsvSelection, pasteCsvSelection } from './csv-cell-clipboard' import type { CsvCellSelection } from './csv-cell-selection' import type { CsvCellEditSession } from './csv-grid-interaction' diff --git a/src/renderer/src/components/editor/diff/monaco-view/DiffViewer.tsx b/src/renderer/src/components/editor/diff/monaco-view/DiffViewer.tsx index e02d1627e37..9fb9bf3ab77 100644 --- a/src/renderer/src/components/editor/diff/monaco-view/DiffViewer.tsx +++ b/src/renderer/src/components/editor/diff/monaco-view/DiffViewer.tsx @@ -13,7 +13,7 @@ import { toast } from 'sonner' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' import { applyDiffEditorLineNumberOptions } from './diff-editor-line-number-options' -import { isDiffComment } from '@/lib/diff-comment-compat' +import { isDiffComment } from '@/lib/source-control/review/comments/diff-comment-compat' import { installEditorSaveShortcut, installMonacoEditorFindShortcut } from '../../editor-shortcuts' import { diffEditorScrollbarOptions } from './diff-editor-scrollbar-options' import { LargeDiffFallback } from '../large-files/LargeDiffFallback' diff --git a/src/renderer/src/components/editor/diff/sections/DiffSectionItem.tsx b/src/renderer/src/components/editor/diff/sections/DiffSectionItem.tsx index 4c980ab1d6d..ab232a7d5ff 100644 --- a/src/renderer/src/components/editor/diff/sections/DiffSectionItem.tsx +++ b/src/renderer/src/components/editor/diff/sections/DiffSectionItem.tsx @@ -9,7 +9,7 @@ import { useEditorTypography } from '@/hooks/use-editor-typography' import { useDiffCommentDecorator } from '../../../diff-comments/useDiffCommentDecorator' import { applyDiffEditorLineNumberOptions } from '../monaco-view/diff-editor-line-number-options' import { DiffSectionHeader } from './DiffSectionHeader' -import { isDiffComment } from '@/lib/diff-comment-compat' +import { isDiffComment } from '@/lib/source-control/review/comments/diff-comment-compat' import { installEditorSaveShortcut, installMonacoEditorFindShortcut } from '../../editor-shortcuts' import { DiffSectionBody } from './DiffSectionBody' import { useDiffSectionLayoutMetrics } from './useDiffSectionLayoutMetrics' diff --git a/src/renderer/src/components/editor/editor-shortcuts.ts b/src/renderer/src/components/editor/editor-shortcuts.ts index 35909e6ee71..7832aa141a6 100644 --- a/src/renderer/src/components/editor/editor-shortcuts.ts +++ b/src/renderer/src/components/editor/editor-shortcuts.ts @@ -1,5 +1,5 @@ import type { KeyboardEvent as ReactKeyboardEvent } from 'react' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { useAppStore } from '@/store' import { keybindingMatchesAction, type KeybindingActionId } from '../../../../shared/keybindings' diff --git a/src/renderer/src/components/editor/git-graph/git-graph-commit-actions-controller.ts b/src/renderer/src/components/editor/git-graph/git-graph-commit-actions-controller.ts index ac69ad7ee1f..cd4bca04574 100644 --- a/src/renderer/src/components/editor/git-graph/git-graph-commit-actions-controller.ts +++ b/src/renderer/src/components/editor/git-graph/git-graph-commit-actions-controller.ts @@ -4,7 +4,7 @@ import type { BranchSwitchTarget } from '../../../../../shared/git/branch-switch import { createStore } from 'zustand/vanilla' import { toast } from 'sonner' import { useAppStore } from '@/store' -import { gitGraphScope } from '@/lib/git-graph-tab' +import { gitGraphScope } from '@/lib/source-control/graph/git-graph-tab' import { gitGraphOwnerKey } from './git-graph-workspace-navigation' import { gitCommitActionsSupported } from '@/runtime/source-control/git/git-commit-actions-capability' import { diff --git a/src/renderer/src/components/editor/git-graph/git-graph-filter.tsx b/src/renderer/src/components/editor/git-graph/git-graph-filter.tsx index 4e514ed205f..afe2589dbd9 100644 --- a/src/renderer/src/components/editor/git-graph/git-graph-filter.tsx +++ b/src/renderer/src/components/editor/git-graph/git-graph-filter.tsx @@ -6,7 +6,7 @@ import { Checkbox } from '@/components/ui/checkbox' import { getRuntimeGitRefs } from '@/runtime/source-control/git/runtime-git-status-client' import { runtimeEnvironmentSupportsCapability } from '@/runtime/rpc/compatibility/runtime-capability-proof' import { GIT_HISTORY_REFS_CAPABILITY } from '../../../../../shared/source-control/runtime/git-graph-capabilities' -import { gitGraphScope, useGitGraphScope } from '@/lib/git-graph-tab' +import { gitGraphScope, useGitGraphScope } from '@/lib/source-control/graph/git-graph-tab' import { useTranslate } from '@/i18n/use-translate' import type { GitHistoryItemRef, diff --git a/src/renderer/src/components/editor/git-graph/git-graph-history-controller.ts b/src/renderer/src/components/editor/git-graph/git-graph-history-controller.ts index 3465685eb14..cd5a139ea05 100644 --- a/src/renderer/src/components/editor/git-graph/git-graph-history-controller.ts +++ b/src/renderer/src/components/editor/git-graph/git-graph-history-controller.ts @@ -4,7 +4,8 @@ import { gitGraphOwnerKey, switchGitGraphWorkspace } from './git-graph-workspace import { createStore } from 'zustand/vanilla' import { shallow } from 'zustand/shallow' import { useAppStore } from '@/store' -import { gitGraphScope, gitGraphScopeInputs, GIT_GRAPH_REFRESH_EVENT } from '@/lib/git-graph-tab' +import { gitGraphScope, gitGraphScopeInputs } from '@/lib/source-control/graph/git-graph-tab' +import { GIT_GRAPH_REFRESH_EVENT } from '@/lib/source-control/graph/git-graph-refresh-event' import { getRuntimeGitHistory } from '@/runtime/source-control/git/runtime-git-status-client' import { translate } from '@/i18n/i18n' import type { diff --git a/src/renderer/src/components/editor/git-graph/git-graph-ref-menu.tsx b/src/renderer/src/components/editor/git-graph/git-graph-ref-menu.tsx index 0b968d353da..428bec78c9e 100644 --- a/src/renderer/src/components/editor/git-graph/git-graph-ref-menu.tsx +++ b/src/renderer/src/components/editor/git-graph/git-graph-ref-menu.tsx @@ -13,7 +13,7 @@ import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { useAppStore } from '@/store' import { selectWorktreesByRepo } from '@/store/workspaces/catalog/workspace-record-fields' -import type { gitGraphScope } from '@/lib/git-graph-tab' +import type { gitGraphScope } from '@/lib/source-control/graph/git-graph-tab' import { gitGraphWorkspaceCatalog } from './git-graph-workspace-navigation' import { useTranslate } from '@/i18n/use-translate' import type { GitHistoryItemRef } from '../../../../../shared/git/history/git-history-types' diff --git a/src/renderer/src/components/editor/git-graph/git-graph-rendering.test.tsx b/src/renderer/src/components/editor/git-graph/git-graph-rendering.test.tsx index ba96587e12e..61a4f918161 100644 --- a/src/renderer/src/components/editor/git-graph/git-graph-rendering.test.tsx +++ b/src/renderer/src/components/editor/git-graph/git-graph-rendering.test.tsx @@ -2,10 +2,7 @@ import { workspaceId, local, repo } from './git-graph-workspace.test-fixtures' // @vitest-environment happy-dom import { useAppStore } from '@/store' import { gitGraphHistoryForTab, disposeGitGraphHistory } from './git-graph-tab-controllers' -import { attachClosedEditorTabCleanup } from '../model-lifetime/retention/closed-editor-tab-controller' -import { gitGraphScope } from '@/lib/git-graph-tab' -import { captureWorktreeOperationGenerationSnapshot } from '@/lib/workspace/ownership/worktree-operation-generation' -import type { OpenFile } from '@/store/slices/editor/types/open-file' + import { act } from 'react' import { createRoot } from 'react-dom/client' import { afterEach, beforeEach, expect, it, vi } from 'vitest' @@ -327,115 +324,6 @@ it('keeps a newer selection and its details during refresh and after a partial f expect(container.querySelector('aside h2')?.textContent).toBe('Commit 120') }) -it.each(['local', 'ssh:A'] as const)( - 'retains %s twin history across workspace switches, then follows its tab owner move', - async (hostId) => { - useAppStore.setState({ - repos: [ - ...useAppStore.getState().repos, - { ...repo, executionHostId: 'ssh:A', connectionId: 'A' } - ], - worktreesByRepo: { r: [local, { ...local, hostId: 'ssh:A' }] }, - activeWorkspaceExecutionHostId: hostId - }) - const cleanup = attachClosedEditorTabCleanup(useAppStore) - const original = useAppStore.getState().openFiles - const file: OpenFile = { - id: `${workspaceId}::git-graph`, - worktreeId: workspaceId, - mode: 'git-graph', - relativePath: 'Git Graph', - language: 'plaintext', - isDirty: false, - filePath: `${workspaceId}::git-graph`, - operationProvenance: { - ownershipProjection: 'explicit', - generation: captureWorktreeOperationGenerationSnapshot({ - executionHostId: hostId, - runtimeEnvironmentId: null - }) - } - } - useAppStore.setState({ openFiles: [...original, file] }) - const render = () => ( - - - - ) - const page = { - ...result, - items: [...result.items, { id: 'b', subject: 'second', message: 'second', parentIds: [] }], - refs: 'all' as const - } - getHistory.mockReset().mockResolvedValueOnce(page) - try { - await act(async () => root.render(render())) - expect(getHistory.mock.calls[0]?.[0].connectionId).toBe(hostId === 'ssh:A' ? 'A' : undefined) - await act(async () => { - const commit = Array.from(container.querySelectorAll('button')).find( - (button) => button.textContent === 'second' - )! - commit.click() - const scroll = container.querySelector('div.overflow-y-auto')! - scroll.scrollTop = 144 - scroll.dispatchEvent(new Event('scroll')) - }) - await act(async () => root.render(null)) - await act(async () => - useAppStore.setState({ activeWorktreeId: 'other', activeWorkspaceExecutionHostId: 'local' }) - ) - expect(gitGraphScope(workspaceId)).toBeNull() - expect(gitGraphHistoryForTab(workspaceId).view.getState().selectedId).toBe('b') - await act(async () => - useAppStore.setState({ - activeWorktreeId: workspaceId, - activeWorkspaceExecutionHostId: hostId - }) - ) - await act(async () => root.render(render())) - expect(container.querySelector('[data-current="true"]')?.textContent).toContain('second') - expect(container.querySelector('div.overflow-y-auto')?.scrollTop).toBe(144) - expect(getHistory).toHaveBeenCalledTimes(1) - await act(async () => root.render(null)) - useAppStore.setState({ - worktreesByRepo: { r: [{ ...local, hostId: hostId === 'local' ? 'ssh:A' : 'local' }] } - }) - expect(gitGraphHistoryForTab(workspaceId).view.getState().result).toBeUndefined() - expect(gitGraphHistoryForTab(workspaceId).scrollOffset).toBe(0) - await act(async () => root.render(render())) - const movedHost = hostId === 'local' ? 'ssh:A' : 'local' - getHistory.mockResolvedValueOnce({ ...result, refs: 'all' }) - await act(async () => - useAppStore.setState({ - openFiles: [ - ...original, - { - ...file, - operationProvenance: { - ownershipProjection: 'explicit', - generation: captureWorktreeOperationGenerationSnapshot({ - executionHostId: movedHost, - runtimeEnvironmentId: null - }) - } - } - ] - }) - ) - expect(getHistory.mock.calls.at(-1)?.[0].connectionId).toBe( - movedHost === 'ssh:A' ? 'A' : undefined - ) - expect(gitGraphHistoryForTab(workspaceId).view.getState().selectedId).toBe('a') - await act(async () => root.render(null)) - useAppStore.setState({ openFiles: original }) - expect(gitGraphHistoryForTab(workspaceId).view.getState().result).toBeUndefined() - } finally { - cleanup() - useAppStore.setState({ openFiles: original }) - } - } -) - it('waits for an in-flight page before retrieving a distant parent in one operation', async () => { let history: ReturnType function History() { @@ -632,23 +520,3 @@ it('keeps the confirm strip across tab switches, discarding it on navigation, fi await act(async () => root.render(render())) expect(container.textContent).not.toContain('Revert a?') }) - -it('canonicalizes selected refs before requesting history', async () => { - let history: ReturnType - function History() { - history = useGitGraphHistory(workspaceId) - return null - } - getHistory.mockReset().mockResolvedValue({ ...result, refs: 'all' }) - await act(async () => root.render()) - getHistory.mockClear().mockResolvedValue({ - ...result, - refs: ['refs/heads/main', 'refs/heads/topic'], - resolvedRefs: ['refs/heads/main', 'refs/heads/topic'] - }) - await act(async () => { - history!.changeFilter(['refs/heads/topic', 'refs/heads/main', 'refs/heads/topic']) - await history!.controller.settledResult() - }) - expect(getHistory.mock.calls[0]?.[1].refs).toEqual(['refs/heads/main', 'refs/heads/topic']) -}) diff --git a/src/renderer/src/components/editor/git-graph/git-graph-workspace-navigation.ts b/src/renderer/src/components/editor/git-graph/git-graph-workspace-navigation.ts index dd059828ebe..6867b8a83f0 100644 --- a/src/renderer/src/components/editor/git-graph/git-graph-workspace-navigation.ts +++ b/src/renderer/src/components/editor/git-graph/git-graph-workspace-navigation.ts @@ -5,7 +5,7 @@ import { getWorktreeExecutionHostId } from '../../../../../shared/execution-host import { findIndexedRepoOwnerForHost } from '@/lib/workspace/ownership/repo-owner-index' import { selectWorktreesByRepo } from '@/store/workspaces/catalog/workspace-record-fields' import { useAppStore } from '@/store' -import { gitGraphScope } from '@/lib/git-graph-tab' +import { gitGraphScope } from '@/lib/source-control/graph/git-graph-tab' import { getRuntimeGitRefs } from '@/runtime/source-control/git/runtime-git-status-client' export const gitGraphOwnerKey = (scope: ReturnType) => diff --git a/src/renderer/src/components/editor/git-graph/use-git-graph-history.ts b/src/renderer/src/components/editor/git-graph/use-git-graph-history.ts index 8e87e789707..58cc1cbcd54 100644 --- a/src/renderer/src/components/editor/git-graph/use-git-graph-history.ts +++ b/src/renderer/src/components/editor/git-graph/use-git-graph-history.ts @@ -1,7 +1,7 @@ import { useEffect } from 'react' import { useStore } from 'zustand' import { useAppStore } from '@/store' -import { useGitGraphScope } from '@/lib/git-graph-tab' +import { useGitGraphScope } from '@/lib/source-control/graph/git-graph-tab' import { gitGraphHistoryForTab } from './git-graph-tab-controllers' import type { GitHistoryRefs, diff --git a/src/renderer/src/components/editor/image-png-export.ts b/src/renderer/src/components/editor/image-png-export.ts index c9b8ee933e0..ab8efae13af 100644 --- a/src/renderer/src/components/editor/image-png-export.ts +++ b/src/renderer/src/components/editor/image-png-export.ts @@ -5,7 +5,7 @@ import { } from '../../../../shared/clipboard-image' import type { PanZoomSize } from '../../../../shared/pan-zoom-view' import { svgMarkupDataUri } from '../../../../shared/file-preview/svg-document' -import { blobToBase64, convertImageBlobToPng } from '../../lib/image-blob-png' +import { blobToBase64, convertImageBlobToPng } from '../../lib/clipboard/images/image-blob-png' const PREFERRED_PIXEL_RATIO = 2 // Chromium returns a blank canvas when a side exceeds this. diff --git a/src/renderer/src/components/editor/markdown-preview/review/MarkdownPreviewAnnotationComposer.tsx b/src/renderer/src/components/editor/markdown-preview/review/MarkdownPreviewAnnotationComposer.tsx index 18b945c93a9..bdb1f6f73c8 100644 --- a/src/renderer/src/components/editor/markdown-preview/review/MarkdownPreviewAnnotationComposer.tsx +++ b/src/renderer/src/components/editor/markdown-preview/review/MarkdownPreviewAnnotationComposer.tsx @@ -1,5 +1,5 @@ import type { DiffCommentOwner } from '@/store/slices/diff-comments/diff-comment-owner' -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import { useCallback, useEffect, useRef, useState } from 'react' import { CornerDownLeft } from 'lucide-react' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/editor/markdown-preview/surface/use-markdown-preview-source-foundation.ts b/src/renderer/src/components/editor/markdown-preview/surface/use-markdown-preview-source-foundation.ts index 7da3e2aa8b2..a098069e424 100644 --- a/src/renderer/src/components/editor/markdown-preview/surface/use-markdown-preview-source-foundation.ts +++ b/src/renderer/src/components/editor/markdown-preview/surface/use-markdown-preview-source-foundation.ts @@ -3,7 +3,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { createConnectionIdForFileSelector } from '@/lib/workspace/ownership/connection-owner-resolution' import { computeEditorFontSize } from '@/lib/editor/appearance/editor-font-zoom' import type { HttpLinkSourceOwner } from '@/lib/browser/navigation/http-link-routing' -import { isMarkdownComment } from '@/lib/diff-comment-compat' +import { isMarkdownComment } from '@/lib/source-control/review/comments/diff-comment-compat' import { useFileOwnerRuntimeTarget } from '@/runtime/rpc/targets/use-worktree-runtime-target' import { useAppStore } from '@/store/index' import { exceedsMarkdownRichModeSizeLimit } from '../../markdown/render-mode/markdown-rich-size-limit' diff --git a/src/renderer/src/components/editor/markdown-preview/viewport/markdown-preview-scroll-input.ts b/src/renderer/src/components/editor/markdown-preview/viewport/markdown-preview-scroll-input.ts index 52a49641104..3b48a9e6340 100644 --- a/src/renderer/src/components/editor/markdown-preview/viewport/markdown-preview-scroll-input.ts +++ b/src/renderer/src/components/editor/markdown-preview/viewport/markdown-preview-scroll-input.ts @@ -1,4 +1,4 @@ -import { isEditableTarget } from '@/lib/editable-target' +import { isEditableTarget } from '@/lib/text-input/focus/editable-target' export function listenMarkdownPreviewScrollInput( container: HTMLDivElement, diff --git a/src/renderer/src/components/editor/markdown-preview/viewport/use-markdown-preview-viewport.ts b/src/renderer/src/components/editor/markdown-preview/viewport/use-markdown-preview-viewport.ts index 5aff2b1f4c6..45940e0a8ba 100644 --- a/src/renderer/src/components/editor/markdown-preview/viewport/use-markdown-preview-viewport.ts +++ b/src/renderer/src/components/editor/markdown-preview/viewport/use-markdown-preview-viewport.ts @@ -2,7 +2,7 @@ import { revealMarkdownNavigationDetails } from '../../markdown/navigation/markd import type { MarkdownPreviewDocument } from '../document-worker/markdown-preview-document-types' import type { VirtualMarkdownPreviewNavigation } from './use-markdown-preview-navigation' import { useCallback, useEffect, useLayoutEffect, type MutableRefObject } from 'react' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { resolveMarkdownPreviewAddReviewNoteKey } from '../review/markdown-preview-annotation-shortcut' import { decodeMarkdownPreviewAnchor, @@ -14,7 +14,7 @@ import { isMarkdownPreviewFindShortcut } from '../search/markdown-preview-search import { useMarkdownPreviewDomSearch } from '../search/use-markdown-preview-dom-search' import type { MarkdownPreviewFoundation } from '../surface/use-markdown-preview-foundation' import { useMarkdownPreviewScrollViewport } from './use-markdown-preview-scroll-viewport' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' export function useMarkdownPreviewViewport({ foundation, diff --git a/src/renderer/src/components/editor/markdown-source-tools/monaco/use-monaco-markdown-annotations.ts b/src/renderer/src/components/editor/markdown-source-tools/monaco/use-monaco-markdown-annotations.ts index 1aaf08c391b..5ce92cf87e7 100644 --- a/src/renderer/src/components/editor/markdown-source-tools/monaco/use-monaco-markdown-annotations.ts +++ b/src/renderer/src/components/editor/markdown-source-tools/monaco/use-monaco-markdown-annotations.ts @@ -18,7 +18,7 @@ import type { WorkspaceResource } from '@/lib/workspace/ownership/workspace-copy import { toast } from 'sonner' import { useTranslate } from '@/i18n/use-translate' import { useAppStore } from '@/store/index' -import { isMarkdownComment } from '@/lib/diff-comment-compat' +import { isMarkdownComment } from '@/lib/source-control/review/comments/diff-comment-compat' import { formatMarkdownReviewNotes, type MarkdownReviewNote diff --git a/src/renderer/src/components/editor/monaco-context-menu-paste.ts b/src/renderer/src/components/editor/monaco-context-menu-paste.ts index 97741aa32b9..a3cb5c457a2 100644 --- a/src/renderer/src/components/editor/monaco-context-menu-paste.ts +++ b/src/renderer/src/components/editor/monaco-context-menu-paste.ts @@ -1,6 +1,6 @@ import type { editor } from 'monaco-editor' import type { ReadClipboardTextOptions } from '../../../../shared/clipboard-text' -import { measureTextControlPasteByteLength } from '@/lib/text-control-paste' +import { measureTextControlPasteByteLength } from '@/lib/text-input/paste/text-control-paste' import { MONACO_PASTE_DIRECT_MAX_BYTES, MONACO_PASTE_MAX_BYTES, diff --git a/src/renderer/src/components/editor/monaco-large-text-paste.ts b/src/renderer/src/components/editor/monaco-large-text-paste.ts index 88ed77eb5da..8916e996579 100644 --- a/src/renderer/src/components/editor/monaco-large-text-paste.ts +++ b/src/renderer/src/components/editor/monaco-large-text-paste.ts @@ -4,7 +4,7 @@ import { getUtf8ChunkEndIndex } from '../../../../shared/utf8-byte-limits' import { measureTextControlPasteByteLength, measureTextControlPasteByteLengthWithYield -} from '@/lib/text-control-paste' +} from '@/lib/text-input/paste/text-control-paste' export const MONACO_PASTE_DIRECT_MAX_BYTES = 64 * 1024 export const MONACO_PASTE_CHUNK_MAX_BYTES = 16 * 1024 diff --git a/src/renderer/src/components/editor/notebook/document/IpynbViewer.tsx b/src/renderer/src/components/editor/notebook/document/IpynbViewer.tsx index 5f538ade877..138d584813b 100644 --- a/src/renderer/src/components/editor/notebook/document/IpynbViewer.tsx +++ b/src/renderer/src/components/editor/notebook/document/IpynbViewer.tsx @@ -1,4 +1,4 @@ -import { isImeOwnedKeyboardEvent } from '@/lib/ime-composition-keyboard-event' +import { isImeOwnedKeyboardEvent } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { useCallback, useMemo, useState } from 'react' import { AlertCircle, Save } from 'lucide-react' import { computeEditorFontSize } from '@/lib/editor/appearance/editor-font-zoom' @@ -15,7 +15,7 @@ import { import { useShortcutKeyDetails } from '@/hooks/useShortcutLabel' import { useTranslate } from '@/i18n/use-translate' import { editorShortcutMatches } from '../../editor-shortcuts' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { findFirstIndexedWorktree } from '@/lib/workspace/ownership/worktree-runtime-owner-index' import { IpynbCellToolbar, IpynbToolbarButton } from '../cells/IpynbCellToolbar' import { IpynbCellSource } from '../cells/IpynbCellEditor' diff --git a/src/renderer/src/components/editor/rich-markdown/clipboard/rich-markdown-large-text-paste.ts b/src/renderer/src/components/editor/rich-markdown/clipboard/rich-markdown-large-text-paste.ts index 0543fee9517..d0d490c7407 100644 --- a/src/renderer/src/components/editor/rich-markdown/clipboard/rich-markdown-large-text-paste.ts +++ b/src/renderer/src/components/editor/rich-markdown/clipboard/rich-markdown-large-text-paste.ts @@ -10,7 +10,7 @@ import { import { measureTextControlPasteByteLength, measureTextControlPasteByteLengthWithYield -} from '@/lib/text-control-paste' +} from '@/lib/text-input/paste/text-control-paste' import { translate } from '@/i18n/i18n' import { getRichMarkdownImageResolverContextVersion } from '../images/rich-markdown-image-context' import { trackRichMarkdownLargePasteHistory } from './rich-markdown-large-paste-history' diff --git a/src/renderer/src/components/editor/rich-markdown/commands/rich-markdown-key-handler.test.ts b/src/renderer/src/components/editor/rich-markdown/commands/rich-markdown-key-handler.test.ts index 9293ae57213..32c3655c071 100644 --- a/src/renderer/src/components/editor/rich-markdown/commands/rich-markdown-key-handler.test.ts +++ b/src/renderer/src/components/editor/rich-markdown/commands/rich-markdown-key-handler.test.ts @@ -12,7 +12,7 @@ import { encodeRawMarkdownHtmlForRichEditor } from '../raw-source/raw-markdown-h import { commitRichMarkdownSerialization } from '../document/rich-markdown-serialization-commit' // Pin the shortcut platform because navigator.userAgent varies across test environments. -vi.mock('@/lib/shortcut-platform', () => ({ +vi.mock('@/lib/keyboard/shortcut-platform', () => ({ getShortcutPlatform: () => 'darwin' as NodeJS.Platform })) diff --git a/src/renderer/src/components/editor/rich-markdown/commands/rich-markdown-key-handler.ts b/src/renderer/src/components/editor/rich-markdown/commands/rich-markdown-key-handler.ts index f047c3e3e08..8eea6f91099 100644 --- a/src/renderer/src/components/editor/rich-markdown/commands/rich-markdown-key-handler.ts +++ b/src/renderer/src/components/editor/rich-markdown/commands/rich-markdown-key-handler.ts @@ -1,8 +1,8 @@ import type { KeyHandlerContext } from './rich-markdown-key-handler-context' -import { isImeOwnedKeyboardEvent } from '@/lib/ime-composition-keyboard-event' +import { isImeOwnedKeyboardEvent } from '@/lib/text-input/ime/ime-composition-keyboard-event' import type { Editor } from '@tiptap/react' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { useAppStore } from '@/store/index' import { isMarkdownPreviewFindShortcut } from '../../markdown-preview/search/markdown-preview-search' import { handleRichMarkdownAddReviewNoteShortcut } from '../review/rich-markdown-annotation-shortcut' diff --git a/src/renderer/src/components/editor/rich-markdown/images/rich-markdown-blob-image-paste.test.ts b/src/renderer/src/components/editor/rich-markdown/images/rich-markdown-blob-image-paste.test.ts index 2d800ba69db..a70b54dbd8a 100644 --- a/src/renderer/src/components/editor/rich-markdown/images/rich-markdown-blob-image-paste.test.ts +++ b/src/renderer/src/components/editor/rich-markdown/images/rich-markdown-blob-image-paste.test.ts @@ -4,7 +4,7 @@ import { useAppStore } from '@/store/index' import type { OpenFile } from '@/store/slices/editor/types/open-file' import { makeWorktree } from '@/store/slices/worktrees/worktree.test-fixture' import { TEST_REPO } from '@/store/repos/repo.test-fixture' -import type * as ImageBlobPng from '@/lib/image-blob-png' +import type * as ImageBlobPng from '@/lib/clipboard/images/image-blob-png' import { Editor } from '@tiptap/react' import StarterKit from '@tiptap/starter-kit' import Image from '@tiptap/extension-image' @@ -23,7 +23,7 @@ vi.mock('@/lib/workspace/ownership/connection-context', () => ({ getConnectionId: () => null, getConnectionIdForFile: () => null })) -vi.mock('@/lib/image-blob-png', async (original) => { +vi.mock('@/lib/clipboard/images/image-blob-png', async (original) => { const actual = await original() return { ...actual, convertImageBlobToPng: async (blob: Blob) => blob } }) diff --git a/src/renderer/src/components/editor/rich-markdown/images/rich-markdown-blob-image-paste.ts b/src/renderer/src/components/editor/rich-markdown/images/rich-markdown-blob-image-paste.ts index 466694658dd..077a55f7c54 100644 --- a/src/renderer/src/components/editor/rich-markdown/images/rich-markdown-blob-image-paste.ts +++ b/src/renderer/src/components/editor/rich-markdown/images/rich-markdown-blob-image-paste.ts @@ -2,7 +2,7 @@ import type { Editor } from '@tiptap/react' import type { Slice } from '@tiptap/pm/model' import { toast } from 'sonner' import { translate } from '@/i18n/i18n' -import { blobToBase64, convertImageBlobToPng } from '@/lib/image-blob-png' +import { blobToBase64, convertImageBlobToPng } from '@/lib/clipboard/images/image-blob-png' import { importExternalPathsToRuntime } from '@/runtime/files/imports/runtime-file-import-client' import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import { assertClipboardImageBase64LengthWithinLimit } from '../../../../../../shared/clipboard-image' diff --git a/src/renderer/src/components/editor/rich-markdown/links/RichMarkdownLinkBubble.tsx b/src/renderer/src/components/editor/rich-markdown/links/RichMarkdownLinkBubble.tsx index c370307825c..a40a3bb1448 100644 --- a/src/renderer/src/components/editor/rich-markdown/links/RichMarkdownLinkBubble.tsx +++ b/src/renderer/src/components/editor/rich-markdown/links/RichMarkdownLinkBubble.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React, { useCallback, useEffect, useRef, useState } from 'react' import { createPortal } from 'react-dom' import type { Editor } from '@tiptap/react' diff --git a/src/renderer/src/components/editor/rich-markdown/review/rich-markdown-review-note-layout.ts b/src/renderer/src/components/editor/rich-markdown/review/rich-markdown-review-note-layout.ts index ba366de1c30..5b9b8f79613 100644 --- a/src/renderer/src/components/editor/rich-markdown/review/rich-markdown-review-note-layout.ts +++ b/src/renderer/src/components/editor/rich-markdown/review/rich-markdown-review-note-layout.ts @@ -1,5 +1,5 @@ import type { DiffComment } from '../../../../../../shared/diff-comment-types' -import { getCommentBodyLayoutLineCount } from '@/lib/comment-body-line-count' +import { getCommentBodyLayoutLineCount } from '@/lib/source-control/review/comments/comment-body-line-count' export type RichMarkdownReviewNotePosition = { comment: DiffComment diff --git a/src/renderer/src/components/editor/rich-markdown/review/useRichMarkdownReviewData.ts b/src/renderer/src/components/editor/rich-markdown/review/useRichMarkdownReviewData.ts index 5c1f52edfd5..1227b03d9c5 100644 --- a/src/renderer/src/components/editor/rich-markdown/review/useRichMarkdownReviewData.ts +++ b/src/renderer/src/components/editor/rich-markdown/review/useRichMarkdownReviewData.ts @@ -1,7 +1,7 @@ import { useMemo } from 'react' import { getRelativePathInsideRoot } from '@/lib/path' import { normalizeRelativePath } from '../../../../../../shared/cross-platform-path' -import { isMarkdownComment } from '@/lib/diff-comment-compat' +import { isMarkdownComment } from '@/lib/source-control/review/comments/diff-comment-compat' import { formatMarkdownReviewNotes, sortMarkdownReviewNotes, diff --git a/src/renderer/src/components/editor/rich-markdown/search/RichMarkdownSearchBar.tsx b/src/renderer/src/components/editor/rich-markdown/search/RichMarkdownSearchBar.tsx index bbcb6d57623..8f79f8e0309 100644 --- a/src/renderer/src/components/editor/rich-markdown/search/RichMarkdownSearchBar.tsx +++ b/src/renderer/src/components/editor/rich-markdown/search/RichMarkdownSearchBar.tsx @@ -12,7 +12,7 @@ import { import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import { useTranslate } from '@/i18n/use-translate' -import { isImeCompositionKeyDown } from '@/lib/ime-composition-keyboard-event' +import { isImeCompositionKeyDown } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { useOptionalShortcutLabel } from '@/hooks/useShortcutLabel' type RichMarkdownSearchBarProps = { diff --git a/src/renderer/src/components/editor/rich-markdown/search/useRichMarkdownSearch.ts b/src/renderer/src/components/editor/rich-markdown/search/useRichMarkdownSearch.ts index cd11cb41d50..818df4aa70c 100644 --- a/src/renderer/src/components/editor/rich-markdown/search/useRichMarkdownSearch.ts +++ b/src/renderer/src/components/editor/rich-markdown/search/useRichMarkdownSearch.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useMemo, useRef, useState, type RefObject } from 'react' import type { Editor } from '@tiptap/react' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { useAppStore } from '@/store/index' import { isMarkdownPreviewFindShortcut, @@ -14,8 +14,8 @@ import { } from './rich-markdown-search' import { createRichMarkdownSearchMatchesCache } from './rich-markdown-search-matches-cache' import { useRichMarkdownSearchHighlights } from './useRichMarkdownSearchHighlights' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' -import { isImeOwnedKeyboardEvent } from '@/lib/ime-composition-keyboard-event' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' +import { isImeOwnedKeyboardEvent } from '@/lib/text-input/ime/ime-composition-keyboard-event' export function useRichMarkdownSearch({ editor, diff --git a/src/renderer/src/components/editor/setup-contextual-copy.ts b/src/renderer/src/components/editor/setup-contextual-copy.ts index 4b10cf8e6bf..9ffc872641d 100644 --- a/src/renderer/src/components/editor/setup-contextual-copy.ts +++ b/src/renderer/src/components/editor/setup-contextual-copy.ts @@ -12,7 +12,7 @@ import { PRIMARY_SELECTION_MAX_LENGTH, isPrimarySelectionEnabled, setPrimarySelectionText -} from '@/lib/primary-selection' +} from '@/lib/clipboard/primary-selection/primary-selection' import { translate } from '@/i18n/i18n' export function setupContextualCopy({ diff --git a/src/renderer/src/components/editor/use-pdf-viewer-find-shortcut.ts b/src/renderer/src/components/editor/use-pdf-viewer-find-shortcut.ts index a63fc482a6c..f55af428a3b 100644 --- a/src/renderer/src/components/editor/use-pdf-viewer-find-shortcut.ts +++ b/src/renderer/src/components/editor/use-pdf-viewer-find-shortcut.ts @@ -1,9 +1,9 @@ import { useEffect, type RefObject } from 'react' -import { getShortcutPlatform } from '@/lib/shortcut-platform' -import { isEditableTarget } from '@/lib/editable-target' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' +import { isEditableTarget } from '@/lib/text-input/focus/editable-target' import { isEventTargetInsideFloatingWorkspacePanel } from '@/lib/floating-workspace-terminal-actions' import { keybindingMatchesAction, type KeybindingOverrides } from '../../../../shared/keybindings' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' /** Claim Find inside this PDF or through its focused group, excluding other text fields and split/window surfaces. */ export function pdfViewerOwnsFind( diff --git a/src/renderer/src/components/editor/view-mode/useMarkdownPreviewShortcut.ts b/src/renderer/src/components/editor/view-mode/useMarkdownPreviewShortcut.ts index 05c867e633f..7439ee90d6b 100644 --- a/src/renderer/src/components/editor/view-mode/useMarkdownPreviewShortcut.ts +++ b/src/renderer/src/components/editor/view-mode/useMarkdownPreviewShortcut.ts @@ -1,11 +1,11 @@ import { editorViewPlacement } from '@/store/slices/editor/tabs/editor-view-placement' import { useEffect, type RefObject } from 'react' import { detectLanguage } from '../../../../../shared/editor-language/editor-language-detect' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { useAppStore } from '@/store/index' import type { OpenFile } from '@/store/slices/editor/types/open-file' import { canOpenMarkdownPreview, isMarkdownPreviewShortcut } from './markdown-preview-controls' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' type UseMarkdownPreviewShortcutParams = { activeViewStateId?: string | null diff --git a/src/renderer/src/components/feature-wall/use-feature-wall-tour-keyboard-shortcut.ts b/src/renderer/src/components/feature-wall/use-feature-wall-tour-keyboard-shortcut.ts index 0bbcb7481b8..ae8af9f8cd2 100644 --- a/src/renderer/src/components/feature-wall/use-feature-wall-tour-keyboard-shortcut.ts +++ b/src/renderer/src/components/feature-wall/use-feature-wall-tour-keyboard-shortcut.ts @@ -1,6 +1,6 @@ import { useEffect } from 'react' import { isScreenSubmitShortcut } from '@/lib/screen-submit-shortcut' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' export function useFeatureWallTourKeyboardShortcut({ isOpen, diff --git a/src/renderer/src/components/floating-terminal/use-floating-terminal-global-shortcut-listeners.ts b/src/renderer/src/components/floating-terminal/use-floating-terminal-global-shortcut-listeners.ts index e81b152eaee..25317fe22d4 100644 --- a/src/renderer/src/components/floating-terminal/use-floating-terminal-global-shortcut-listeners.ts +++ b/src/renderer/src/components/floating-terminal/use-floating-terminal-global-shortcut-listeners.ts @@ -4,7 +4,7 @@ import { isFloatingWorkspaceTerminalInputTarget, switchFloatingWorkspaceTab } from '@/lib/floating-workspace-terminal-actions' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { useAppStore } from '@/store' import { keybindingMatchesAction, @@ -14,7 +14,7 @@ import { import { toModifierDoubleTapEvent } from '../../../../shared/modifier-double-tap-detector' import type { FloatingTerminalPanelLocalState } from './use-floating-terminal-panel-local-state' import type { FloatingTerminalPanelShortcuts } from './use-floating-terminal-panel-shortcuts' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' const FLOATING_TAB_SWITCH_ACTIONS: readonly KeybindingActionId[] = [ 'tab.nextSameType', diff --git a/src/renderer/src/components/floating-terminal/use-floating-terminal-panel-shortcuts.ts b/src/renderer/src/components/floating-terminal/use-floating-terminal-panel-shortcuts.ts index 766a2e8a017..96a4685fc45 100644 --- a/src/renderer/src/components/floating-terminal/use-floating-terminal-panel-shortcuts.ts +++ b/src/renderer/src/components/floating-terminal/use-floating-terminal-panel-shortcuts.ts @@ -6,7 +6,7 @@ import { matchFloatingWorkspacePanelShortcut } from '@/lib/floating-workspace-shortcut-policy' import { isFloatingWorkspaceTerminalInputTarget } from '@/lib/floating-workspace-terminal-actions' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { requestTerminalTabRename } from '@/components/tab-bar/terminal-tab-rename-request' import { resolveTerminalAgentTabShortcut } from '@/components/terminal-agent-tab-shortcut' import { launchFloatingWorkspaceAgentShortcut } from '@/components/agent-tab-shortcut-launch' diff --git a/src/renderer/src/components/github-item-dialog/discuss-item/comment-reply-form.tsx b/src/renderer/src/components/github-item-dialog/discuss-item/comment-reply-form.tsx index 2e61e0b98b9..ccd49525724 100644 --- a/src/renderer/src/components/github-item-dialog/discuss-item/comment-reply-form.tsx +++ b/src/renderer/src/components/github-item-dialog/discuss-item/comment-reply-form.tsx @@ -8,7 +8,7 @@ import type { GitHubImageUploadAddress } from '@/components/github/github-image- import { getCommentBodySubmitState, hasBoundedCommentBodyText -} from '@/lib/comment-body-submit-state' +} from '@/lib/source-control/review/comments/comment-body-submit-state' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/github-item-dialog/discuss-item/conversation-tab.tsx b/src/renderer/src/components/github-item-dialog/discuss-item/conversation-tab.tsx index 970ec2d78e4..6d1183f74f7 100644 --- a/src/renderer/src/components/github-item-dialog/discuss-item/conversation-tab.tsx +++ b/src/renderer/src/components/github-item-dialog/discuss-item/conversation-tab.tsx @@ -6,7 +6,7 @@ import { getPRCommentAudienceCounts, type PRCommentAudienceFilter } from '../../../../../shared/source-control/review-comments/pr-comment-audience' -import { usePRBotAuthorOverrides } from '@/lib/pr-bot-author-overrides' +import { usePRBotAuthorOverrides } from '@/lib/source-control/review/pr-bot-author-overrides' import { groupPRComments } from '../../../../../shared/source-control/review-comments/pr-comment-groups' import { getCommentReplyTargetCandidates, @@ -18,9 +18,9 @@ import { } from '@/components/right-sidebar/checks-panel/comments/pr-comments-ai-launch-ack' import { buildPRCommentConversationReplyBody } from '@/components/right-sidebar/checks-panel/comments/pr-comment-fixing-reply-body' import { useAppStore } from '@/store' -import { canUseGitHubRepoContext } from '@/lib/github-source-runtime-context' +import { canUseGitHubRepoContext } from '@/lib/work-items/github/github-source-runtime-context' import { getGitHubMutationTarget } from '@/components/github/github-work-item-mutation-target' -import { taskSourceRuntimeTarget } from '@/lib/task-source-runtime-target' +import { taskSourceRuntimeTarget } from '@/lib/work-items/task-source-runtime-target' import { githubCommentImageUploadAddress } from '@/components/github/github-comment-image-upload-address' import { resolveGitHubBodyDraft, @@ -57,7 +57,7 @@ import { GHCommentComposer } from './gh-comment-composer' import { ConversationTabDescription } from './conversation-tab-description' import { ConversationTabActivity } from './conversation-tab-activity' import { ConversationTabPRSidebar } from './conversation-tab-pr-sidebar' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export function ConversationTab({ item, diff --git a/src/renderer/src/components/github-item-dialog/discuss-item/gh-comment-composer.tsx b/src/renderer/src/components/github-item-dialog/discuss-item/gh-comment-composer.tsx index 8cc593a2043..26eb86b4117 100644 --- a/src/renderer/src/components/github-item-dialog/discuss-item/gh-comment-composer.tsx +++ b/src/renderer/src/components/github-item-dialog/discuss-item/gh-comment-composer.tsx @@ -10,14 +10,14 @@ import { githubCommentImageUploadAddress } from '@/components/github/github-comm import { getCommentBodySubmitState, hasBoundedCommentBodyText -} from '@/lib/comment-body-submit-state' +} from '@/lib/source-control/review/comments/comment-body-submit-state' import { addIssueCommentForRepo } from '@/components/github/github-work-item-comment-mutations' import type { PRComment } from '../../../../../shared/github/comment-types' import type { GitHubOwnerRepo } from '../../../../../shared/github/pull-request-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export function GHCommentComposer({ className, diff --git a/src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-section.tsx b/src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-section.tsx index 47de49ec951..33995bb59e0 100644 --- a/src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-section.tsx +++ b/src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-section.tsx @@ -5,7 +5,7 @@ import { useRepoLabels, useRepoAssignees } from '@/hooks/useGitHubRepoMetadata' import { useImmediateMutation } from '@/hooks/useIssueMetadata' import { useRepoLabelsBySlug, useRepoAssigneesBySlug } from '@/hooks/useGitHubSlugMetadata' import { githubRepoIdentityKey } from '../../../../../shared/github/repository-identity-key' -import { getGitHubRepoRoutingTarget } from '@/lib/github-source-runtime-context' +import { getGitHubRepoRoutingTarget } from '@/lib/work-items/github/github-source-runtime-context' import { getTaskPageGitHubDuplicateCandidates, getTaskPageGitHubDuplicateTargetErrorMessage, diff --git a/src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-task-record.ts b/src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-task-record.ts index 1c9f635ab46..b2a4d780105 100644 --- a/src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-task-record.ts +++ b/src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-task-record.ts @@ -1,5 +1,5 @@ import { useAppStore } from '@/store' -import { getWorkItemRepo } from '@/lib/work-item-repo-row' +import { getWorkItemRepo } from '@/lib/work-items/work-item-repo-row' import { untrackedTaskOperation, type TaskChange } from '@/store/github/task-records/task-change' import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' diff --git a/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-actions.ts b/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-actions.ts index ecb9b2d7104..b1813f82765 100644 --- a/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-actions.ts +++ b/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-actions.ts @@ -1,4 +1,4 @@ -import { readPRCheckRefreshOwner } from '@/lib/pr-check-refresh-owner' +import { readPRCheckRefreshOwner } from '@/lib/source-control/checks/pr-check-refresh-owner' import type React from 'react' import { toast } from 'sonner' import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' @@ -8,15 +8,18 @@ import { type GitHubChecksContextOwner, type GitHubChecksTabState } from '@/components/github-checks-tab-state' -import { getGitHubRuntimeRepoId, type GitHubRuntimeHost } from '@/lib/github-source-runtime-context' -import { startFixChecksAgent } from '@/lib/fix-checks-agent-launch' +import { + getGitHubRuntimeRepoId, + type GitHubRuntimeHost +} from '@/lib/work-items/github/github-source-runtime-context' +import { startFixChecksAgent } from '@/lib/source-control/checks/fix-checks-agent-launch' import { buildFixBrokenChecksPrompt } from '../../../../../shared/source-control/checks/pr-checks-fix-prompt' import type { PRCheckDetail } from '../../../../../shared/github/check-types' import type { GitHubOwnerRepo } from '../../../../../shared/github/pull-request-types' import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import { translate } from '@/i18n/i18n' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' type RuntimeHost = GitHubRuntimeHost | null diff --git a/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-request-details.ts b/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-request-details.ts index cc4fad7ba1d..c9877e753da 100644 --- a/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-request-details.ts +++ b/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-request-details.ts @@ -11,7 +11,7 @@ import { settleGitHubChecksTabDetails, type CheckDetailsLoadState } from '@/components/github-checks-tab-state' -import { getGitHubRuntimeRepoId } from '@/lib/github-source-runtime-context' +import { getGitHubRuntimeRepoId } from '@/lib/work-items/github/github-source-runtime-context' import type { PRCheckDetail } from '../../../../../shared/github/check-types' import { translate } from '@/i18n/i18n' import type { ChecksTabActionContext } from './checks-tab-actions' diff --git a/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab.tsx b/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab.tsx index 1c688842f40..807ef270d75 100644 --- a/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab.tsx +++ b/src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab.tsx @@ -14,7 +14,7 @@ import { import { canUseGitHubRepoContext, getGitHubSourceRuntimeHost -} from '@/lib/github-source-runtime-context' +} from '@/lib/work-items/github/github-source-runtime-context' import { getBrokenChecks } from '../../../../../shared/source-control/checks/pr-checks-fix-prompt' import { githubRepoIdentityKey } from '../../../../../shared/github/repository-identity-key' import type { PRCheckDetail } from '../../../../../shared/github/check-types' diff --git a/src/renderer/src/components/github-item-dialog/inspect-pull-request/pr-files-combined-diff-load.ts b/src/renderer/src/components/github-item-dialog/inspect-pull-request/pr-files-combined-diff-load.ts index 918761d60ff..24c0e89f9c3 100644 --- a/src/renderer/src/components/github-item-dialog/inspect-pull-request/pr-files-combined-diff-load.ts +++ b/src/renderer/src/components/github-item-dialog/inspect-pull-request/pr-files-combined-diff-load.ts @@ -21,7 +21,7 @@ import type { import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import { translate } from '@/i18n/i18n' import { loadPRFileContents } from '../load-item-details/pr-file-content-cache' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' type LoadSectionArgs = { index: number diff --git a/src/renderer/src/components/github-item-dialog/land-pull-request/pr-actions-panel.tsx b/src/renderer/src/components/github-item-dialog/land-pull-request/pr-actions-panel.tsx index 09e1be54910..287b84a6294 100644 --- a/src/renderer/src/components/github-item-dialog/land-pull-request/pr-actions-panel.tsx +++ b/src/renderer/src/components/github-item-dialog/land-pull-request/pr-actions-panel.tsx @@ -10,7 +10,7 @@ import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import { getGitHubRepoRoutingTarget, getGitHubRuntimeRepoId -} from '@/lib/github-source-runtime-context' +} from '@/lib/work-items/github/github-source-runtime-context' import { presentGitHubPRMergeState } from '@/components/github-pr-merge-state' import { resolveGitHubPRMergeMethods } from '../../../../../shared/github/pull-request-merge-methods' import type { GitHubPRMergeMethod } from '../../../../../shared/github/pull-request-types' @@ -29,7 +29,7 @@ import { runPullRequestStateUpdate } from '@/components/github/github-work-item- import type { GitHubItemDialogProjectOrigin } from '../load-item-details/github-item-dialog-types' import { PRActionsMergeMenu } from './pr-actions-merge-menu' import { WorkItemStateBadge } from '../load-item-details/work-item-state-badge' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export function PRActionsPanel({ item, diff --git a/src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-panel.tsx b/src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-panel.tsx index d93837961de..b2c0d13782e 100644 --- a/src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-panel.tsx +++ b/src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-panel.tsx @@ -15,7 +15,7 @@ import type { GitHubAssignableUser } from '../../../../../shared/github/pull-req import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import { useTranslate } from '@/i18n/use-translate' -import { getGitHubRepoRoutingTarget } from '@/lib/github-source-runtime-context' +import { getGitHubRepoRoutingTarget } from '@/lib/work-items/github/github-source-runtime-context' import { resolvePullRequestRepo } from '@/components/github/github-work-item-identity' import { mergeReviewerSuggestions } from '@/components/github/work-item-state-presentation' import type { GitHubItemDialogProjectOrigin } from '../load-item-details/github-item-dialog-types' diff --git a/src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-request-actions.ts b/src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-request-actions.ts index ec2724fc104..f5a64a990cc 100644 --- a/src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-request-actions.ts +++ b/src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-request-actions.ts @@ -1,7 +1,7 @@ import { toast } from 'sonner' import { useAppStore } from '@/store' import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' -import { getGitHubRuntimeRepoId } from '@/lib/github-source-runtime-context' +import { getGitHubRuntimeRepoId } from '@/lib/work-items/github/github-source-runtime-context' import { normalizeGitHubReviewerLogins, parseGitHubReviewerInputLogins @@ -16,7 +16,7 @@ import type { GitHubWorkItem } from '../../../../../shared/github/work-item-type import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import type { RuntimeClientTarget } from '../../../../../shared/runtime-client-target' import { translate } from '@/i18n/i18n' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' type ReviewerRequestArgs = { submitting: boolean diff --git a/src/renderer/src/components/github-item-dialog/load-item-details/github-work-item-target-context.ts b/src/renderer/src/components/github-item-dialog/load-item-details/github-work-item-target-context.ts index 6f4b98db0fe..e23c482ae78 100644 --- a/src/renderer/src/components/github-item-dialog/load-item-details/github-work-item-target-context.ts +++ b/src/renderer/src/components/github-item-dialog/load-item-details/github-work-item-target-context.ts @@ -1,5 +1,5 @@ import { useGitHubOperationOwner } from '@/hooks/useGitHubOperationScope' -import { canUseGitHubRepoContext } from '@/lib/github-source-runtime-context' +import { canUseGitHubRepoContext } from '@/lib/work-items/github/github-source-runtime-context' import { resolvePullRequestRepo, parseOwnerRepoFromItemUrl diff --git a/src/renderer/src/components/github-item-dialog/load-item-details/pr-file-content-cache.ts b/src/renderer/src/components/github-item-dialog/load-item-details/pr-file-content-cache.ts index 8bf5548abc8..b5a88077926 100644 --- a/src/renderer/src/components/github-item-dialog/load-item-details/pr-file-content-cache.ts +++ b/src/renderer/src/components/github-item-dialog/load-item-details/pr-file-content-cache.ts @@ -2,7 +2,7 @@ import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import { getGitHubRuntimeRepoId, getGitHubSourceRuntimeHost -} from '@/lib/github-source-runtime-context' +} from '@/lib/work-items/github/github-source-runtime-context' import { PR_FILE_CONTENT_CACHE_MAX_BYTES, getRetainedPRFileContentsByteCount diff --git a/src/renderer/src/components/github-item-dialog/load-item-details/use-github-task-refresh.ts b/src/renderer/src/components/github-item-dialog/load-item-details/use-github-task-refresh.ts index 3ed44582f86..ea74f808637 100644 --- a/src/renderer/src/components/github-item-dialog/load-item-details/use-github-task-refresh.ts +++ b/src/renderer/src/components/github-item-dialog/load-item-details/use-github-task-refresh.ts @@ -2,9 +2,12 @@ import { useGitHubItemTargetIdentity } from './github-work-item-target-context' import { toast } from 'sonner' import { translate } from '@/i18n/i18n' import { runtimeEnvironmentSupportsCapability } from '@/runtime/rpc/compatibility/runtime-capability-proof' -import { getGitHubSourceRuntimeHost } from '@/lib/github-source-runtime-context' +import { getGitHubSourceRuntimeHost } from '@/lib/work-items/github/github-source-runtime-context' import { GITHUB_CANONICAL_DETAILS_RUNTIME_CAPABILITY } from '../../../../../shared/work-items/task-source-runtime-capabilities' -import { githubTaskExecutionIdentity, captureGitHubTaskTarget } from '@/lib/github-task-target' +import { + githubTaskExecutionIdentity, + captureGitHubTaskTarget +} from '@/lib/work-items/github/github-task-target' import { useCallback, useLayoutEffect, @@ -25,7 +28,7 @@ import { startWorkItemDetailsFetch, loadCanonicalGitHubTaskDetails } from './work-item-details-fetch-settle' -import { getWorkItemRepo } from '@/lib/work-item-repo-row' +import { getWorkItemRepo } from '@/lib/work-items/work-item-repo-row' import { useMountedRef } from '@/hooks/useMountedRef' export function useGitHubTaskRefresh({ diff --git a/src/renderer/src/components/github-item-dialog/load-item-details/use-github-work-item-details.ts b/src/renderer/src/components/github-item-dialog/load-item-details/use-github-work-item-details.ts index 89abe0ab33c..9a170dc3946 100644 --- a/src/renderer/src/components/github-item-dialog/load-item-details/use-github-work-item-details.ts +++ b/src/renderer/src/components/github-item-dialog/load-item-details/use-github-work-item-details.ts @@ -8,7 +8,7 @@ import { import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from 'react' import { useGitHubTaskItems } from '@/hooks/useGitHubTaskItems' import { useGitHubTaskRefresh } from './use-github-task-refresh' -import { addressedGitHubIssueItem } from '@/lib/github-task-target' +import { addressedGitHubIssueItem } from '@/lib/work-items/github/github-task-target' import { normalizeItemDialogTab, type ItemDialogTab diff --git a/src/renderer/src/components/github-item-dialog/load-item-details/work-item-details-fetch-settle.ts b/src/renderer/src/components/github-item-dialog/load-item-details/work-item-details-fetch-settle.ts index 52a9b019549..731bef192ed 100644 --- a/src/renderer/src/components/github-item-dialog/load-item-details/work-item-details-fetch-settle.ts +++ b/src/renderer/src/components/github-item-dialog/load-item-details/work-item-details-fetch-settle.ts @@ -12,7 +12,10 @@ import type { } from '../../../../../shared/github/work-item-types' import type { GitHubTaskRecordCache } from '@/store/github/task-records/task-record-cache' import type { TaskBinding } from '@/store/github/task-records/task-record-model' -import { githubTaskRpcOptions, type GitHubTaskTarget } from '@/lib/github-task-target' +import { + githubTaskRpcOptions, + type GitHubTaskTarget +} from '@/lib/work-items/github/github-task-target' import { useAppStore } from '@/store' import { lookupGitHubWorkItemDetailsForSource } from '@/lib/work-items/github/github-work-item-source-lookup' import { diff --git a/src/renderer/src/components/github-item-dialog/open-dialog/github-item-dialog-pr-tabs.tsx b/src/renderer/src/components/github-item-dialog/open-dialog/github-item-dialog-pr-tabs.tsx index d8fb55f4e85..e5aef3265ae 100644 --- a/src/renderer/src/components/github-item-dialog/open-dialog/github-item-dialog-pr-tabs.tsx +++ b/src/renderer/src/components/github-item-dialog/open-dialog/github-item-dialog-pr-tabs.tsx @@ -6,7 +6,7 @@ import { resolvePullRequestRepo, type ItemDialogTab } from '@/components/github/github-work-item-identity' -import { canUseGitHubRepoContext } from '@/lib/github-source-runtime-context' +import { canUseGitHubRepoContext } from '@/lib/work-items/github/github-source-runtime-context' import { useTranslate } from '@/i18n/use-translate' import type { PRComment } from '../../../../../shared/github/comment-types' import type { GitHubAssignableUser } from '../../../../../shared/github/pull-request-types' diff --git a/src/renderer/src/components/github-project/ProjectCellValueEditors.tsx b/src/renderer/src/components/github-project/ProjectCellValueEditors.tsx index a8601e7c780..953861adb2e 100644 --- a/src/renderer/src/components/github-project/ProjectCellValueEditors.tsx +++ b/src/renderer/src/components/github-project/ProjectCellValueEditors.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React, { useState } from 'react' import { Plus } from 'lucide-react' import { Input } from '@/components/ui/input' diff --git a/src/renderer/src/components/github-project/ProjectViewToolbar.tsx b/src/renderer/src/components/github-project/ProjectViewToolbar.tsx index 73563a511ce..7fc50b8eb72 100644 --- a/src/renderer/src/components/github-project/ProjectViewToolbar.tsx +++ b/src/renderer/src/components/github-project/ProjectViewToolbar.tsx @@ -7,7 +7,7 @@ import { useTranslate } from '@/i18n/use-translate' import ProjectPicker from './ProjectPicker' import type { ProjectViewTableState } from './useProjectViewTable' import { githubProjectHost } from '../../../../shared/github/project-identity' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' import { openAppHttpLink } from '@/lib/browser/navigation/app-http-link-open' export function ProjectViewToolbar({ tableState }: { tableState: ProjectViewTableState }) { diff --git a/src/renderer/src/components/github-project/ProjectViewWrapper.tsx b/src/renderer/src/components/github-project/ProjectViewWrapper.tsx index c19fe2e6746..31bfc095261 100644 --- a/src/renderer/src/components/github-project/ProjectViewWrapper.tsx +++ b/src/renderer/src/components/github-project/ProjectViewWrapper.tsx @@ -22,7 +22,7 @@ import type { GitHubProjectRow } from '../../../../shared/github/project-types' import type { ExecutionHostId } from '../../../../shared/execution-host' -import { taskSourceRuntimeTarget } from '@/lib/task-source-runtime-target' +import { taskSourceRuntimeTarget } from '@/lib/work-items/task-source-runtime-target' import { openAppHttpLink } from '@/lib/browser/navigation/app-http-link-open' type Props = { diff --git a/src/renderer/src/components/github-project/project-dialog-state.ts b/src/renderer/src/components/github-project/project-dialog-state.ts index 5e0f68a40c3..cbd76e63136 100644 --- a/src/renderer/src/components/github-project/project-dialog-state.ts +++ b/src/renderer/src/components/github-project/project-dialog-state.ts @@ -1,5 +1,5 @@ import type { Repo } from '../../../../shared/repo-types' -import { getWorkItemRepo, type WorkItemRepoRef } from '@/lib/work-item-repo-row' +import { getWorkItemRepo, type WorkItemRepoRef } from '@/lib/work-items/work-item-repo-row' type RepoBackedProjectDialogState = { repoId: string diff --git a/src/renderer/src/components/github-project/slug-dialog/Comments.tsx b/src/renderer/src/components/github-project/slug-dialog/Comments.tsx index eb793aaf212..34898a7015e 100644 --- a/src/renderer/src/components/github-project/slug-dialog/Comments.tsx +++ b/src/renderer/src/components/github-project/slug-dialog/Comments.tsx @@ -8,7 +8,7 @@ import { gitHubSlugApiForTarget } from '@/runtime/repository-github/github-slug- import { getCommentBodySubmitState, hasBoundedCommentBodyText -} from '@/lib/comment-body-submit-state' +} from '@/lib/source-control/review/comments/comment-body-submit-state' import type { PRComment } from '../../../../../shared/github/comment-types' import { useTranslate } from '@/i18n/use-translate' import { projectViewErrorMessage } from '../project-view-error-copy' diff --git a/src/renderer/src/components/github/GitHubImageTextarea.tsx b/src/renderer/src/components/github/GitHubImageTextarea.tsx index 76b9b732819..ef54656ade2 100644 --- a/src/renderer/src/components/github/GitHubImageTextarea.tsx +++ b/src/renderer/src/components/github/GitHubImageTextarea.tsx @@ -1,5 +1,5 @@ import { useCallback, useRef, type ComponentProps, type Ref } from 'react' -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import { useGitHubTextareaImages } from './use-github-textarea-images' import type { GitHubImageIntake } from './use-github-image-uploads' diff --git a/src/renderer/src/components/github/PRAssigneesPanel.tsx b/src/renderer/src/components/github/PRAssigneesPanel.tsx index 375b3496739..10835e82c6f 100644 --- a/src/renderer/src/components/github/PRAssigneesPanel.tsx +++ b/src/renderer/src/components/github/PRAssigneesPanel.tsx @@ -9,7 +9,7 @@ import { useAppStore } from '@/store' import { useImmediateMutation } from '@/hooks/useIssueMetadata' import { useRepoAssignees } from '@/hooks/useGitHubRepoMetadata' import { useRepoAssigneesBySlug } from '@/hooks/useGitHubSlugMetadata' -import { getGitHubRepoRoutingTarget } from '@/lib/github-source-runtime-context' +import { getGitHubRepoRoutingTarget } from '@/lib/work-items/github/github-source-runtime-context' import { parseOwnerRepoFromItemUrl, resolvePullRequestRepo, diff --git a/src/renderer/src/components/github/github-comment-image-upload-address.ts b/src/renderer/src/components/github/github-comment-image-upload-address.ts index 5ef4f06ce8b..d732709ac49 100644 --- a/src/renderer/src/components/github/github-comment-image-upload-address.ts +++ b/src/renderer/src/components/github/github-comment-image-upload-address.ts @@ -4,7 +4,7 @@ import type { GitHubOwnerRepo } from '../../../../shared/github/pull-request-typ import { getGitHubRuntimeRepoId, getGitHubSourceRuntimeHost -} from '@/lib/github-source-runtime-context' +} from '@/lib/work-items/github/github-source-runtime-context' export function githubCommentImageUploadAddress(args: { repoId?: string | null diff --git a/src/renderer/src/components/github/github-image-upload.ts b/src/renderer/src/components/github/github-image-upload.ts index ef7234836ad..dafef68f422 100644 --- a/src/renderer/src/components/github/github-image-upload.ts +++ b/src/renderer/src/components/github/github-image-upload.ts @@ -10,7 +10,7 @@ import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import { getRuntimeEnvironmentRevision } from '@/runtime/rpc/environment-revisions/runtime-environment-revision' import { isWebClientLocation } from '@/lib/web-client-location' import { readStoredWebRuntimeEnvironment } from '@/web/web-runtime-environment' -import { blobToBase64 } from '@/lib/image-blob-png' +import { blobToBase64 } from '@/lib/clipboard/images/image-blob-png' export type GitHubImageUploadAddress = { runtime: RuntimeClientTarget diff --git a/src/renderer/src/components/github/github-work-item-comment-mutations.ts b/src/renderer/src/components/github/github-work-item-comment-mutations.ts index 539a46f97bb..0fc458701cf 100644 --- a/src/renderer/src/components/github/github-work-item-comment-mutations.ts +++ b/src/renderer/src/components/github/github-work-item-comment-mutations.ts @@ -9,7 +9,7 @@ import { emitGitHubWorkItemDetailsCacheMutation } from '@/lib/work-items/github/ import { getGitHubRuntimeRepoId, getGitHubSourceRuntimeHost -} from '@/lib/github-source-runtime-context' +} from '@/lib/work-items/github/github-source-runtime-context' import type { TaskSourceContext } from '../../../../shared/work-items/task-source-context' import type { GitHubOwnerRepo } from '../../../../shared/github/pull-request-types' diff --git a/src/renderer/src/components/github/github-work-item-edit-mutations.ts b/src/renderer/src/components/github/github-work-item-edit-mutations.ts index 7fd728fad03..91ddcd150b4 100644 --- a/src/renderer/src/components/github/github-work-item-edit-mutations.ts +++ b/src/renderer/src/components/github/github-work-item-edit-mutations.ts @@ -8,8 +8,8 @@ import { getGitHubRepoRoutingTarget, getGitHubRuntimeRepoId, getGitHubSourceRuntimeHost -} from '@/lib/github-source-runtime-context' -import { taskSourceRuntimeTarget } from '@/lib/task-source-runtime-target' +} from '@/lib/work-items/github/github-source-runtime-context' +import { taskSourceRuntimeTarget } from '@/lib/work-items/task-source-runtime-target' import { resolvePullRequestRepo, type GitHubWorkItemProjectOrigin @@ -19,7 +19,7 @@ import { githubProjectHost } from '../../../../shared/github/project-identity' import type { TaskSourceContext } from '../../../../shared/work-items/task-source-context' import type { GitHubOwnerRepo } from '../../../../shared/github/pull-request-types' import type { GitHubWorkItem } from '../../../../shared/github/work-item-types' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export async function runIssueUpdate(args: { repoPath: string | null diff --git a/src/renderer/src/components/gitlab-item-dialog/gitlab-files-tab.tsx b/src/renderer/src/components/gitlab-item-dialog/gitlab-files-tab.tsx index 4e6a073a202..4bf55161799 100644 --- a/src/renderer/src/components/gitlab-item-dialog/gitlab-files-tab.tsx +++ b/src/renderer/src/components/gitlab-item-dialog/gitlab-files-tab.tsx @@ -2,7 +2,7 @@ import { LoaderCircle, Send } from 'lucide-react' import { Button } from '@/components/ui/button' import { TabsContent } from '@/components/ui/tabs' import { useTranslate } from '@/i18n/use-translate' -import { hasBoundedCommentBodyText } from '@/lib/comment-body-submit-state' +import { hasBoundedCommentBodyText } from '@/lib/source-control/review/comments/comment-body-submit-state' import type { GitLabWorkItem } from '../../../../shared/gitlab-types' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' import type { GitLabReviewActions } from './use-gitlab-review-actions' diff --git a/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-view.tsx b/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-view.tsx index 5e697a39dbf..979650d08be 100644 --- a/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-view.tsx +++ b/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-view.tsx @@ -1,4 +1,4 @@ -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import { CircleDot, ExternalLink, GitMerge, LoaderCircle, RefreshCw, Send, X } from 'lucide-react' import * as VisuallyHidden from 'radix-ui/visually-hidden' import { Button } from '@/components/ui/button' @@ -11,7 +11,7 @@ import { } from '@/components/ui/sheet' import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs' import { useTranslate } from '@/i18n/use-translate' -import { hasBoundedCommentBodyText } from '@/lib/comment-body-submit-state' +import { hasBoundedCommentBodyText } from '@/lib/source-control/review/comments/comment-body-submit-state' import { isScreenSubmitShortcut } from '@/lib/screen-submit-shortcut' import type { GitLabWorkItem } from '../../../../shared/gitlab-types' import { normalizeGitLabLabels, StateBadge } from '../gitlab-item-dialog-parts' diff --git a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-details-editing.ts b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-details-editing.ts index bad709e7959..1c0c77dfa85 100644 --- a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-details-editing.ts +++ b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-details-editing.ts @@ -12,7 +12,7 @@ import { } from '../gitlab-item-dialog-parts' import type { GitLabDialogRepoSelector } from './gitlab-item-dialog-types' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export function useGitLabDetailsEditing( item: GitLabWorkItem | null, diff --git a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-pipeline-actions.ts b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-pipeline-actions.ts index d191255dd23..74399d9933f 100644 --- a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-pipeline-actions.ts +++ b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-pipeline-actions.ts @@ -6,7 +6,7 @@ import type { GitLabPipelineJob, GitLabWorkItem } from '../../../../shared/gitla import { showGitLabMutationError } from '../gitlab-item-dialog-parts' import type { GitLabDialogRepoSelector } from './gitlab-item-dialog-types' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export function useGitLabPipelineActions( item: GitLabWorkItem | null, diff --git a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-primary-actions.ts b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-primary-actions.ts index 12f7951d25c..b59f1288ddc 100644 --- a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-primary-actions.ts +++ b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-primary-actions.ts @@ -1,14 +1,14 @@ import { gitLabApiFor } from '@/runtime/repository-gitlab/gitlab-owner-api' import { useCallback } from 'react' import { toast } from 'sonner' -import { getCommentBodySubmitState } from '@/lib/comment-body-submit-state' +import { getCommentBodySubmitState } from '@/lib/source-control/review/comments/comment-body-submit-state' import { translate } from '@/i18n/i18n' import { useAppStore } from '@/store' import type { GitLabWorkItem } from '../../../../shared/gitlab-types' import { showGitLabMutationError } from '../gitlab-item-dialog-parts' import type { GitLabDialogRepoSelector } from './gitlab-item-dialog-types' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export function useGitLabPrimaryActions( item: GitLabWorkItem | null, diff --git a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-review-actions.ts b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-review-actions.ts index 74a6b6fde3b..3cf5276d92b 100644 --- a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-review-actions.ts +++ b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-review-actions.ts @@ -1,14 +1,14 @@ import { gitLabApiFor } from '@/runtime/repository-gitlab/gitlab-owner-api' import { useCallback } from 'react' import { toast } from 'sonner' -import { getCommentBodySubmitState } from '@/lib/comment-body-submit-state' +import { getCommentBodySubmitState } from '@/lib/source-control/review/comments/comment-body-submit-state' import { translate } from '@/i18n/i18n' import { useAppStore } from '@/store' import type { GitLabAssignableUser, GitLabWorkItem } from '../../../../shared/gitlab-types' import { dedupeGitLabUsers, showGitLabMutationError } from '../gitlab-item-dialog-parts' import type { GitLabDialogRepoSelector } from './gitlab-item-dialog-types' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export function useGitLabReviewActions( item: GitLabWorkItem | null, diff --git a/src/renderer/src/components/integrations/source-control/bitbucket-credentials-dialog.tsx b/src/renderer/src/components/integrations/source-control/bitbucket-credentials-dialog.tsx index 83b5cee741f..504d987419b 100644 --- a/src/renderer/src/components/integrations/source-control/bitbucket-credentials-dialog.tsx +++ b/src/renderer/src/components/integrations/source-control/bitbucket-credentials-dialog.tsx @@ -18,7 +18,7 @@ import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group' import { cn } from '@/lib/utils' import { hasRemoteProviderRuntime } from '@/runtime/hosts/observations/provider-runtime-context' import { preventOutsideDismissWhenDirty } from '@/lib/outside-dismiss-guard' -import { bitbucketConnectErrorText } from '@/lib/bitbucket-connect-error-copy' +import { bitbucketConnectErrorText } from '@/lib/source-control/remote/bitbucket-connect-error-copy' import { useTranslate } from '@/i18n/use-translate' import { BitbucketApiTokenScopes } from './bitbucket-api-token-scopes' diff --git a/src/renderer/src/components/integrations/task-trackers/jira-integration-card.tsx b/src/renderer/src/components/integrations/task-trackers/jira-integration-card.tsx index 30658c5c339..d67934da8c6 100644 --- a/src/renderer/src/components/integrations/task-trackers/jira-integration-card.tsx +++ b/src/renderer/src/components/integrations/task-trackers/jira-integration-card.tsx @@ -1,4 +1,4 @@ -import { taskProviderErrorMessage } from '@/lib/task-provider-error-copy' +import { taskProviderErrorMessage } from '@/lib/work-items/task-provider-error-copy' import { UnsealedCredentialNotice } from '../../provider-accounts/UnsealedCredentialNotice' import { useState } from 'react' import { AlertCircle, CheckCircle2, LoaderCircle, Unlink } from 'lucide-react' diff --git a/src/renderer/src/components/integrations/task-trackers/linear-integration-card.tsx b/src/renderer/src/components/integrations/task-trackers/linear-integration-card.tsx index 41c301b5f4f..62e0a092090 100644 --- a/src/renderer/src/components/integrations/task-trackers/linear-integration-card.tsx +++ b/src/renderer/src/components/integrations/task-trackers/linear-integration-card.tsx @@ -1,4 +1,4 @@ -import { taskProviderErrorMessage } from '@/lib/task-provider-error-copy' +import { taskProviderErrorMessage } from '@/lib/work-items/task-provider-error-copy' import { UnsealedCredentialNotice } from '../../provider-accounts/UnsealedCredentialNotice' import { useState } from 'react' import { AlertCircle, CheckCircle2, LoaderCircle, Unlink } from 'lucide-react' diff --git a/src/renderer/src/components/jira-connect-dialog.tsx b/src/renderer/src/components/jira-connect-dialog.tsx index 808fd39c519..3ae33349c72 100644 --- a/src/renderer/src/components/jira-connect-dialog.tsx +++ b/src/renderer/src/components/jira-connect-dialog.tsx @@ -1,5 +1,8 @@ import { jiraCredentialStorageCopy } from './jira-credential-storage-copy' -import { taskProviderErrorMessage, taskProviderErrorText } from '@/lib/task-provider-error-copy' +import { + taskProviderErrorMessage, + taskProviderErrorText +} from '@/lib/work-items/task-provider-error-copy' import { useId, useState } from 'react' import { LoaderCircle, Lock } from 'lucide-react' import { useAppStore } from '@/store' diff --git a/src/renderer/src/components/jira-issue-mutation-queue.ts b/src/renderer/src/components/jira-issue-mutation-queue.ts index a2da7cf0264..de77986a4b9 100644 --- a/src/renderer/src/components/jira-issue-mutation-queue.ts +++ b/src/renderer/src/components/jira-issue-mutation-queue.ts @@ -1,4 +1,4 @@ -import { taskProviderErrorMessage } from '@/lib/task-provider-error-copy' +import { taskProviderErrorMessage } from '@/lib/work-items/task-provider-error-copy' import type { JiraIssue, JiraMutationResult } from '../../../shared/jira/jira-types' import type { GlobalSettings } from '../../../shared/global-settings-types' import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' diff --git a/src/renderer/src/components/jira-issue-transition-control.tsx b/src/renderer/src/components/jira-issue-transition-control.tsx index c43bfcfb515..517a138891e 100644 --- a/src/renderer/src/components/jira-issue-transition-control.tsx +++ b/src/renderer/src/components/jira-issue-transition-control.tsx @@ -1,4 +1,7 @@ -import { taskProviderErrorMessage, taskProviderErrorText } from '@/lib/task-provider-error-copy' +import { + taskProviderErrorMessage, + taskProviderErrorText +} from '@/lib/work-items/task-provider-error-copy' import { useState } from 'react' import { ChevronDown, CircleAlert, ExternalLink, Loader2 } from 'lucide-react' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/jira-issue-workspace-actions.ts b/src/renderer/src/components/jira-issue-workspace-actions.ts index dcf574e9139..58187c693ce 100644 --- a/src/renderer/src/components/jira-issue-workspace-actions.ts +++ b/src/renderer/src/components/jira-issue-workspace-actions.ts @@ -10,7 +10,7 @@ import type { } from '../../../shared/jira/jira-types' import { applyJiraIssueKeyCasing } from '../../../shared/workspace-name' import type { WorkspaceSeedNameOptions } from '../../../shared/workspace-name' -import { getJiraIssueKeyCasingSeedOptions } from '@/lib/jira-issue-key-casing' +import { getJiraIssueKeyCasingSeedOptions } from '@/lib/work-items/jira/jira-issue-key-casing' import { buildJiraIssuePrompt } from './jira-prompt-templates' import { issueCopiedMessage, diff --git a/src/renderer/src/components/jira-transition-fields-form.tsx b/src/renderer/src/components/jira-transition-fields-form.tsx index 1cbef07b564..d3b733df0bd 100644 --- a/src/renderer/src/components/jira-transition-fields-form.tsx +++ b/src/renderer/src/components/jira-transition-fields-form.tsx @@ -10,7 +10,7 @@ import { } from '@/components/ui/select' import { Textarea } from '@/components/ui/textarea' import { useTranslate } from '@/i18n/use-translate' -import { getCommentBodySubmitState } from '@/lib/comment-body-submit-state' +import { getCommentBodySubmitState } from '@/lib/source-control/review/comments/comment-body-submit-state' import { buildResolutionFieldValue, classifyTransitionRequirements, diff --git a/src/renderer/src/components/linear-api-key-dialog.tsx b/src/renderer/src/components/linear-api-key-dialog.tsx index ef8c99daa83..655243e224b 100644 --- a/src/renderer/src/components/linear-api-key-dialog.tsx +++ b/src/renderer/src/components/linear-api-key-dialog.tsx @@ -1,4 +1,7 @@ -import { taskProviderErrorMessage, taskProviderErrorText } from '@/lib/task-provider-error-copy' +import { + taskProviderErrorMessage, + taskProviderErrorText +} from '@/lib/work-items/task-provider-error-copy' import { useId, useMemo, useState } from 'react' import { ExternalLink, LoaderCircle, Lock } from 'lucide-react' import type { LinearWorkspace } from '../../../shared/linear/workspace-types' diff --git a/src/renderer/src/components/linear-issue-project-selector.tsx b/src/renderer/src/components/linear-issue-project-selector.tsx index e84cad7264c..5067124df84 100644 --- a/src/renderer/src/components/linear-issue-project-selector.tsx +++ b/src/renderer/src/components/linear-issue-project-selector.tsx @@ -1,6 +1,9 @@ import { getLinearSourceScope } from '@/store/slices/linear/linear-slice-scope' import { confirmLinearIssueWrite } from '@/store/slices/linear/linear-issue-publication' -import { taskProviderErrorMessage, taskProviderErrorText } from '@/lib/task-provider-error-copy' +import { + taskProviderErrorMessage, + taskProviderErrorText +} from '@/lib/work-items/task-provider-error-copy' import React, { useCallback, useEffect, useRef, useState } from 'react' import { Check, ChevronDown, FolderKanban, LoaderCircle } from 'lucide-react' import { toast } from 'sonner' diff --git a/src/renderer/src/components/linear-issue-sub-issues.tsx b/src/renderer/src/components/linear-issue-sub-issues.tsx index 66b421c8d86..94c6fefe105 100644 --- a/src/renderer/src/components/linear-issue-sub-issues.tsx +++ b/src/renderer/src/components/linear-issue-sub-issues.tsx @@ -1,6 +1,9 @@ import { observeLinearIssueRead } from '@/store/slices/linear/linear-issue-publication' -import { taskProviderErrorMessage, taskProviderErrorText } from '@/lib/task-provider-error-copy' -import { ImeInput } from '@/lib/ime-text-field' +import { + taskProviderErrorMessage, + taskProviderErrorText +} from '@/lib/work-items/task-provider-error-copy' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { ArrowRight, LoaderCircle, Plus } from 'lucide-react' import { toast } from 'sonner' diff --git a/src/renderer/src/components/linear-issue-workspace-detail-state.ts b/src/renderer/src/components/linear-issue-workspace-detail-state.ts index da7cf56d45e..b63e4d3335d 100644 --- a/src/renderer/src/components/linear-issue-workspace-detail-state.ts +++ b/src/renderer/src/components/linear-issue-workspace-detail-state.ts @@ -3,7 +3,7 @@ import { getLinearSourceScope } from '@/store/slices/linear/linear-slice-scope' import { observeLinearIssueRead } from '@/store/slices/linear/linear-issue-publication' import { useLinearIssuePublication } from '@/hooks/useLinearIssuePublication' import { translate } from '@/i18n/i18n' -import { taskProviderErrorText } from '@/lib/task-provider-error-copy' +import { taskProviderErrorText } from '@/lib/work-items/task-provider-error-copy' import { useCallback, useEffect, useRef, useState } from 'react' import { createNonSecureContextUuid as createBrowserUuid } from '../../../shared/non-secure-context-uuid' diff --git a/src/renderer/src/components/linear-issue-workspace-sidebar.tsx b/src/renderer/src/components/linear-issue-workspace-sidebar.tsx index 5eda5753cb9..3e4131b889d 100644 --- a/src/renderer/src/components/linear-issue-workspace-sidebar.tsx +++ b/src/renderer/src/components/linear-issue-workspace-sidebar.tsx @@ -4,7 +4,7 @@ import { ChevronDown, Clipboard, FolderOpen, GitBranch } from 'lucide-react' import { LinearIssueEditSection, type LinearEditState } from '@/components/LinearItemDrawer' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { buildLinearIssueContextSnapshot } from '@/lib/work-items/linear/linear-issue-context-snapshot' -import { buildContainedLinkedContextBlock } from '@/lib/linked-work-item-context' +import { buildContainedLinkedContextBlock } from '@/lib/work-items/linked-work-item-context' import { useTranslate } from '@/i18n/use-translate' import { buildLinearIssueBranchName } from '@/components/linear-issue-workspace-text' import type { LinearComment, LinearIssue } from '../../../shared/linear/issue-types' diff --git a/src/renderer/src/components/linear-item-drawer-comment-footer.tsx b/src/renderer/src/components/linear-item-drawer-comment-footer.tsx index 17c2bb85662..df0c7ab31e2 100644 --- a/src/renderer/src/components/linear-item-drawer-comment-footer.tsx +++ b/src/renderer/src/components/linear-item-drawer-comment-footer.tsx @@ -1,5 +1,5 @@ -import { taskProviderErrorText } from '@/lib/task-provider-error-copy' -import { ImeTextarea } from '@/lib/ime-text-field' +import { taskProviderErrorText } from '@/lib/work-items/task-provider-error-copy' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import React, { useCallback, useRef, useState } from 'react' import { LoaderCircle, Send } from 'lucide-react' import { toast } from 'sonner' @@ -8,7 +8,7 @@ import { Button } from '@/components/ui/button' import { getCommentBodySubmitState, hasBoundedCommentBodyText -} from '@/lib/comment-body-submit-state' +} from '@/lib/source-control/review/comments/comment-body-submit-state' import { getScreenSubmitShortcutLabel, isScreenSubmitShortcut } from '@/lib/screen-submit-shortcut' import { createNonSecureContextUuid as createBrowserUuid } from '../../../shared/non-secure-context-uuid' import { useAppStore } from '@/store' diff --git a/src/renderer/src/components/linear-item-drawer-edit-controller.tsx b/src/renderer/src/components/linear-item-drawer-edit-controller.tsx index 2b748d5d479..73aa076673d 100644 --- a/src/renderer/src/components/linear-item-drawer-edit-controller.tsx +++ b/src/renderer/src/components/linear-item-drawer-edit-controller.tsx @@ -1,6 +1,9 @@ import { getLinearSourceScope } from '@/store/slices/linear/linear-slice-scope' import { writeLinearIssue } from '@/lib/work-items/linear/linear-issue-write' -import { taskProviderErrorMessage, taskProviderErrorText } from '@/lib/task-provider-error-copy' +import { + taskProviderErrorMessage, + taskProviderErrorText +} from '@/lib/work-items/task-provider-error-copy' import { useCallback, useState } from 'react' import { toast } from 'sonner' diff --git a/src/renderer/src/components/linear-project-view-surfaces.tsx b/src/renderer/src/components/linear-project-view-surfaces.tsx index b437e0d8562..00ecc5477bb 100644 --- a/src/renderer/src/components/linear-project-view-surfaces.tsx +++ b/src/renderer/src/components/linear-project-view-surfaces.tsx @@ -1,5 +1,5 @@ -import { linearIssueReadError } from '@/lib/linear-read-error' -import { taskProviderErrorText } from '@/lib/task-provider-error-copy' +import { linearIssueReadError } from '@/lib/work-items/linear/linear-read-error' +import { taskProviderErrorText } from '@/lib/work-items/task-provider-error-copy' import React from 'react' import { ArrowLeft, ArrowRight, ExternalLink, Layers3, LoaderCircle, RefreshCw } from 'lucide-react' diff --git a/src/renderer/src/components/link-actions/LinkActionPopover.tsx b/src/renderer/src/components/link-actions/LinkActionPopover.tsx index 5c07fc87eea..1df465ac3fd 100644 --- a/src/renderer/src/components/link-actions/LinkActionPopover.tsx +++ b/src/renderer/src/components/link-actions/LinkActionPopover.tsx @@ -5,7 +5,7 @@ import { ShortcutKeyCombo } from '@/components/ShortcutKeyCombo' import { Button } from '@/components/ui/button' import { Popover, PopoverAnchor, PopoverContent } from '@/components/ui/popover' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' -import { useClipboardTextCopyFeedback } from '@/hooks/use-clipboard-text-copy-feedback' +import { useClipboardTextCopyFeedback } from '@/hooks/clipboard/use-clipboard-text-copy-feedback' import { useTranslate } from '@/i18n/use-translate' import { BROWSER_TERMINAL_LINK_ACTIONS_SETTINGS_TARGET_ID } from '@/lib/settings-navigation-types' import { useAppStore } from '@/store' diff --git a/src/renderer/src/components/native-chat/appearance/use-native-chat-font-size.ts b/src/renderer/src/components/native-chat/appearance/use-native-chat-font-size.ts index 2cd2d46aa39..d18ff409dea 100644 --- a/src/renderer/src/components/native-chat/appearance/use-native-chat-font-size.ts +++ b/src/renderer/src/components/native-chat/appearance/use-native-chat-font-size.ts @@ -2,9 +2,9 @@ import { useEffect, type RefObject } from 'react' import { chatFontSizeActionForEvent } from './native-chat-font-size' import { writeNativeChatFontSize } from './native-chat-font-size-write' import { isWebClientLocation } from '@/lib/web-client-location' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { useAppStore } from '../../../store/index' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' export function useNativeChatFontSize( enabled: boolean, diff --git a/src/renderer/src/components/native-chat/attachments/intake/native-chat-composer-workspace-file-drop.test.tsx b/src/renderer/src/components/native-chat/attachments/intake/native-chat-composer-workspace-file-drop.test.tsx index 82ae4618f88..7a31994beb7 100644 --- a/src/renderer/src/components/native-chat/attachments/intake/native-chat-composer-workspace-file-drop.test.tsx +++ b/src/renderer/src/components/native-chat/attachments/intake/native-chat-composer-workspace-file-drop.test.tsx @@ -16,7 +16,7 @@ import type { NativeChatComposerInput } from '../../composer/editor/native-chat- import { NativeChatComposerField } from '../../composer/editor/NativeChatComposerField' import { useNativeChatComposerAttachments } from '../chips/use-native-chat-composer-attachments' import { useNativeChatWorkspaceFileDrop } from './use-native-chat-workspace-file-drop' -import { useImeEnterGestureOwnership } from '@/lib/ime-composition-keyboard-event' +import { useImeEnterGestureOwnership } from '@/lib/text-input/ime/ime-composition-keyboard-event' import type * as RemoteRuntimePtyIdModule from '../../../../../../shared/remote-runtime/remote-runtime-pty-id' const testState: { @@ -282,28 +282,6 @@ describe('native chat workspace file drops', () => { }) // Explorer paths from the same runtime host are readable by its agent. - it('accepts a same-host drop on a remote runtime target and refuses a foreign one', () => { - testState.executionHostId = 'runtime:env-1' - testState.ownerKind = 'remote' - testState.targetIsRemoteRuntime = true - const view = render() - dispatchDragEvent( - 'drop', - editor(), - internalTransfer(['/env/owned.ts'], { executionHostId: 'runtime:env-1' }) - ) - expect(screen.getByTestId('draft').textContent).toBe('@/env/owned.ts ') - view.unmount() - - render() - dispatchDragEvent( - 'drop', - editor(), - internalTransfer(['/elsewhere/foreign.ts'], { executionHostId: 'runtime:env-2' }) - ) - expect(screen.getByTestId('draft').textContent).toBe('') - expect(screen.getByText('Files can only be attached to their source workspace.')).toBeTruthy() - }) it('queues an internal reference until composition settles without stealing focus', () => { render() @@ -319,30 +297,5 @@ describe('native chat workspace file drops', () => { expect(document.activeElement).toBe(input) }) - it('rejects an IME-queued path when its execution host changes before composition settles', () => { - render() - const input = editor() - fireEvent.compositionStart(input) - dispatchDragEvent('drop', input, internalTransfer(['/repo/a.ts'])) - - testState.executionHostId = 'ssh:replacement' - fireEvent.compositionEnd(input, { data: '' }) - - expect(screen.getByTestId('draft').textContent).toBe('preedit') - expect(screen.getByText('Files can only be attached to their source workspace.')).toBeTruthy() - }) - // Recheck current workspace after IME; comparing only captured identities would miss a pane retarget. - it('rejects an IME-queued path when the pane changes workspace before settling', () => { - const view = render() - const input = editor() - fireEvent.compositionStart(input) - dispatchDragEvent('drop', input, internalTransfer(['/repo/a.ts'])) - - view.rerender() - fireEvent.compositionEnd(input, { data: '' }) - - expect(screen.getByTestId('draft').textContent).toBe('preedit') - expect(screen.getByText('Files can only be attached to their source workspace.')).toBeTruthy() - }) }) diff --git a/src/renderer/src/components/native-chat/composer/NativeChatComposerPane.tsx b/src/renderer/src/components/native-chat/composer/NativeChatComposerPane.tsx index 631d6dc531e..442257a4319 100644 --- a/src/renderer/src/components/native-chat/composer/NativeChatComposerPane.tsx +++ b/src/renderer/src/components/native-chat/composer/NativeChatComposerPane.tsx @@ -22,7 +22,7 @@ import { useNativeChatComposerSessionOptions } from './controls/use-native-chat- import { useNativeChatDictation } from './editor/use-native-chat-dictation' import { useNativeChatPtyComposerSend } from './submit/use-native-chat-pty-composer-send' import { useNativeChatStructuredComposerSend } from './submit/use-native-chat-structured-composer-send' -import { useImeEnterGestureOwnership } from '@/lib/ime-composition-keyboard-event' +import { useImeEnterGestureOwnership } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { useNativeChatComposerAppMenuSelection } from './focus/use-native-chat-composer-app-menu-selection' import { useNativeChatComposerSubmit } from './submit/use-native-chat-composer-submit' import { useNativeChatComposerCommandPicker } from './pickers/use-native-chat-composer-command-picker' diff --git a/src/renderer/src/components/native-chat/composer/editor/NativeChatComposerField.tsx b/src/renderer/src/components/native-chat/composer/editor/NativeChatComposerField.tsx index d7e68a3ec87..de8e86c21cb 100644 --- a/src/renderer/src/components/native-chat/composer/editor/NativeChatComposerField.tsx +++ b/src/renderer/src/components/native-chat/composer/editor/NativeChatComposerField.tsx @@ -3,7 +3,7 @@ import { notifyNativeChatComposerState } from '../focus/native-chat-composer-mou import type { NativeChatComposerInput } from './native-chat-composer-input' import { useCallback, useLayoutEffect, useMemo, useRef } from 'react' import { flushSync } from 'react-dom' -import type { useImeEnterGestureOwnership } from '@/lib/ime-composition-keyboard-event' +import type { useImeEnterGestureOwnership } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { cn } from '@/lib/utils' import type { ComposerAutocomplete } from '../../../../../../shared/native-chat/input/native-chat-composer-autocomplete' import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/native-chat-picker-items' diff --git a/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-composition.test.tsx b/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-composition.test.tsx index 8b4e1ccc070..edfacb95d12 100644 --- a/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-composition.test.tsx +++ b/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-composition.test.tsx @@ -1,4 +1,4 @@ -import { endComposition } from '@/lib/ime-composition-event.test-support' +import { endComposition } from '@/lib/text-input/ime/ime-composition-event.test-support' import { changePrompt, promptValue } from './native-chat-prompt-editor.test-support' // @vitest-environment happy-dom @@ -22,7 +22,7 @@ import { NativeChatComposerField, type NativeChatComposerFieldProps } from './NativeChatComposerField' -import { useImeEnterGestureOwnership } from '@/lib/ime-composition-keyboard-event' +import { useImeEnterGestureOwnership } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { TooltipProvider } from '@/components/ui/tooltip' import { useNativeChatDraft } from '../../drafts/use-native-chat-draft' import { useNativeChatDraftEvents } from './use-native-chat-draft-events' diff --git a/src/renderer/src/components/native-chat/composer/focus/native-chat-root-key-routing.ts b/src/renderer/src/components/native-chat/composer/focus/native-chat-root-key-routing.ts index 2ee860e95ff..83acde598b8 100644 --- a/src/renderer/src/components/native-chat/composer/focus/native-chat-root-key-routing.ts +++ b/src/renderer/src/components/native-chat/composer/focus/native-chat-root-key-routing.ts @@ -1,4 +1,4 @@ -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { findNativeChatPasteField } from '@/components/native-chat/paste/native-chat-paste-request' import type { NativeChatComposerHandle } from '../native-chat-composer-types' import { diff --git a/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-app-menu-selection.test.tsx b/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-app-menu-selection.test.tsx index 12b1d9e67be..73d21954f4c 100644 --- a/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-app-menu-selection.test.tsx +++ b/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-app-menu-selection.test.tsx @@ -2,8 +2,8 @@ import { act, cleanup, fireEvent, render } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import type { AppMenuSelectionAction } from '@/lib/app-menu-selection-actions' -import { useAppMenuSelectionActions } from '@/hooks/useAppMenuSelectionActions' +import type { AppMenuSelectionAction } from '@/lib/app-commands/app-menu-selection-actions' +import { useAppMenuSelectionActions } from '@/hooks/app-commands/useAppMenuSelectionActions' import { useNativeChatComposerAppMenuSelection } from './use-native-chat-composer-app-menu-selection' let appMenuListener: ((action: AppMenuSelectionAction) => void) | null = null diff --git a/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-app-menu-selection.ts b/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-app-menu-selection.ts index 34d06b7a17a..bf89ce5dd87 100644 --- a/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-app-menu-selection.ts +++ b/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-app-menu-selection.ts @@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef } from 'react' import { APP_MENU_SELECTION_ACTION_EVENT, type AppMenuSelectionAction -} from '@/lib/app-menu-selection-actions' +} from '@/lib/app-commands/app-menu-selection-actions' export function useNativeChatComposerAppMenuSelection(isComposingOverride?: () => boolean) { const textareaRef = useRef(null) diff --git a/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-reveal-focus.ts b/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-reveal-focus.ts index 29ac591e558..fea1ce359f4 100644 --- a/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-reveal-focus.ts +++ b/src/renderer/src/components/native-chat/composer/focus/use-native-chat-composer-reveal-focus.ts @@ -1,6 +1,6 @@ import { useEffect, useLayoutEffect, useRef, useState, type RefObject } from 'react' -import { shouldPreserveEditableFocus } from '@/lib/editable-focus-preservation' +import { shouldPreserveEditableFocus } from '@/lib/text-input/focus/editable-focus-preservation' import { scheduleNextFrame } from '@/components/terminal-pane/input/ime/terminal-ime-input-context-refresh' import { getOverlayFocusOwners } from '@/lib/overlay-focus-ownership' import type { NativeChatComposerHandle } from '../native-chat-composer-types' diff --git a/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-send-composition-clear.test.tsx b/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-send-composition-clear.test.tsx index 77fab9a8bf6..c799652cd52 100644 --- a/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-send-composition-clear.test.tsx +++ b/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-send-composition-clear.test.tsx @@ -1,4 +1,4 @@ -import { endComposition } from '@/lib/ime-composition-event.test-support' +import { endComposition } from '@/lib/text-input/ime/ime-composition-event.test-support' import { changePrompt, promptValue } from '../editor/native-chat-prompt-editor.test-support' // @vitest-environment happy-dom diff --git a/src/renderer/src/components/native-chat/media/images/NativeChatResolvedView.context-menu.test.tsx b/src/renderer/src/components/native-chat/media/images/NativeChatResolvedView.context-menu.test.tsx index 52b089900f6..eacc080f271 100644 --- a/src/renderer/src/components/native-chat/media/images/NativeChatResolvedView.context-menu.test.tsx +++ b/src/renderer/src/components/native-chat/media/images/NativeChatResolvedView.context-menu.test.tsx @@ -5,7 +5,7 @@ import { isValidElement, type ComponentProps } from 'react' import type { NativeChatCrewFrame } from '../../../orchestration-crew/NativeChatCrewPanel' import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import type * as ImageBlobPng from '@/lib/image-blob-png' +import type * as ImageBlobPng from '@/lib/clipboard/images/image-blob-png' import { NativeChatImageAttachmentPreview } from '../../attachments/chips/NativeChatImageAttachmentPreview' import type { NativeChatLiveSession } from '../../session/terminal/read/native-chat-live-session-contract' import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' @@ -66,7 +66,7 @@ vi.mock('../../composer/NativeChatComposer', () => ({ vi.mock('@/components/editor/document-images/useLocalImageSrc', () => ({ useLocalImageSrc: () => 'blob:original' })) -vi.mock('@/lib/image-blob-png', async (importOriginal) => ({ +vi.mock('@/lib/clipboard/images/image-blob-png', async (importOriginal) => ({ ...(await importOriginal()), convertImageBlobToPng: mocks.convertImageBlobToPng })) diff --git a/src/renderer/src/components/native-chat/media/images/native-chat-image-copy.ts b/src/renderer/src/components/native-chat/media/images/native-chat-image-copy.ts index 026d3918a10..3d6a84457b0 100644 --- a/src/renderer/src/components/native-chat/media/images/native-chat-image-copy.ts +++ b/src/renderer/src/components/native-chat/media/images/native-chat-image-copy.ts @@ -3,7 +3,7 @@ import { translate } from '@/i18n/i18n' import { clipboardImageCopyErrorDescription, copyImageToClipboard -} from '@/lib/clipboard-image-copy' +} from '@/lib/clipboard/images/clipboard-image-copy' import { isWebClientLocation } from '@/lib/web-client-location' /** The chat context menu offers "Copy image" for elements carrying this attribute. */ diff --git a/src/renderer/src/components/native-chat/pane/actions/use-native-chat-context-menu.tsx b/src/renderer/src/components/native-chat/pane/actions/use-native-chat-context-menu.tsx index daa01c30206..b8571437e80 100644 --- a/src/renderer/src/components/native-chat/pane/actions/use-native-chat-context-menu.tsx +++ b/src/renderer/src/components/native-chat/pane/actions/use-native-chat-context-menu.tsx @@ -26,8 +26,8 @@ import { import { isMacPlatform } from '../routing/native-chat-shortcut' import { formatOptionalPrimaryShortcutLabel } from '@/hooks/useShortcutLabel' import { useAppStore } from '@/store' -import { isEditableTarget } from '@/lib/editable-target' -import { findEditablePrimarySelectionPasteTarget } from '@/lib/primary-selection-paste' +import { isEditableTarget } from '@/lib/text-input/focus/editable-target' +import { findEditablePrimarySelectionPasteTarget } from '@/lib/clipboard/primary-selection/primary-selection-paste' import { NativeChatCopyOrcaSessionIdMenuItem } from './NativeChatCopyOrcaSessionIdMenuItem' import { NativeChatSelectionQuote } from '../../selection-quotes/NativeChatSelectionQuote' import { diff --git a/src/renderer/src/components/native-chat/pane/actions/use-structured-native-chat-pane-commands.tsx b/src/renderer/src/components/native-chat/pane/actions/use-structured-native-chat-pane-commands.tsx index aea76ac4e44..f65490cd27c 100644 --- a/src/renderer/src/components/native-chat/pane/actions/use-structured-native-chat-pane-commands.tsx +++ b/src/renderer/src/components/native-chat/pane/actions/use-structured-native-chat-pane-commands.tsx @@ -1,7 +1,7 @@ import { useCallback, useMemo, type KeyboardEventHandler, type RefObject } from 'react' import { useAppStore } from '@/store' import { formatShortcutLabel } from '@/hooks/useShortcutLabel' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { isOrcaSessionId } from '../../../../../../shared/orca-session-address' import { resolveStructuredSessionOrcaSessionId } from '../../../../runtime/native-chat/orchestration/structured-session-orca-session-id' import type { NativeChatStructuredViewProps } from '../../native-chat-view-types' diff --git a/src/renderer/src/components/native-chat/pane/routing/native-chat-pane-shortcut.ts b/src/renderer/src/components/native-chat/pane/routing/native-chat-pane-shortcut.ts index 734be6b7023..ce817e7ad28 100644 --- a/src/renderer/src/components/native-chat/pane/routing/native-chat-pane-shortcut.ts +++ b/src/renderer/src/components/native-chat/pane/routing/native-chat-pane-shortcut.ts @@ -1,5 +1,5 @@ import type { KeyboardEvent } from 'react' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { keybindingMatchesAction } from '../../../../../../shared/keybindings/matching' import type { KeybindingInput, diff --git a/src/renderer/src/components/native-chat/pane/routing/use-native-chat-toggle-shortcut.ts b/src/renderer/src/components/native-chat/pane/routing/use-native-chat-toggle-shortcut.ts index 03082c34030..9d71d93bf52 100644 --- a/src/renderer/src/components/native-chat/pane/routing/use-native-chat-toggle-shortcut.ts +++ b/src/renderer/src/components/native-chat/pane/routing/use-native-chat-toggle-shortcut.ts @@ -17,14 +17,14 @@ import { resolveNativeChatTabAgentEvidence } from '../../../tab-bar/native-chat- import { canToggleNativeChat } from '../../../../../../shared/native-chat/native-chat-availability' import { isNativeChatTranscriptLocalReadable } from '../../../../../../shared/native-chat/transcript/native-chat-transcript-readability' import { matchesNativeChatToggleShortcut } from './native-chat-shortcut' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { getConnectionIdFromState } from '@/lib/workspace/ownership/connection-owner-resolution' import { resolveKeyboardWorkspaceId } from '@/lib/floating-workspace-terminal-actions' import { isNativeChatTabWideFallbackSafe, resolveNativeChatActiveLayoutLeafId } from './native-chat-leaf-routing' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' export function resolveNativeChatToggleShortcutDetectedAgent({ terminalTabId, diff --git a/src/renderer/src/components/native-chat/paste/use-native-chat-paste-bridge.ts b/src/renderer/src/components/native-chat/paste/use-native-chat-paste-bridge.ts index feaed342d9f..d24ffa83781 100644 --- a/src/renderer/src/components/native-chat/paste/use-native-chat-paste-bridge.ts +++ b/src/renderer/src/components/native-chat/paste/use-native-chat-paste-bridge.ts @@ -2,17 +2,17 @@ import { nativeChatComposerDestination } from '../composer/focus/native-chat-com import { useCallback, useEffect, type RefObject } from 'react' import { toast } from 'sonner' -import { isEditableTarget } from '@/lib/editable-target' +import { isEditableTarget } from '@/lib/text-input/focus/editable-target' import { NativeChatPasteRequest, findNativeChatPasteField, nativeChatPasteUnavailableNotice, NATIVE_CHAT_PASTE_REQUEST_EVENT } from '@/components/native-chat/paste/native-chat-paste-request' -import { APP_MENU_PASTE_EVENT } from '@/lib/app-menu-paste' +import { APP_MENU_PASTE_EVENT } from '@/lib/clipboard/menu/app-menu-paste' import { isWebClientLocation } from '@/lib/web-client-location' -import { pasteTextIntoTextControl } from '@/lib/text-control-paste' -import { TEXT_CONTROL_PASTE_MAX_BYTES } from '@/lib/text-control-paste-model' +import { pasteTextIntoTextControl } from '@/lib/text-input/paste/text-control-paste' +import { TEXT_CONTROL_PASTE_MAX_BYTES } from '@/lib/text-input/paste/text-control-paste-model' import type { NativeChatComposerHandle } from '../composer/native-chat-composer-types' type NativeChatPasteBridgeRefs = { diff --git a/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.tsx b/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.tsx index 0f2e27541f1..36ce3845a18 100644 --- a/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.tsx +++ b/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.tsx @@ -1,4 +1,4 @@ -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import { Textarea } from '@/components/ui/textarea' import { useRef, useState, type RefObject } from 'react' import { Check, Pencil, X } from 'lucide-react' @@ -13,7 +13,7 @@ import { NativeChatPromptCollapseToggle } from './NativeChatPromptCollapse' import { useNativeChatPromptCardFocus } from './use-native-chat-prompt-card-focus' import { useNativeChatQuestionAutoAdvance } from './use-native-chat-question-auto-advance' import { useNativeChatQuestionKeys } from './use-native-chat-question-keys' -import { isEditableTarget } from '@/lib/editable-target' +import { isEditableTarget } from '@/lib/text-input/focus/editable-target' import type { AgentJournalFreeTextInput } from '../../../../../shared/agent-session/journal/agent-session-journal-types' import { askAcceptsEmptyAnswer, diff --git a/src/renderer/src/components/native-chat/prompts/use-native-chat-question-keys.ts b/src/renderer/src/components/native-chat/prompts/use-native-chat-question-keys.ts index 39f41cdb290..41799448529 100644 --- a/src/renderer/src/components/native-chat/prompts/use-native-chat-question-keys.ts +++ b/src/renderer/src/components/native-chat/prompts/use-native-chat-question-keys.ts @@ -1,5 +1,5 @@ import { useEffect, useEffectEvent, type RefObject } from 'react' -import { isEditableTarget } from '@/lib/editable-target' +import { isEditableTarget } from '@/lib/text-input/focus/editable-target' import { isInNativeChatPaneOf } from './use-native-chat-prompt-card-focus' /** Keep question shortcuts scoped to its pane, including when a replaced row drops focus. */ diff --git a/src/renderer/src/components/native-chat/viewport/find/NativeChatFindBar.tsx b/src/renderer/src/components/native-chat/viewport/find/NativeChatFindBar.tsx index 31cc0267b19..17bc8d376b1 100644 --- a/src/renderer/src/components/native-chat/viewport/find/NativeChatFindBar.tsx +++ b/src/renderer/src/components/native-chat/viewport/find/NativeChatFindBar.tsx @@ -2,7 +2,7 @@ import { useEffect } from 'react' import './native-chat-find.css' import { ChevronDown, ChevronUp, X } from 'lucide-react' import { Button } from '@/components/ui/button' -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import { useTranslate } from '@/i18n/use-translate' import type { NativeChatFind } from './use-native-chat-find' import { useNativeChatFindMatches } from './use-native-chat-find-matches' diff --git a/src/renderer/src/components/native-chat/viewport/find/use-native-chat-find.ts b/src/renderer/src/components/native-chat/viewport/find/use-native-chat-find.ts index 73ad174250e..12eb70007a1 100644 --- a/src/renderer/src/components/native-chat/viewport/find/use-native-chat-find.ts +++ b/src/renderer/src/components/native-chat/viewport/find/use-native-chat-find.ts @@ -7,14 +7,14 @@ import { type RefObject } from 'react' import { keybindingMatchesAction } from '../../../../../../shared/keybindings/matching' -import { getShortcutPlatform } from '@/lib/shortcut-platform' -import { isEditableTarget } from '@/lib/editable-target' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' +import { isEditableTarget } from '@/lib/text-input/focus/editable-target' import { isWebClientLocation } from '@/lib/web-client-location' import { useAppStore } from '../../../../store/index' import type { NativeChatComposerHandle } from '../../composer/native-chat-composer-types' import type { NativeChatMessageListHandle } from '../../messages/actions/use-native-chat-reveal-latest' import { focusNativeChatPromptCard } from '../../prompts/use-native-chat-prompt-card-focus' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' // Keep open state/query with the retained chat so reopen preserves its last search. export type NativeChatFind = { diff --git a/src/renderer/src/components/new-workspace/NewWorkspaceComposerAdvancedSection.tsx b/src/renderer/src/components/new-workspace/NewWorkspaceComposerAdvancedSection.tsx index d71d3d057e4..434bf3dd4cc 100644 --- a/src/renderer/src/components/new-workspace/NewWorkspaceComposerAdvancedSection.tsx +++ b/src/renderer/src/components/new-workspace/NewWorkspaceComposerAdvancedSection.tsx @@ -8,12 +8,12 @@ import { import { toast } from 'sonner' import SparseCheckoutPresetSelect from '@/components/sparse/SparseCheckoutPresetSelect' import { cn } from '@/lib/utils' +import { TEXT_CONTROL_PASTE_DIRECT_MAX_BYTES } from '@/lib/text-input/paste/text-control-paste-model' import { - TEXT_CONTROL_PASTE_DIRECT_MAX_BYTES, measureTextControlPasteByteLength, pasteTextIntoTextControl, shouldHandleTextControlPaste -} from '@/lib/text-control-paste' +} from '@/lib/text-input/paste/text-control-paste' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' import { ComposerParentWorktreePicker } from './ComposerParentWorktreePicker' diff --git a/src/renderer/src/components/new-workspace/ProjectCombobox.tsx b/src/renderer/src/components/new-workspace/ProjectCombobox.tsx index 3d14a8291ba..f89e9096d50 100644 --- a/src/renderer/src/components/new-workspace/ProjectCombobox.tsx +++ b/src/renderer/src/components/new-workspace/ProjectCombobox.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React, { useCallback, useMemo, useRef, useState } from 'react' import { ChevronDown, FolderPlus } from 'lucide-react' import { Popover, PopoverAnchor, PopoverContent } from '@/components/ui/popover' diff --git a/src/renderer/src/components/new-workspace/RunTargetField.tsx b/src/renderer/src/components/new-workspace/RunTargetField.tsx index 463dacf5f73..88ac9bc2a04 100644 --- a/src/renderer/src/components/new-workspace/RunTargetField.tsx +++ b/src/renderer/src/components/new-workspace/RunTargetField.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React, { useState } from 'react' import { ChevronDown, Cloud } from 'lucide-react' import { PopoverAnchor } from '@/components/ui/popover' diff --git a/src/renderer/src/components/new-workspace/smart-workspace-github-direct-link.test.ts b/src/renderer/src/components/new-workspace/smart-workspace-github-direct-link.test.ts index 3c8d24df21a..5fc53698028 100644 --- a/src/renderer/src/components/new-workspace/smart-workspace-github-direct-link.test.ts +++ b/src/renderer/src/components/new-workspace/smart-workspace-github-direct-link.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest' -import { parseGitHubIssueOrPRLink } from '@/lib/github-links' +import { parseGitHubIssueOrPRLink } from '../../../../shared/github/links' import type { RepoOption } from './smart-workspace-name-field-model' import { resolveSmartWorkspaceGithubDirectLink } from './smart-workspace-github-direct-link' diff --git a/src/renderer/src/components/new-workspace/smart-workspace-github-direct-link.ts b/src/renderer/src/components/new-workspace/smart-workspace-github-direct-link.ts index 1ed36f311ed..de7a2bc4916 100644 --- a/src/renderer/src/components/new-workspace/smart-workspace-github-direct-link.ts +++ b/src/renderer/src/components/new-workspace/smart-workspace-github-direct-link.ts @@ -1,10 +1,10 @@ import type React from 'react' -import type { parseGitHubIssueOrPRLink } from '@/lib/github-links' +import type { parseGitHubIssueOrPRLink } from '../../../../shared/github/links' import { lookupGitHubWorkItemByOwnerRepoForSource, lookupGitHubWorkItemForSource } from '@/lib/work-items/github/github-work-item-source-lookup' -import { lookupSmartGitHubSubmitItem } from '@/lib/smart-github-submit' +import { lookupSmartGitHubSubmitItem } from '@/lib/work-items/github/smart-github-submit' import type { GitHubWorkItem } from '../../../../shared/github/work-item-types' import { buildTaskSourceContextFromRepo, diff --git a/src/renderer/src/components/new-workspace/smart-workspace-name-field-model.ts b/src/renderer/src/components/new-workspace/smart-workspace-name-field-model.ts index 910d868bd6c..79bee1ddd88 100644 --- a/src/renderer/src/components/new-workspace/smart-workspace-name-field-model.ts +++ b/src/renderer/src/components/new-workspace/smart-workspace-name-field-model.ts @@ -1,6 +1,6 @@ import type React from 'react' import type { useAppStore } from '@/store' -import type { parseGitHubIssueOrPRLink, RepoSlug } from '@/lib/github-links' +import type { parseGitHubIssueOrPRLink, RepoSlug } from '../../../../shared/github/links' import type { GitHubWorkItem } from '../../../../shared/github/work-item-types' import type { GitLabWorkItem } from '../../../../shared/gitlab-types' import type { JiraIssue, JiraSite } from '../../../../shared/jira/jira-types' diff --git a/src/renderer/src/components/new-workspace/smart-workspace-name-input-surface.tsx b/src/renderer/src/components/new-workspace/smart-workspace-name-input-surface.tsx index 8515a05f04a..eb379820850 100644 --- a/src/renderer/src/components/new-workspace/smart-workspace-name-input-surface.tsx +++ b/src/renderer/src/components/new-workspace/smart-workspace-name-input-surface.tsx @@ -4,7 +4,7 @@ import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { WorkspaceEmojiPickerButton } from '@/components/workspace-emoji/WorkspaceEmojiPickerButton' -import { isImeCompositionKeyDown } from '@/lib/ime-composition-keyboard-event' +import { isImeCompositionKeyDown } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { isBlockingJiraUrlIntent } from '../../../../shared/new-workspace/smart-workspace-source-results' import { isBlockingLinearUrlIntent } from '../../../../shared/new-workspace/smart-workspace-linear-intent' import { isComposerFieldToFieldFocus } from './smart-workspace-source-popover-focus' diff --git a/src/renderer/src/components/new-workspace/smart-workspace-repo-slug.ts b/src/renderer/src/components/new-workspace/smart-workspace-repo-slug.ts index 09ee5346092..8dfe4a7a9ae 100644 --- a/src/renderer/src/components/new-workspace/smart-workspace-repo-slug.ts +++ b/src/renderer/src/components/new-workspace/smart-workspace-repo-slug.ts @@ -1,9 +1,9 @@ -import type { RepoSlug } from '@/lib/github-links' +import type { RepoSlug } from '../../../../shared/github/links' import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import { getGitHubRuntimeRepoId, getGitHubSourceRuntimeTarget -} from '@/lib/github-source-runtime-context' +} from '@/lib/work-items/github/github-source-runtime-context' import { githubRepoIdentityKey } from '../../../../shared/github/repository-identity-key' import { getTaskSourceCacheScope, diff --git a/src/renderer/src/components/new-workspace/use-jira-url-source.ts b/src/renderer/src/components/new-workspace/use-jira-url-source.ts index 48dd7ad1ad5..9baf170761a 100644 --- a/src/renderer/src/components/new-workspace/use-jira-url-source.ts +++ b/src/renderer/src/components/new-workspace/use-jira-url-source.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useAppStore } from '@/store' -import { getJiraAccountLabel } from '@/lib/jira-account-label' +import { getJiraAccountLabel } from '@/lib/work-items/jira/jira-account-label' import { assertRuntimeEnvironmentCapability } from '@/runtime/rpc/compatibility/runtime-capability-proof' import { getMatchingJiraSites, diff --git a/src/renderer/src/components/new-workspace/use-smart-workspace-github-search.ts b/src/renderer/src/components/new-workspace/use-smart-workspace-github-search.ts index 0168d7ee78b..c7b10dcdbee 100644 --- a/src/renderer/src/components/new-workspace/use-smart-workspace-github-search.ts +++ b/src/renderer/src/components/new-workspace/use-smart-workspace-github-search.ts @@ -1,11 +1,12 @@ import { useEffect, useMemo } from 'react' import { useAppStore } from '@/store' -import { normalizeGitHubLinkQuery, parseGitHubIssueOrPRLink } from '@/lib/github-links' +import { normalizeGitHubLinkQuery } from '../../../../shared/new-workspace/github-links' +import { parseGitHubIssueOrPRLink } from '../../../../shared/github/links' import { lookupGitHubWorkItemByOwnerRepoForSource, lookupGitHubWorkItemForSource } from '@/lib/work-items/github/github-work-item-source-lookup' -import { lookupSmartGitHubSubmitItem } from '@/lib/smart-github-submit' +import { lookupSmartGitHubSubmitItem } from '@/lib/work-items/github/smart-github-submit' import type { GitHubWorkItem } from '../../../../shared/github/work-item-types' import { RESULT_LIMIT } from './smart-workspace-name-field-model' import { resolveSmartWorkspaceGithubDirectLink } from './smart-workspace-github-direct-link' diff --git a/src/renderer/src/components/new-workspace/use-smart-workspace-gitlab-search.ts b/src/renderer/src/components/new-workspace/use-smart-workspace-gitlab-search.ts index 9eafa23feeb..62278de3bf5 100644 --- a/src/renderer/src/components/new-workspace/use-smart-workspace-gitlab-search.ts +++ b/src/renderer/src/components/new-workspace/use-smart-workspace-gitlab-search.ts @@ -2,8 +2,8 @@ import { useEffect, useMemo } from 'react' import { listGitLabWorkItemsForSource, lookupGitLabWorkItemByPathForSource -} from '@/lib/gitlab-work-item-source-lookup' -import { parseGitLabIssueOrMRLink } from '@/lib/gitlab-links' +} from '@/lib/work-items/gitlab/gitlab-work-item-source-lookup' +import { parseGitLabIssueOrMRLink } from '../../../../shared/new-workspace/gitlab-links' import type { GitLabWorkItem } from '../../../../shared/gitlab-types' import { RESULT_LIMIT } from './smart-workspace-name-field-model' import type { useWorkItemSourceFoundation } from './use-work-item-source-foundation' diff --git a/src/renderer/src/components/new-workspace/use-smart-workspace-name-field-foundation.source.test.tsx b/src/renderer/src/components/new-workspace/use-smart-workspace-name-field-foundation.source.test.tsx index 64dd0f532b4..0c11b0d2d66 100644 --- a/src/renderer/src/components/new-workspace/use-smart-workspace-name-field-foundation.source.test.tsx +++ b/src/renderer/src/components/new-workspace/use-smart-workspace-name-field-foundation.source.test.tsx @@ -34,7 +34,7 @@ const mocks = vi.hoisted(() => ({ } })) vi.mock('@/runtime/linear/runtime-linear-client', () => ({ linearStatus: mocks.readStatus })) -vi.mock('@/lib/gitlab-work-item-source-lookup', () => ({ +vi.mock('@/lib/work-items/gitlab/gitlab-work-item-source-lookup', () => ({ listGitLabWorkItemsForSource: mocks.listGitlabWorkItems, lookupGitLabWorkItemByPathForSource: vi.fn() })) diff --git a/src/renderer/src/components/new-workspace/use-smart-workspace-secondary-searches.ts b/src/renderer/src/components/new-workspace/use-smart-workspace-secondary-searches.ts index 1cbbd4b7c4d..b15ea773cc6 100644 --- a/src/renderer/src/components/new-workspace/use-smart-workspace-secondary-searches.ts +++ b/src/renderer/src/components/new-workspace/use-smart-workspace-secondary-searches.ts @@ -6,7 +6,7 @@ import { } from '@/store/slices/linear/linear-issue-publication' import type { LinearIssue } from '../../../../shared/linear/issue-types' import type { LinearCollectionResult } from '../../../../shared/linear/workspace-types' -import { linearIssueViewError } from '@/lib/linear-read-error' +import { linearIssueViewError } from '@/lib/work-items/linear/linear-read-error' import { getRepoExecutionHostId } from '../../../../shared/execution-host' import { useEffect, useMemo, useRef } from 'react' import { searchRuntimeRepoBaseRefDetails } from '@/runtime/source-control/references/runtime-repo-client' diff --git a/src/renderer/src/components/new-workspace/use-work-item-source-presentation.ts b/src/renderer/src/components/new-workspace/use-work-item-source-presentation.ts index 133fd2ebe29..71f6d1b6d03 100644 --- a/src/renderer/src/components/new-workspace/use-work-item-source-presentation.ts +++ b/src/renderer/src/components/new-workspace/use-work-item-source-presentation.ts @@ -1,7 +1,7 @@ import { useEffect, useMemo } from 'react' import { CaseSensitive, LoaderCircle, Search } from 'lucide-react' -import { parseGitHubIssueOrPRLink } from '@/lib/github-links' -import { parseGitLabIssueOrMRLink } from '@/lib/gitlab-links' +import { parseGitHubIssueOrPRLink } from '../../../../shared/github/links' +import { parseGitLabIssueOrMRLink } from '../../../../shared/new-workspace/gitlab-links' import { isSmartWorkspaceLinearIssueIntentMatch, parseBoundedSmartWorkspaceLinearIssueInput, diff --git a/src/renderer/src/components/new-workspace/use-work-item-source-state.ts b/src/renderer/src/components/new-workspace/use-work-item-source-state.ts index 91d721ae321..ca66a8e8461 100644 --- a/src/renderer/src/components/new-workspace/use-work-item-source-state.ts +++ b/src/renderer/src/components/new-workspace/use-work-item-source-state.ts @@ -1,6 +1,6 @@ import { useGitHubTaskItems } from '@/hooks/useGitHubTaskItems' import { useRef, useState } from 'react' -import type { RepoSlug } from '@/lib/github-links' +import type { RepoSlug } from '../../../../shared/github/links' import type { GitHubWorkItem } from '../../../../shared/github/work-item-types' import type { GitLabWorkItem } from '../../../../shared/gitlab-types' import type { JiraIssue } from '../../../../shared/jira/jira-types' diff --git a/src/renderer/src/components/onboarding/OnboardingFlow.tsx b/src/renderer/src/components/onboarding/OnboardingFlow.tsx index f94baec6f02..624585c53f1 100644 --- a/src/renderer/src/components/onboarding/OnboardingFlow.tsx +++ b/src/renderer/src/components/onboarding/OnboardingFlow.tsx @@ -1,7 +1,7 @@ import { OnboardingLanguageSwitcher } from './OnboardingLanguageSwitcher' import { useCallback, useEffect, useRef, useState } from 'react' import { cn } from '@/lib/utils' -import { isEditableTarget } from '@/lib/editable-target' +import { isEditableTarget } from '@/lib/text-input/focus/editable-target' import { getScreenSubmitModifierLabel, isScreenSubmitShortcut } from '@/lib/screen-submit-shortcut' import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip' import type { OnboardingState } from '../../../../shared/onboarding-state-types' @@ -16,7 +16,7 @@ import { OnboardingFooter } from './OnboardingFooter' import { shouldRequestOnboardingSkipConfirmation } from './onboarding-dismiss-target' import logo from '../../../../../resources/logo.svg' import { useTranslate } from '@/i18n/use-translate' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' import { useScrollEdgeFades } from '@/lib/use-scroll-edge-fades' import { AgentSurfaceStep } from './AgentSurfaceStep' import { stepCopy, stepTooltipLabels } from './onboarding-step-copy' diff --git a/src/renderer/src/components/orchestration-crew/OrchestrationCrewPanel.tsx b/src/renderer/src/components/orchestration-crew/OrchestrationCrewPanel.tsx index ee0609f4947..8eb957bb7df 100644 --- a/src/renderer/src/components/orchestration-crew/OrchestrationCrewPanel.tsx +++ b/src/renderer/src/components/orchestration-crew/OrchestrationCrewPanel.tsx @@ -15,7 +15,7 @@ import { useOrchestrationCrew } from '../native-chat/worker-lifetime/use-orchest import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' import { hasVisibleOverlay } from '@/lib/visible-overlay' -import { isImeOwnedKeyboardEvent } from '@/lib/ime-composition-keyboard-event' +import { isImeOwnedKeyboardEvent } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { CrewRowView, IconButton } from './CrewRowView' import { CREW_STATUS_GROUPS, diff --git a/src/renderer/src/components/plugins/page/PluginAddsSection.tsx b/src/renderer/src/components/plugins/page/PluginAddsSection.tsx index b4e8ee7c00f..4f2ee9cb711 100644 --- a/src/renderer/src/components/plugins/page/PluginAddsSection.tsx +++ b/src/renderer/src/components/plugins/page/PluginAddsSection.tsx @@ -24,7 +24,7 @@ import type { PluginCatalogType } from '../../../../../shared/plugins/catalog/pl import { translate } from '@/i18n/i18n' import { useIntlLocale, useTranslate, type Translate } from '@/i18n/use-translate' import { useAppStore } from '@/store' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { usePluginLanguagePackStore } from '@/store/plugins/localization/plugin-language-packs' import type { ActivePluginCommand } from '@/store/plugins/catalog/plugin-contribution-catalog' import { usePluginIconThemes } from '@/store/plugins/appearance/plugin-icon-themes' diff --git a/src/renderer/src/components/plugins/review/PluginInstallConsent.tsx b/src/renderer/src/components/plugins/review/PluginInstallConsent.tsx index 5df26568495..09bfbd8bf4b 100644 --- a/src/renderer/src/components/plugins/review/PluginInstallConsent.tsx +++ b/src/renderer/src/components/plugins/review/PluginInstallConsent.tsx @@ -3,7 +3,7 @@ import { AlertTriangle, Check, Loader2, ShieldAlert } from 'lucide-react' import type { PluginHostListEntry } from '../../../../../preload/api-types' import { getIntlLocale } from '@/i18n/i18n' import { useIntlLocale, useTranslate } from '@/i18n/use-translate' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { Button } from '../../ui/button' import { SecuritySurface } from '../../ui/security-surface' import { diff --git a/src/renderer/src/components/plugins/view/plugin-view-host-actions.ts b/src/renderer/src/components/plugins/view/plugin-view-host-actions.ts index 2a45aa1b6fb..e1ce203537e 100644 --- a/src/renderer/src/components/plugins/view/plugin-view-host-actions.ts +++ b/src/renderer/src/components/plugins/view/plugin-view-host-actions.ts @@ -3,7 +3,7 @@ import type { PluginViewRequest } from '../../../../../shared/plugins/view/plugin-view-protocol' import { detectLanguage } from '../../../../../shared/editor-language/editor-language-detect' -import { dispatchAppCommand } from '@/lib/app-command-dispatch' +import { dispatchAppCommand } from '@/lib/app-commands/app-command-dispatch' import { useAppStore } from '@/store' import { getIndexedWorktreeMap } from '@/store/slices/worktrees/listing/worktree-catalog-index' import { diff --git a/src/renderer/src/components/provider-accounts/use-antigravity-chat-sign-in.ts b/src/renderer/src/components/provider-accounts/use-antigravity-chat-sign-in.ts index a476f14331a..ebacd45ef9c 100644 --- a/src/renderer/src/components/provider-accounts/use-antigravity-chat-sign-in.ts +++ b/src/renderer/src/components/provider-accounts/use-antigravity-chat-sign-in.ts @@ -1,7 +1,7 @@ import { useEffect, useState, useSyncExternalStore } from 'react' import { translate } from '../../i18n/i18n' import { useTranslate, type Translate } from '../../i18n/use-translate' -import { useClipboardTextCopyFeedback } from '../../hooks/use-clipboard-text-copy-feedback' +import { useClipboardTextCopyFeedback } from '../../hooks/clipboard/use-clipboard-text-copy-feedback' import { antigravityChatSignInRunning as running, cancelAntigravityChatSignIn, diff --git a/src/renderer/src/components/pull-request-page/actions/merge-actions.ts b/src/renderer/src/components/pull-request-page/actions/merge-actions.ts index 1aafa675536..38db102669b 100644 --- a/src/renderer/src/components/pull-request-page/actions/merge-actions.ts +++ b/src/renderer/src/components/pull-request-page/actions/merge-actions.ts @@ -3,7 +3,7 @@ import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import type { RuntimeClientTarget } from '../../../../../shared/runtime-client-target' import { notifyWorkItemDetailsMutation } from '@/components/github/github-work-item-comment-mutations' import { runPullRequestStateUpdate } from '@/components/github/github-work-item-edit-mutations' -import { getGitHubRuntimeRepoId } from '@/lib/github-source-runtime-context' +import { getGitHubRuntimeRepoId } from '@/lib/work-items/github/github-source-runtime-context' import { getPullRequestMergeConfirmationTitle, getPullRequestMergeMethodLabel, @@ -19,7 +19,7 @@ import type { TaskSourceContext } from '../../../../../shared/work-items/task-so import type { PullRequestPageProjectOrigin } from '../page-types' import { translate } from '@/i18n/i18n' import type { GitHubPRMergeStatePresentation } from '@/components/github-pr-merge-state' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export async function changePullRequestState(args: { canMutateState: boolean diff --git a/src/renderer/src/components/pull-request-page/actions/panel.tsx b/src/renderer/src/components/pull-request-page/actions/panel.tsx index 6054d009c84..38a5f8473c6 100644 --- a/src/renderer/src/components/pull-request-page/actions/panel.tsx +++ b/src/renderer/src/components/pull-request-page/actions/panel.tsx @@ -21,7 +21,7 @@ import { import { useConfirmationDialog } from '@/components/confirmation-dialog-context' import { cn } from '@/lib/utils' import { useAppStore } from '@/store' -import { getGitHubRepoRoutingTarget } from '@/lib/github-source-runtime-context' +import { getGitHubRepoRoutingTarget } from '@/lib/work-items/github/github-source-runtime-context' import { presentGitHubPRMergeState } from '@/components/github-pr-merge-state' import { resolveGitHubPRMergeMethods } from '../../../../../shared/github/pull-request-merge-methods' import { resolvePullRequestRepo } from '@/components/github/github-work-item-identity' diff --git a/src/renderer/src/components/pull-request-page/cache/file-content.ts b/src/renderer/src/components/pull-request-page/cache/file-content.ts index de98b15b055..647e15a164d 100644 --- a/src/renderer/src/components/pull-request-page/cache/file-content.ts +++ b/src/renderer/src/components/pull-request-page/cache/file-content.ts @@ -10,7 +10,7 @@ import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import { getGitHubRuntimeRepoId, getGitHubSourceRuntimeHost -} from '@/lib/github-source-runtime-context' +} from '@/lib/work-items/github/github-source-runtime-context' import { PR_FILE_CONTENT_CACHE_MAX_BYTES, getRetainedPRFileContentsByteCount diff --git a/src/renderer/src/components/pull-request-page/checks/details-request.ts b/src/renderer/src/components/pull-request-page/checks/details-request.ts index 6896ac9e596..ec258b68b6e 100644 --- a/src/renderer/src/components/pull-request-page/checks/details-request.ts +++ b/src/renderer/src/components/pull-request-page/checks/details-request.ts @@ -12,7 +12,10 @@ import { type CheckDetailsLoadState, type GitHubChecksTabState } from '@/components/github-checks-tab-state' -import { getGitHubRuntimeRepoId, type GitHubRuntimeHost } from '@/lib/github-source-runtime-context' +import { + getGitHubRuntimeRepoId, + type GitHubRuntimeHost +} from '@/lib/work-items/github/github-source-runtime-context' import { translate } from '@/i18n/i18n' import type { GitHubOwnerRepo } from '../../../../../shared/github/pull-request-types' import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types' diff --git a/src/renderer/src/components/pull-request-page/checks/fix-launch.ts b/src/renderer/src/components/pull-request-page/checks/fix-launch.ts index 05b033b6298..d6279ea6bdc 100644 --- a/src/renderer/src/components/pull-request-page/checks/fix-launch.ts +++ b/src/renderer/src/components/pull-request-page/checks/fix-launch.ts @@ -5,7 +5,7 @@ import { import type { DirectWorkItemLaunchResult } from '@/lib/workspace/creation/work-item/direct-work-item-setup' import { toast } from 'sonner' import { useAppStore } from '@/store' -import { startFixChecksAgent } from '@/lib/fix-checks-agent-launch' +import { startFixChecksAgent } from '@/lib/source-control/checks/fix-checks-agent-launch' import { launchWorkItemDirect } from '@/lib/workspace/creation/work-item/launch-work-item-direct' import { buildFixBrokenChecksPrompt } from '../../../../../shared/source-control/checks/pr-checks-fix-prompt' import type { SourceControlAiWriteTarget } from '../../../../../shared/source-control/ai/settings/source-control-ai-recipe-save' diff --git a/src/renderer/src/components/pull-request-page/checks/refresh.ts b/src/renderer/src/components/pull-request-page/checks/refresh.ts index b56f366111d..fd647303677 100644 --- a/src/renderer/src/components/pull-request-page/checks/refresh.ts +++ b/src/renderer/src/components/pull-request-page/checks/refresh.ts @@ -1,7 +1,10 @@ -import { readPRCheckRefreshOwner } from '@/lib/pr-check-refresh-owner' +import { readPRCheckRefreshOwner } from '@/lib/source-control/checks/pr-check-refresh-owner' import { toast } from 'sonner' import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' -import { getGitHubRuntimeRepoId, type GitHubRuntimeHost } from '@/lib/github-source-runtime-context' +import { + getGitHubRuntimeRepoId, + type GitHubRuntimeHost +} from '@/lib/work-items/github/github-source-runtime-context' import { resetGitHubChecksTabForSource, updateGitHubChecksTabLocalChecks, diff --git a/src/renderer/src/components/pull-request-page/checks/rerun.ts b/src/renderer/src/components/pull-request-page/checks/rerun.ts index 078d996bb54..b422731ef80 100644 --- a/src/renderer/src/components/pull-request-page/checks/rerun.ts +++ b/src/renderer/src/components/pull-request-page/checks/rerun.ts @@ -1,13 +1,16 @@ import { toast } from 'sonner' import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' -import { getGitHubRuntimeRepoId, type GitHubRuntimeHost } from '@/lib/github-source-runtime-context' +import { + getGitHubRuntimeRepoId, + type GitHubRuntimeHost +} from '@/lib/work-items/github/github-source-runtime-context' import { translate } from '@/i18n/i18n' import type { GitHubOwnerRepo } from '../../../../../shared/github/pull-request-types' import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types' import type { PRCheckDetail } from '../../../../../shared/github/check-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import type { GitHubChecksTabState } from '../../github-checks-tab-state' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' /** The checks tab mints one of these per context; only its reference identity is ever read. */ type ChecksContextOwner = GitHubChecksTabState['contextOwner'] diff --git a/src/renderer/src/components/pull-request-page/checks/tab.tsx b/src/renderer/src/components/pull-request-page/checks/tab.tsx index 45c6ab85d74..6b87113606e 100644 --- a/src/renderer/src/components/pull-request-page/checks/tab.tsx +++ b/src/renderer/src/components/pull-request-page/checks/tab.tsx @@ -25,7 +25,7 @@ import { resolvePullRequestRepo } from '@/components/github/github-work-item-ide import { canUseGitHubRepoContext, getGitHubSourceRuntimeHost -} from '@/lib/github-source-runtime-context' +} from '@/lib/work-items/github/github-source-runtime-context' import { getLocalRepoProjectExecutionRuntimeContext } from '@/lib/local-preflight-context' import { CLIENT_PLATFORM } from '@/lib/new-workspace' import { resolveRepoExecutionHostPlatform } from '@/runtime/hosts/platform/execution-host-facts' diff --git a/src/renderer/src/components/pull-request-page/comments/composer.tsx b/src/renderer/src/components/pull-request-page/comments/composer.tsx index 11f86f70cca..49460ff952d 100644 --- a/src/renderer/src/components/pull-request-page/comments/composer.tsx +++ b/src/renderer/src/components/pull-request-page/comments/composer.tsx @@ -11,7 +11,7 @@ import { isScreenSubmitShortcut } from '@/lib/screen-submit-shortcut' import { getCommentBodySubmitState, hasBoundedCommentBodyText -} from '@/lib/comment-body-submit-state' +} from '@/lib/source-control/review/comments/comment-body-submit-state' import { addIssueCommentForRepo } from '@/components/github/github-work-item-comment-mutations' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' @@ -20,7 +20,7 @@ import type { PRComment } from '../../../../../shared/github/comment-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import type { MentionOption } from '../page-types' import { MentionTextarea } from '../mentions/textarea' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export function GHCommentComposer({ className, diff --git a/src/renderer/src/components/pull-request-page/comments/reply-form.tsx b/src/renderer/src/components/pull-request-page/comments/reply-form.tsx index ffed7d1b4a9..8e37f90ca60 100644 --- a/src/renderer/src/components/pull-request-page/comments/reply-form.tsx +++ b/src/renderer/src/components/pull-request-page/comments/reply-form.tsx @@ -9,7 +9,7 @@ import { isScreenSubmitShortcut } from '@/lib/screen-submit-shortcut' import { getCommentBodySubmitState, hasBoundedCommentBodyText -} from '@/lib/comment-body-submit-state' +} from '@/lib/source-control/review/comments/comment-body-submit-state' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' import type { MentionOption } from '../page-types' diff --git a/src/renderer/src/components/pull-request-page/conversation/reply.ts b/src/renderer/src/components/pull-request-page/conversation/reply.ts index d54feaf876c..1b67f437a34 100644 --- a/src/renderer/src/components/pull-request-page/conversation/reply.ts +++ b/src/renderer/src/components/pull-request-page/conversation/reply.ts @@ -13,7 +13,7 @@ import type { GitHubOwnerRepo } from '../../../../../shared/github/pull-request- import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types' import type { PRComment } from '../../../../../shared/github/comment-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export async function postConversationReply(args: { canUseRepoMutationContext: boolean diff --git a/src/renderer/src/components/pull-request-page/conversation/tab.tsx b/src/renderer/src/components/pull-request-page/conversation/tab.tsx index ef351efdfc7..5c7027d3881 100644 --- a/src/renderer/src/components/pull-request-page/conversation/tab.tsx +++ b/src/renderer/src/components/pull-request-page/conversation/tab.tsx @@ -1,6 +1,6 @@ import { githubCommentImageUploadAddress } from '@/components/github/github-comment-image-upload-address' import { getGitHubMutationTarget } from '@/components/github/github-work-item-mutation-target' -import { taskSourceRuntimeTarget } from '@/lib/task-source-runtime-target' +import { taskSourceRuntimeTarget } from '@/lib/work-items/task-source-runtime-target' import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useShallow } from 'zustand/react/shallow' import { toast } from 'sonner' @@ -10,8 +10,8 @@ import { useRepoAssignees } from '@/hooks/useGitHubRepoMetadata' import { canUseGitHubRepoContext, getGitHubRepoRoutingTarget -} from '@/lib/github-source-runtime-context' -import { usePRBotAuthorOverrides } from '@/lib/pr-bot-author-overrides' +} from '@/lib/work-items/github/github-source-runtime-context' +import { usePRBotAuthorOverrides } from '@/lib/source-control/review/pr-bot-author-overrides' import { filterPRCommentsByAudience, getPRCommentAudienceCounts, diff --git a/src/renderer/src/components/pull-request-page/edit/section.tsx b/src/renderer/src/components/pull-request-page/edit/section.tsx index 36bba8d6349..a145cb298ea 100644 --- a/src/renderer/src/components/pull-request-page/edit/section.tsx +++ b/src/renderer/src/components/pull-request-page/edit/section.tsx @@ -10,7 +10,7 @@ import { useRepoAssignees, useRepoLabels } from '@/hooks/useGitHubRepoMetadata' import { useRepoAssigneesBySlug, useRepoLabelsBySlug } from '@/hooks/useGitHubSlugMetadata' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types' -import { getGitHubRepoRoutingTarget } from '@/lib/github-source-runtime-context' +import { getGitHubRepoRoutingTarget } from '@/lib/work-items/github/github-source-runtime-context' import { getStateLabel } from '@/components/github/work-item-state-presentation' import { useTranslate } from '@/i18n/use-translate' import type { PullRequestPageProjectOrigin } from '../page-types' diff --git a/src/renderer/src/components/pull-request-page/files/line-comment.ts b/src/renderer/src/components/pull-request-page/files/line-comment.ts index d8a57019938..c569a09c13b 100644 --- a/src/renderer/src/components/pull-request-page/files/line-comment.ts +++ b/src/renderer/src/components/pull-request-page/files/line-comment.ts @@ -5,7 +5,7 @@ import type { DiffSection } from '@/components/editor/diff/sections/diff-section import type { GitHubOwnerRepo } from '../../../../../shared/github/pull-request-types' import type { PRComment } from '../../../../../shared/github/comment-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export async function addPullRequestLineComment(args: { headSha: string | undefined diff --git a/src/renderer/src/components/pull-request-page/mentions/textarea.tsx b/src/renderer/src/components/pull-request-page/mentions/textarea.tsx index 48b5ab231a5..ac3f7c24c33 100644 --- a/src/renderer/src/components/pull-request-page/mentions/textarea.tsx +++ b/src/renderer/src/components/pull-request-page/mentions/textarea.tsx @@ -1,6 +1,6 @@ import { useGitHubTextareaImages } from '@/components/github/use-github-textarea-images' import type { GitHubImageIntake } from '@/components/github/use-github-image-uploads' -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import React, { useCallback, useId, useMemo, useState } from 'react' import { cn } from '@/lib/utils' import { filterGitHubMentionOptions } from '@/components/github/github-mention-option-filter' diff --git a/src/renderer/src/components/pull-request-page/reviewers/panel.tsx b/src/renderer/src/components/pull-request-page/reviewers/panel.tsx index 678571b3c1d..960b20ad4f3 100644 --- a/src/renderer/src/components/pull-request-page/reviewers/panel.tsx +++ b/src/renderer/src/components/pull-request-page/reviewers/panel.tsx @@ -6,7 +6,7 @@ import { useRepoAssigneesBySlug } from '@/hooks/useGitHubSlugMetadata' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import type { GitHubAssignableUser } from '../../../../../shared/github/pull-request-types' import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types' -import { getGitHubRepoRoutingTarget } from '@/lib/github-source-runtime-context' +import { getGitHubRepoRoutingTarget } from '@/lib/work-items/github/github-source-runtime-context' import { resolvePullRequestRepo } from '@/components/github/github-work-item-identity' import { getGitHubPRReviewerRows } from '../../../../../shared/github/pr-reviewer-display' import { mergeReviewerSuggestions } from '@/components/github/work-item-state-presentation' diff --git a/src/renderer/src/components/pull-request-page/reviewers/request-actions.ts b/src/renderer/src/components/pull-request-page/reviewers/request-actions.ts index 8bd313480ef..2c13ff20a06 100644 --- a/src/renderer/src/components/pull-request-page/reviewers/request-actions.ts +++ b/src/renderer/src/components/pull-request-page/reviewers/request-actions.ts @@ -6,7 +6,7 @@ import { } from '../../../../../shared/github/pr-reviewer-display' import { notifyWorkItemDetailsMutation } from '@/components/github/github-work-item-comment-mutations' import { buildRequestedReviewUsers } from '@/components/github/work-item-state-presentation' -import { getGitHubRuntimeRepoId } from '@/lib/github-source-runtime-context' +import { getGitHubRuntimeRepoId } from '@/lib/work-items/github/github-source-runtime-context' import { translate } from '@/i18n/i18n' import type { GitHubAssignableUser, @@ -15,7 +15,7 @@ import type { import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import type { RuntimeClientTarget } from '../../../../../shared/runtime-client-target' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' const MAX_REQUESTED_REVIEWERS = 15 diff --git a/src/renderer/src/components/right-sidebar/ai-vault/panel/AiVaultPanelHeader.tsx b/src/renderer/src/components/right-sidebar/ai-vault/panel/AiVaultPanelHeader.tsx index 740bb07c78f..c7bea03d91b 100644 --- a/src/renderer/src/components/right-sidebar/ai-vault/panel/AiVaultPanelHeader.tsx +++ b/src/renderer/src/components/right-sidebar/ai-vault/panel/AiVaultPanelHeader.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import type { KeyboardEvent, ReactNode, Ref } from 'react' import { LoaderCircle, RefreshCw, Search, X } from 'lucide-react' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/right-sidebar/ai-vault/session-actions/use-ai-vault-session-row-handlers.ts b/src/renderer/src/components/right-sidebar/ai-vault/session-actions/use-ai-vault-session-row-handlers.ts index 9b3a9da0cb8..c9edd6105aa 100644 --- a/src/renderer/src/components/right-sidebar/ai-vault/session-actions/use-ai-vault-session-row-handlers.ts +++ b/src/renderer/src/components/right-sidebar/ai-vault/session-actions/use-ai-vault-session-row-handlers.ts @@ -1,7 +1,7 @@ import { toast } from 'sonner' import type { AiVaultSession } from '../../../../../../shared/ai-vault/contracts/ai-vault-types' import { translate } from '@/i18n/i18n' -import { formatClipboardFilePath } from '@/lib/clipboard-file-path' +import { formatClipboardFilePath } from '@/lib/clipboard/clipboard-file-path' import { useLatestHandler } from '@/lib/use-latest-handler' import { openAiVaultSessionLogInOrca } from './ai-vault-session-log-open' import { revealAiVaultSessionPath } from './ai-vault-session-path-actions' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/comments/comment-controls.tsx b/src/renderer/src/components/right-sidebar/checks-panel/comments/comment-controls.tsx index bf35d6db6cb..43da45f13cb 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/comments/comment-controls.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/comments/comment-controls.tsx @@ -22,7 +22,7 @@ import { useAppStore } from '@/store/index' import { isReviewThreadResolutionInFlight } from '@/store/github/review-threads/review-thread-resolution-in-flight' import { basename } from '@/lib/path' import { isBotPRComment } from '../../../../../../shared/source-control/review-comments/pr-comment-audience' -import { setPRBotAuthorOverride } from '@/lib/pr-bot-author-overrides' +import { setPRBotAuthorOverride } from '@/lib/source-control/review/pr-bot-author-overrides' import { normalizePRCommentAuthorLogin } from '../../../../../../shared/source-control/review-comments/pr-bot-author-overrides' import type { PRComment } from '../../../../../../shared/github/comment-types' import type { PRCommentGroupActionState } from '@/lib/source-control/review/comments/pr-comment-action-state' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/comments/right-panel-comment-composer.tsx b/src/renderer/src/components/right-sidebar/checks-panel/comments/right-panel-comment-composer.tsx index 387d5683b99..fb9ab86bde5 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/comments/right-panel-comment-composer.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/comments/right-panel-comment-composer.tsx @@ -3,25 +3,25 @@ import { useGitHubImagePending, type GitHubImageIntake } from '@/components/github/use-github-image-uploads' -import { ImeTextarea } from '@/lib/ime-text-field' +import { ImeTextarea } from '@/lib/text-input/ime/ime-text-field' import React, { useCallback, useEffect, useRef, useState } from 'react' import { Bold, Code2, Italic, List, Quote } from 'lucide-react' import { Button } from '@/components/ui/button' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { ShortcutKeyCombo } from '@/components/ShortcutKeyCombo' import { cn } from '@/lib/utils' -import { isImeCompositionKeyDown } from '@/lib/ime-composition-keyboard-event' +import { isImeCompositionKeyDown } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { getCommentBodySubmitState, hasBoundedCommentBodyText -} from '@/lib/comment-body-submit-state' +} from '@/lib/source-control/review/comments/comment-body-submit-state' import { clearRightPanelCommentFocusTimer, scheduleRightPanelCommentFocusTimer } from './right-panel-comment-focus-timers' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export type RightPanelCommentSubmitResult = { ok: true } | { ok: false; error: string } diff --git a/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-mutations.tsx b/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-mutations.tsx index 3c52b3a8add..7ccd8d54ec7 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-mutations.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-mutations.tsx @@ -24,7 +24,7 @@ import type { PRComment } from '../../../../../../shared/github/comment-types' import { translate } from '@/i18n/i18n' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' import { gitHubSlugApiForWorkspace } from '@/runtime/repository-github/github-slug-owner-api' import { errorMessage } from '../../../../../../shared/error-message' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-resolution.tsx b/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-resolution.tsx index 1ab4e5f8d83..07dfa1e3c01 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-resolution.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-resolution.tsx @@ -21,7 +21,7 @@ import { useTranslate } from '@/i18n/use-translate' import { useAppStore } from '@/store/index' import { isReviewThreadResolutionInFlight } from '@/store/github/review-threads/review-thread-resolution-in-flight' import { worktreeLaunchWorkspace } from '@/lib/agent-session/launch/routing/agent-launch-route-input' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' import { errorMessage } from '../../../../../../shared/error-message' import type { GitLabDiscussionResolveResult } from '../../../../../../shared/gitlab-types' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/comments/use-comments-list-state.tsx b/src/renderer/src/components/right-sidebar/checks-panel/comments/use-comments-list-state.tsx index 33c90ee50c5..9f567534d71 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/comments/use-comments-list-state.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/comments/use-comments-list-state.tsx @@ -31,7 +31,7 @@ import { usePRCommentsListSelection, type PRCommentsListSelectionClearRequest } from './pr-comments-list-selection' -import { usePRBotAuthorOverrides } from '@/lib/pr-bot-author-overrides' +import { usePRBotAuthorOverrides } from '@/lib/source-control/review/pr-bot-author-overrides' import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' import { PRCommentGroupView } from './comment-group' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/presentation/active-content.tsx b/src/renderer/src/components/right-sidebar/checks-panel/presentation/active-content.tsx index c76d6f55186..53bdedb8062 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/presentation/active-content.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/presentation/active-content.tsx @@ -2,7 +2,7 @@ import { forgeCredentialTarget, forgeOwnerHostIdForWorkspace } from '@/runtime/source-control/forge/forge-credential-target' -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React from 'react' import { Check, LoaderCircle, Pencil, X } from 'lucide-react' import { DetachedHeadBadge } from '@/components/DetachedHeadBadge' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-panel-entry-refresh-and-title-actions.tsx b/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-panel-entry-refresh-and-title-actions.tsx index 558b17ecc5b..3a03c574bf7 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-panel-entry-refresh-and-title-actions.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-panel-entry-refresh-and-title-actions.tsx @@ -11,7 +11,7 @@ import type { ChecksPanelControllerState } from '../use-checks-panel-controller- import type { ChecksPanelReviewState } from '../use-checks-panel-review-state' import type { ChecksPanelPollingState } from './use-checks-panel-polling' import type { ChecksPanelReviewDataState } from '../use-checks-panel-review-data' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' type ChecksPanelEntryRefreshAndTitleActionsInput = Pick< ChecksPanelContextState, diff --git a/src/renderer/src/components/right-sidebar/checks-panel/review-actions/use-checks-panel-ai-acknowledgement.tsx b/src/renderer/src/components/right-sidebar/checks-panel/review-actions/use-checks-panel-ai-acknowledgement.tsx index d732f6cabab..93561b031c3 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/review-actions/use-checks-panel-ai-acknowledgement.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/review-actions/use-checks-panel-ai-acknowledgement.tsx @@ -22,7 +22,7 @@ import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' import type { ChecksAgentComposerState } from '../panel-state-types' import type { ChecksPanelReview } from '../checks-panel-review' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' type ChecksPanelAiAcknowledgementInput = Pick< ChecksPanelControllerState, diff --git a/src/renderer/src/components/right-sidebar/checks-panel/review-actions/use-checks-panel-check-and-review-actions.tsx b/src/renderer/src/components/right-sidebar/checks-panel/review-actions/use-checks-panel-check-and-review-actions.tsx index 11e0f4247bc..d4b8576a42a 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/review-actions/use-checks-panel-check-and-review-actions.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/review-actions/use-checks-panel-check-and-review-actions.tsx @@ -12,7 +12,7 @@ import { } from '../../../../../../shared/source-control/checks/pr-checks-fix-prompt' import { loadGitLabJobLogDetails } from '@/runtime/repository-gitlab/gitlab-job-trace-client' -import { startFixChecksAgent } from '@/lib/fix-checks-agent-launch' +import { startFixChecksAgent } from '@/lib/source-control/checks/fix-checks-agent-launch' import { openChecksPanelHostedReviewUrl } from './checks-panel-hosted-review-click-routing' import { isMacPlatform } from '../../../terminal-pane/links/terminal-link-open-hints' import { translate } from '@/i18n/i18n' diff --git a/src/renderer/src/components/right-sidebar/file-explorer/content-search/SearchQueryRow.tsx b/src/renderer/src/components/right-sidebar/file-explorer/content-search/SearchQueryRow.tsx index 21282f1c08d..1c76f5e4e99 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/content-search/SearchQueryRow.tsx +++ b/src/renderer/src/components/right-sidebar/file-explorer/content-search/SearchQueryRow.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React from 'react' import { Search as SearchIcon, CaseSensitive, WholeWord, Regex, X, Loader2 } from 'lucide-react' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/right-sidebar/file-explorer/mutations/file-explorer-inline-input-row.tsx b/src/renderer/src/components/right-sidebar/file-explorer/mutations/file-explorer-inline-input-row.tsx index d30d2ab8bb7..2df47e8f4c5 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/mutations/file-explorer-inline-input-row.tsx +++ b/src/renderer/src/components/right-sidebar/file-explorer/mutations/file-explorer-inline-input-row.tsx @@ -4,7 +4,7 @@ import { FolderIcon } from '@/components/FileTypeIcon' import { isImeCompositionKeyDown, useImeEnterGestureOwnership -} from '@/lib/ime-composition-keyboard-event' +} from '@/lib/text-input/ime/ime-composition-keyboard-event' import type { TreeNode } from '../tree/file-explorer-types' export type InlineInput = { diff --git a/src/renderer/src/components/right-sidebar/file-explorer/panel/FileExplorerVirtualRows.tsx b/src/renderer/src/components/right-sidebar/file-explorer/panel/FileExplorerVirtualRows.tsx index 61480ffdcaa..e3f13264006 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/panel/FileExplorerVirtualRows.tsx +++ b/src/renderer/src/components/right-sidebar/file-explorer/panel/FileExplorerVirtualRows.tsx @@ -5,7 +5,10 @@ import { cn } from '@/lib/utils' import type { GitFileStatus } from '../../../../../../shared/git/status/git-status-types' import { FileExplorerRow } from './FileExplorerRow' import { InlineInputRow, type InlineInput } from '../mutations/file-explorer-inline-input-row' -import { shouldShowIgnoredDecoration, STATUS_COLORS } from '../../../../lib/git-path-decoration' +import { + shouldShowIgnoredDecoration, + STATUS_COLORS +} from '../../../../lib/source-control/paths/git-path-decoration' import type { DirCache, FileExplorerOperationOwner, TreeNode } from '../tree/file-explorer-types' import type { FileExplorerRowProjection } from '../tree/file-explorer-row-projection' import type { RuntimeFileOperationArgs } from '@/runtime/files/runtime-file-client-types' diff --git a/src/renderer/src/components/right-sidebar/file-explorer/selection/file-explorer-selection.ts b/src/renderer/src/components/right-sidebar/file-explorer/selection/file-explorer-selection.ts index 87a808fd939..893b9bbe3f2 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/selection/file-explorer-selection.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/selection/file-explorer-selection.ts @@ -1,5 +1,5 @@ import type { TreeNode } from '../tree/file-explorer-types' -import { formatClipboardFilePath } from '@/lib/clipboard-file-path' +import { formatClipboardFilePath } from '@/lib/clipboard/clipboard-file-path' import type { LocalPathOpenOwner } from '@/lib/local-path-open-guard' export type FileExplorerSelectionState = { diff --git a/src/renderer/src/components/right-sidebar/file-explorer/selection/useFileExplorerKeys.ts b/src/renderer/src/components/right-sidebar/file-explorer/selection/useFileExplorerKeys.ts index a94c58c8ca6..940c894b977 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/selection/useFileExplorerKeys.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/selection/useFileExplorerKeys.ts @@ -2,7 +2,7 @@ import { useEffect, useLayoutEffect, useRef } from 'react' import type React from 'react' import { toast } from 'sonner' import { useAppStore } from '@/store/index' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import type { InlineInput } from '../mutations/file-explorer-inline-input-row' import type { TreeNode } from '../tree/file-explorer-types' import type { FileExplorerRowProjection } from '../tree/file-explorer-row-projection' @@ -20,8 +20,8 @@ import { } from './file-explorer-keyboard-navigation' import { keybindingMatchesAction } from '../../../../../../shared/keybindings' import { translate } from '@/i18n/i18n' -import { isEditableTarget } from '@/lib/editable-target' -import { addAppKeyListener, removeAppKeyListener } from '@/lib/app-keyboard-router' +import { isEditableTarget } from '@/lib/text-input/focus/editable-target' +import { addAppKeyListener, removeAppKeyListener } from '@/lib/keyboard/app-keyboard-router' export function shouldIgnoreFileExplorerKeyTarget(target: EventTarget | null): boolean { return ( diff --git a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.test.ts b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.test.ts index de9b9d69367..6a5c1e31dcd 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.test.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { createNameFilteredFileExplorerProjection } from './file-explorer-name-filter-projection' -import { buildIgnoredSet } from '../../../../lib/git-path-decoration' +import { buildIgnoredSet } from '../../../../lib/source-control/paths/git-path-decoration' describe('name-filter filename identity', () => { function project( diff --git a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.ts b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.ts index 1e3842ce898..7db4e428f49 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.ts @@ -16,7 +16,7 @@ import { type FileExplorerRowProjection } from './file-explorer-row-projection' import { isDotfileRelativePath } from './file-explorer-entries' -import { isPathIgnored } from '../../../../lib/git-path-decoration' +import { isPathIgnored } from '../../../../lib/source-control/paths/git-path-decoration' export type FileExplorerNameFilterProjectionSource = { query: string diff --git a/src/renderer/src/components/right-sidebar/file-explorer/tree/use-file-explorer-tree-pane-state.ts b/src/renderer/src/components/right-sidebar/file-explorer/tree/use-file-explorer-tree-pane-state.ts index 96f040e7da1..d34bd9d6b9a 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/tree/use-file-explorer-tree-pane-state.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/tree/use-file-explorer-tree-pane-state.ts @@ -9,7 +9,10 @@ import type { Repo } from '../../../../../../shared/repo-types' import type { GitStatusEntry } from '../../../../../../shared/git/status/git-status-types' import type { FileExplorerRowProjection } from './file-explorer-row-projection' import type { TreeNode } from './file-explorer-types' -import { buildFolderStatusMap, buildStatusMap } from '../../../../lib/git-path-decoration' +import { + buildFolderStatusMap, + buildStatusMap +} from '../../../../lib/source-control/paths/git-path-decoration' import { useFileDeletion } from '../mutations/useFileDeletion' import { useFileExplorerDragDrop } from '../mutations/useFileExplorerDragDrop' import { useFileExplorerHandlers } from '../mutations/useFileExplorerHandlers' diff --git a/src/renderer/src/components/right-sidebar/file-explorer/tree/useFileExplorerVisibleRowProjection.ts b/src/renderer/src/components/right-sidebar/file-explorer/tree/useFileExplorerVisibleRowProjection.ts index 6d1365b46b0..39a2e9277f7 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/tree/useFileExplorerVisibleRowProjection.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/tree/useFileExplorerVisibleRowProjection.ts @@ -6,7 +6,10 @@ import { createFileExplorerRowProjectionFromParts, type FileExplorerRowProjection } from './file-explorer-row-projection' -import { buildIgnoredSet, isPathIgnored } from '../../../../lib/git-path-decoration' +import { + buildIgnoredSet, + isPathIgnored +} from '../../../../lib/source-control/paths/git-path-decoration' import { createNameFilteredFileExplorerProjection, getFileExplorerNameFilterExpandedPaths, diff --git a/src/renderer/src/components/right-sidebar/hosted-review/provider-actions/use-hosted-review-actions.ts b/src/renderer/src/components/right-sidebar/hosted-review/provider-actions/use-hosted-review-actions.ts index e8c3372c464..492b7056a3a 100644 --- a/src/renderer/src/components/right-sidebar/hosted-review/provider-actions/use-hosted-review-actions.ts +++ b/src/renderer/src/components/right-sidebar/hosted-review/provider-actions/use-hosted-review-actions.ts @@ -19,7 +19,7 @@ import { translate } from '@/i18n/i18n' import { getHostedReviewStateChangeCopy } from './hosted-review-state-change-copy' import { buildGitHubPRStackMergeConfirmation } from './github-pr-stack-confirmation' import { useReadyHostedReviewAction } from './use-ready-hosted-review-action' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export type HostedReviewActionInfo = Pick< HostedReviewInfo, diff --git a/src/renderer/src/components/right-sidebar/hosted-review/provider-actions/use-ready-hosted-review-action.ts b/src/renderer/src/components/right-sidebar/hosted-review/provider-actions/use-ready-hosted-review-action.ts index 88041058383..28eb23a865e 100644 --- a/src/renderer/src/components/right-sidebar/hosted-review/provider-actions/use-ready-hosted-review-action.ts +++ b/src/renderer/src/components/right-sidebar/hosted-review/provider-actions/use-ready-hosted-review-action.ts @@ -5,7 +5,7 @@ import type { Repo } from '../../../../../../shared/repo-types' import { translate } from '@/i18n/i18n' import { markGitHubHostedReviewReadyForReview } from './hosted-review-github-actions' import { markGitLabHostedReviewReadyForReview } from './hosted-review-gitlab-actions' -import { codeHostErrorText } from '@/lib/code-host-error-copy' +import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' export function useReadyHostedReviewAction({ reviewNumber, diff --git a/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-action.ts b/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-action.ts index c19f3ada631..341948f29ac 100644 --- a/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-action.ts +++ b/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-action.ts @@ -1,4 +1,5 @@ -import { GIT_GRAPH_REFRESH_EVENT } from '@/lib/git-graph-tab' +import '@/lib/source-control/graph/git-graph-tab' +import { GIT_GRAPH_REFRESH_EVENT } from '@/lib/source-control/graph/git-graph-refresh-event' import { useCallback } from 'react' import { toast } from 'sonner' import { requireGitOwnerTarget } from '../sync/worktree-git-owner-target' diff --git a/src/renderer/src/components/right-sidebar/source-control/listing/branch-entry-row.tsx b/src/renderer/src/components/right-sidebar/source-control/listing/branch-entry-row.tsx index 671eb75db1b..4ab91678aff 100644 --- a/src/renderer/src/components/right-sidebar/source-control/listing/branch-entry-row.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/listing/branch-entry-row.tsx @@ -15,7 +15,7 @@ import { SOURCE_CONTROL_TREE_FILE_PADDING_PX, SOURCE_CONTROL_TREE_INDENT_PX } from './row-layout' -import { STATUS_COLORS } from '../../../../lib/git-path-decoration' +import { STATUS_COLORS } from '../../../../lib/source-control/paths/git-path-decoration' import { STATUS_LABELS } from '../../../../../../shared/git/status/git-status-labels' import { useTranslate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/right-sidebar/source-control/listing/entry-context-menu.tsx b/src/renderer/src/components/right-sidebar/source-control/listing/entry-context-menu.tsx index 187fee2e754..f1f97e746cf 100644 --- a/src/renderer/src/components/right-sidebar/source-control/listing/entry-context-menu.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/listing/entry-context-menu.tsx @@ -17,7 +17,7 @@ import { } from '@/lib/reveal-in-file-manager' import { isRevealOrEditorOpenBlocked } from '@/lib/local-path-open-guard' import { runtimeEnvironmentIdOrLocalUnlessTwin } from '@/lib/workspace/ownership/worktree-runtime-owner' -import { formatClipboardFilePath } from '@/lib/clipboard-file-path' +import { formatClipboardFilePath } from '@/lib/clipboard/clipboard-file-path' import type { ConflictResolution } from '../../../../../../shared/source-control/listing/source-control-entry-actions' import { CONFLICT_RESOLUTION_ICONS, getLocalizedConflictResolutionLabel } from './conflict-label' import { OpenInContextSubmenu } from '@/components/file-actions/OpenInContextSubmenu' diff --git a/src/renderer/src/components/right-sidebar/source-control/listing/sequencer-recovery-controls.test.tsx b/src/renderer/src/components/right-sidebar/source-control/listing/sequencer-recovery-controls.test.tsx index 1e40bcf651c..95849f0b337 100644 --- a/src/renderer/src/components/right-sidebar/source-control/listing/sequencer-recovery-controls.test.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/listing/sequencer-recovery-controls.test.tsx @@ -4,7 +4,8 @@ import { createRoot } from 'react-dom/client' import { expect, it, vi } from 'vitest' import { useAppStore } from '@/store' import { SequencerRecoveryControls } from './sequencer-recovery-controls' -import { GIT_GRAPH_REFRESH_EVENT } from '@/lib/git-graph-tab' +import '@/lib/source-control/graph/git-graph-tab' +import { GIT_GRAPH_REFRESH_EVENT } from '@/lib/source-control/graph/git-graph-refresh-event' import { local } from '@/components/editor/git-graph/git-graph-workspace.test-fixtures' import type * as WorktreeGitCopy from '@/lib/worktree-git-copy' import type { GitStatusResult } from '../../../../../../shared/git/status/git-status-types' diff --git a/src/renderer/src/components/right-sidebar/source-control/listing/sequencer-recovery-controls.tsx b/src/renderer/src/components/right-sidebar/source-control/listing/sequencer-recovery-controls.tsx index 08990451968..2c47a44df77 100644 --- a/src/renderer/src/components/right-sidebar/source-control/listing/sequencer-recovery-controls.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/listing/sequencer-recovery-controls.tsx @@ -12,7 +12,8 @@ import { sequencerAbortRuntimeGit, sequencerContinueRuntimeGit } from '@/runtime/source-control/git/runtime-git-commit-actions-client' -import { GIT_GRAPH_REFRESH_EVENT } from '@/lib/git-graph-tab' +import '@/lib/source-control/graph/git-graph-tab' +import { GIT_GRAPH_REFRESH_EVENT } from '@/lib/source-control/graph/git-graph-refresh-event' import { extractIpcErrorMessage } from '@/lib/ipc-error' import { useSourceControlWorktreeContext } from './use-worktree-context' import type { GitCommitAction } from '../../../../../../shared/git/commands/git-commit-action' diff --git a/src/renderer/src/components/right-sidebar/source-control/listing/uncommitted-entry-row.tsx b/src/renderer/src/components/right-sidebar/source-control/listing/uncommitted-entry-row.tsx index d7cc98880f9..7f0db7f23a5 100644 --- a/src/renderer/src/components/right-sidebar/source-control/listing/uncommitted-entry-row.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/listing/uncommitted-entry-row.tsx @@ -35,7 +35,7 @@ import { getSubmoduleWorktreeOnlyLabel, getSubmoduleWorktreeOnlyTooltip } from './row-layout' -import { STATUS_COLORS } from '../../../../lib/git-path-decoration' +import { STATUS_COLORS } from '../../../../lib/source-control/paths/git-path-decoration' import { STATUS_LABELS } from '../../../../../../shared/git/status/git-status-labels' export const UncommittedEntryRow = React.memo(function UncommittedEntryRow({ diff --git a/src/renderer/src/components/right-sidebar/source-control/notes/diff-comments-list.tsx b/src/renderer/src/components/right-sidebar/source-control/notes/diff-comments-list.tsx index 15fdecb3e7b..bcb9315572a 100644 --- a/src/renderer/src/components/right-sidebar/source-control/notes/diff-comments-list.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/notes/diff-comments-list.tsx @@ -1,7 +1,10 @@ import React, { useCallback, useMemo } from 'react' import { Check, Copy, Trash, Trash2 } from 'lucide-react' -import { getDiffCommentLineLabel, getDiffCommentSource } from '@/lib/diff-comment-compat' -import { formatDiffComment } from '@/lib/diff-comments-format' +import { + getDiffCommentLineLabel, + getDiffCommentSource +} from '@/lib/source-control/review/comments/diff-comment-compat' +import { formatDiffComment } from '../../../../../../shared/diff-comments-format' import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' import type { DiffComment } from '../../../../../../shared/diff-comment-types' diff --git a/src/renderer/src/components/right-sidebar/source-control/notes/use-diff-comment-notes.ts b/src/renderer/src/components/right-sidebar/source-control/notes/use-diff-comment-notes.ts index a496b59310a..039cfc053ad 100644 --- a/src/renderer/src/components/right-sidebar/source-control/notes/use-diff-comment-notes.ts +++ b/src/renderer/src/components/right-sidebar/source-control/notes/use-diff-comment-notes.ts @@ -5,8 +5,8 @@ import { useCallback, useMemo, useState } from 'react' import { toast } from 'sonner' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' -import { formatDiffComments } from '@/lib/diff-comments-format' -import { describeClipboardWriteFailure } from '@/lib/clipboard-write-failure' +import { formatDiffComments } from '../../../../../../shared/diff-comments-format' +import { describeClipboardWriteFailure } from '@/lib/clipboard/clipboard-write-failure' import { useVisibleWorktreeDiffComments } from '../../../diff-comments/use-visible-worktree-diff-comments' import { countPendingDiffCommentsClear, diff --git a/src/renderer/src/components/right-sidebar/source-control/notes/use-note-opening.ts b/src/renderer/src/components/right-sidebar/source-control/notes/use-note-opening.ts index e1e86bdd797..68d65154cb6 100644 --- a/src/renderer/src/components/right-sidebar/source-control/notes/use-note-opening.ts +++ b/src/renderer/src/components/right-sidebar/source-control/notes/use-note-opening.ts @@ -1,6 +1,6 @@ import { useCallback, useRef, type RefObject } from 'react' import { detectLanguage } from '../../../../../../shared/editor-language/editor-language-detect' -import { getDiffCommentSource } from '@/lib/diff-comment-compat' +import { getDiffCommentSource } from '@/lib/source-control/review/comments/diff-comment-compat' import { joinPath } from '@/lib/path' import { useAppStore } from '@/store' import type { diff --git a/src/renderer/src/components/right-sidebar/source-control/panel/header-toolbar.tsx b/src/renderer/src/components/right-sidebar/source-control/panel/header-toolbar.tsx index 7914a964d56..9c6b6414537 100644 --- a/src/renderer/src/components/right-sidebar/source-control/panel/header-toolbar.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/panel/header-toolbar.tsx @@ -1,4 +1,4 @@ -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' import React, { useCallback, useEffect, useRef } from 'react' import { Search, X } from 'lucide-react' import type { GitBranchCompareSummary } from '../../../../../../shared/git/diff/git-diff-compare-types' diff --git a/src/renderer/src/components/right-sidebar/source-control/panel/panel-content.tsx b/src/renderer/src/components/right-sidebar/source-control/panel/panel-content.tsx index 0e104397fea..122388ceffe 100644 --- a/src/renderer/src/components/right-sidebar/source-control/panel/panel-content.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/panel/panel-content.tsx @@ -10,7 +10,7 @@ import { SourceControlCommitSurface } from './commit-surface' import { SourceControlForkPushNotice } from './fork-push-notice' import type { SourceControlPanelReadyProps } from './panel-props' import { useSourceControlScope } from './worktree-scope' -import { openGitGraph } from '@/lib/git-graph-tab' +import { openGitGraph } from '@/lib/source-control/graph/git-graph-tab' export function SourceControlPanelContent(props: SourceControlPanelReadyProps) { const { activeWorktree, currentWorktreeId, model, worktreePath } = props diff --git a/src/renderer/src/components/right-sidebar/source-control/sync/git-graph-open-button.tsx b/src/renderer/src/components/right-sidebar/source-control/sync/git-graph-open-button.tsx index 36f3bb4a35d..1d94e36e27c 100644 --- a/src/renderer/src/components/right-sidebar/source-control/sync/git-graph-open-button.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/sync/git-graph-open-button.tsx @@ -8,7 +8,7 @@ import { gitGraphUpdateMessage, openGitGraph, probeGitGraphSupport -} from '@/lib/git-graph-tab' +} from '@/lib/source-control/graph/git-graph-tab' import { toSourceControlRowOpenEvent, type SourceControlRowOpenEvent } from '../listing/split-open' import { useTranslate } from '@/i18n/use-translate' import { CommitsHeaderIconButton } from './commits-header-icon-button' diff --git a/src/renderer/src/components/right-sidebar/source-control/sync/git-history-commit-files.tsx b/src/renderer/src/components/right-sidebar/source-control/sync/git-history-commit-files.tsx index 43fa5957e7b..20b6f9835f3 100644 --- a/src/renderer/src/components/right-sidebar/source-control/sync/git-history-commit-files.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/sync/git-history-commit-files.tsx @@ -1,7 +1,7 @@ import { createElement } from 'react' import type React from 'react' import { ArrowUpRight } from 'lucide-react' -import { STATUS_COLORS } from '../../../../lib/git-path-decoration' +import { STATUS_COLORS } from '../../../../lib/source-control/paths/git-path-decoration' import { STATUS_LABELS } from '../../../../../../shared/git/status/git-status-labels' import { toPermanentSourceControlRowOpenEvent, diff --git a/src/renderer/src/components/right-sidebar/source-control/sync/remote-refresh.ts b/src/renderer/src/components/right-sidebar/source-control/sync/remote-refresh.ts index 9b5dce2f275..ee5ae306ccb 100644 --- a/src/renderer/src/components/right-sidebar/source-control/sync/remote-refresh.ts +++ b/src/renderer/src/components/right-sidebar/source-control/sync/remote-refresh.ts @@ -1,4 +1,5 @@ -import { GIT_GRAPH_REFRESH_EVENT } from '@/lib/git-graph-tab' +import '@/lib/source-control/graph/git-graph-tab' +import { GIT_GRAPH_REFRESH_EVENT } from '@/lib/source-control/graph/git-graph-refresh-event' import { isSyncPushStageError, resolveRemoteOperationErrorMessage diff --git a/src/renderer/src/components/right-sidebar/ssh-port-forward-dialog.ime-enter.test.tsx b/src/renderer/src/components/right-sidebar/ssh-port-forward-dialog.ime-enter.test.tsx index c03751ba3e3..e16e012a659 100644 --- a/src/renderer/src/components/right-sidebar/ssh-port-forward-dialog.ime-enter.test.tsx +++ b/src/renderer/src/components/right-sidebar/ssh-port-forward-dialog.ime-enter.test.tsx @@ -1,7 +1,7 @@ // @vitest-environment happy-dom import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { act, cleanup, fireEvent, render, screen } from '@testing-library/react' -import { endComposition } from '@/lib/ime-composition-event.test-support' +import { endComposition } from '@/lib/text-input/ime/ime-composition-event.test-support' import { SshPortForwardDialog } from './ssh-port-forward-dialog' const addPortForward = vi.fn(() => Promise.resolve()) diff --git a/src/renderer/src/components/right-sidebar/ssh-port-forward-dialog.tsx b/src/renderer/src/components/right-sidebar/ssh-port-forward-dialog.tsx index 2c7302e3786..cc7847c647d 100644 --- a/src/renderer/src/components/right-sidebar/ssh-port-forward-dialog.tsx +++ b/src/renderer/src/components/right-sidebar/ssh-port-forward-dialog.tsx @@ -10,7 +10,7 @@ import { Button } from '@/components/ui/button' import type { PortForwardEntry } from '../../../../shared/ssh-types' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' -import { ImeInput } from '@/lib/ime-text-field' +import { ImeInput } from '@/lib/text-input/ime/ime-text-field' // Remap privileged ports to avoid EACCES when binding locally without root. function safeLocalPort(remotePort: number): number { diff --git a/src/renderer/src/components/settings/__fixtures__/settings-persistence-test-fixture.ts b/src/renderer/src/components/settings/__fixtures__/settings-persistence-test-fixture.ts index 7e30c7ecc3f..39c0a6d6099 100644 --- a/src/renderer/src/components/settings/__fixtures__/settings-persistence-test-fixture.ts +++ b/src/renderer/src/components/settings/__fixtures__/settings-persistence-test-fixture.ts @@ -91,12 +91,12 @@ export function settingsModel(): SettingsPersistenceModel { hasUnsavedBranchPromptChanges: false, hasUnsavedChatPromptChanges: false, hasUnsavedCommitPromptChanges: false, - highlightedSettingsTargetId: null, + highlightedSettingsTarget: null, setFontSuggestions: vi.fn(), setHasUnsavedBranchPromptChanges: vi.fn(), setHasUnsavedChatPromptChanges: vi.fn(), setHasUnsavedCommitPromptChanges: vi.fn(), - setHighlightedSettingsTargetId: vi.fn(), + setHighlightedSettingsTarget: vi.fn(), setSettingsSearchQuery: vi.fn(), setSourceControlAiPromptDiscardSignal: vi.fn() } satisfies SettingsPersistenceModel diff --git a/src/renderer/src/components/settings/accounts/accounts-claude-search.ts b/src/renderer/src/components/settings/accounts/accounts-claude-search.ts index a5ac0bccc7b..6ea25153719 100644 --- a/src/renderer/src/components/settings/accounts/accounts-claude-search.ts +++ b/src/renderer/src/components/settings/accounts/accounts-claude-search.ts @@ -4,7 +4,7 @@ import { translateSearchKeyword } from '../search/settings-search-keywords' export const getAccountsClaudeSearchEntries = createLocalizedCatalog(() => [ { - title: translate('auto.components.settings.accounts.search.75682e1b62', 'Claude Accounts'), + title: translate('auto.components.settings.accounts.search.be3a748ebb', 'Claude accounts'), description: translate( 'auto.components.settings.accounts.search.dd75a73991', 'Optional account switching for Claude while preserving shared chat context.' diff --git a/src/renderer/src/components/settings/accounts/accounts-pane-removal-dialogs.tsx b/src/renderer/src/components/settings/accounts/accounts-pane-removal-dialogs.tsx index efd18c7f1c1..377ad532bcb 100644 --- a/src/renderer/src/components/settings/accounts/accounts-pane-removal-dialogs.tsx +++ b/src/renderer/src/components/settings/accounts/accounts-pane-removal-dialogs.tsx @@ -65,7 +65,7 @@ export function renderAccountsRemovalDialogs( ) }} > - {t('auto.components.settings.AccountsPane.c2d2751587', 'Remove Account')} + {t('auto.components.settings.AccountsPane.699680a328', 'Remove account')} @@ -105,7 +105,7 @@ export function renderAccountsRemovalDialogs( ) }} > - {t('auto.components.settings.AccountsPane.c2d2751587', 'Remove Account')} + {t('auto.components.settings.AccountsPane.699680a328', 'Remove account')} diff --git a/src/renderer/src/components/settings/accounts/accounts-search.ts b/src/renderer/src/components/settings/accounts/accounts-search.ts index fd78aba0d15..dbf6bdb196f 100644 --- a/src/renderer/src/components/settings/accounts/accounts-search.ts +++ b/src/renderer/src/components/settings/accounts/accounts-search.ts @@ -6,7 +6,7 @@ import { getAccountsClaudeSearchEntries } from './accounts-claude-search' export const getAccountsLocationSearchEntries = createLocalizedCatalog(() => [ { - title: translate('auto.components.settings.accounts.search.d09fb5ca92', 'Account Location'), + title: translate('auto.components.settings.accounts.search.5e2101f61f', 'Account location'), description: translate( 'auto.components.settings.accounts.search.b84a5b0c8a', 'Choose whether provider accounts are inspected and added on this device or in WSL.' @@ -25,7 +25,7 @@ export const getAccountsLocationSearchEntries = createLocalizedCatalog(() => [ export const getAccountsCodexSearchEntries = createLocalizedCatalog(() => [ { - title: translate('auto.components.settings.accounts.search.17c5d244eb', 'Codex Accounts'), + title: translate('auto.components.settings.accounts.search.54c541fc6e', 'Codex accounts'), description: translate( 'auto.components.settings.accounts.search.b40d5b6570', 'Optional account switching for Codex and live rate limit fetching.' @@ -55,7 +55,7 @@ export const getAccountsCodexSearchEntries = createLocalizedCatalog(() => [ ] }, { - title: translate('auto.components.settings.accounts.search.a4bcfd6f86', 'Active Codex Account'), + title: translate('auto.components.settings.accounts.search.4518496456', 'Active Codex account'), description: translate( 'auto.components.settings.accounts.search.87a4a8584e', 'Choose which optional saved Codex account powers live quota reads.' @@ -109,8 +109,8 @@ export const getAccountsGeminiSearchEntries = createLocalizedCatalog(() => [ export const getAccountsOpencodeSearchEntries = createLocalizedCatalog(() => [ { title: translate( - 'auto.components.settings.accounts.search.6ed1401020', - 'OpenCode Go Session Cookie' + 'auto.components.settings.accounts.search.f0e6678f99', + 'OpenCode Go session cookie' ), description: translate( 'auto.components.settings.accounts.search.25591bf95b', @@ -130,8 +130,8 @@ export const getAccountsOpencodeSearchEntries = createLocalizedCatalog(() => [ }, { title: translate( - 'auto.components.settings.accounts.search.4ee2029e9c', - 'OpenCode Go Workspace ID' + 'auto.components.settings.accounts.search.8eef999193', + 'OpenCode Go workspace id' ), description: translate( 'auto.components.settings.accounts.search.38d22ff8d6', @@ -153,7 +153,7 @@ export const getAccountsOpencodeSearchEntries = createLocalizedCatalog(() => [ export const getAccountsMiniMaxSearchEntries = createLocalizedCatalog(() => [ { - title: translate('auto.components.settings.accounts.search.733f9e2a93', 'MiniMax Usage'), + title: translate('auto.components.settings.accounts.search.9b6ce52c36', 'MiniMax usage'), description: translate( 'auto.components.settings.accounts.search.f8374c3151', 'Configure MiniMax usage tracking. Pick the overseas or China endpoint, then paste a session cookie or save an API key that works on either host.' @@ -198,7 +198,7 @@ export const getAccountsGrokSearchEntries = createLocalizedCatalog(() => [ export const getAccountsAntigravitySearchEntries = createLocalizedCatalog(() => [ { - title: translate('accounts.antigravity.searchTitle', 'Antigravity Accounts'), + title: translate('accounts.antigravity.fd47b5a5dd', 'Antigravity accounts'), description: translate( 'accounts.antigravity.searchDescription', 'Save and select native agy Google accounts on the execution host.' @@ -216,7 +216,7 @@ export const getAccountsAntigravitySearchEntries = createLocalizedCatalog(() => export const getAccountsCursorSearchEntries = createLocalizedCatalog(() => [ { - title: translate('auto.components.settings.accounts.search.cursor.title', 'Cursor Usage'), + title: translate('auto.components.settings.accounts.search.cursor.39bbdebe13', 'Cursor usage'), description: translate( 'auto.components.settings.accounts.search.cursor.description', 'Plan usage read from the Cursor sign-in already on this computer (cursor-agent login).' @@ -248,7 +248,10 @@ export const getAccountsCursorSearchEntries = createLocalizedCatalog(() => [ export const getAccountsZcodePlanSearchEntries = createLocalizedCatalog(() => [ { - title: translate('auto.components.settings.accounts.search.zcodePlan.title', 'GLM Coding Plan'), + title: translate( + 'auto.components.settings.accounts.search.zcodePlan.0db9d0465f', + 'GLM coding plan' + ), description: translate( 'auto.components.settings.accounts.search.zcodePlan.description', 'Track Z.AI or Zhipu (BigModel) GLM Coding Plan usage. Pick the site and save the plan API key.' diff --git a/src/renderer/src/components/settings/accounts/claude/accounts-pane-claude-section.tsx b/src/renderer/src/components/settings/accounts/claude/accounts-pane-claude-section.tsx index 117ef72b818..bc05589e570 100644 --- a/src/renderer/src/components/settings/accounts/claude/accounts-pane-claude-section.tsx +++ b/src/renderer/src/components/settings/accounts/claude/accounts-pane-claude-section.tsx @@ -98,7 +98,7 @@ export function renderClaudeAccountsSection( )} > )} - {t('auto.components.settings.AccountsPane.b0e948a4f9', 'Add Account')} + {t('auto.components.settings.AccountsPane.7e9977b560', 'Add account')} {!isRemoteAccountScope && canOfferClaudeSignInLink(accountRuntime.runtime) ? ( )} - {t('auto.components.settings.AccountsPane.b0e948a4f9', 'Add Account')} + {t('auto.components.settings.AccountsPane.7e9977b560', 'Add account')} {/* Follow the running addition; hide Cancel only when its server prompt already offers it. */} {codexAction === 'adding' && !accountAdditionShownInPrompt('codex', accountOwner) ? ( diff --git a/src/renderer/src/components/settings/accounts/providers/accounts-pane-opencode-section.tsx b/src/renderer/src/components/settings/accounts/providers/accounts-pane-opencode-section.tsx index 3c166ba7143..251606f4ca9 100644 --- a/src/renderer/src/components/settings/accounts/providers/accounts-pane-opencode-section.tsx +++ b/src/renderer/src/components/settings/accounts/providers/accounts-pane-opencode-section.tsx @@ -32,8 +32,8 @@ export function renderOpenCodeAccountsSection(
{cookieNotice ?

{cookieNotice}

: null} diff --git a/src/renderer/src/components/settings/accounts/usage/accounts-pane-opencode-credentials.tsx b/src/renderer/src/components/settings/accounts/usage/accounts-pane-opencode-credentials.tsx index d56984df1b0..c4d7acc10c9 100644 --- a/src/renderer/src/components/settings/accounts/usage/accounts-pane-opencode-credentials.tsx +++ b/src/renderer/src/components/settings/accounts/usage/accounts-pane-opencode-credentials.tsx @@ -58,8 +58,8 @@ export function OpenCodeGoCredentials({ onSaved }: { onSaved: () => void }): Rea return ( diff --git a/src/renderer/src/components/settings/advanced/ExperimentalPane.test.tsx b/src/renderer/src/components/settings/advanced/ExperimentalPane.test.tsx new file mode 100644 index 00000000000..b9c9627d224 --- /dev/null +++ b/src/renderer/src/components/settings/advanced/ExperimentalPane.test.tsx @@ -0,0 +1,25 @@ +// @vitest-environment happy-dom +import { cleanup, fireEvent, render, screen } from '@testing-library/react' +import { afterEach, beforeEach, expect, it, vi } from 'vitest' +import { getDefaultSettings } from '../../../../../shared/constants' +import { useAppStore } from '@/store' +import { TooltipProvider } from '../../ui/tooltip' +import { ExperimentalPane } from './ExperimentalPane' + +beforeEach(() => useAppStore.setState(useAppStore.getInitialState(), true)) +afterEach(cleanup) + +it('opens the ordinary Experimental pane and preserves its setting action', () => { + const updateSettings = vi.fn() + render( + + + + ) + + fireEvent.click(screen.getByRole('switch', { name: 'Pet' })) + expect(updateSettings).toHaveBeenCalledWith({ experimentalPet: true }) +}) diff --git a/src/renderer/src/components/settings/advanced/ExperimentalPane.tsx b/src/renderer/src/components/settings/advanced/ExperimentalPane.tsx index d50f0698959..941d1a333ea 100644 --- a/src/renderer/src/components/settings/advanced/ExperimentalPane.tsx +++ b/src/renderer/src/components/settings/advanced/ExperimentalPane.tsx @@ -36,18 +36,18 @@ export function ExperimentalPane({ }: ExperimentalPaneProps): React.JSX.Element { const t = useTranslate() const searchQuery = useAppStore((s) => s.settingsSearchQuery) - const showPet = matchesSettingsSearch(searchQuery, [getExperimentalSearchEntry(t).pet]) + const showPet = matchesSettingsSearch(searchQuery, [getExperimentalSearchEntry().pet]) const showAgentDashboard = matchesSettingsSearch(searchQuery, [ - getExperimentalSearchEntry(t).agentDashboard + getExperimentalSearchEntry().agentDashboard ]) const showTerminalAttention = matchesSettingsSearch(searchQuery, [ - getExperimentalSearchEntry(t).terminalAttention + getExperimentalSearchEntry().terminalAttention ]) const showAgentHibernation = matchesSettingsSearch(searchQuery, [ - getExperimentalSearchEntry(t).agentHibernation + getExperimentalSearchEntry().agentHibernation ]) const showNewWorktreeCardStyle = matchesSettingsSearch(searchQuery, [ - getExperimentalSearchEntry(t).newWorktreeCardStyle + getExperimentalSearchEntry().newWorktreeCardStyle ]) const agentHibernationEnabled = settings.experimentalAgentHibernation === true const newWorktreeCardStyleEnabled = settings.experimentalNewWorktreeCardStyle === true @@ -70,7 +70,7 @@ export function ExperimentalPane({ 'auto.components.settings.ExperimentalPane.0e89a574ae', 'Floating animated pet in the bottom-right corner.' )} - keywords={getExperimentalSearchEntry(t).pet.keywords} + keywords={getExperimentalSearchEntry().pet.keywords} className="space-y-3 py-3" id="experimental-pet" > @@ -102,7 +102,7 @@ export function ExperimentalPane({ 'auto.components.settings.ExperimentalPane.88b7613afb', 'Persistent pane highlight for terminal bell and agent-completion events.' )} - keywords={getExperimentalSearchEntry(t).terminalAttention.keywords} + keywords={getExperimentalSearchEntry().terminalAttention.keywords} className="space-y-3 py-3" >
@@ -143,7 +143,7 @@ export function ExperimentalPane({ 'auto.components.settings.ExperimentalPane.agentHibernation.description', 'Stops idle background agent terminals after the configured idle window and resumes supported sessions when you open them again.' )} - keywords={getExperimentalSearchEntry(t).agentHibernation.keywords} + keywords={getExperimentalSearchEntry().agentHibernation.keywords} className="space-y-3 py-3" id="experimental-agent-hibernation" > @@ -216,7 +216,7 @@ export function ExperimentalPane({ 'auto.components.settings.ExperimentalPane.newWorktreeCardStyle.description', 'Preview updated worktree-card layout, metadata placement, card-display menu options, and status presentation.' )} - keywords={getExperimentalSearchEntry(t).newWorktreeCardStyle.keywords} + keywords={getExperimentalSearchEntry().newWorktreeCardStyle.keywords} className="space-y-3 py-3" id="experimental-new-worktree-card-style" > diff --git a/src/renderer/src/components/settings/advanced/HiddenExperimentalGroup.tsx b/src/renderer/src/components/settings/advanced/HiddenExperimentalGroup.tsx index 6de87e81686..cbb7c53bc59 100644 --- a/src/renderer/src/components/settings/advanced/HiddenExperimentalGroup.tsx +++ b/src/renderer/src/components/settings/advanced/HiddenExperimentalGroup.tsx @@ -6,9 +6,9 @@ import { setTerminalRenderDesyncSentinelArmed } from '../../terminal-pane/render-health/terminal-render-desync-trigger' import { useTranslate } from '@/i18n/use-translate' -import { getShortcutPlatform } from '@/lib/shortcut-platform' +import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' -// Use shared orange styling to identify unfinished/staff-only controls. +// Warning tokens distinguish unfinished controls across themes. export function HiddenExperimentalGroup(): React.JSX.Element { const t = useTranslate() const isMac = getShortcutPlatform() === 'darwin' @@ -20,23 +20,26 @@ export function HiddenExperimentalGroup(): React.JSX.Element { setRenderDiagnosticsArmed(armed) } return ( -
-

+
+

{t( 'auto.components.settings.HiddenExperimentalGroup.f2c81d904a', 'Hidden experimental settings' )}

-
+
-
diff --git a/src/renderer/src/components/settings/advanced/advanced-search.ts b/src/renderer/src/components/settings/advanced/advanced-search.ts index f252ae2f56c..5b8f97f6205 100644 --- a/src/renderer/src/components/settings/advanced/advanced-search.ts +++ b/src/renderer/src/components/settings/advanced/advanced-search.ts @@ -2,61 +2,72 @@ import type { SettingsSearchEntry } from '../search/settings-search' import { getAdvancedNetworkSearchEntries } from './network/advanced-network-search' import { createLocalizedCatalog } from '@/i18n/localized-catalog' import { translate } from '@/i18n/i18n' -import type { Translate } from '@/i18n/use-translate' import { translateSearchKeyword } from '../search/settings-search-keywords' +export const getAdvancedSearchEntry = createLocalizedCatalog( + () => + ({ + http1Compatibility: { + title: translate( + 'auto.components.settings.advanced.search.11eea3da72', + 'HTTP/1.1 Compatibility' + ), + description: translate( + 'auto.components.settings.advanced.search.585f56fae0', + 'Use HTTP/1.1 for Electron networking when HTTP/2 fails behind a proxy.' + ), + keywords: [ + ...translateSearchKeyword( + 'auto.components.settings.advanced.search.e04e9db503', + 'advanced' + ), + ...translateSearchKeyword( + 'auto.components.settings.advanced.search.2b4d26d11e', + 'networking' + ), + ...translateSearchKeyword( + 'auto.components.settings.advanced.search.4d44352eea', + 'network' + ), + ...translateSearchKeyword('auto.components.settings.advanced.search.48a1c8f534', 'http'), + ...translateSearchKeyword('auto.components.settings.advanced.search.4b4ae4345a', 'http2'), + ...translateSearchKeyword( + 'auto.components.settings.advanced.search.a0f71bd909', + 'http/2' + ), + ...translateSearchKeyword('auto.components.settings.advanced.search.f8ff125ebe', 'http1'), + ...translateSearchKeyword( + 'auto.components.settings.advanced.search.621233008b', + 'http/1.1' + ), + ...translateSearchKeyword( + 'auto.components.settings.advanced.search.65bf6af262', + 'compatibility' + ), + ...translateSearchKeyword('auto.components.settings.advanced.search.f98a60af11', 'proxy'), + ...translateSearchKeyword('auto.components.settings.advanced.search.4383251647', 'vpn'), + ...translateSearchKeyword( + 'auto.components.settings.advanced.search.79e0947e95', + 'support' + ), + ...translateSearchKeyword( + 'auto.components.settings.advanced.search.6576fce4d2', + 'troubleshooting' + ), + ...translateSearchKeyword( + 'auto.components.settings.advanced.search.e61ed8ab33', + 'updates' + ), + ...translateSearchKeyword( + 'auto.components.settings.advanced.search.a7002e1ac4', + 'updater' + ) + ] + } + }) satisfies Record +) + export const getAdvancedPaneSearchEntries = createLocalizedCatalog((): SettingsSearchEntry[] => [ ...getAdvancedNetworkSearchEntries(), - { - title: translate( - 'auto.components.settings.advanced.search.11eea3da72', - 'HTTP/1.1 Compatibility' - ), - description: translate( - 'auto.components.settings.advanced.search.585f56fae0', - 'Use HTTP/1.1 for Electron networking when HTTP/2 fails behind a proxy.' - ), - keywords: [ - ...translateSearchKeyword('auto.components.settings.advanced.search.e04e9db503', 'advanced'), - ...translateSearchKeyword( - 'auto.components.settings.advanced.search.2b4d26d11e', - 'networking' - ), - ...translateSearchKeyword('auto.components.settings.advanced.search.4d44352eea', 'network'), - ...translateSearchKeyword('auto.components.settings.advanced.search.48a1c8f534', 'http'), - ...translateSearchKeyword('auto.components.settings.advanced.search.4b4ae4345a', 'http2'), - ...translateSearchKeyword('auto.components.settings.advanced.search.a0f71bd909', 'http/2'), - ...translateSearchKeyword('auto.components.settings.advanced.search.f8ff125ebe', 'http1'), - ...translateSearchKeyword('auto.components.settings.advanced.search.621233008b', 'http/1.1'), - ...translateSearchKeyword( - 'auto.components.settings.advanced.search.65bf6af262', - 'compatibility' - ), - ...translateSearchKeyword('auto.components.settings.advanced.search.f98a60af11', 'proxy'), - ...translateSearchKeyword('auto.components.settings.advanced.search.4383251647', 'vpn'), - ...translateSearchKeyword('auto.components.settings.advanced.search.79e0947e95', 'support'), - ...translateSearchKeyword( - 'auto.components.settings.advanced.search.6576fce4d2', - 'troubleshooting' - ), - ...translateSearchKeyword('auto.components.settings.advanced.search.e61ed8ab33', 'updates'), - ...translateSearchKeyword('auto.components.settings.advanced.search.a7002e1ac4', 'updater') - ] - } + getAdvancedSearchEntry().http1Compatibility ]) - -function findEntry(title: string): SettingsSearchEntry { - const entry = getAdvancedPaneSearchEntries().find((e) => e.title === title) - if (!entry) { - throw new Error(`Missing advanced-pane search entry: "${title}"`) - } - return entry -} - -export function getAdvancedSearchEntry(t: Translate = translate) { - return { - http1Compatibility: findEntry( - t('auto.components.settings.advanced.search.11eea3da72', 'HTTP/1.1 Compatibility') - ) - } as const -} diff --git a/src/renderer/src/components/settings/advanced/experimental-search.ts b/src/renderer/src/components/settings/advanced/experimental-search.ts index 97f63766797..d69b5528840 100644 --- a/src/renderer/src/components/settings/advanced/experimental-search.ts +++ b/src/renderer/src/components/settings/advanced/experimental-search.ts @@ -1,227 +1,200 @@ import type { SettingsSearchEntry } from '../search/settings-search' import { createLocalizedCatalog } from '@/i18n/localized-catalog' import { translate } from '@/i18n/i18n' -import type { Translate } from '@/i18n/use-translate' import { translateSearchKeyword } from '../search/settings-search-keywords' import { getNewWorktreeCardStyleSearchEntry } from './new-worktree-card-style-search-entry' import { getEphemeralVmsSearchEntry } from '../virtual-machines/recipes/ephemeral-vms-search' import { getBrowserExtensionsExperimentalSearchEntry } from '../browser/extensions/browser-extensions-experimental-search' import { getWslHostsExperimentalSearchEntry } from '../wsl/hosts/wsl-hosts-experimental-search' +export const getExperimentalSearchEntry = createLocalizedCatalog( + () => + ({ + pet: { + title: translate('auto.components.settings.experimental.search.87d99e634b', 'Pet'), + description: translate( + 'auto.components.settings.experimental.search.6b5a56ac35', + 'Floating animated pet in the bottom-right corner.' + ), + keywords: [ + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.0d24759f14', + 'experimental' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.051203d37c', + 'pet' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.b54cea709b', + 'sidekick' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.2a33975d72', + 'mascot' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.9f5609bfb8', + 'overlay' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.65df471ab2', + 'animated' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.791fefc0b0', + 'corner' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.9af7a518db', + 'character' + ) + ] + }, + agentDashboard: { + title: translate( + 'auto.components.settings.experimental.search.agentDashboard.eaf17a7214', + 'Agent dashboard' + ), + description: translate( + 'auto.components.settings.experimental.search.agentDashboard.description', + 'Kanban board for monitoring agents across worktrees, in-window or as a pop-out.' + ), + keywords: [ + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.0d24759f14', + 'experimental' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentDashboard.agent', + 'agent' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentDashboard.dashboard', + 'dashboard' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentDashboard.kanban', + 'kanban' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentDashboard.popout', + 'pop-out' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentDashboard.board', + 'board' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentDashboard.inWindow', + 'in-window' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentDashboard.worktrees', + 'worktrees' + ) + ] + }, + terminalAttention: { + title: translate( + 'auto.components.settings.experimental.search.9e4ddf776d', + 'Terminal attention' + ), + description: translate( + 'auto.components.settings.experimental.search.11877246fc', + 'Persistent pane highlight for terminal bell and agent-completion events.' + ), + keywords: [ + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.0d24759f14', + 'experimental' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.9bb3bd5098', + 'terminal' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.01567f19ca', + 'attention' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.268e99d957', + 'highlight' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.edc49480a1', + 'pane' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.8facf10138', + 'bell' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.7695fd30e9', + 'notification' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.5f067ba0f9', + 'agent' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.f10d307468', + 'completion' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.7b79081695', + 'unread' + ) + ] + }, + agentHibernation: { + title: translate( + 'auto.components.settings.experimental.search.agentHibernation.title', + 'Agent sleep' + ), + description: translate( + 'auto.components.settings.experimental.search.agentHibernation.description', + 'Stops idle background agent terminals after the configured idle window and resumes supported sessions when opened again. Agent sleep preserves launch options for agents started by Orca; manually started agents may resume with current Orca defaults.' + ), + keywords: [ + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.0d24759f14', + 'experimental' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentHibernation.agent', + 'agent' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentHibernation.agents', + 'agents' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentHibernation.sleep', + 'sleep' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentHibernation.minutes', + 'minutes' + ), + ...translateSearchKeyword( + 'auto.components.settings.experimental.search.agentHibernation.terminal', + 'terminal' + ) + ] + }, + newWorktreeCardStyle: getNewWorktreeCardStyleSearchEntry(), + ephemeralVms: getEphemeralVmsSearchEntry(), + browserExtensions: getBrowserExtensionsExperimentalSearchEntry() + }) satisfies Record +) + export const getExperimentalPaneSearchEntries = createLocalizedCatalog( (): SettingsSearchEntry[] => [ - { - title: translate('auto.components.settings.experimental.search.87d99e634b', 'Pet'), - description: translate( - 'auto.components.settings.experimental.search.6b5a56ac35', - 'Floating animated pet in the bottom-right corner.' - ), - keywords: [ - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.0d24759f14', - 'experimental' - ), - ...translateSearchKeyword('auto.components.settings.experimental.search.051203d37c', 'pet'), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.b54cea709b', - 'sidekick' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.2a33975d72', - 'mascot' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.9f5609bfb8', - 'overlay' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.65df471ab2', - 'animated' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.791fefc0b0', - 'corner' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.9af7a518db', - 'character' - ) - ] - }, - { - title: translate( - 'auto.components.settings.experimental.search.agentDashboard.title', - 'Agent Dashboard' - ), - description: translate( - 'auto.components.settings.experimental.search.agentDashboard.description', - 'Kanban board for monitoring agents across worktrees, in-window or as a pop-out.' - ), - keywords: [ - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.0d24759f14', - 'experimental' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentDashboard.agent', - 'agent' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentDashboard.dashboard', - 'dashboard' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentDashboard.kanban', - 'kanban' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentDashboard.popout', - 'pop-out' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentDashboard.board', - 'board' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentDashboard.inWindow', - 'in-window' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentDashboard.worktrees', - 'worktrees' - ) - ] - }, - { - title: translate( - 'auto.components.settings.experimental.search.9e4ddf776d', - 'Terminal attention' - ), - description: translate( - 'auto.components.settings.experimental.search.11877246fc', - 'Persistent pane highlight for terminal bell and agent-completion events.' - ), - keywords: [ - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.0d24759f14', - 'experimental' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.9bb3bd5098', - 'terminal' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.01567f19ca', - 'attention' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.268e99d957', - 'highlight' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.edc49480a1', - 'pane' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.8facf10138', - 'bell' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.7695fd30e9', - 'notification' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.5f067ba0f9', - 'agent' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.f10d307468', - 'completion' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.7b79081695', - 'unread' - ) - ] - }, - { - title: translate( - 'auto.components.settings.experimental.search.agentHibernation.title', - 'Agent sleep' - ), - description: translate( - 'auto.components.settings.experimental.search.agentHibernation.description', - 'Stops idle background agent terminals after the configured idle window and resumes supported sessions when opened again. Agent sleep preserves launch options for agents started by Orca; manually started agents may resume with current Orca defaults.' - ), - keywords: [ - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.0d24759f14', - 'experimental' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentHibernation.agent', - 'agent' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentHibernation.agents', - 'agents' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentHibernation.sleep', - 'sleep' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentHibernation.minutes', - 'minutes' - ), - ...translateSearchKeyword( - 'auto.components.settings.experimental.search.agentHibernation.terminal', - 'terminal' - ) - ] - }, - getNewWorktreeCardStyleSearchEntry(), - getEphemeralVmsSearchEntry(), - getBrowserExtensionsExperimentalSearchEntry(), + ...Object.values(getExperimentalSearchEntry()), // Index WSL toggles only on Windows desktops that expose them. ...(typeof window !== 'undefined' && window.api?.runtimeEnvironments?.wslHosts ? [getWslHostsExperimentalSearchEntry()] : []) ] ) - -// Resolve by title and fail loudly on renames so changing catalog shape cannot silently retarget numeric indexes. -function findEntry(title: string): SettingsSearchEntry { - const entry = getExperimentalPaneSearchEntries().find((e) => e.title === title) - if (!entry) { - throw new Error(`Missing experimental-pane search entry: "${title}"`) - } - return entry -} - -export function getExperimentalSearchEntry(t: Translate = translate) { - return { - pet: findEntry(t('auto.components.settings.experimental.search.87d99e634b', 'Pet')), - agentDashboard: findEntry( - t('auto.components.settings.experimental.search.agentDashboard.title', 'Agent Dashboard') - ), - terminalAttention: findEntry( - t('auto.components.settings.experimental.search.9e4ddf776d', 'Terminal attention') - ), - agentHibernation: findEntry( - t('auto.components.settings.experimental.search.agentHibernation.title', 'Agent sleep') - ), - newWorktreeCardStyle: findEntry( - t('auto.components.settings.experimental.search.newWorktreeCardStyle.title', 'New card style') - ), - ephemeralVms: findEntry( - t('auto.components.settings.ephemeralVms.search.cloudVmTitle', 'Cloud VM') - ), - browserExtensions: findEntry( - t( - 'auto.components.settings.experimental.search.browserExtensions.title', - 'Browser extensions' - ) - ) - } as const -} diff --git a/src/renderer/src/components/settings/advanced/network/AdvancedNetworkSettingsSection.tsx b/src/renderer/src/components/settings/advanced/network/AdvancedNetworkSettingsSection.tsx index c9ab9f90216..d8943143898 100644 --- a/src/renderer/src/components/settings/advanced/network/AdvancedNetworkSettingsSection.tsx +++ b/src/renderer/src/components/settings/advanced/network/AdvancedNetworkSettingsSection.tsx @@ -245,7 +245,7 @@ export function AdvancedNetworkSettingsSection({

{t( @@ -278,8 +278,8 @@ export function AdvancedNetworkSettingsSection({