Commit Graph
8556 Commits
Author SHA1 Message Date
Brennan Benson 90e3ead5cb fix(native-chat): keep Claude option controls idle 2026-08-12 18:24:50 -07:00
Brennan Benson 15ebaa1d74 Merge commit 'd53823acc7' into brennanb2025/claude-structured-mobile
# Conflicts:
#	mobile/src/session/use-mobile-structured-session-entry.ts
#	mobile/src/session/use-mobile-structured-session-options.test.ts
#	mobile/src/session/use-mobile-structured-session-options.ts
#	src/main/native-chat/agent-session-wire/structured-agent-session-attach-flow.ts
#	src/main/native-chat/agent-session-wire/structured-agent-session-handoff-forward.ts
#	src/main/native-chat/agent-session-wire/structured-agent-session-handoff.test.ts
#	src/main/native-chat/agent-session-wire/structured-agent-session-host-handoff.ts
#	src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
#	src/main/runtime/orca-runtime-structured-tui-tab-binding.test.ts
#	src/main/runtime/orca-runtime.ts
#	src/shared/agent-session-record.ts
2026-08-12 18:06:39 -07:00
Brennan Benson d53823acc7 test(native-chat): give the host-oracle matrix test an explicit timeout 2026-08-12 17:40:41 -07:00
Brennan Benson 5fc6f7a1cc test(native-chat): derive refusal retry state from host 2026-08-12 17:35:57 -07:00
Brennan Benson 2355a20b29 fix(native-chat): rotate refused send operations 2026-08-12 17:21:10 -07:00
Brennan Benson d82d807180 fix(native-chat): rotate settled handoff operations 2026-08-12 17:04:49 -07:00
Brennan Benson 7f4a1d13f7 fix(native-chat): replay pending option mutations 2026-08-12 16:54:16 -07:00
Brennan Benson 973dd58aba fix(native-chat): preserve options across structured handoffs 2026-08-12 16:40:09 -07:00
Brennan Benson 2c8b009101 fix(native-chat): hydrate resumed structured options 2026-08-12 14:16:00 -07:00
Brennan Benson 5971fcb437 fix(native-chat): persist structured session options 2026-08-12 13:58:48 -07:00
Brennan Benson 1cf45caa24 fix(native-chat): route structured Codex options directly 2026-08-12 12:43:24 -07:00
Brennan Benson 5c2d2bf6e3 fix(native-chat): queue stale idle TUI handoffs 2026-08-12 02:58:46 -07:00
Brennan Benson f5cfa241a1 fix(native-chat): wait for structured TUI process proof 2026-08-12 01:54:47 -07:00
Brennan Benson b44714fe56 fix(i18n): catalog Claude session controls 2026-08-12 01:04:10 -07:00
Brennan Benson 2f8fc3cb4d fix(native-chat): gate restart recovery publications 2026-08-12 00:47:46 -07:00
Brennan Benson 22312a8932 fix(native-chat): revalidate restored and retried owners 2026-08-12 00:28:12 -07:00
Brennan Benson e5bd9812c9 fix(native-chat): validate pinned launch environment 2026-08-12 00:09:23 -07:00
Brennan Benson 8f39ca84b6 fix(native-chat): close handoff admission races 2026-08-11 23:52:14 -07:00
Brennan Benson 7da8def904 fix(native-chat): serialize structured handoff recovery 2026-08-11 23:32:07 -07:00
Brennan Benson 7371c0d2f5 fix(native-chat): harden Claude handoff recovery 2026-08-11 22:59:34 -07:00
Brennan Benson 7b3144c037 Merge remote-tracking branch 'origin/brennanb2025/native-chat-toggle' into brennanb2025/codex-structured-mobile-write 2026-08-11 22:57:35 -07:00
Brennan Benson 6456b4cb5a fix(native-chat): recover TUI transcripts read-only 2026-08-11 22:25:32 -07:00
Brennan Benson 64b0d5c97e fix(native-chat): preserve Claude handoff authority 2026-08-11 22:21:28 -07:00
Brennan Benson c8a67dcf3b fix(native-chat): retain cold TUI proof authority 2026-08-11 22:17:56 -07:00
Brennan Benson eac2520f42 fix(native-chat): recover claimed TUI owners 2026-08-11 22:10:24 -07:00
Brennan Benson f350cfbc29 Merge native chat handoff and wire Claude structured sessions 2026-08-11 22:01:38 -07:00
Brennan Benson ff35abf7a8 fix(native-chat): recover TUI transcript gaps 2026-08-11 21:56:01 -07:00
Brennan Benson ed78cfd598 fix(native-chat): keep TUI transcripts readable 2026-08-11 21:37:39 -07:00
Brennan Benson 7316ac3926 fix(native-chat): complete mobile reverse after TUI exit 2026-08-11 20:35:12 -07:00
Brennan Benson c18e81c8d2 fix(native-chat): clear sticky handoff recovery 2026-08-11 19:46:33 -07:00
Brennan Benson 2cf610b052 Add Claude structured TUI handoff seams 2026-08-11 16:32:22 -07:00
Brennan Benson c0f6e427d3 fix(native-chat): make reverse handoff transactional 2026-08-11 15:01:52 -07:00
Brennan Benson 93824e2635 Merge remote-tracking branch 'origin/brennanb2025/codex-structured-mobile-write' into brennanb2025/claude-structured-mobile
# Conflicts:
#	mobile/src/session/mobile-structured-composer-command.ts
#	mobile/src/session/mobile-structured-session-create.ts
#	mobile/src/session/use-mobile-structured-session-entry.ts
#	mobile/src/session/use-mobile-structured-session-options.ts
#	src/main/ai-vault/structured-session-ownership.test.ts
#	src/main/ai-vault/structured-session-ownership.ts
#	src/main/ipc/ai-vault.ts
#	src/main/native-chat/agent-session-wire/structured-agent-session-attach-flow.ts
#	src/main/runtime/rpc/methods/ai-vault.ts
#	tests/e2e/cross-version-wire/cross-version-agent-session-wire.unit.test.ts
2026-08-11 14:26:56 -07:00
Brennan Benson 438d256ef5 Merge remote-tracking branch 'origin/main' into brennanb2025/codex-structured-mobile-write
# Conflicts:
#	mobile/app/h/[hostId]/session/[worktreeId].tsx
#	mobile/src/session/MobileMarkdownReader.tsx
#	src/renderer/src/components/native-chat/NativeChatView.tsx
#	src/renderer/src/components/native-chat/native-chat-view-types.ts
#	src/renderer/src/components/tab-bar/TabBar.tsx
#	src/renderer/src/runtime/web-session-tabs-sync.ts
2026-08-11 13:16:52 -07:00
Jinjing 2b1e69d4b0 Add keyboard dismissal for mobile markdown editor (#13856)
* fix(mobile-markdown): enable keyboard dismissal while editing

Allow users to dismiss the soft keyboard while composing markdown content. Extract the MarkdownReader component into its own file and add WebView-based caret preservation to restore the cursor position after the keyboard closes. This prevents the editor from losing focus and erasing the user's selected caret location when the keyboard hides.

* improve test
2026-08-11 13:08:50 -07:00
Jinwoo Hong 92f928cf89 feat(terminal): add copy action to link popover (#13857) 2026-08-11 12:58:07 -07:00
Jinjing 17c57b7d20 Unpack OpenCode SQLite worker entry from asar (#13853)
The scanner service runs under ELECTRON_RUN_AS_NODE and cannot access
packed files in app.asar. Without unpacking, the worker entry fails to
spawn, causing all OpenCode sessions to disappear in packaged builds.
2026-08-11 12:51:29 -07:00
Jinjing 97ebfd9b81 fix(cmd-j): improve keyboard selection visibility in light mode (#13855)
Use color-mix to blend selection highlight instead of flat accent, making the keyboard cursor visible on light popover surfaces in both light and dark modes. Fix race condition in selection handling where deferred query lag could break arrow navigation by always accepting cmdk's internal cursor updates.
2026-08-11 12:31:30 -07:00
Jinwoo Hong 6acd69c516 fix(terminal): prevent link action clicks reaching child (#13797) 2026-08-11 12:27:54 -07:00
Jinjing 4c69e45552 Strengthen plain-node-entry-guard with entry name validation (#12761)
* Strengthen plain-node-entry-guard with entry name validation

- Add buildStart hook to validate guarded entry names exist in rollup
  inputs, preventing stale names from silently stopping guards
- Extend electron require detection to subpaths (electron/main, etc)
- Improve smoke test signal/exit handling and use constants
- Add comprehensive tests for entry validation and new behaviors

* Add SIGKILL escalation to plain-node-entry-guard timeout

Switch from spawnSync to async spawn to properly handle daemons that trap
SIGTERM. spawnSync's timeout only sends the signal and waits, so a daemon
that ignores SIGTERM causes the build to hang. The new runDaemonEntry
function escalates to SIGKILL after a grace period to enforce the deadline.
Configurable timeouts and grace periods via SmokeTimings type; closeBundle
hook becomes async to support the change.
2026-08-11 12:20:20 -07:00
OrcaWin e790266546 fix(windows): show first window before shell PATH hydration (#13799) 2026-08-11 12:14:36 -07:00
Jinwoo Hong 536d17dca3 fix(artifacts): recover committed cloud mutations (#13796) 2026-08-11 12:13:16 -07:00
OrcaWin c96ded8dfd fix(startup): restore Windows PATH before shell changes (#13792) 2026-08-11 11:50:21 -07:00
Jinjing ef56ca8b81 fix(feedback): pre-include Orca version and OS in errors and feedback (#13851)
* fix(feedback): pre-include Orca version and OS in errors and feedback

Make terminal errors and Send Feedback carry easy-to-copy client
environment details so bug reports include build and platform context
without a follow-up ask.

* fix(feedback): satisfy exhaustive-deps in environment prefill hook

Destructure hook params so useEffect/useLayoutEffect dependency lists
are complete and the changed-code quality gate passes.

* fix(preload): stop importing node:os in sandboxed preload

Sandboxed Electron preloads cannot require node:os. That import crashed
the whole preload script, leaving window.api undefined and taking down
App chrome (dock badge, preflight). Keep platform.get on process APIs
only, and guard best-effort badge/preflight callers when api is missing.

* fix(feedback): count text typed below the env footer

Strip only the prefilled Orca/OS/Shell block for Send validation so
users who click past the footer and type can still submit.
2026-08-11 11:49:44 -07:00
Brennan Benson 34635aed0f fix: align structured TUI return readiness 2026-08-11 06:45:21 -07:00
Brennan Benson 9d8857c20a fix: complete structured chat round trips 2026-08-11 06:12:59 -07:00
Brennan Benson 6bc01085d0 fix: bind structured TUI before rollout proof 2026-08-11 05:20:06 -07:00
Brennan Benson 1ab28b5fc0 fix: harden structured session handoffs 2026-08-11 04:24:54 -07:00
OrcaWin a0a654c3a9 fix(renderer): reject malformed cursor and language-pack inputs (#13451)
## What this changes

Two renderer inputs were trusted because their TypeScript types said they were valid. Both are now validated at the boundary that owns them.

**Terminal cursor style.** `normalizeTerminalCursorStyleDefault` preserved any non-null migration-stamped value without checking it against the actual enum, so a runtime value outside `bar | block | underline` survived into `terminal.options.cursorStyle`. It now enum-checks and falls back to `block`. Applied on both read paths (desktop `Store` load, web `getStoredSettings`) and both write paths (`Store.updateSettings`, web `settings.set`), so an unsupported value cannot reach persistence, the `settings:changed` publication, or xterm.

**Plugin language packs.** The renderer stored the `listLanguagePacks()` IPC result without a runtime check, so a non-array response was assigned to state and later crashed its first array consumer on `.find`. Ingress now accepts only an array, drops members failing `isPluginLanguagePackRegistration`, keeps valid siblings in their original order, and logs which failure mode occurred. The registration guard requires `resourceLanguage` to equal `pluginLanguageResourceId(id)`, which keeps a pack with a missing or inconsistent identity out of i18next — that shape reproduces as `TypeError: Cannot read properties of undefined (reading 'includes')` with the guard removed.

Catalog validation is shape-only on this path (`validatePluginLanguagePackCatalogShape`), so revalidating an already-parsed catalog does not allocate a second copy of it. `isCatalogObject` also now requires a plain-object prototype, and the walk rejects repeated or cyclic object references.

## Root cause: partially known

Worth stating plainly, because the fix is defensive rather than causal:

- The non-array pack container and the out-of-enum cursor value are both reproduced directly by tests.
- Two additional field stacks are *consistent with* an invalid `resourceLanguage` and are blocked by this guard, but the reports do not prove that malformed registrations were their source.
- No production writer in current code or history emits an out-of-enum cursor style. The Ghostty config importer (`src/main/ghostty/mapper.ts`) already rejects unsupported `cursor-style` values. The original writer is unidentified.

Every in-tree producer supplies valid data, so these guards are no-ops on the current happy path. They are boundary hardening against a mutation we have not located, not a repair of a known writer.

## Trade-offs

- Malformed registrations are skipped with one warning rather than surfaced in the UI. Valid siblings keep their identity and order. Note the main-process registry already reports per-plugin parse errors, so this path only catches corruption after main has validated.
- Renderer ingress walks each catalog once per lazy load or `contentPacksChanged`. It does not run on render or terminal-output paths, but a maximum-size burst still costs tens of milliseconds synchronously. Pack count and plugin-ID length remain uncapped.
- An unsupported cursor value now renders and persists as `block`, so anyone relying on an undocumented third-party value loses it.
- Loading settings whose cursor style is absent or invalid now marks state dirty and rewrites once, matching the existing `terminalRightClickToPasteDefaultedForPlatform` pattern above it.

## Compatibility

`listLanguagePacks` is local `ipcMain`/`ipcRenderer` only and is not implemented in the web build, so nothing here crosses the remote wire — no RPC parameter, publication schema, stream frame, opcode, or capability changed. Validation is receiver-side at existing boundaries. Nothing is platform-, shell-, PTY-, native-module-, SSH-, WSL-, or worktree-dependent, and the web build normalizes on both read and write. Malformed plugin data is rejected before i18next sees it; no new permission, network path, executable input, or persistence schema was added.

## Verification

Locally on the final head: the 5 touched test files pass (591 tests), plus node and web typecheck, oxlint, and oxfmt. All GitHub required checks pass, including Windows packaging, static analysis, Git and wire compatibility, shell contracts, and all 32 Node 24/26 shards. The path-gated E2E job is skipped after its detector passed.

Scope note: an earlier revision generalized this hardening to `Project.sourceRepoIds` and profile transfer without field evidence. That scope was removed; the diff is cursor and plugin paths only.
2026-08-11 03:18:55 -07:00
Neil 1f2e18acc1 fix(e2e): repair seven specs whose assertions drifted from shipped behavior (#13785)
* fix(e2e): repair seven specs whose assertions drifted from shipped behavior

The E2E suite could not collect at all until #13758, so these seven had been
failing unobserved. Each is a stale test, not a product defect — verified
individually against src/ rather than by making the assertion pass.

- worktree-jump-palette-filter: the palette placeholder gained chats and
  terminals. Hoisted to one SEARCH_PLACEHOLDER const.
- tab-create-entry-file-paths: matched the omnibox by its translated
  aria-label. Switched to aria-controls, which is structural and unlocalized.
- browser-local-https-certificate-trust: once a load settles, the toolbar
  reload button relabels itself "Retry" alongside the failure overlay's own
  Retry, so the slot-wide locator hit two elements and failed strict mode. The
  test only ever passed inside the window where the toolbar still read "Stop".
  Narrowed by visible text; the icon button has none.
- repro-7732-gitlab-checks-job-details: the activity-bar label carries a
  failure suffix ("Checks — Error"), which an exact-name match stops seeing
  precisely when the checks under test fail. Anchored regex, and bounded the
  click so the poll retries instead of hanging on a label that flips mid-action.
- floating-tab-rename: the panel's open flag is persisted, so after the restart
  the helper's blind toggle closed the panel it was about to assert on. Made it
  idempotent.
- github-created-issue-start-prefill: starting an issue now routes through the
  quick-create composer, so the launch command only forms once that is
  submitted. The spec now drives it.
- ssh-config-host-import: P6 waited on "All hosts already in Orca", a string
  that exists nowhere in src/ and never could have matched. P7 required the
  tombstoned host to be absent, but listing it behind a "Removed from Orca"
  badge is deliberate — see the rationale at ssh-config-host-picker.ts:54 and
  the unit test already pinning it. Both retargeted; P7 still proves the host
  is excluded from bulk re-adoption, which is what it was for.

Verified locally: all seven pass. github-created-issue-start-prefill cannot be
verified on a machine whose gh resolves to an Orca terminal-attribution shim,
since hydrateShellPath puts that ahead of the fixture's fake gh; CI has no shim.

Three further failures are NOT addressed here. Adversarial review found the
obvious test-side fix for each would have masked a real product bug, so they
are being fixed in the product instead.

* fix(e2e): configure the issue spec's git remote before Electron launches

The spec added origin inside the test body, after the orcaPage fixture had
already launched the app and added the repo. "New GitHub issue" is disabled
when no repo is task-eligible, and eligibility is decided by the git remote
probe alone: repos.add runs detectRepoIconAndUpstream, and a settled "no
remote" writes gitRemoteIdentity = null, which is the ineligible marker.
Background enrichment then suppresses re-probing that location for five
minutes, so a remote added afterwards can never recover the button.

It passed only when the shared seeded repo happened to already carry an origin
from an earlier spec in the same worker — github-cli-stall-repro adds one,
source-control-create-pr-intent-switch removes one — which is why it passed in
the sharded lane and failed in the changed-specs lane.

Moved to test.beforeAll, whose worker-scoped testRepoPath runs before the
test-scoped Electron fixtures. Reproduced the failure against a fresh
origin-less repo, then confirmed the fix on the same, including --repeat-each=2.

Note the earlier attribution was wrong: the local failure at this line was
never the gh attribution shim. The button's enabled state reads `git remote -v`
and never consults gh, so a shim can only bite later, at issue creation.
2026-08-11 03:07:44 -07:00