You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(renderer): group file and document feature owners - #40745
Keep renderer file and document behavior with the feature that owns it, so callers can find and import the implementation directly.
What Changed
Move 42 modules into file access, drag/drop, search, OS opening, document preview, markdown, text search and path-display owners. Update callers, mocks, lazy imports and active metadata directly.
Move the complete file explorer tree result contract into its existing type owner; all runtime hook bodies and eager imports remain unchanged.
Import UUID and keyboard matching definitions from their concrete owners; remove redundant forwarding surfaces without compatibility aliases.
Retire complete prohibited cases in touched consumers and 17 whole suites/registration helpers, including the orphaned editor recovery registrar whose caller was removed with its suite. Preserve the remaining complete registrations and fixture initialization. No replacement tests or assertion surgery.
Why
The renderer library root mixes unrelated features. These cohesive folders put implementation and callers under concrete domains without barrels or forwarding wrappers.
Linked Issue
Internal module-layout cleanup; no new issue.
Visual Proof
N/A — file placement and imports change without a rendered layout or interaction change.
Testing
Affected suites: 41 files, 141 tests passed, with three existing skips.
Renderer and Node typechecks passed; the final changed check also covers all three desktop TypeScript projects.
File explorer contract consumers: 3 suites, 4 tests passed.
Normal commit hooks passed. All 40 formatter changes preserve their complete source ASTs.
Earlier changed checks exposed an orphaned registration helper and a formatter-expanded 303-line hook. The helper was retired whole with its meaningful lost alarms recorded; the complete hook result contract moved to its existing defining type owner. Both obsolete runs were stopped and carry no related-unit pass credit.
Final ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed: all 39 checks passed (517.9s), including related unit tests and all three desktop TypeScript projects. Full hosted CI passed, including all 12 unit shards, changed E2E specs and both SSH Docker lanes. Mobile, Headless E2E and WSL workflows passed.
Risk
Level: Medium. File-owner routing, eager module initialization, dynamic imports and fixture isolation are the main risks. Existing implementations, state identities and initialization order are preserved. A plain revert restores the prior organization.
Whole mixed cases lose meaningful alarms alongside prohibited checks, including paired-host editor restart/provenance recovery, file routing/drop refusals and lifecycle races. These losses are documented; the remaining tests are not claimed as equivalent replacements.
Cross-platform path behavior, remote host routing and folder-workspace support stay with the same implementations. No agent/provider protocol, credential policy, allocation or polling logic changes. Local validation runs on macOS; conditional hosted platform lanes retain their actual passed or skipped status.
Review
Two independent prospective source/boundary audits accepted the full candidate. Actual application, whole formatter ASTs, retained cases, owner contacts and orphan-helper retirement were accepted by independent reviewers. The rebase preserves the complete reviewed source trees; actual-parent and final type-owner receipts are accepted, with immutable root replays passed. Planning and detailed evidence remain local and ignored.
Agent skill upstream boundary
Not applicable: no upstream skill-installer material is copied or translated.
Checklist
Cohesive renderer file/document ownership scope
Changes, purpose and risk explained
No visual change
Cross-platform, remote and folder-workspace impact considered
Final local gates and required hosted CI passed
Latest-main integration preserves 55 incoming entries: plugin typography owners, terminal startup/env and oracle visibility changes, and SSH fixtures. Both independent latest-main supplements accepted the exact combined tree; all three desktop typechecks passed on that tree. Hosted CI remains attached to its recorded earlier source tree; no new-tree CI pass is inferred. Inherited forwarding exports and a stale test mock are recorded for subsequent cleanup.
This pull request mostly updates renderer imports to new nested library paths under lib/files, lib/text-search, lib/path-display, lib/browser/documents, and lib/workspace/paths. It also moves one empty open-in constant and one file-explorer tree result type to shared modules. Many test files or test cases were removed. CI reliability-gate selectors, shard timing records, and baseline files were updated to match the new paths and removed tests.
Merge Risk: Low · up to 97d09
Core behavior appears unchanged, but the removed tests leave important file, editor, and draft-recovery regressions harder to detect. Restore or replace the relevant coverage before merging, and complete hosted CI.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly summarizes the main change: grouping renderer file and document features under their owning domains.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description covers the change, purpose, visual impact, testing, risk, review, and checklist. It states that no new issue was created, but does not provide a linked issue number.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 50 files. (193 skipped: 4 unsupported, 189 over the file limit.)
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
LanguageTool
config/react-compiler-bailout-baseline.txt
LanguageTool could not check every text chunk; analysis is incomplete
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Restore the retired useLocalImageSrc regression tests, or replace them.
This change removes the tests for prewarm adoption, failed-read retry, and stale invalidated reads. It also removes the whole runtime-owner suite, which checked that an SSH-generation or worktree change triggers a fresh image read and a new preview URL. The hook is unchanged in this PR, so these removals only reduce coverage. Nothing in the supplied context shows other tests for these cache and owner-change paths.
A stale image after an owner change is a user-visible bug. Keep these tests. Update only their import paths.
Restore the success-path cases for runtime terminal drops.
The removed it.each(['worktree', 'folder', 'ssh']) test was the only test of successful, owner-matched drops. It checked that handleTerminalFileDrop and handleInternalTerminalFileDrop resolve the runtime owner's worktree root and do not choose a local duplicate. A search for both handlers in test files found only this file.
The surviving it.each covers refusals only. If the owner lookup or host matching is later changed to be too strict, nothing fails. If it is changed to pick a local duplicate, only the refusal cases are checked.
Keep the success cases. Update only the import path.
Restore the overflow-handling tests for editor-external-watch-overflow.
This change removes every behavioral test in this file for the overflow handler. The removed tests covered:
normal-overflow probing and tombstone clearing;
storm-overflow reloads of clean tabs;
runtime-owner filtering;
the 128-path probe batch boundary.
The handler is unchanged in this PR. Without these tests, an off-by-one in batching or a wrong deleted/reload decision would go undetected. Both can mark a live file as deleted or leave stale editor content. Keep the tests. Update only the mock path, as done on this line.
Retain coverage for the executeWorktreeCreation draft handoff and retry paths.
This change removes four lifecycle tests:
the slow, refused, and background live-draft handoff cases;
the rich-message retry after layout refusal;
the unresolved-host pending-composer case;
the late legacy preparation error case.
PendingNativeChatCreation.test.tsx still covers the slow and refused draft write. It does so through moveNativeChatComposerDraft. It does not call executeWorktreeCreation and has no background (activeView: 'tasks') variant. Nothing visible covers user-input loss when creation completes in the background or the layout is refused. These paths guard against losing unsent text and attachments.
Restore the removed tests, or move them to a surviving suite. Update only the import paths.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 893b9e10-5004-429a-b3ef-20c685980e58
Commits
Reviewing files that changed from the base of the PR and between fedb28b and 97d096e.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
OmarHung
added a commit
to OmarHung/orca
that referenced
this pull request
Nov 13, 2026
Upstream grouped more renderer owners into folders (stablyai#40230, stablyai#40745,
stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40936) and dropped a few aliases. Fork imports
and vi.mock targets follow the moves, and:
- `@/lib/utils` cn → `@/lib/class-names`; `@/lib/language-detect` →
`shared/editor-language/editor-language-detect`; agent catalog
helpers come from `@/lib/agent-catalog/agent-catalog`.
- `BrowserTab` → `BrowserWorkspace`; `collectLeafIdsInOrder` →
`collectLayoutLeafIdsInOrder`; `ORCA_BROWSER_BLANK_URL` lives in
`shared/browser/browser-blank-page`; `tuiAgentToAgentKind` in
`shared/agent-kind`.
- process-host no longer re-exports `SpawnedProcess`/`PipedChildProcess`,
so SFTP and SSH VPN use node's ChildProcess types.
- The Database and Git Log shortcuts move to their own module so
app-command-handlers.ts stays under the line cap.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 14, 2026
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 16, 2026
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 18, 2026
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 18, 2026
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 19, 2026
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
OmarHung
added a commit
to OmarHung/orca
that referenced
this pull request
Nov 19, 2026
Upstream grouped more renderer owners into folders (stablyai#40230, stablyai#40745,
and vi.mock targets follow the moves, and:
- `@/lib/utils` cn → `@/lib/class-names`; `@/lib/language-detect` →
`shared/editor-language/editor-language-detect`; agent catalog
helpers come from `@/lib/agent-catalog/agent-catalog`.
- `BrowserTab` → `BrowserWorkspace`; `collectLeafIdsInOrder` →
`collectLayoutLeafIdsInOrder`; `ORCA_BROWSER_BLANK_URL` lives in
`shared/browser/browser-blank-page`; `tuiAgentToAgentKind` in
`shared/agent-kind`.
- process-host no longer re-exports `SpawnedProcess`/`PipedChildProcess`,
so SFTP and SSH VPN use node's ChildProcess types.
- The Database and Git Log shortcuts move to their own module so
app-command-handlers.ts stays under the line cap.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 20, 2026
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 20, 2026
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 20, 2026
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 21, 2026
…40337, stablyai#40562, stablyai#40688, stablyai#40745, stablyai#40761, stablyai#40777, stablyai#40895, stablyai#40911, stablyai#40936)
Rewrites fork import and vi.mock specifiers to the moved modules, moves the three fork tests that sit
beside moved modules (git-graph-tab, lazy-chunk-recovery-reload, folder-repo-launch-chat-route) and
their seam list entries, takes GIT_GRAPH_REFRESH_EVENT from its own module, and drops the fork's
OpenFile type import that upstream's editor-autosave now carries itself.
OmarHung
added a commit
to OmarHung/orca
that referenced
this pull request
Nov 24, 2026
Upstream grouped more renderer owners into folders (stablyai#40230, stablyai#40745,
and vi.mock targets follow the moves, and:
- `@/lib/utils` cn → `@/lib/class-names`; `@/lib/language-detect` →
`shared/editor-language/editor-language-detect`; agent catalog
helpers come from `@/lib/agent-catalog/agent-catalog`.
- `BrowserTab` → `BrowserWorkspace`; `collectLeafIdsInOrder` →
`collectLayoutLeafIdsInOrder`; `ORCA_BROWSER_BLANK_URL` lives in
`shared/browser/browser-blank-page`; `tuiAgentToAgentKind` in
`shared/agent-kind`.
- process-host no longer re-exports `SpawnedProcess`/`PipedChildProcess`,
so SFTP and SSH VPN use node's ChildProcess types.
- The Database and Git Log shortcuts move to their own module so
app-command-handlers.ts stays under the line cap.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Keep renderer file and document behavior with the feature that owns it, so callers can find and import the implementation directly.
What Changed
Why
The renderer library root mixes unrelated features. These cohesive folders put implementation and callers under concrete domains without barrels or forwarding wrappers.
Linked Issue
Internal module-layout cleanup; no new issue.
Visual Proof
N/A — file placement and imports change without a rendered layout or interaction change.
Testing
ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed: all 39 checks passed (517.9s), including related unit tests and all three desktop TypeScript projects. Full hosted CI passed, including all 12 unit shards, changed E2E specs and both SSH Docker lanes. Mobile, Headless E2E and WSL workflows passed.Risk
Level: Medium. File-owner routing, eager module initialization, dynamic imports and fixture isolation are the main risks. Existing implementations, state identities and initialization order are preserved. A plain revert restores the prior organization.
Whole mixed cases lose meaningful alarms alongside prohibited checks, including paired-host editor restart/provenance recovery, file routing/drop refusals and lifecycle races. These losses are documented; the remaining tests are not claimed as equivalent replacements.
Cross-platform path behavior, remote host routing and folder-workspace support stay with the same implementations. No agent/provider protocol, credential policy, allocation or polling logic changes. Local validation runs on macOS; conditional hosted platform lanes retain their actual passed or skipped status.
Review
Two independent prospective source/boundary audits accepted the full candidate. Actual application, whole formatter ASTs, retained cases, owner contacts and orphan-helper retirement were accepted by independent reviewers. The rebase preserves the complete reviewed source trees; actual-parent and final type-owner receipts are accepted, with immutable root replays passed. Planning and detailed evidence remain local and ignored.
Agent skill upstream boundary
Checklist
Latest-main integration preserves 55 incoming entries: plugin typography owners, terminal startup/env and oracle visibility changes, and SSH fixtures. Both independent latest-main supplements accepted the exact combined tree; all three desktop typechecks passed on that tree. Hosted CI remains attached to its recorded earlier source tree; no new-tree CI pass is inferred. Inherited forwarding exports and a stale test mock are recorded for subsequent cleanup.