From 84494ce3943e97eed210c7d6a0dc70da7058626b Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Mon, 26 Oct 2026 22:58:55 -0700 Subject: [PATCH] test: remove 338 low-value cases and 28 suites (#34234) Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> --- config/reliability-gates.jsonc | 12 +- config/scripts/ci-shard-timings.json | 28 --- .../doc-preview-download-block-notice.test.ts | 11 - .../doc-preview-failure-notice.test.ts | 28 --- .../codex-login-auth-url.test.ts | 5 - .../codex/codex-trust-grant-telemetry.test.ts | 42 ---- .../android/android-app-control.test.ts | 74 ------- .../android/android-permissions.test.ts | 34 --- src/main/git/admission-tier-plumbing.test.ts | 48 ---- .../git/fetch-error-classification.test.ts | 13 -- .../repository-field-options.test.ts | 23 +- src/main/grok-accounts/status.test.ts | 12 - .../configured-terminal-shell-args.test.ts | 58 ----- .../ipc/spawn-options-spawn-intent.test.ts | 6 - src/main/ipc/pty/pty-spawn-timing.test.ts | 34 --- .../menu/gpu-acceleration-about-panel.test.ts | 60 ----- src/main/muse/hook-config-json.test.ts | 5 - src/main/muse/hook-settings.test.ts | 43 ---- .../structured-agent-configured-args.test.ts | 4 - .../opencode/legacy-shared-config-dir.test.ts | 20 -- .../orcad/orcad-app-version-stamp.test.ts | 7 - src/main/orcad/orcad-bind-address.test.ts | 6 - src/main/orcad/orcad-compile-cache.test.ts | 10 - .../preflight/agent-command-detection.test.ts | 5 - .../provider-spawn-failure-report.test.ts | 10 - .../filesystem-markdown-listing.test.ts | 11 - .../stable-foreground-process.test.ts | 15 -- .../claude-oauth-usage-error.test.ts | 8 - .../gemini-bucket-formatting.test.ts | 65 ------ .../bundled-ripgrep-wsl-routing.test.ts | 7 - .../orchestration/db/row-column-lists.test.ts | 5 - .../methods/mobile-project-sections.test.ts | 47 ---- .../federation-start-schema.test.ts | 5 - .../orchestration/runs/run-receipt.test.ts | 21 -- .../structured-agent-session-agents.test.ts | 14 +- .../structured-agent-account-kind.test.ts | 16 +- .../windows-default-route-interfaces.test.ts | 15 -- src/main/speech/model-catalog.test.ts | 48 ---- src/main/speech/stt-worker-paths.test.ts | 7 +- src/main/ssh/ssh-session-limit-error.test.ts | 61 ----- ...serve-mode-argv-cli-redirect-order.test.ts | 51 ----- src/main/telemetry/cohort-classifier.test.ts | 19 -- .../window/clipboard-image-thumbnail.test.ts | 11 - src/main/worktree-create-base.test.ts | 16 -- .../cmd-j/palette-filter-option-list.test.ts | 63 ------ .../agent-board-filtering.test.ts | 48 ---- .../editor/markdown-export-html.test.ts | 25 --- ...all-setup-checklist-localized-copy.test.ts | 59 +---- .../github/pr-comment-code-context.test.ts | 45 ---- ...ssue-attribute-filter-primary-team.test.ts | 38 +--- .../native-chat-resume-activity-label.test.ts | 79 ------- .../agent-session-write-notice-text.test.ts | 64 +----- .../native-chat-session-option-labels.test.ts | 65 +----- .../src/components/repo/repo-icon.test.tsx | 25 --- .../file-explorer-display-root.test.ts | 18 -- ...e-control-text-generation-defaults.test.ts | 58 ----- .../listing/content-status.test.tsx | 17 -- .../settings/GrokAccountsSection.test.tsx | 11 - .../settings/OrcaAccountSettingsPane.test.tsx | 112 ---------- .../settings/accounts-search.test.ts | 80 ------- .../appearance-status-bar-search.test.ts | 56 ----- .../settings/integrations-pane-status.test.ts | 99 --------- .../settings/provider-account-scope.test.ts | 65 ------ .../repository-host-setup-options.test.ts | 65 +----- .../settings-form-option-filter.test.ts | 17 -- .../settings/shortcut-row-visibility.test.ts | 64 +----- .../sidebar/create-project-defaults.test.ts | 137 ------------ .../sidebar/truncated-sidebar-label.test.tsx | 24 +- .../codex-restart-status-summary.test.ts | 38 ---- .../remote-host-connection-status.test.ts | 20 -- .../resource-manager-terminal-copy.test.ts | 96 -------- .../resource-memory-metric-copy.test.ts | 73 ------ .../status-bar/ssh-status-menu-rows.test.ts | 26 --- .../status-bar-agent-gating.test.ts | 40 ---- .../usage-unit-label-parity.test.tsx | 14 +- .../status-bar/usage-unit-label.test.ts | 75 ------- .../task-page-repo-source-context.test.ts | 68 ------ .../terminal-title-evidence.test.ts | 29 +-- .../terminal/terminal-close-copy-kind.test.ts | 20 -- .../workspace-cleanup-filter-bar.test.tsx | 39 ---- .../src/i18n/plugin-chrome-allowlist.test.ts | 16 -- .../file-preview-action-visibility.test.tsx | 85 ------- .../lib/monaco-peek-preview-options.test.ts | 98 --------- .../ssh/ssh-host-node-download-copy.test.ts | 29 --- src/shared/ai-vault-resume-target.test.ts | 33 +-- .../antigravity-generation-plan.test.ts | 28 --- src/shared/git-status-sort.test.ts | 76 ------- ...-script-package-manager-suggestion.test.ts | 57 ----- src/shared/sidebar-list/sort-stamps.test.ts | 60 ----- .../sidebar-list/workspace-rows.test.ts | 38 ---- src/shared/skill-package-manifest.test.ts | 4 - ...ource-control-create-review-intent.test.ts | 16 -- ...ce-control-primary-action-decision.test.ts | 43 ---- .../source-control-push-failure.test.ts | 39 ---- ...uctured-agent-session-agent-status.test.ts | 13 -- ...ctured-agent-session-context-usage.test.ts | 38 ---- .../structured-agent-session-create.test.ts | 47 +--- ...d-agent-session-dispatch-rejection.test.ts | 33 +-- ...uctured-agent-session-option-picks.test.ts | 29 --- ...ured-agent-session-rejection-words.test.ts | 22 -- ...ctured-agent-session-send-evidence.test.ts | 15 -- ...structured-agent-turn-clock-anchor.test.ts | 25 +-- ...structured-chat-naming-eligibility.test.ts | 6 - ...tructured-native-chat-launch-route.test.ts | 20 -- src/shared/tab-title-resolution.test.ts | 208 ------------------ src/shared/terminal-input.test.ts | 30 --- src/shared/tui-agent-launch-defaults.spec.ts | 20 -- src/shared/ui-locale.test.ts | 64 ------ src/shared/utf8-byte-limits.test.ts | 17 -- .../workspace-cleanup-applied-filters.test.ts | 51 ----- src/shared/workspace-cleanup.test.ts | 7 - .../workspace-layout/tab-group-moves.test.ts | 52 +---- .../workspace-layout-browser-commands.test.ts | 27 --- .../workspace-layout-dropped-leaves.test.ts | 13 +- .../workspace-layout-records.test.ts | 7 - .../workspace-layout-views.test.ts | 29 --- .../worktree/host-qualified-identity.test.ts | 100 +-------- 117 files changed, 28 insertions(+), 4379 deletions(-) delete mode 100644 src/main/codex/codex-trust-grant-telemetry.test.ts delete mode 100644 src/main/emulator/android/android-app-control.test.ts delete mode 100644 src/main/git/admission-tier-plumbing.test.ts delete mode 100644 src/main/ipc/pty/configured-terminal-shell-args.test.ts delete mode 100644 src/main/menu/gpu-acceleration-about-panel.test.ts delete mode 100644 src/main/muse/hook-settings.test.ts delete mode 100644 src/main/rate-limits/gemini-bucket-formatting.test.ts delete mode 100644 src/main/runtime/rpc/methods/mobile-project-sections.test.ts delete mode 100644 src/main/speech/model-catalog.test.ts delete mode 100644 src/main/ssh/ssh-session-limit-error.test.ts delete mode 100644 src/main/startup/serve-mode-argv-cli-redirect-order.test.ts delete mode 100644 src/renderer/src/components/native-chat-resume-activity-label.test.ts delete mode 100644 src/renderer/src/components/right-sidebar/source-control-text-generation-defaults.test.ts delete mode 100644 src/renderer/src/components/settings/OrcaAccountSettingsPane.test.tsx delete mode 100644 src/renderer/src/components/settings/accounts-search.test.ts delete mode 100644 src/renderer/src/components/settings/appearance-status-bar-search.test.ts delete mode 100644 src/renderer/src/components/settings/integrations-pane-status.test.ts delete mode 100644 src/renderer/src/components/settings/provider-account-scope.test.ts delete mode 100644 src/renderer/src/components/sidebar/create-project-defaults.test.ts delete mode 100644 src/renderer/src/components/status-bar/resource-manager-terminal-copy.test.ts delete mode 100644 src/renderer/src/components/status-bar/resource-memory-metric-copy.test.ts delete mode 100644 src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts delete mode 100644 src/renderer/src/components/status-bar/usage-unit-label.test.ts delete mode 100644 src/renderer/src/components/task-page/task-page-repo-source-context.test.ts delete mode 100644 src/renderer/src/lib/file-preview-action-visibility.test.tsx delete mode 100644 src/renderer/src/lib/monaco-peek-preview-options.test.ts delete mode 100644 src/shared/git-status-sort.test.ts delete mode 100644 src/shared/tab-title-resolution.test.ts diff --git a/config/reliability-gates.jsonc b/config/reliability-gates.jsonc index fba857a9bfe..db8925fb9b5 100644 --- a/config/reliability-gates.jsonc +++ b/config/reliability-gates.jsonc @@ -6013,7 +6013,7 @@ "pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/orca-runtime-browser.test.ts src/main/runtime/rpc/methods/browser.test.ts src/renderer/src/lib/file-preview.test.ts src/renderer/src/runtime/web-session-browser-placement.test.ts src/renderer/src/runtime/web-runtime-session.test.ts src/renderer/src/runtime/web-session-tabs-sync.test.ts src/renderer/src/runtime/remote-server-parity.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/runtime/web-runtime-browser-materialization.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/runtime/web-runtime-browser-capability-cleanup.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/doc-preview-grant-registry.test.ts src/main/browser/doc-preview-file-reader.test.ts src/main/browser/doc-preview-protocol.test.ts src/main/browser/doc-preview-guest-policy.test.ts src/main/browser/doc-preview-failure-notice.test.ts src/shared/doc-preview-scheme.test.ts src/renderer/src/lib/doc-preview-grants.test.ts src/renderer/src/lib/file-preview.test.ts src/renderer/src/lib/file-preview-action-visibility.test.tsx src/main/window/main-window-webview-security.test.ts src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.failure-message.test.tsx src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts src/renderer/src/components/terminal-pane/terminal-file-link-actions.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/doc-preview-grant-registry.test.ts src/main/browser/doc-preview-file-reader.test.ts src/main/browser/doc-preview-protocol.test.ts src/main/browser/doc-preview-guest-policy.test.ts src/main/browser/doc-preview-failure-notice.test.ts src/shared/doc-preview-scheme.test.ts src/renderer/src/lib/doc-preview-grants.test.ts src/renderer/src/lib/file-preview.test.ts src/main/window/main-window-webview-security.test.ts src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.failure-message.test.tsx src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts src/renderer/src/components/terminal-pane/terminal-file-link-actions.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/browser-session-partition-policies.test.ts src/main/browser/doc-preview-protocol.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/doc-preview-download-block-notice.test.ts src/main/browser/browser-session-partition-policies.test.ts src/main/browser/doc-preview-guest-policy.test.ts src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.failure-message.test.tsx", "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/browser-manager-guest-policy-profile.test.ts src/main/window/main-window-webview-security.test.ts src/main/browser/doc-preview-guest-policy.test.ts", @@ -6081,7 +6081,6 @@ "src/shared/doc-preview-scheme.test.ts", "src/renderer/src/lib/doc-preview-grants.test.ts", "src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.failure-message.test.tsx", - "src/renderer/src/lib/file-preview-action-visibility.test.tsx", "src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts", "src/renderer/src/components/terminal-pane/terminal-file-link-actions.test.ts", "src/main/ipc/doc-preview-grant-ipc.test.ts", @@ -6231,12 +6230,6 @@ "file": "src/main/browser/doc-preview-failure-notice.test.ts", "assertions": ["413 and 415 map to distinct reasons and everything else stays generic"] }, - { - "file": "src/renderer/src/lib/file-preview-action-visibility.test.tsx", - "assertions": [ - "the Explorer row predicate and the preview plan return one answer for the same file" - ] - }, { "file": "src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts", "assertions": [ @@ -6452,7 +6445,8 @@ "command": "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/doc-preview-grant-registry.test.ts src/main/browser/doc-preview-file-reader.test.ts src/main/browser/doc-preview-protocol.test.ts src/main/browser/doc-preview-guest-policy.test.ts src/main/browser/doc-preview-failure-notice.test.ts src/shared/doc-preview-scheme.test.ts src/renderer/src/lib/doc-preview-grants.test.ts src/renderer/src/lib/file-preview.test.ts src/renderer/src/lib/file-preview-action-visibility.test.tsx src/main/window/main-window-webview-security.test.ts src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.failure-message.test.tsx src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts src/renderer/src/components/terminal-pane/terminal-file-link-actions.test.ts", "result": "passed", "durationSeconds": 1.63, - "summary": "189/189 over the grant, reader, protocol, guest-policy, scheme-admission, plan-routing, action-visibility, failure-message, external-link and terminal-row contracts. This replaces the 2026-08-27 record of the same command at 174/174, whose thirteenth file was the deleted doc-preview-external-link-bridge.test.ts: the STA-5758 hardening moved that behavior into the reader-facing confirmation (doc-preview-external-link-confirmation.test.ts), which now proves the exact destination is shown and nothing opens on cancel, alongside everything the retired run carried — the stale-mint rejection that must not evict a reopened preview tab, the CSP header and session request filter, the SSH symlink refusal, subframe containment, truncated and over-cap reads, the unservable-asset and empty-file split, the out-of-worktree paired refusal, and the guest deny-only navigation sinks. The count also carries the entry-only rule added on top of the hardening: a grant whose document directory is its own request base — a workspace-root or out-of-workspace document — reads nothing but the entry file until the reader approves a directory, at both the lexical and the canonical containment pass, because that directory is where secrets live and a DNS-prefetch beacon needs no click." + "summary": "189/189 over the grant, reader, protocol, guest-policy, scheme-admission, plan-routing, action-visibility, failure-message, external-link and terminal-row contracts. This replaces the 2026-08-27 record of the same command at 174/174, whose thirteenth file was the deleted doc-preview-external-link-bridge.test.ts: the STA-5758 hardening moved that behavior into the reader-facing confirmation (doc-preview-external-link-confirmation.test.ts), which now proves the exact destination is shown and nothing opens on cancel, alongside everything the retired run carried — the stale-mint rejection that must not evict a reopened preview tab, the CSP header and session request filter, the SSH symlink refusal, subframe containment, truncated and over-cap reads, the unservable-asset and empty-file split, the out-of-worktree paired refusal, and the guest deny-only navigation sinks. The count also carries the entry-only rule added on top of the hardening: a grant whose document directory is its own request base — a workspace-root or out-of-workspace document — reads nothing but the entry file until the reader approves a directory, at both the lexical and the canonical containment pass, because that directory is where secrets live and a DNS-prefetch beacon needs no click.", + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/doc-preview-grant-registry.test.ts src/main/browser/doc-preview-file-reader.test.ts src/main/browser/doc-preview-protocol.test.ts src/main/browser/doc-preview-guest-policy.test.ts src/main/browser/doc-preview-failure-notice.test.ts src/shared/doc-preview-scheme.test.ts src/renderer/src/lib/doc-preview-grants.test.ts src/renderer/src/lib/file-preview.test.ts src/main/window/main-window-webview-security.test.ts src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.failure-message.test.tsx src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts src/renderer/src/components/terminal-pane/terminal-file-link-actions.test.ts" }, { "date": "2026-08-27", diff --git a/config/scripts/ci-shard-timings.json b/config/scripts/ci-shard-timings.json index 00142ef9f5c..3ad68e8a251 100644 --- a/config/scripts/ci-shard-timings.json +++ b/config/scripts/ci-shard-timings.json @@ -1919,7 +1919,6 @@ "src/main/codex/codex-trust-config-mutation-queue.test.ts": 52, "src/main/codex/codex-trust-grant-host.test.ts": 99, "src/main/codex/codex-trust-grant-ledger.test.ts": 70, - "src/main/codex/codex-trust-grant-telemetry.test.ts": 159, "src/main/codex/codex-turn-ordinals.test.ts": 74, "src/main/codex/codex-usage-limits.test.ts": 238, "src/main/codex/codex-user-hook-trust-moves.test.ts": 75, @@ -2337,7 +2336,6 @@ "src/main/durable-file-write.test.ts": 99, "src/main/electron-updater-mac-staging-contract.test.ts": 141, "src/main/emulator/android/adb-devices.test.ts": 62, - "src/main/emulator/android/android-app-control.test.ts": 45, "src/main/emulator/android/android-capability-operations.test.ts": 75, "src/main/emulator/android/android-device-inventory.test.ts": 37, "src/main/emulator/android/android-input-commands.test.ts": 63, @@ -2407,7 +2405,6 @@ "src/main/ghostty/theme-resolution.test.ts": 59, "src/main/git-bash.test.ts": 26, "src/main/git/add-sparse-worktree.test.ts": 139, - "src/main/git/admission-tier-plumbing.test.ts": 51, "src/main/git/base-ref-search-selector.test.ts": 157, "src/main/git/branch-rename.test.ts": 51, "src/main/git/canonical-repo-key.test.ts": 108, @@ -2996,7 +2993,6 @@ "src/main/ipc/pty-claude-agent-view-readiness.test.ts": 3531, "src/main/ipc/pty-painted-cold-restore-ack-layout-owner.test.ts": 2928, "src/main/ipc/pty-spawn-saved-resume-admission.test.ts": 6908, - "src/main/ipc/pty/configured-terminal-shell-args.test.ts": 66, "src/main/ipc/pty/daemon-late-exit.test.ts": 6475, "src/main/ipc/pty/delivery/attached-pty-size.test.ts": 68, "src/main/ipc/pty/delivery/interactive-typing-burst.test.ts": 34, @@ -3551,7 +3547,6 @@ "src/main/memory/memory-snapshot-buckets.test.ts": 92, "src/main/memory/verified-local-folder-workspaces.test.ts": 50, "src/main/memory/windows-process-sample-parsing.test.ts": 93, - "src/main/menu/gpu-acceleration-about-panel.test.ts": 66, "src/main/menu/register-app-menu.test.ts": 133, "src/main/mimo/hook-service.test.ts": 112, "src/main/minimax/minimax-api-key-store.test.ts": 125, @@ -3561,7 +3556,6 @@ "src/main/muse-usage/store-snapshot-filtering.test.ts": 471, "src/main/muse/hook-config-json.test.ts": 48, "src/main/muse/hook-service.test.ts": 91, - "src/main/muse/hook-settings.test.ts": 72, "src/main/native-chat/agent-model-catalog/agent-model-catalog-discovery-freshness.test.ts": 110, "src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.test.ts": 46, "src/main/native-chat/agent-model-catalog/agent-model-catalog-independent-discovery.test.ts": 121, @@ -4694,7 +4688,6 @@ "src/main/rate-limits/cursor-fetcher.test.ts": 241, "src/main/rate-limits/cursor-session-token.test.ts": 63, "src/main/rate-limits/cursor-usage-mapping.test.ts": 92, - "src/main/rate-limits/gemini-bucket-formatting.test.ts": 46, "src/main/rate-limits/gemini-oauth-sources.test.ts": 64, "src/main/rate-limits/gemini-usage-fetcher.fallback.test.ts": 105, "src/main/rate-limits/gemini-usage-fetcher.test.ts": 82, @@ -5382,7 +5375,6 @@ "src/main/runtime/rpc/methods/linear.test.ts": 513, "src/main/runtime/rpc/methods/managed-runtime-install.test.ts": 994, "src/main/runtime/rpc/methods/managed-server.test.ts": 374, - "src/main/runtime/rpc/methods/mobile-project-sections.test.ts": 825, "src/main/runtime/rpc/methods/mobile-web-bundle-range.test.ts": 1942, "src/main/runtime/rpc/methods/mobile-web-bundle-read-concurrency.test.ts": 492, "src/main/runtime/rpc/methods/mobile-web-bundle-window-refusals.test.ts": 365, @@ -6270,7 +6262,6 @@ "src/main/source-control/repo-default-branch.test.ts": 87, "src/main/source-control/repo-remote-head-branch.test.ts": 103, "src/main/source-control/stacked-hosted-review-creation.test.ts": 46, - "src/main/speech/model-catalog.test.ts": 45, "src/main/speech/model-manager-download-error.test.ts": 96, "src/main/speech/model-manager-download-resume.test.ts": 1162, "src/main/speech/model-manager-progress-callback.test.ts": 54, @@ -6481,7 +6472,6 @@ "src/main/ssh/ssh-remote-windows-command-line-limit.test.ts": 177, "src/main/ssh/ssh-request-outcome-verdict.test.ts": 40, "src/main/ssh/ssh-security-key-identity.test.ts": 95, - "src/main/ssh/ssh-session-limit-error.test.ts": 43, "src/main/ssh/ssh-system-transport.integration.test.ts": 280, "src/main/ssh/ssh-tcp-forwarding-probe.test.ts": 1020, "src/main/ssh/ssh-windows-host-cells.test.ts": 57, @@ -6571,7 +6561,6 @@ "src/main/startup/run-electron-vite-dev.test.ts": 899, "src/main/startup/select-linux-keyring-backend.test.ts": 63, "src/main/startup/serve-desktop-activation.test.ts": 32, - "src/main/startup/serve-mode-argv-cli-redirect-order.test.ts": 140, "src/main/startup/serve-mode-argv.test.ts": 70, "src/main/startup/serve-native-quit-guard.test.ts": 54, "src/main/startup/serve-options.test.ts": 59, @@ -7910,7 +7899,6 @@ "src/renderer/src/components/mobile/use-mobile-pairing-address-preference.test.tsx": 235, "src/renderer/src/components/native-chat-launch-resume-decision.test.tsx": 1631, "src/renderer/src/components/native-chat-restart-action-notifications.test.ts": 153, - "src/renderer/src/components/native-chat-resume-activity-label.test.ts": 117, "src/renderer/src/components/native-chat-resume-bulk-progress.test.tsx": 1690, "src/renderer/src/components/native-chat-resume-failed-chat-watch.test.ts": 2022, "src/renderer/src/components/native-chat-resume-failure-guidance.test.ts": 111, @@ -8586,9 +8574,7 @@ "src/renderer/src/components/right-sidebar/source-control-recovery-admission.test.ts": 131, "src/renderer/src/components/right-sidebar/source-control-section-order.test.ts": 69, "src/renderer/src/components/right-sidebar/source-control-split-open.test.ts": 52, - "src/renderer/src/components/right-sidebar/source-control-status-sort.test.ts": 25, "src/renderer/src/components/right-sidebar/source-control-submodule-expansion.test.ts": 46, - "src/renderer/src/components/right-sidebar/source-control-text-generation-defaults.test.ts": 102, "src/renderer/src/components/right-sidebar/source-control-too-many-changes-banner.test.tsx": 632, "src/renderer/src/components/right-sidebar/source-control-tree.test.ts": 57, "src/renderer/src/components/right-sidebar/source-control/ai/use-ai.operation-recovery.test.tsx": 1955, @@ -8741,7 +8727,6 @@ "src/renderer/src/components/settings/NotificationsPane.hidden-workspaces.test.tsx": 1362, "src/renderer/src/components/settings/NotificationsPane.test.tsx": 1723, "src/renderer/src/components/settings/OpenInMenuSetting.test.ts": 148, - "src/renderer/src/components/settings/OrcaAccountSettingsPane.test.tsx": 405, "src/renderer/src/components/settings/OrchestrationPane.test.tsx": 1824, "src/renderer/src/components/settings/OrchestrationSkillAgentCoverage.test.tsx": 247, "src/renderer/src/components/settings/PluginConsentDialog.test.tsx": 1638, @@ -8809,12 +8794,10 @@ "src/renderer/src/components/settings/ZcodePlanAccountsSection.test.tsx": 858, "src/renderer/src/components/settings/account-add-cancel-target.test.ts": 105, "src/renderer/src/components/settings/accounts-pane-opencode-credentials.test.ts": 464, - "src/renderer/src/components/settings/accounts-search.test.ts": 32, "src/renderer/src/components/settings/agent-availability-settings.test.ts": 108, "src/renderer/src/components/settings/agent-default-env-draft.test.ts": 32, "src/renderer/src/components/settings/agent-launch-settings-transport.test.ts": 151, "src/renderer/src/components/settings/agent-permission-conversion-persistence.test.tsx": 8787, - "src/renderer/src/components/settings/appearance-status-bar-search.test.ts": 72, "src/renderer/src/components/settings/bitbucket-integration-card.test.tsx": 421, "src/renderer/src/components/settings/browser-link-routing-localization.test.ts": 216, "src/renderer/src/components/settings/browser-search.test.ts": 323, @@ -8832,7 +8815,6 @@ "src/renderer/src/components/settings/general-editor-search.test.ts": 136, "src/renderer/src/components/settings/general-preview-tab-search.test.ts": 136, "src/renderer/src/components/settings/git-description-templates.test.tsx": 1759, - "src/renderer/src/components/settings/integrations-pane-status.test.ts": 29, "src/renderer/src/components/settings/jira-integration-card.test.tsx": 459, "src/renderer/src/components/settings/linear-agent-skill-install-cta.test.tsx": 1871, "src/renderer/src/components/settings/managed-server-row-parts.test.tsx": 437, @@ -8842,7 +8824,6 @@ "src/renderer/src/components/settings/native-chat-provider-choice.test.tsx": 619, "src/renderer/src/components/settings/notification-host-pending-save.test.tsx": 1663, "src/renderer/src/components/settings/plugin-install-source.test.ts": 110, - "src/renderer/src/components/settings/provider-account-scope.test.ts": 109, "src/renderer/src/components/settings/provider-account-visibility.test.ts": 49, "src/renderer/src/components/settings/repository-source-control-ai-global-ux.test.ts": 585, "src/renderer/src/components/settings/repository/RepositoryJiraProjectSection.test.tsx": 292, @@ -9031,7 +9012,6 @@ "src/renderer/src/components/sidebar/child-workspaces-toggle-target.test.ts": 1665, "src/renderer/src/components/sidebar/child-workspaces-toggle-visibility.test.ts": 1793, "src/renderer/src/components/sidebar/clone-defaults.test.ts": 39, - "src/renderer/src/components/sidebar/create-project-defaults.test.ts": 37, "src/renderer/src/components/sidebar/default-branch-folder-project-root.test.ts": 100, "src/renderer/src/components/sidebar/default-branch-visible-under-hide-sleeping.test.ts": 158, "src/renderer/src/components/sidebar/delete-worktree-always-force-preference.test.tsx": 1368, @@ -9352,9 +9332,7 @@ "src/renderer/src/components/status-bar/provider-segment-stale-warning.test.tsx": 261, "src/renderer/src/components/status-bar/remote-host-connection-status.test.ts": 123, "src/renderer/src/components/status-bar/resource-manager-exit-render-budget.test.tsx": 1534, - "src/renderer/src/components/status-bar/resource-manager-terminal-copy.test.ts": 78, "src/renderer/src/components/status-bar/resource-manager-worktree-target.test.ts": 34, - "src/renderer/src/components/status-bar/resource-memory-metric-copy.test.ts": 55, "src/renderer/src/components/status-bar/resource-pty-view-model.test.ts": 142, "src/renderer/src/components/status-bar/resource-pty-virtualization.test.tsx": 645, "src/renderer/src/components/status-bar/resource-session-bindings.test.ts": 75, @@ -9367,7 +9345,6 @@ "src/renderer/src/components/status-bar/resource-usage-space-scan-ready.test.ts": 38, "src/renderer/src/components/status-bar/runtime-host-resources.test.ts": 45, "src/renderer/src/components/status-bar/ssh-status-menu-rows.test.ts": 48, - "src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts": 27, "src/renderer/src/components/status-bar/status-bar-antigravity-segment.test.tsx": 968, "src/renderer/src/components/status-bar/status-bar-copy-localization.test.tsx": 885, "src/renderer/src/components/status-bar/status-bar-cursor-segment.test.tsx": 1503, @@ -9385,7 +9362,6 @@ "src/renderer/src/components/status-bar/usage-provider-settings-target.test.ts": 34, "src/renderer/src/components/status-bar/usage-roster-row-state.test.ts": 71, "src/renderer/src/components/status-bar/usage-unit-label-parity.test.tsx": 335, - "src/renderer/src/components/status-bar/usage-unit-label.test.ts": 90, "src/renderer/src/components/status-bar/use-owner-usage-rate-limits.test.tsx": 261, "src/renderer/src/components/status-bar/use-resource-memory-snapshot.test.tsx": 198, "src/renderer/src/components/status-bar/use-resource-pty-actions.test.tsx": 486, @@ -9540,7 +9516,6 @@ "src/renderer/src/components/task-page/task-page-localized-options.test.ts": 211, "src/renderer/src/components/task-page/task-page-mutation-page-allocation.test.ts": 128, "src/renderer/src/components/task-page/task-page-new-issue-draft.test.ts": 76, - "src/renderer/src/components/task-page/task-page-repo-source-context.test.ts": 407, "src/renderer/src/components/task-page/task-page-repo-source-divergence.test.ts": 1043, "src/renderer/src/components/task-page/task-page-task-source-host-availability.test.ts": 401, "src/renderer/src/components/task-page/task-page-work-item-pagination.test.ts": 56, @@ -10636,7 +10611,6 @@ "src/renderer/src/lib/feedback-image-shrink.test.ts": 40, "src/renderer/src/lib/file-artifact-source-key.test.ts": 969, "src/renderer/src/lib/file-owner-runtime-target.test.ts": 230, - "src/renderer/src/lib/file-preview-action-visibility.test.tsx": 1253, "src/renderer/src/lib/file-preview-link-open.test.ts": 2059, "src/renderer/src/lib/file-preview.test.ts": 1742, "src/renderer/src/lib/file-search-result-owner.test.ts": 33, @@ -10764,7 +10738,6 @@ "src/renderer/src/lib/monaco-languages/textmate-language-registration.test.ts": 37, "src/renderer/src/lib/monaco-languages/textmate-token-provider.test.ts": 233, "src/renderer/src/lib/monaco-languages/zig-highlighting.test.ts": 4871, - "src/renderer/src/lib/monaco-peek-preview-options.test.ts": 777, "src/renderer/src/lib/monaco-setup-steps.test.ts": 48, "src/renderer/src/lib/monospace-font-family.test.ts": 36, "src/renderer/src/lib/native-chat-cli-fork-preparation.test.ts": 2392, @@ -13079,7 +13052,6 @@ "src/shared/subprocess-stdin-write.test.ts": 17, "src/shared/synthetic-agent-title.test.ts": 39, "src/shared/tab-has-live-pty.test.ts": 33, - "src/shared/tab-title-resolution.test.ts": 46, "src/shared/tailnet-address.test.ts": 34, "src/shared/task-providers.test.ts": 44, "src/shared/task-query.test.ts": 41, diff --git a/src/main/browser/doc-preview-download-block-notice.test.ts b/src/main/browser/doc-preview-download-block-notice.test.ts index b0106ab83a2..7082b7a1203 100644 --- a/src/main/browser/doc-preview-download-block-notice.test.ts +++ b/src/main/browser/doc-preview-download-block-notice.test.ts @@ -51,17 +51,6 @@ afterEach(() => { }) describe('noticeDocPreviewDownloadBlocked', () => { - it('tells the shell which preview had a download refused', async () => { - const notice = await loadNotifier() - - notice(guestBoundTo(GRANT_ID)) - - expect(mocks.publishDocPreviewFailure).toHaveBeenCalledWith({ - grantId: GRANT_ID, - reason: 'download-blocked' - }) - }) - it('says it once however often the document asks', async () => { const notice = await loadNotifier() const guest = guestBoundTo(GRANT_ID) diff --git a/src/main/browser/doc-preview-failure-notice.test.ts b/src/main/browser/doc-preview-failure-notice.test.ts index 35ac9d95f65..424d13bea54 100644 --- a/src/main/browser/doc-preview-failure-notice.test.ts +++ b/src/main/browser/doc-preview-failure-notice.test.ts @@ -1,6 +1,5 @@ import { afterEach, describe, expect, it, vi } from 'vitest' -import { DOC_PREVIEW_LOAD_FAILURE_CHANNEL } from '../../shared/doc-preview-scheme' import { publishDocPreviewFailure, setDocPreviewFailureSink } from './doc-preview-failure-notice' afterEach(() => { @@ -8,33 +7,6 @@ afterEach(() => { }) describe('publishDocPreviewFailure', () => { - it('sends the grant, path, and reason on the failure channel', () => { - const send = vi.fn() - setDocPreviewFailureSink({ send }) - - publishDocPreviewFailure({ - grantId: 'a'.repeat(32), - relativePath: 'index.html', - reason: 'too-large' - }) - - expect(send).toHaveBeenCalledWith(DOC_PREVIEW_LOAD_FAILURE_CHANNEL, { - grantId: 'a'.repeat(32), - relativePath: 'index.html', - reason: 'too-large' - }) - }) - - it('is a no-op with no sink registered', () => { - expect(() => - publishDocPreviewFailure({ - grantId: 'b'.repeat(32), - relativePath: 'index.html', - reason: 'unreadable' - }) - ).not.toThrow() - }) - it('sends nothing into a destroyed window', () => { const send = vi.fn() setDocPreviewFailureSink({ send, isDestroyed: () => true }) diff --git a/src/main/codex-accounts/codex-login-auth-url.test.ts b/src/main/codex-accounts/codex-login-auth-url.test.ts index 9dddaef048c..2cbc95794e4 100644 --- a/src/main/codex-accounts/codex-login-auth-url.test.ts +++ b/src/main/codex-accounts/codex-login-auth-url.test.ts @@ -38,11 +38,6 @@ describe('parseCodexLoginAuthUrl', () => { ).toBe(AUTH_URL) }) - it('reports nothing for output without a link yet', () => { - expect(parseCodexLoginAuthUrl('')).toBe(null) - expect(parseCodexLoginAuthUrl('Codex login failed: network unreachable\n')).toBe(null) - }) - it('offers no link at all rather than an unrelated one when the notice is missing', () => { expect( parseCodexLoginAuthUrl('A new version of codex is available: https://openai.com/codex\n') diff --git a/src/main/codex/codex-trust-grant-telemetry.test.ts b/src/main/codex/codex-trust-grant-telemetry.test.ts deleted file mode 100644 index ead60b60df0..00000000000 --- a/src/main/codex/codex-trust-grant-telemetry.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { WSL_CODEX_NOT_FOUND_MESSAGE } from '../codex-accounts/wsl-codex-command' -import { CodexAppServerTimeoutError } from './codex-app-server-client' -import { classifyCodexTrustGrantError } from './codex-trust-grant-telemetry' - -describe('classifyCodexTrustGrantError', () => { - it.each([ - [new CodexAppServerTimeoutError('entry exceeded 20000ms session deadline'), 'timeout'], - [new Error('spawn codex ENOENT'), 'binary-missing'], - [new Error('spawn /Users/ada/.local/bin/codex ENOENT'), 'binary-missing'], - [ - new Error( - `codex app-server exited before completing the session: ${WSL_CODEX_NOT_FOUND_MESSAGE}` - ), - 'binary-missing' - ], - [new Error('spawn wsl.exe ENOENT'), 'unexpected'], - [ - new Error("ENOENT: no such file or directory, open '/home/ada/.codex/config.toml'"), - 'unexpected' - ], - [new Error('codex trust-grant entry bundle not found'), 'entry-failed'], - [new Error('codex trust-grant entry produced no result (exit 1)'), 'entry-failed'], - [ - new Error('codex app-server exited before completing the session: panicked at main.rs'), - 'early-exit' - ], - [new Error('codex app-server config/batchWrite failed: unknown key'), 'rpc-failed'], - [new Error('write EPIPE'), 'unexpected'], - ['not an error object', 'unexpected'] - ] as const)('classifies %s as %s', (error, expected) => { - expect(classifyCodexTrustGrantError(error)).toBe(expected) - }) - - it('keeps an ENOENT-mentioning stderr tail classified as early-exit', () => { - expect( - classifyCodexTrustGrantError( - new Error('codex app-server exited before completing the session: ENOENT in codex output') - ) - ).toBe('early-exit') - }) -}) diff --git a/src/main/emulator/android/android-app-control.test.ts b/src/main/emulator/android/android-app-control.test.ts deleted file mode 100644 index f985769e841..00000000000 --- a/src/main/emulator/android/android-app-control.test.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { installApkArgs, launchAppArgs } from './android-app-control' - -describe('installApkArgs', () => { - it('builds install args without -r by default', () => { - expect(installApkArgs('emulator-5554', '/tmp/app.apk')).toEqual([ - '-s', - 'emulator-5554', - 'install', - '/tmp/app.apk' - ]) - }) - - it('omits -r when reinstall is false', () => { - expect(installApkArgs('emulator-5554', '/tmp/app.apk', { reinstall: false })).toEqual([ - '-s', - 'emulator-5554', - 'install', - '/tmp/app.apk' - ]) - }) - - it('adds -r before the apk path when reinstall is true', () => { - expect(installApkArgs('emulator-5554', '/tmp/app.apk', { reinstall: true })).toEqual([ - '-s', - 'emulator-5554', - 'install', - '-r', - '/tmp/app.apk' - ]) - }) -}) - -describe('launchAppArgs', () => { - it('uses am start with the explicit package/activity component', () => { - expect(launchAppArgs('emulator-5554', 'com.example.app', '.MainActivity')).toEqual([ - '-s', - 'emulator-5554', - 'shell', - 'am', - 'start', - '-n', - 'com.example.app/.MainActivity' - ]) - }) - - it('falls back to monkey LAUNCHER when no activity is given', () => { - expect(launchAppArgs('emulator-5554', 'com.example.app')).toEqual([ - '-s', - 'emulator-5554', - 'shell', - 'monkey', - '-p', - 'com.example.app', - '-c', - 'android.intent.category.LAUNCHER', - '1' - ]) - }) - - it('falls back to monkey when the activity is an empty/whitespace string', () => { - expect(launchAppArgs('emulator-5554', 'com.example.app', ' ')).toEqual([ - '-s', - 'emulator-5554', - 'shell', - 'monkey', - '-p', - 'com.example.app', - '-c', - 'android.intent.category.LAUNCHER', - '1' - ]) - }) -}) diff --git a/src/main/emulator/android/android-permissions.test.ts b/src/main/emulator/android/android-permissions.test.ts index 63a89cc4401..e73c6bbac7f 100644 --- a/src/main/emulator/android/android-permissions.test.ts +++ b/src/main/emulator/android/android-permissions.test.ts @@ -3,34 +3,6 @@ import { EmulatorError } from '../emulator-errors' import { permissionArgs } from './android-permissions' describe('permissionArgs', () => { - it('builds grant args', () => { - expect( - permissionArgs('emulator-5554', 'grant', 'com.example.app', 'android.permission.CAMERA') - ).toEqual([ - '-s', - 'emulator-5554', - 'shell', - 'pm', - 'grant', - 'com.example.app', - 'android.permission.CAMERA' - ]) - }) - - it('builds revoke args', () => { - expect( - permissionArgs('emulator-5554', 'revoke', 'com.example.app', 'android.permission.CAMERA') - ).toEqual([ - '-s', - 'emulator-5554', - 'shell', - 'pm', - 'revoke', - 'com.example.app', - 'android.permission.CAMERA' - ]) - }) - it('builds reset-permissions args without a package (it resets all apps)', () => { expect(permissionArgs('emulator-5554', 'reset', 'com.example.app')).toEqual([ '-s', @@ -41,12 +13,6 @@ describe('permissionArgs', () => { ]) }) - it('ignores the package and permission for reset', () => { - expect( - permissionArgs('emulator-5554', 'reset', 'com.example.app', 'android.permission.CAMERA') - ).toEqual(['-s', 'emulator-5554', 'shell', 'pm', 'reset-permissions']) - }) - it('throws EmulatorError with code emulator_error when grant has no permission', () => { expect(() => permissionArgs('emulator-5554', 'grant', 'com.example.app')).toThrowError( EmulatorError diff --git a/src/main/git/admission-tier-plumbing.test.ts b/src/main/git/admission-tier-plumbing.test.ts deleted file mode 100644 index aba8c4a9c35..00000000000 --- a/src/main/git/admission-tier-plumbing.test.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { hostedReviewOptionArgs } from '../github/pr-refresh-candidate-policy' -import { getHostedReviewLocalGitOptions } from '../source-control/hosted-review-git-options' -import { gitOptionsForWorktree, gitReadOptionsForWorktree } from './git-runtime-options' - -describe('git admission tier plumbing', () => { - it('preserves tiers through both runtime option constructors', () => { - expect( - gitOptionsForWorktree('/repo', { wslDistro: 'Ubuntu', admissionTier: 'interactive' }) - ).toEqual({ cwd: '/repo', wslDistro: 'Ubuntu', admissionTier: 'interactive' }) - expect( - gitReadOptionsForWorktree('/repo', { wslDistro: 'Ubuntu', admissionTier: 'background' }) - ).toEqual({ - cwd: '/repo', - wslDistro: 'Ubuntu', - admissionTier: 'background', - preferWslDirectGit: true - }) - }) - - it('preserves the hosted-review execution tier beside WSL routing', () => { - expect( - getHostedReviewLocalGitOptions({ - localGitExecOptions: { wslDistro: 'Ubuntu', admissionTier: 'interactive' } - }) - ).toEqual({ wslDistro: 'Ubuntu', admissionTier: 'interactive' }) - }) - - it.each([ - ['manual', 'interactive'], - ['visible', 'background'], - ['active', 'background'], - ['post-push', 'background'], - ['swr', 'background'] - ] as const)('maps PR refresh reason %s to %s admission', (reason, admissionTier) => { - const [options] = hostedReviewOptionArgs( - { - localGitOptions: { wslDistro: 'Ubuntu' }, - linkedPRNumber: null, - fallbackPRNumber: null, - fallbackPRSource: null, - currentHeadOid: null - }, - reason - ) - expect(options?.localGitExecOptions).toEqual({ wslDistro: 'Ubuntu', admissionTier }) - }) -}) diff --git a/src/main/git/fetch-error-classification.test.ts b/src/main/git/fetch-error-classification.test.ts index 8f5b5de452f..ef197335d48 100644 --- a/src/main/git/fetch-error-classification.test.ts +++ b/src/main/git/fetch-error-classification.test.ts @@ -5,19 +5,6 @@ import { } from './fetch-error-classification' describe('isMissingRemoteRefGitError', () => { - it('matches missing remote ref messages', () => { - expect( - isMissingRemoteRefGitError( - new Error('fatal: could not find remote ref refs/heads/feature/test') - ) - ).toBe(true) - expect( - isMissingRemoteRefGitError( - new Error("fatal: couldn't find remote ref refs/heads/feature/test") - ) - ).toBe(true) - }) - it('does not match auth or network failures', () => { expect(isMissingRemoteRefGitError(new Error('fatal: Authentication failed'))).toBe(false) expect( diff --git a/src/main/github/project-view/repository-field-options.test.ts b/src/main/github/project-view/repository-field-options.test.ts index 91123388b49..31d67a04969 100644 --- a/src/main/github/project-view/repository-field-options.test.ts +++ b/src/main/github/project-view/repository-field-options.test.ts @@ -26,7 +26,7 @@ vi.mock('./project-error-classification', () => ({ rateLimitedError: vi.fn() })) -import { listAssignableUsersBySlug, listLabelsBySlug } from './repository-field-options' +import { listLabelsBySlug } from './repository-field-options' describe('repository field options', () => { beforeEach(() => { @@ -49,25 +49,4 @@ describe('repository field options', () => { ) expect(releaseMock).toHaveBeenCalledOnce() }) - - it('merges seed assignees after paginated provider results', async () => { - ghExecFileAsyncMock.mockResolvedValue({ - stdout: '{"login":"octo","name":null,"avatarUrl":"octo.png"}\n', - stderr: '' - }) - - const result = await listAssignableUsersBySlug({ - owner: 'acme', - repo: 'widgets', - seedLogins: ['octo', 'hubot'] - }) - - expect(result).toEqual({ - ok: true, - users: [ - { login: 'octo', name: null, avatarUrl: 'octo.png' }, - { login: 'hubot', name: null, avatarUrl: '' } - ] - }) - }) }) diff --git a/src/main/grok-accounts/status.test.ts b/src/main/grok-accounts/status.test.ts index fccf5dfd719..24309bf0e3a 100644 --- a/src/main/grok-accounts/status.test.ts +++ b/src/main/grok-accounts/status.test.ts @@ -13,18 +13,6 @@ describe('getGrokAccountStatus', () => { vi.mocked(isGrokAccessTokenFresh).mockReturnValue(true) }) - it('reports unsigned status when the Grok auth file is missing', () => { - vi.mocked(readGrokAuthSession).mockReturnValue({ status: 'missing' }) - - expect(getGrokAccountStatus()).toEqual({ - signedIn: false, - email: null, - teamId: null, - tokenFresh: false, - error: null - }) - }) - it('reports auth read errors without exposing token fields', () => { vi.mocked(readGrokAuthSession).mockReturnValue({ status: 'error', diff --git a/src/main/ipc/pty/configured-terminal-shell-args.test.ts b/src/main/ipc/pty/configured-terminal-shell-args.test.ts deleted file mode 100644 index 768070231bc..00000000000 --- a/src/main/ipc/pty/configured-terminal-shell-args.test.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { resolveConfiguredTerminalShellArgs } from './configured-terminal-shell-args' - -const profile = { - connectionId: undefined, - requestedShellOverride: undefined, - launchCommand: undefined -} - -describe('resolveConfiguredTerminalShellArgs', () => { - it('forwards the configured argument list, including an explicit empty one', () => { - expect( - resolveConfiguredTerminalShellArgs({ - ...profile, - settings: { terminalDefaultShell: '/bin/bash', terminalDefaultShellArgs: [] } - }) - ).toEqual([]) - expect( - resolveConfiguredTerminalShellArgs({ - ...profile, - settings: { - terminalDefaultShell: '/bin/bash', - terminalDefaultShellArgs: ['--rcfile', '/tmp/rc'] - } - }) - ).toEqual(['--rcfile', '/tmp/rc']) - }) - - it('falls back to the controlled default when no profile is configured', () => { - expect( - resolveConfiguredTerminalShellArgs({ - ...profile, - settings: { terminalDefaultShell: '/bin/bash' } - }) - ).toBeUndefined() - expect( - resolveConfiguredTerminalShellArgs({ - ...profile, - settings: { terminalDefaultShell: ' ', terminalDefaultShellArgs: [] } - }) - ).toBeUndefined() - expect(resolveConfiguredTerminalShellArgs({ ...profile, settings: undefined })).toBeUndefined() - }) - - it.each([ - { connectionId: 'ssh-host' }, - { requestedShellOverride: '/bin/fish' }, - { launchCommand: 'codex' } - ])('ignores the profile for %o', (overrides) => { - expect( - resolveConfiguredTerminalShellArgs({ - ...profile, - ...overrides, - settings: { terminalDefaultShell: '/bin/bash', terminalDefaultShellArgs: [] } - }) - ).toBeUndefined() - }) -}) diff --git a/src/main/ipc/pty/ipc/spawn-options-spawn-intent.test.ts b/src/main/ipc/pty/ipc/spawn-options-spawn-intent.test.ts index be12e27230b..e6a43b47eff 100644 --- a/src/main/ipc/pty/ipc/spawn-options-spawn-intent.test.ts +++ b/src/main/ipc/pty/ipc/spawn-options-spawn-intent.test.ts @@ -22,12 +22,6 @@ async function resolveSpawnIntent(args: PtySpawnIpcArgs): Promise { const PANE = { cols: 80, rows: 24 } describe('renderer pty spawn: declared spawn intent', () => { - it('hands a known intent to the provider', async () => { - await expect(resolveSpawnIntent({ ...PANE, spawnIntent: 'user-resume' })).resolves.toBe( - 'user-resume' - ) - }) - it('treats a missing or unknown intent as undeclared', async () => { await expect(resolveSpawnIntent(PANE)).resolves.toBeUndefined() await expect(resolveSpawnIntent({ ...PANE, spawnIntent: 'urgent' })).resolves.toBeUndefined() diff --git a/src/main/ipc/pty/pty-spawn-timing.test.ts b/src/main/ipc/pty/pty-spawn-timing.test.ts index c732c91e209..b9d0976a359 100644 --- a/src/main/ipc/pty/pty-spawn-timing.test.ts +++ b/src/main/ipc/pty/pty-spawn-timing.test.ts @@ -22,40 +22,6 @@ afterEach(() => { vi.useRealTimers() }) -it('keeps disabled spawn timing silent', () => { - vi.stubEnv('ORCA_PTY_SPAWN_TIMING', '0') - const timing = createPtySpawnTiming() - timing.mark('provider_spawn') - timing.log('pty-1') - expect(records).toEqual([]) - expect(console.log).not.toHaveBeenCalled() -}) - -it('writes numeric monotonic phase durations through the existing local trace sink', () => { - vi.stubEnv('ORCA_PTY_SPAWN_TIMING', '1') - const timing = createPtySpawnTiming() - vi.advanceTimersByTime(25) - timing.mark('preflight') - vi.advanceTimersByTime(80) - timing.mark('provider_spawn') - timing.log('pty-1', { daemon: true, reattach: false }) - expect(records).toEqual([ - expect.objectContaining({ - name: 'pty.spawn.timing', - attributes: expect.objectContaining({ - ptyId: 'pty-1', - totalMs: 105, - phaseDurations: { preflight: 25, provider_spawn: 80 }, - daemon: true, - reattach: false - }) - }) - ]) - expect(console.log).toHaveBeenCalledWith( - expect.stringContaining('total=105ms preflight=25ms provider_spawn=80ms') - ) -}) - it('does not fail a successful spawn when the diagnostic sink throws', () => { vi.stubEnv('ORCA_PTY_SPAWN_TIMING', '1') setActiveSink({ diff --git a/src/main/menu/gpu-acceleration-about-panel.test.ts b/src/main/menu/gpu-acceleration-about-panel.test.ts deleted file mode 100644 index 2102460feb3..00000000000 --- a/src/main/menu/gpu-acceleration-about-panel.test.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { - createGpuAccelerationAboutPanelOptions, - describeGpuAcceleration -} from './gpu-acceleration-about-panel' - -describe('GPU acceleration About panel', () => { - it.each([ - ['enabled', 'Enabled'], - ['disabled_off', 'Disabled'], - ['disabled_software', 'Software rendering'], - ['unavailable_software', 'Software rendering'], - ['unavailable', 'Unavailable'], - ['undefined', 'Status unavailable'] - ])('describes Chromium compositing status %s', (gpu_compositing, expected) => { - expect(describeGpuAcceleration({ gpu_compositing }, false)).toBe(expected) - }) - - it('gives Safe Graphics Mode precedence over Chromium status', () => { - expect(describeGpuAcceleration({ gpu_compositing: 'enabled' }, true)).toBe( - 'Disabled (Safe Graphics Mode)' - ) - }) - - it('reports status as unavailable until Chromium publishes GPU information', () => { - expect(describeGpuAcceleration(null, false)).toBe('Status unavailable') - }) - - it('uses the Linux-visible copyright field', () => { - expect( - createGpuAccelerationAboutPanelOptions({ - appName: 'Orca', - appVersion: '1.2.3', - platform: 'linux', - gpuFallbackActive: false, - gpuFeatureStatus: { gpu_compositing: 'enabled' } - }) - ).toEqual({ - applicationName: 'Orca', - applicationVersion: '1.2.3', - copyright: 'GPU acceleration: Enabled' - }) - }) - - it.each(['darwin', 'win32'] satisfies NodeJS.Platform[])('uses credits on %s', (platform) => { - expect( - createGpuAccelerationAboutPanelOptions({ - appName: 'Orca', - appVersion: '1.2.3', - platform, - gpuFallbackActive: true, - gpuFeatureStatus: null - }) - ).toEqual({ - applicationName: 'Orca', - applicationVersion: '1.2.3', - credits: 'GPU acceleration: Disabled (Safe Graphics Mode)' - }) - }) -}) diff --git a/src/main/muse/hook-config-json.test.ts b/src/main/muse/hook-config-json.test.ts index 15cf94cf1cb..3a5c7e985dd 100644 --- a/src/main/muse/hook-config-json.test.ts +++ b/src/main/muse/hook-config-json.test.ts @@ -6,11 +6,6 @@ import { } from './hook-config-json' describe('muse hook-config-json', () => { - it('creates a fresh settings file with the required schema_version', () => { - const parsed = parseMuseSettingsText(serializeMuseSettings(null, '/x/muse-hooks.json'), 'test') - expect(parsed?.managed_hooks_env_vars).toEqual(MUSE_MANAGED_HOOK_ENV_VARS) - }) - it('sets the pointer while preserving user keys and formatting', () => { const original = '{\n "schema_version": 1,\n "model": "muse-spark-1.2"\n}\n' const next = serializeMuseSettings(original, '/x/muse-hooks.json') diff --git a/src/main/muse/hook-settings.test.ts b/src/main/muse/hook-settings.test.ts deleted file mode 100644 index 8994b5f010f..00000000000 --- a/src/main/muse/hook-settings.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { afterEach, describe, expect, it, vi } from 'vitest' -import { - isSafeUnicodeWindowsBatchHookPath, - wrapWindowsHookCommand -} from '../agent-hooks/windows-hook-command' -import { wrapPosixHookCommand } from '../agent-hooks/posix-hook-command' -import { getMuseManagedCommand, getMuseRemoteManagedCommand } from './hook-settings' - -afterEach(() => vi.restoreAllMocks()) - -describe('Muse hook commands', () => { - it('dispatches safe Windows batch paths without PowerShell', () => { - vi.spyOn(process, 'platform', 'get').mockReturnValue('win32') - expect(getMuseManagedCommand('C:\\Users\\alice\\.orca\\agent-hooks\\muse-hook.cmd')).toBe( - 'C:/Users/alice/.orca/agent-hooks/muse-hook.cmd' - ) - }) - - it.each([ - 'C:\\Users\\Alice Smith\\.orca\\agent-hooks\\muse-hook.cmd', - 'C:\\Users\\a&b\\.orca\\agent-hooks\\muse-hook.cmd', - 'C:\\Users\\a%b\\.orca\\agent-hooks\\muse-hook.cmd', - "C:\\Users\\O'Brien\\.orca\\agent-hooks\\muse-hook.cmd", - 'C:\\Users\\日本語\\.orca\\agent-hooks\\muse-hook.cmd', - '\\\\server\\share\\.orca\\agent-hooks\\muse-hook.cmd' - ])('retains the established quoting fallback for %s', (path) => { - vi.spyOn(process, 'platform', 'get').mockReturnValue('win32') - const policy = { useProcessPolicyEnvironment: isSafeUnicodeWindowsBatchHookPath(path) } - expect(getMuseManagedCommand(path)).toBe(wrapWindowsHookCommand(path, {}, policy)) - }) - - it.each(['darwin', 'linux'] as const)('keeps local %s commands POSIX', (platform) => { - vi.spyOn(process, 'platform', 'get').mockReturnValue(platform) - const path = '/home/alice smith/.orca/agent-hooks/muse-hook.sh' - expect(getMuseManagedCommand(path)).toBe(wrapPosixHookCommand(path)) - }) - - it('keeps SSH commands POSIX when the client runs Windows', () => { - vi.spyOn(process, 'platform', 'get').mockReturnValue('win32') - const path = '/home/alice smith/.orca/agent-hooks/muse-hook.sh' - expect(getMuseRemoteManagedCommand(path)).toBe(wrapPosixHookCommand(path)) - }) -}) diff --git a/src/main/native-chat/structured-agent-configured-args.test.ts b/src/main/native-chat/structured-agent-configured-args.test.ts index f8e581bc4bf..4ee9ebb6f84 100644 --- a/src/main/native-chat/structured-agent-configured-args.test.ts +++ b/src/main/native-chat/structured-agent-configured-args.test.ts @@ -20,10 +20,6 @@ describe('structured chat configured Arguments', () => { } ) - it('uses the existing default when the Arguments key is absent', () => { - expect(structuredAgentConfiguredArgs('claude', {})).toEqual(['--dangerously-skip-permissions']) - }) - it('preserves Windows paths under the configured shell', () => { expect( structuredAgentConfiguredArgs( diff --git a/src/main/opencode/legacy-shared-config-dir.test.ts b/src/main/opencode/legacy-shared-config-dir.test.ts index f4a20713e8b..d8d556cb73c 100644 --- a/src/main/opencode/legacy-shared-config-dir.test.ts +++ b/src/main/opencode/legacy-shared-config-dir.test.ts @@ -16,23 +16,3 @@ describe('retired config directory recognition', () => { expect(isOpenCodeLegacySharedConfigDir('C:/ORCA/opencode-hooks/shared/', 'c:\\orca')).toBe(true) }) }) - -describe('isOpenCodeLegacySharedConfigDir', () => { - const userData = join('fixture', 'user-data') - - it('matches only the retired shared dirs of both OpenCode variants', () => { - expect( - isOpenCodeLegacySharedConfigDir(join(userData, 'opencode-hooks', 'shared'), userData) - ).toBe(true) - expect( - isOpenCodeLegacySharedConfigDir(join(userData, 'opencode2-hooks', 'shared'), userData) - ).toBe(true) - expect( - isOpenCodeLegacySharedConfigDir(join(userData, 'opencode-hooks', 'mine'), userData) - ).toBe(false) - expect( - isOpenCodeLegacySharedConfigDir(join('other', 'opencode-hooks', 'shared'), userData) - ).toBe(false) - expect(isOpenCodeLegacySharedConfigDir(undefined, userData)).toBe(false) - }) -}) diff --git a/src/main/orcad/orcad-app-version-stamp.test.ts b/src/main/orcad/orcad-app-version-stamp.test.ts index 42866e8d84c..644e6954ccd 100644 --- a/src/main/orcad/orcad-app-version-stamp.test.ts +++ b/src/main/orcad/orcad-app-version-stamp.test.ts @@ -23,13 +23,6 @@ describe('the Orca version a server reports', () => { } }) - it('is the release its bundle was built from, not a dev placeholder', () => { - mkdirSync(join(root, 'out', 'cli'), { recursive: true }) - writeFileSync(join(root, 'out', 'package.json'), JSON.stringify({ version: '1.4.224' })) - stampOrcadAppVersion(() => root) - expect(process.env.ORCA_APP_VERSION).toBe('1.4.224') - }) - it('replaces a version inherited from the Orca that started it', () => { process.env.ORCA_APP_VERSION = '1.4.300' mkdirSync(join(root, 'out'), { recursive: true }) diff --git a/src/main/orcad/orcad-bind-address.test.ts b/src/main/orcad/orcad-bind-address.test.ts index 2ddbcc56343..d7ee7e5709a 100644 --- a/src/main/orcad/orcad-bind-address.test.ts +++ b/src/main/orcad/orcad-bind-address.test.ts @@ -1,7 +1,6 @@ import { describe, expect, it } from 'vitest' import { bindHostIsNetworkExposed, - describeOrcadBindExposure, ORCAD_LOOPBACK_BIND_HOST, OrcadBindAddressError, resolveOrcadBindHost @@ -37,9 +36,4 @@ describe('bindHostIsNetworkExposed', () => { expect(bindHostIsNetworkExposed('::')).toBe(true) expect(bindHostIsNetworkExposed('10.1.2.3')).toBe(true) }) - - it('says out loud when a deployment is reachable from the network', () => { - expect(describeOrcadBindExposure('0.0.0.0')).toContain('reachable from the network') - expect(describeOrcadBindExposure('127.0.0.1')).toContain('local only') - }) }) diff --git a/src/main/orcad/orcad-compile-cache.test.ts b/src/main/orcad/orcad-compile-cache.test.ts index 4b94ba20aca..2ca86086a38 100644 --- a/src/main/orcad/orcad-compile-cache.test.ts +++ b/src/main/orcad/orcad-compile-cache.test.ts @@ -12,16 +12,6 @@ const managed = { } describe('managed orcad compile cache', () => { - it('caches inside a managed slot, where slot GC removes it with the slot', () => { - const enableCompileCache = vi.fn() - enableManagedOrcadCompileCache('/home/u/.orca-remote/orcad-1+ab', managed, { - enableCompileCache - }) - expect(enableCompileCache).toHaveBeenCalledWith( - join('/home/u/.orca-remote/orcad-1+ab', ORCAD_COMPILE_CACHE_DIRNAME) - ) - }) - it('never writes into a slot no client manages, such as a packaged app', () => { const enableCompileCache = vi.fn() enableManagedOrcadCompileCache('/Applications/Orca.app/orcad', {}, { enableCompileCache }) diff --git a/src/main/preflight/agent-command-detection.test.ts b/src/main/preflight/agent-command-detection.test.ts index 5e2abdaaf50..23a8205ad96 100644 --- a/src/main/preflight/agent-command-detection.test.ts +++ b/src/main/preflight/agent-command-detection.test.ts @@ -30,11 +30,6 @@ describe('detectAgentCommandsOnHost install-dir fallback', () => { guestMounts.value = [] }) - it('searches the process PATH everywhere except a WSL host orcad', async () => { - await detectAgentCommandsOnHost(['codex']) - expect(detectInstallDirs).toHaveBeenCalledWith(['codex'], undefined) - }) - it.skipIf(process.platform === 'win32')( 'drops /mnt/ dirs from the fallback PATH on a WSL host orcad', async () => { diff --git a/src/main/provider-process/provider-spawn-failure-report.test.ts b/src/main/provider-process/provider-spawn-failure-report.test.ts index 2c02a9ba8d3..35572364109 100644 --- a/src/main/provider-process/provider-spawn-failure-report.test.ts +++ b/src/main/provider-process/provider-spawn-failure-report.test.ts @@ -1,7 +1,6 @@ import { describe, expect, it } from 'vitest' import { PROVIDER_SPAWN_FAILURE_MARKER, - providerStderrForDisplay, supervisedProviderSpawnFailure } from './provider-spawn-failure-report' @@ -33,13 +32,4 @@ describe('provider spawn failure report', () => { ])('reads no spawn failure from %s', (_, code, stderr) => { expect(supervisedProviderSpawnFailure(code, stderr)).toBeNull() }) - - it('shows a report as the spawn error a direct spawn gives, and other stderr unchanged', () => { - expect( - providerStderrForDisplay( - `Warning: a runtime notice\n${report(false, 'ENOENT', 'spawn /opt/claude ENOENT')}` - ) - ).toBe('Warning: a runtime notice\nspawn /opt/claude ENOENT\n') - expect(providerStderrForDisplay('Error: auth failed\n')).toBe('Error: auth failed\n') - }) }) diff --git a/src/main/providers/filesystem-markdown-listing.test.ts b/src/main/providers/filesystem-markdown-listing.test.ts index abdce6de723..9216ac8d279 100644 --- a/src/main/providers/filesystem-markdown-listing.test.ts +++ b/src/main/providers/filesystem-markdown-listing.test.ts @@ -1,17 +1,6 @@ import { expect, it, vi } from 'vitest' import { listFilesystemMarkdownDocuments } from './filesystem-markdown-listing' -it('uses a native markdown capability without requiring unrelated provider methods', async () => { - const documents = [ - { filePath: '/repo/docs/a.md', relativePath: 'docs/a.md', basename: 'a.md', name: 'a' } - ] - const listMarkdownDocuments = vi.fn(async () => documents) - await expect(listFilesystemMarkdownDocuments({ listMarkdownDocuments }, '/repo')).resolves.toBe( - documents - ) - expect(listMarkdownDocuments).toHaveBeenCalledWith('/repo') -}) - it('retains the path-list fallback for providers without native markdown listing', async () => { const listFiles = vi.fn(async () => ['b.mdx', 'ignored.ts', '../escape.md', 'a.md']) const documents = await listFilesystemMarkdownDocuments({ listFiles }, '/repo') diff --git a/src/main/providers/stable-foreground-process.test.ts b/src/main/providers/stable-foreground-process.test.ts index fbd77862252..9bc609f5d08 100644 --- a/src/main/providers/stable-foreground-process.test.ts +++ b/src/main/providers/stable-foreground-process.test.ts @@ -12,12 +12,6 @@ describe('resolveStableForegroundProcess', () => { expect(result.lastRecognizedAgent).toBe('claude') }) - it('remembers the agent from a completed scan that found it', () => { - const result = resolveStableForegroundProcess({ available: true, processName: 'claude' }, null) - expect(result.processName).toBe('claude') - expect(result.lastRecognizedAgent).toBe('claude') - }) - it('reports a real exit and clears memory when a completed scan finds no agent', () => { const result = resolveStableForegroundProcess( { available: true, processName: 'powershell.exe' }, @@ -27,15 +21,6 @@ describe('resolveStableForegroundProcess', () => { expect(result.lastRecognizedAgent).toBeNull() }) - it('passes through when a scan is unavailable and nothing is remembered', () => { - const result = resolveStableForegroundProcess( - { available: false, processName: 'powershell.exe' }, - null - ) - expect(result.processName).toBe('powershell.exe') - expect(result.lastRecognizedAgent).toBeNull() - }) - it('prefers the remembered agent even when a degraded scan returns null', () => { const result = resolveStableForegroundProcess({ available: false, processName: null }, 'codex') expect(result.processName).toBe('codex') diff --git a/src/main/rate-limits/claude-oauth-usage-error.test.ts b/src/main/rate-limits/claude-oauth-usage-error.test.ts index d1b1fde9c2c..ab46c1e69aa 100644 --- a/src/main/rate-limits/claude-oauth-usage-error.test.ts +++ b/src/main/rate-limits/claude-oauth-usage-error.test.ts @@ -6,14 +6,6 @@ function rateLimitedResponse(headers?: Record): Response { } describe('createOAuthUsageError', () => { - it('captures a numeric Retry-After on 429', async () => { - const error = await createOAuthUsageError(rateLimitedResponse({ 'retry-after': '3037' })) - expect(error.status).toBe(429) - expect(error.skipPtyFallback).toBe(true) - expect(error.retryAfterMs).toBe(3037 * 1000) - expect(error.message).toBe('Claude usage is rate limited right now.') - }) - it('captures an HTTP-date Retry-After on 429', async () => { const error = await createOAuthUsageError( rateLimitedResponse({ 'retry-after': new Date(Date.now() + 90_000).toUTCString() }) diff --git a/src/main/rate-limits/gemini-bucket-formatting.test.ts b/src/main/rate-limits/gemini-bucket-formatting.test.ts deleted file mode 100644 index b806fbef902..00000000000 --- a/src/main/rate-limits/gemini-bucket-formatting.test.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { describe, expect, it } from 'vitest' -import type { RateLimitBucket } from '../../shared/rate-limit-types' -import { getBucketName, deriveSessionSummary } from './gemini-bucket-formatting' - -describe('getBucketName', () => { - it('maps known model IDs to stable names', () => { - expect(getBucketName('gemini-2.5-pro')).toBe('Pro') - expect(getBucketName('gemini-2.5-flash')).toBe('Flash') - expect(getBucketName('gemini-2.5-flash-lite')).toBe('Flash Lite') - expect(getBucketName('gemini-2.0-flash-lite')).toBe('2.0 Flash Lite') - expect(getBucketName('gemini-2.0-flash')).toBe('2.0 Flash') - }) - - it('humanizes unknown model IDs by stripping the gemini- prefix', () => { - expect(getBucketName('gemini-3.0-ultra')).toBe('3.0 Ultra') - expect(getBucketName('gemini-experimental')).toBe('Exp') - expect(getBucketName('some-random-id')).toBe('Some Random Id') - }) -}) - -describe('deriveSessionSummary', () => { - it('returns null for empty buckets', () => { - expect(deriveSessionSummary([])).toBeNull() - }) - - it('picks the most constrained bucket (highest usedPercent) as session summary', () => { - const buckets: RateLimitBucket[] = [ - { name: 'Pro', usedPercent: 30, windowMinutes: 60, resetsAt: null, resetDescription: null }, - { name: 'Flash', usedPercent: 80, windowMinutes: 60, resetsAt: null, resetDescription: null }, - { - name: 'Flash Lite', - usedPercent: 10, - windowMinutes: 60, - resetsAt: null, - resetDescription: null - } - ] - const summary = deriveSessionSummary(buckets) - expect(summary).not.toBeNull() - expect(summary!.usedPercent).toBe(80) - expect(summary!.windowMinutes).toBe(60) - }) - - it('preserves reset metadata from the most constrained bucket', () => { - const buckets: RateLimitBucket[] = [ - { - name: 'Pro', - usedPercent: 30, - windowMinutes: 60, - resetsAt: 1000, - resetDescription: '2:00 PM' - }, - { - name: 'Flash', - usedPercent: 80, - windowMinutes: 60, - resetsAt: 2000, - resetDescription: '3:00 PM' - } - ] - const summary = deriveSessionSummary(buckets) - expect(summary!.resetsAt).toBe(2000) - expect(summary!.resetDescription).toBe('3:00 PM') - }) -}) diff --git a/src/main/ripgrep/bundled-ripgrep-wsl-routing.test.ts b/src/main/ripgrep/bundled-ripgrep-wsl-routing.test.ts index d3a6406faa9..a7b6dae65d0 100644 --- a/src/main/ripgrep/bundled-ripgrep-wsl-routing.test.ts +++ b/src/main/ripgrep/bundled-ripgrep-wsl-routing.test.ts @@ -46,11 +46,4 @@ describe('resolveBundledRipgrepWslRouting', () => { wslDistroForOutput: 'Ubuntu' }) }) - - it('runs the host rg when the project has no WSL runtime', () => { - expect(resolveBundledRipgrepWslRouting('/home/me/repo', undefined)).toEqual({ - wslDistro: undefined, - wslDistroForOutput: undefined - }) - }) }) diff --git a/src/main/runtime/orchestration/db/row-column-lists.test.ts b/src/main/runtime/orchestration/db/row-column-lists.test.ts index b8e50dab0cc..d553ffa9b23 100644 --- a/src/main/runtime/orchestration/db/row-column-lists.test.ts +++ b/src/main/runtime/orchestration/db/row-column-lists.test.ts @@ -35,11 +35,6 @@ describe('row column lists', () => { expect([...columns].sort()).toEqual(tableColumns(table)) }) - it('qualifies each column when the statement joins under an alias', () => { - expect(selectColumns(['id', 'run_id'])).toBe('id, run_id') - expect(selectColumns(['id', 'run_id'], 't')).toBe('t.id, t.run_id') - }) - // Alias-qualified SQL must still return bare column names for lineage readers. it('returns bare column names for an alias-qualified projection', () => { db = new OrchestrationDb(':memory:') diff --git a/src/main/runtime/rpc/methods/mobile-project-sections.test.ts b/src/main/runtime/rpc/methods/mobile-project-sections.test.ts deleted file mode 100644 index 27026d94220..00000000000 --- a/src/main/runtime/rpc/methods/mobile-project-sections.test.ts +++ /dev/null @@ -1,47 +0,0 @@ -import '../unused-default-rpc-methods.test-fixture' -import { beforeEach, describe, expect, it, vi } from 'vitest' -import { RpcDispatcher } from '../dispatcher' -import type { OrcaRuntimeService } from '../../orca-runtime' -import { MOBILE_PROJECT_SECTIONS_METHOD } from '../../../../shared/mobile-project-sections-contract' -import { PROJECT_SECTION_PARITY_SERVED } from '../../../../shared/project-section-parity.test-fixture' - -// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the method reads no runtime member; the dispatcher only stamps the runtime id. -const runtime = { getRuntimeId: () => 'test-runtime' } as unknown as OrcaRuntimeService - -// Reset modules because the published snapshot is process state. -beforeEach(() => { - vi.resetModules() -}) - -async function sectionsDispatcher(): Promise { - const { MOBILE_PROJECT_SECTIONS_METHODS } = await import('./mobile-project-sections') - return new RpcDispatcher({ runtime, methods: MOBILE_PROJECT_SECTIONS_METHODS }) -} - -describe(MOBILE_PROJECT_SECTIONS_METHOD, () => { - it('answers no catalog before a desktop window has published one', async () => { - const response = await ( - await sectionsDispatcher() - ).dispatch({ - id: 'req-1', - authToken: 'tok', - method: MOBILE_PROJECT_SECTIONS_METHOD - }) - - expect(response).toMatchObject({ ok: true, result: { catalog: null } }) - }) - - it("answers the window's last published catalog", async () => { - const dispatcher = await sectionsDispatcher() - const { publishMobileProjectSections } = await import('../../mobile-project-sections-snapshot') - publishMobileProjectSections(PROJECT_SECTION_PARITY_SERVED) - - const response = await dispatcher.dispatch({ - id: 'req-2', - authToken: 'tok', - method: MOBILE_PROJECT_SECTIONS_METHOD - }) - - expect(response).toMatchObject({ ok: true, result: { catalog: PROJECT_SECTION_PARITY_SERVED } }) - }) -}) diff --git a/src/main/runtime/rpc/methods/orchestration/federation/federation-start-schema.test.ts b/src/main/runtime/rpc/methods/orchestration/federation/federation-start-schema.test.ts index 2606313a483..c3de7ab4531 100644 --- a/src/main/runtime/rpc/methods/orchestration/federation/federation-start-schema.test.ts +++ b/src/main/runtime/rpc/methods/orchestration/federation/federation-start-schema.test.ts @@ -19,11 +19,6 @@ describe('FederationAttachStartParams', () => { expect(result.success && result.data.runId).toBeUndefined() }) - it('keeps a v1.4.199 runId verbatim', () => { - const result = FederationAttachStartParams.parse({ ...legacyRequest, runId: 'run_home' }) - expect(result.runId).toBe('run_home') - }) - // OptionalString drops empty/non-strings to mint a stub Run; whitespace survives parsing and is refused at attachment. it('maps an empty or non-string runId to undefined but passes whitespace through', () => { expect(FederationAttachStartParams.parse({ ...legacyRequest, runId: '' }).runId).toBeUndefined() diff --git a/src/main/runtime/rpc/methods/orchestration/runs/run-receipt.test.ts b/src/main/runtime/rpc/methods/orchestration/runs/run-receipt.test.ts index d598dbdfff4..daccfec3044 100644 --- a/src/main/runtime/rpc/methods/orchestration/runs/run-receipt.test.ts +++ b/src/main/runtime/rpc/methods/orchestration/runs/run-receipt.test.ts @@ -36,25 +36,4 @@ describe('exposeRun', () => { expect(exposed).not.toHaveProperty('coordinator_orca_session_id') expect(exposed).not.toHaveProperty('coordinator_orca_session_id_generation') }) - - it('preserves every published column by value', () => { - const exposed = exposeRun(RUN_ROW) - - expect(exposed).toEqual({ - id: 'run_1', - objective: 'Coordinate reviews', - coordinator_handle: 'term_coord', - consumer_generation: 3, - legacy: 0, - created_at: '2026-09-04T18:53:07Z', - updated_at: '2026-09-04T18:53:09Z' - }) - }) - - it('does not mutate the source row', () => { - const row = { ...RUN_ROW } - exposeRun(row) - - expect(row).toEqual(RUN_ROW) - }) }) diff --git a/src/main/runtime/rpc/methods/structured-agent-session-agents.test.ts b/src/main/runtime/rpc/methods/structured-agent-session-agents.test.ts index 20db04b9aee..26ffeb06f1f 100644 --- a/src/main/runtime/rpc/methods/structured-agent-session-agents.test.ts +++ b/src/main/runtime/rpc/methods/structured-agent-session-agents.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it, vi } from 'vitest' import { STRUCTURED_AGENT_SESSION_RUNTIME_CAPABILITY } from '../../../../shared/protocol-version' -import { STRUCTURED_AGENT_RUNTIME_REGISTRATIONS } from '../../structured-agent-runtime-registrations' + import type { RpcContext } from '../core' import { STRUCTURED_AGENT_SESSION_AGENTS_METHODS } from './structured-agent-session-agents' @@ -16,18 +16,6 @@ function context(overrides: Partial): RpcContext { } describe('agentSession.agents', () => { - it("lists this build's registered agents without installing the host", async () => { - const ctx = context({}) - - const result = await method.handler({}, ctx) - - expect(result.agents.map(({ agent }) => agent)).toEqual( - STRUCTURED_AGENT_RUNTIME_REGISTRATIONS.map(({ definition }) => definition.agent) - ) - expect(result.agents.map(({ agent }) => agent)).toContain('opencode') - expect(ensureStructuredAgentSessionHost).not.toHaveBeenCalled() - }) - it('still refuses a remote client that cannot read structured sessions', async () => { await expect( method.handler({}, context({ clientKind: 'mobile', clientCapabilities: [] })) diff --git a/src/main/runtime/structured-agent-account-kind.test.ts b/src/main/runtime/structured-agent-account-kind.test.ts index 2fe4eb71a90..c6e98a43cff 100644 --- a/src/main/runtime/structured-agent-account-kind.test.ts +++ b/src/main/runtime/structured-agent-account-kind.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { resolveStructuredCodexAccountKind } from './structured-agent-account-home' -import { getSystemCodexHomePath, resolveOrcaManagedCodexHomePath } from '../codex/codex-home-paths' +import { getSystemCodexHomePath } from '../codex/codex-home-paths' import type { CodexManagedAccount } from '../../shared/managed-account-types' const ACCOUNT: CodexManagedAccount = { id: 'account-a', @@ -24,20 +24,6 @@ describe('Codex sign-in instructions follow the probed home', () => { it('recognizes the system home even when Settings selects a managed account', () => { expect(resolveStructuredCodexAccountKind(getSystemCodexHomePath(), SETTINGS)).toBe('system') }) - it.each([ - ['account-a', 'managed'], - [null, 'system'] - ] as const)( - 'classifies the shared mirror with selection=%s', - (activeCodexManagedAccountId, kind) => { - expect( - resolveStructuredCodexAccountKind(resolveOrcaManagedCodexHomePath(), { - ...SETTINGS, - activeCodexManagedAccountId - }) - ).toBe(kind) - } - ) it('does not infer a managed account from a custom or WSL home', () => { expect(resolveStructuredCodexAccountKind('/custom/home', SETTINGS)).toBeUndefined() expect( diff --git a/src/main/runtime/windows-default-route-interfaces.test.ts b/src/main/runtime/windows-default-route-interfaces.test.ts index 23d1a10a38e..a004128ecac 100644 --- a/src/main/runtime/windows-default-route-interfaces.test.ts +++ b/src/main/runtime/windows-default-route-interfaces.test.ts @@ -12,21 +12,6 @@ function environment( } describe('getWindowsDefaultRouteInterfaceNames', () => { - it('returns active IPv4 and IPv6 default-route interface aliases', async () => { - const runPowerShell = vi.fn().mockResolvedValue('["vEthernet (Production LAN)","Ethernet"]') - - await expect(getWindowsDefaultRouteInterfaceNames(environment(runPowerShell))).resolves.toEqual( - new Set(['vEthernet (Production LAN)', 'Ethernet']) - ) - - const script = runPowerShell.mock.calls[0]![0] as string - expect(runPowerShell.mock.calls[0]![1]).toBe(3_000) - expect(script).toContain("$ProgressPreference = 'SilentlyContinue'") - expect(script).toContain("$_.State -eq 'Alive'") - expect(script).toContain("$_.DestinationPrefix -eq '0.0.0.0/0'") - expect(script).toContain("$_.DestinationPrefix -eq '::/0'") - }) - it('returns unknown when route inspection fails or emits malformed data', async () => { await expect( getWindowsDefaultRouteInterfaceNames( diff --git a/src/main/speech/model-catalog.test.ts b/src/main/speech/model-catalog.test.ts deleted file mode 100644 index f81f57bbf9e..00000000000 --- a/src/main/speech/model-catalog.test.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { getCatalogModel, SPEECH_MODEL_CATALOG } from './model-catalog' - -describe('SPEECH_MODEL_CATALOG', () => { - it('includes the Japanese Parakeet TDT-CTC model with a valid manifest', () => { - const manifest = getCatalogModel('parakeet-tdt-ctc-0.6b-ja-int8') - - expect(manifest).toBeDefined() - expect(manifest?.type).toBe('nemo-ctc') - expect(manifest?.provider).toBe('local') - expect(manifest?.language).toBe('ja') - expect(manifest?.streaming).toBe(false) - expect(manifest?.sampleRate).toBe(16000) - expect(manifest?.files).toEqual(['model.int8.onnx', 'tokens.txt']) - expect(manifest?.sizeBytes).toBe(655_571_161) - expect(manifest?.downloadFiles?.map(({ name }) => name)).toEqual([ - 'model.int8.onnx', - 'tokens.txt' - ]) - }) - - it('has unique ids across the catalog', () => { - const ids = SPEECH_MODEL_CATALOG.map((m) => m.id) - - expect(new Set(ids).size).toBe(ids.length) - }) - - it('registers SenseVoice as a non-streaming local model', () => { - const model = getCatalogModel('sense-voice-zh-en-ja-ko-yue') - expect(model).toBeDefined() - expect(model?.type).toBe('senseVoice') - expect(model?.provider).toBe('local') - expect(model?.language).toBe('multilingual') - expect(model?.streaming).toBe(false) - }) - - it('ships the single-file SenseVoice model layout the loader resolves', () => { - const model = getCatalogModel('sense-voice-zh-en-ja-ko-yue') - expect(model?.files).toEqual(['model.int8.onnx', 'tokens.txt']) - }) - - it('downloads only the pinned SenseVoice runtime files', () => { - const model = getCatalogModel('sense-voice-zh-en-ja-ko-yue') - expect(model?.sizeBytes).toBe(239_549_735) - expect(model?.downloadFiles).toHaveLength(2) - expect(model?.downloadFiles?.map(({ name }) => name)).toEqual(['model.int8.onnx', 'tokens.txt']) - }) -}) diff --git a/src/main/speech/stt-worker-paths.test.ts b/src/main/speech/stt-worker-paths.test.ts index c4f9261632a..a6b137b2df1 100644 --- a/src/main/speech/stt-worker-paths.test.ts +++ b/src/main/speech/stt-worker-paths.test.ts @@ -4,7 +4,7 @@ import { join } from 'node:path' import { afterEach, describe, expect, it } from 'vitest' import { installFakeAppEnvironment } from '../../../config/scripts/vitest-host-ports-setup' import { SPEECH_RECOGNIZER_DIR_ENV } from '../../shared/speech-recognizer-package' -import { getSherpaModulePath, getSttWorkerPath, hasLocalSpeechRecognizer } from './stt-worker-paths' +import { getSherpaModulePath, hasLocalSpeechRecognizer } from './stt-worker-paths' const roots: string[] = [] afterEach(() => { @@ -38,9 +38,4 @@ describe('speech worker paths on orcad (#31174)', () => { process.env[SPEECH_RECOGNIZER_DIR_ENV] = dir expect(getSherpaModulePath()).toBeNull() }) - - it('starts the worker shipped beside the server bundle', () => { - installFakeAppEnvironment({ isPackaged: () => true }) - expect(getSttWorkerPath()).toBe(join(__dirname, 'stt-worker.js')) - }) }) diff --git a/src/main/ssh/ssh-session-limit-error.test.ts b/src/main/ssh/ssh-session-limit-error.test.ts deleted file mode 100644 index b66a452b38b..00000000000 --- a/src/main/ssh/ssh-session-limit-error.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { isSshSessionLimitError } from './ssh-session-limit-error' - -describe('isSshSessionLimitError', () => { - it('matches ssh2 open failures with the resource-shortage reason code', () => { - expect( - isSshSessionLimitError( - Object.assign(new Error('(SSH) Channel open failure: open failed'), { reason: 4 }) - ) - ).toBe(true) - }) - - it('matches the OpenSSH MaxSessions rejection (SSH2_OPEN_CONNECT_FAILED + "open failed")', () => { - // OpenSSH 9.2 uses reason 2 plus open failed for MaxSessions refusal. - expect( - isSshSessionLimitError( - Object.assign(new Error('(SSH) Channel open failure: open failed'), { reason: 2 }) - ) - ).toBe(true) - }) - - it('matches OpenSSH mux and MaxSessions failures', () => { - expect( - isSshSessionLimitError( - new Error( - 'mux_client_request_session: session request failed: Session open refused by peer' - ) - ) - ).toBe(true) - expect( - isSshSessionLimitError(new Error('open failed: MaxSessions limit reached on remote host')) - ).toBe(true) - }) - - it('does not match generic channel-open failures without a session-limit reason', () => { - expect( - isSshSessionLimitError( - Object.assign(new Error('(SSH) Channel open failure: open failed'), { reason: 1 }) - ) - ).toBe(false) - expect( - isSshSessionLimitError( - Object.assign(new Error('(SSH) Channel open failure: open failed'), { reason: 3 }) - ) - ).toBe(false) - }) - - it('does not match unrelated command failures', () => { - expect( - isSshSessionLimitError(new Error('Command "node" failed (exit 1): Node.js not found')) - ).toBe(false) - expect(isSshSessionLimitError(new Error('channel open failure while parsing output'))).toBe( - false - ) - expect( - isSshSessionLimitError( - new Error('open failed: administratively prohibited: forwarding disabled') - ) - ).toBe(false) - }) -}) diff --git a/src/main/startup/serve-mode-argv-cli-redirect-order.test.ts b/src/main/startup/serve-mode-argv-cli-redirect-order.test.ts deleted file mode 100644 index 2f366e32655..00000000000 --- a/src/main/startup/serve-mode-argv-cli-redirect-order.test.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { getCliLaunchArgs } from './cli-launch-redirect' -import { argvRequestsServeMode, normalizeServeModeArgv } from './serve-mode-argv' - -const CLI_ENTRY_PATH = '/opt/orca/resources/app.asar.unpacked/out/cli/index.js' -const REDIRECT_OPTIONS = { - platform: 'linux' as const, - isPackaged: true, - commandNames: ['serve', 'status'] -} - -function rewriteAsIndexDoes(argv: string[]): string[] { - return argvRequestsServeMode(argv) ? normalizeServeModeArgv(argv) : argv -} - -describe('serve argv rewrite vs CLI launch redirect ordering', () => { - const launchArgv = [ - '/opt/orca/orca-ide', - '--disable-features=Vulkan', - 'serve', - '--port', - '7777', - '--json' - ] - - it('leaves direct serve in the main process', () => { - expect(getCliLaunchArgs(launchArgv, CLI_ENTRY_PATH, REDIRECT_OPTIONS)).toBeNull() - }) - - it('rewrites direct serve into the in-process flag shape', () => { - const rewritten = rewriteAsIndexDoes(launchArgv) - expect(rewritten).toContain('--disable-features=Vulkan') - expect(rewritten).toContain('--serve') - expect(rewritten).toContain('--serve-port') - expect(getCliLaunchArgs(rewritten, CLI_ENTRY_PATH, REDIRECT_OPTIONS)).toBeNull() - }) - - it('leaves non-serve CLI commands redirectable either way', () => { - const argv = ['/opt/orca/orca-ide', 'status'] - expect(rewriteAsIndexDoes(argv)).toEqual(argv) - expect(getCliLaunchArgs(argv, CLI_ENTRY_PATH, REDIRECT_OPTIONS)).toEqual(['status']) - }) - - it('redirects serve help instead of binding a server', () => { - const argv = ['/opt/orca/orca-ide', 'serve', '--help'] - expect(rewriteAsIndexDoes(argv)).toEqual(argv) - expect(getCliLaunchArgs(argv, CLI_ENTRY_PATH, REDIRECT_OPTIONS)).toEqual(['serve', '--help']) - }) - - // Source order is the contract: behavior cases remain green if preflight redirect/rewrite order reverses. -}) diff --git a/src/main/telemetry/cohort-classifier.test.ts b/src/main/telemetry/cohort-classifier.test.ts index 36688fa0d20..0169d481237 100644 --- a/src/main/telemetry/cohort-classifier.test.ts +++ b/src/main/telemetry/cohort-classifier.test.ts @@ -16,10 +16,6 @@ function makeFakeStore(getRepos: () => Repo[]): Store { } as unknown as Store } -function makeRepos(n: number): Repo[] { - return Array.from({ length: n }, (_, i) => ({ id: `repo-${i}` }) as unknown as Repo) -} - describe('cohort-classifier', () => { beforeEach(() => { vi.spyOn(console, 'warn').mockImplementation(() => {}) @@ -31,21 +27,6 @@ describe('cohort-classifier', () => { _setStoreForTests(null) }) - it('returns the current repo count', () => { - initCohortClassifier(makeFakeStore(() => makeRepos(3))) - expect(getCohortAtEmit()).toEqual({ nth_repo_added: 3 }) - }) - - // Zero is the canonical pre-repo cohort, not absent classifier data. - it('returns 0 (not undefined) for an empty repo list', () => { - initCohortClassifier(makeFakeStore(() => [])) - expect(getCohortAtEmit()).toEqual({ nth_repo_added: 0 }) - }) - - it('returns undefined when the store is not initialized', () => { - expect(getCohortAtEmit()).toEqual({ nth_repo_added: undefined }) - }) - it('returns undefined and never throws when getRepos throws', () => { initCohortClassifier( makeFakeStore(() => { diff --git a/src/main/window/clipboard-image-thumbnail.test.ts b/src/main/window/clipboard-image-thumbnail.test.ts index d991e8e95ed..cf7720bd956 100644 --- a/src/main/window/clipboard-image-thumbnail.test.ts +++ b/src/main/window/clipboard-image-thumbnail.test.ts @@ -23,17 +23,6 @@ describe('buildClipboardImageThumbnail', () => { expect(image.resize).toHaveBeenCalledWith({ height: 160, quality: 'good', width: 320 }) }) - it('skips the resize for an image that already fits', () => { - const image = fakeImage({ getSize: () => ({ height: 200, width: 320 }) }) - - expect(buildClipboardImageThumbnail(image)?.dataUrl).toBe('data:image/png;base64,FULL') - expect(image.resize).not.toHaveBeenCalled() - }) - - it('reports no thumbnail for an empty clipboard so text paste falls through', () => { - expect(buildClipboardImageThumbnail(fakeImage({ isEmpty: () => true }))).toBeNull() - }) - it('reports no thumbnail rather than throwing for an oversized image', () => { // Preview only decides placeholder visibility; save still reports the actual oversized-image failure. const image = fakeImage({ getSize: () => ({ height: 100_000, width: 100_000 }) }) diff --git a/src/main/worktree-create-base.test.ts b/src/main/worktree-create-base.test.ts index 168cae3441c..a74103a8423 100644 --- a/src/main/worktree-create-base.test.ts +++ b/src/main/worktree-create-base.test.ts @@ -34,20 +34,4 @@ describe('resolveWorktreeCreateBase', () => { expect(resolveDefaultBaseRef).not.toHaveBeenCalled() expect(isBaseUsable).not.toHaveBeenCalled() }) - - it('keeps a usable persisted base when it is still valid', async () => { - const resolveDefaultBaseRef = vi.fn().mockResolvedValue('origin/main') - const isBaseUsable = vi.fn().mockResolvedValue(true) - - await expect( - resolveWorktreeCreateBase({ - repoWorktreeBaseRef: 'origin/master', - resolveDefaultBaseRef, - isBaseUsable - }) - ).resolves.toBe('origin/master') - - expect(resolveDefaultBaseRef).toHaveBeenCalledTimes(1) - expect(isBaseUsable).toHaveBeenCalledWith('origin/master') - }) }) diff --git a/src/renderer/src/components/cmd-j/palette-filter-option-list.test.ts b/src/renderer/src/components/cmd-j/palette-filter-option-list.test.ts index cff607eed37..111101be82c 100644 --- a/src/renderer/src/components/cmd-j/palette-filter-option-list.test.ts +++ b/src/renderer/src/components/cmd-j/palette-filter-option-list.test.ts @@ -14,13 +14,6 @@ const option = (id: string, label: string, count: number, detail = ''): PaletteF searchText: buildPaletteFilterOptionSearchText(label, detail) }) -describe('buildPaletteFilterOptionSearchText', () => { - it('lowercases label and detail once for cheap includes checks', () => { - expect(buildPaletteFilterOptionSearchText('Acme', 'SSH host')).toBe('acme ssh host') - expect(buildPaletteFilterOptionSearchText('Local', '')).toBe('local') - }) -}) - describe('rankPaletteFilterOptions', () => { const options = [ option('a', 'Alpha', 1), @@ -29,62 +22,6 @@ describe('rankPaletteFilterOptions', () => { option('d', 'Delta Host', 2, 'ssh') ] - it('moves a toggled option to the front, so a cursor must track ids not positions', () => { - const before = rankPaletteFilterOptions({ - options, - query: '', - selectedIds: new Set(), - rankMode: 'registry' - }) - expect(before.ordered.map((entry) => entry.id)).toEqual(['a', 'b', 'c', 'd']) - - // A toggle pins the row first, invalidating the previous highlight index. - const after = rankPaletteFilterOptions({ - options, - query: '', - selectedIds: new Set(['c']), - rankMode: 'registry' - }) - expect(after.ordered[0]?.id).toBe('c') - expect(before.ordered[1]?.id).not.toBe(after.ordered[1]?.id) - }) - - it('pins selected matches first and ranks the rest by popularity', () => { - const ranked = rankPaletteFilterOptions({ - options, - selectedIds: new Set(['a']), - query: '', - rankMode: 'popularity' - }) - - expect(ranked.ordered.map((row) => row.id)).toEqual(['a', 'b', 'c', 'd']) - expect(ranked.selectedCount).toBe(1) - expect(ranked.unselectedCount).toBe(3) - expect(ranked.unselectedIds).toEqual(['b', 'c', 'd']) - }) - - it('keeps registry order for hosts within each partition', () => { - const ranked = rankPaletteFilterOptions({ - options, - selectedIds: new Set(['c']), - query: '', - rankMode: 'registry' - }) - - expect(ranked.ordered.map((row) => row.id)).toEqual(['c', 'a', 'b', 'd']) - }) - - it('filters with pre-normalized searchText without re-lowercasing options', () => { - const ranked = rankPaletteFilterOptions({ - options, - selectedIds: new Set(), - query: 'ssh', - rankMode: 'popularity' - }) - - expect(ranked.ordered.map((row) => row.id)).toEqual(['d']) - }) - it('keeps selected rows visible even when they miss the query text', () => { // Selected rows must remain undoable after a search that would otherwise hide them. const ranked = rankPaletteFilterOptions({ diff --git a/src/renderer/src/components/dashboard-popout/agent-board-filtering.test.ts b/src/renderer/src/components/dashboard-popout/agent-board-filtering.test.ts index e197c96c740..82d6930a514 100644 --- a/src/renderer/src/components/dashboard-popout/agent-board-filtering.test.ts +++ b/src/renderer/src/components/dashboard-popout/agent-board-filtering.test.ts @@ -29,54 +29,6 @@ function card(overrides: Partial): DashboardCard { } describe('agent board filtering', () => { - it('searches visible names, messages, review numbers, and subagent names', () => { - const cards = [ - card({ paneKey: 'conversation', conversationName: 'Sparse-checkout parser' }), - card({ paneKey: 'messages', lastAgentMessage: 'Relay authentication repaired' }), - card({ paneKey: 'review', review: { number: 11012, state: 'open' } }), - card({ - paneKey: 'subagent', - subagents: [{ id: 'child', name: 'terminal orphan cleanup', dotState: 'working' }] - }) - ] - - expect(filterDashboardCards(cards, 'sparse-checkout', EMPTY_DASHBOARD_FILTERS)[0].paneKey).toBe( - 'conversation' - ) - expect(filterDashboardCards(cards, 'authentication', EMPTY_DASHBOARD_FILTERS)[0].paneKey).toBe( - 'messages' - ) - expect(filterDashboardCards(cards, '#11012', EMPTY_DASHBOARD_FILTERS)[0].paneKey).toBe('review') - expect(filterDashboardCards(cards, 'orphan cleanup', EMPTY_DASHBOARD_FILTERS)[0].paneKey).toBe( - 'subagent' - ) - }) - - it('combines filter categories while treating values within a category as alternatives', () => { - const cards = [ - card({ - paneKey: 'match', - repoId: 'orca', - workspaceStatusId: 'in-review', - review: { number: 1, state: 'open' } - }), - card({ - paneKey: 'wrong-status', - repoId: 'orca', - workspaceStatusId: 'todo', - review: { number: 2, state: 'open' } - }) - ] - - const result = filterDashboardCards(cards, '', { - projects: ['orca', 'relay'], - workspaceStatuses: ['in-review'], - reviewStates: ['open'] - }) - - expect(result.map((candidate) => candidate.paneKey)).toEqual(['match']) - }) - it('supports the synthesized no-review filter and immutable toggles', () => { const cards = [ card({ paneKey: 'none' }), diff --git a/src/renderer/src/components/editor/markdown-export-html.test.ts b/src/renderer/src/components/editor/markdown-export-html.test.ts index 9d98aa61502..16d57add438 100644 --- a/src/renderer/src/components/editor/markdown-export-html.test.ts +++ b/src/renderer/src/components/editor/markdown-export-html.test.ts @@ -2,19 +2,6 @@ import { describe, expect, it } from 'vitest' import { buildMarkdownExportHtml } from './markdown-export-html' describe('buildMarkdownExportHtml', () => { - it('wraps rendered html in a complete standalone document', () => { - const html = buildMarkdownExportHtml({ - title: 'Hello', - renderedHtml: '

Hello

world

' - }) - expect(html.startsWith('')).toBe(true) - expect(html).toContain('Hello') - expect(html).toContain('

Hello

world

') - expect(html).toContain('class="orca-export-root"') - expect(html).toContain('