Skip to content

refactor: group desktop integration and lifecycle owners - #37600

Merged
nwparker merged 4 commits into
mainfrom
module-layout-v2/m02-desktop-integration
Nov 3, 2026
Merged

nwparker merged 4 commits into
mainfrom
module-layout-v2/m02-desktop-integration

Conversation

@nwparker

@nwparker nwparker commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 72 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​142 $\color{#cf222e}{\Huge{\mathbf{−}}}$​97 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​45
Prod 82 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​154 $\color{#cf222e}{\Huge{\mathbf{−}}}$​148 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6

Desktop integration and lifecycle code still sits directly in src/main. Move 59 implementation/test files into concrete editor, power, permissions, repository-icon, preference, media, page-metadata, desktop-window and quit owners, with all callers and test mocks retargeted atomically.

Remove two forwarding export blocks and import their constants/types from defining owners. Preserve production bodies, asset query suffixes and mock identities, platform gates, launch behavior, and historical reliability evidence. Link the retained executed command to the renamed active gate with the checker’s existing currentCommand field. The Docker lid-sleep oracle now reads either historical or current source paths when given a baseline Git ref. A single reviewed path-ratchet exception permits its intentional historical source lookup.

Validation:

  • Two independent native Codex audits approve tree d0516251: all 73 affected production source bodies/literals, defining-owner imports, mock interception and path/config changes verified.
  • 67 focused test files passed 671 tests; targeted audit corrections passed 51 tests (one existing skip), then the final WSL/fork mock cohort passed seven tests.
  • The actual Docker bundler function produces byte-identical bundles from pre-move, moved and current sources; Docker was not invoked.
  • Required ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2 passed all 29 checks after the final rebase/edits, including related unit tests (782 seconds).
  • Required GitHub checks gate merge.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

Imports and test mocks now reference relocated main-process modules, including repository icons, desktop integration, external editors, macOS permissions, startup, power, quit, and preferences. CI timing keys, test baselines, and reliability-gate paths were updated to match. The Linux lid-sleep Docker script checks the relocated source path and supports the former path when loading a baseline. Two re-exports were removed.

Merge Risk: Minimal · up to 5a904

No concrete regression or merge-blocking risk was identified in the relocation.

Pre-merge checks: Passed 3 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Description check Warning The description explains the refactor and reports validation, but it does not follow the required template. It omits the required section headings and lacks a linked issue, explicit visual-proof statu… Rewrite the description using all required template sections. Add an actual linked issue after “Fixes #”, state “N/A” with a reason for visual proof if there is no UI change, document testing and supported platforms, describe risks and roll…
Docstring Coverage Inconclusive Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: grouping desktop integration and lifecycle code under concrete owners.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the refactor and reports validation, but it does not follow the required template. It omits the required section headings and lacks a linked issue, explicit visual-proof status, risk assessment, checklist confirmations, and other required template details.

Resolution

Rewrite the description using all required template sections. Add an actual linked issue after “Fixes #”, state “N/A” with a reason for visual proof if there is no UI change, document testing and supported platforms, describe risks and rollback, complete applicable checkboxes, address AI disclosure and the agent-skill boundary, and retain the existing change summary and validation results.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. 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 1 functions across 50 files. (75 skipped: 6 unsupported, 69 over the file limit.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

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.

ast-grep (0.51.1)

ast-grep could not parse rule config: /ast-grep-rules/ast-grep-essentials/rules/c/security/null-library-function-c.yml

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent 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: 5f0ececc-a252-47ea-a25c-d43b12dc46f7
Commits

Reviewing files that changed from the base of the PR and between 30145d8 and 5a90436.

Files selected for processing: 154
  • config/flaky-test-pattern-baseline.txt
  • config/main-sync-spawn-baseline.txt
  • config/path-literal-baseline.txt
  • config/process-host-direct-import-baseline.txt
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • config/scripts/repo-icon-source-href-benchmark.mjs
  • config/scripts/run-linux-lid-sleep-assertion-docker.mjs
  • config/scripts/vitest-node-runtime-files.mjs
  • src/main/computer/macos-computer-use-permissions-shutdown.test.ts
  • src/main/computer/macos-computer-use-permissions.ts
  • src/main/daemon/daemon-folder-access-reset.test.ts
  • src/main/daemon/daemon-folder-access-reset.ts
  • src/main/daemon/daemon-full-disk-access-status.test.ts
  • src/main/daemon/daemon-full-disk-access-status.ts
  • src/main/daemon/daemon-health-requests.ts
  • src/main/external-editors/editor-launcher-name.ts
  • src/main/external-editors/external-editor-launch-process-host.test.ts
  • src/main/external-editors/external-editor-launch.test.ts
  • src/main/external-editors/external-editor-launch.ts
  • src/main/external-editors/jetbrains-windows-gui-launchers.ts
  • src/main/external-editors/remote-ssh-editor-launch.ts
  • src/main/external-editors/vscode-cli-install-paths.ts
  • src/main/ipc/app.test.ts
  • src/main/ipc/app.ts
  • src/main/ipc/developer-permissions.test.ts
  • src/main/ipc/developer-permissions.ts
  • src/main/ipc/filesystem/filesystem-runtime-upload-staging.ts
  • src/main/ipc/orca-profiles-switch-persistence.test.ts
  • src/main/ipc/orca-profiles.test.ts
  • src/main/ipc/orca-profiles.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.ts
  • src/main/ipc/repos-add-linked-worktree.test.ts
  • src/main/ipc/repos/local-repo-registration.test.ts
  • src/main/ipc/repos/local-repo-registration.ts
  • src/main/ipc/repos/nested-repo-import-handler.ts
  • src/main/ipc/repos/repo-clone-lifecycle.ts
  • src/main/ipc/repos/repo-creation-handlers.ts
  • src/main/ipc/settings-delayed-response.test.ts
  • src/main/ipc/settings.test.ts
  • src/main/ipc/settings.ts
  • src/main/ipc/shell-server-ssh-editor.test.ts
  • src/main/ipc/shell-wsl-owner.test.ts
  • src/main/ipc/shell.test.ts
  • src/main/ipc/shell.ts
  • src/main/ipc/ssh/ssh-app-shutdown.test.ts
  • src/main/ipc/ssh/ssh-connect-attempt-registry.ts
  • src/main/ipc/ssh/ssh.ts
  • src/main/ipc/wsl-drive-unc-conversion-handlers.ts
  • src/main/link-preview/link-preview-page-metadata.ts
  • src/main/macos-permissions/macos-full-disk-access-status.test.ts
  • src/main/macos-permissions/macos-full-disk-access-status.ts
  • src/main/macos-permissions/macos-tcc-log-stream-orphans.test.ts
  • src/main/macos-permissions/macos-tcc-log-stream-orphans.ts
  • src/main/macos-permissions/macos-tcc-prompt-notice.test.ts
  • src/main/macos-permissions/macos-tcc-prompt-notice.ts
  • src/main/macos-permissions/macos-tcc-prompt-watch.test.ts
  • src/main/macos-permissions/macos-tcc-prompt-watch.ts
  • src/main/macos-permissions/macos-tcc-reset.ts
  • src/main/media/image-file-signature.test.ts
  • src/main/media/image-file-signature.ts
  • src/main/network/page-metadata/html-head-tags.ts
  • src/main/orcad/orcad-lifecycle.ts
  • src/main/persistence/loading-store/profile-state-maintenance.spec.ts
  • src/main/persistence/loading-store/store-runtime-state.ts
  • src/main/persistence/loading-store/store.ts
  • src/main/persistence/preferences/active-view-persistence-boundary.test.ts
  • src/main/persistence/preferences/active-view-preference-sync-flush-veto.test.ts
  • src/main/persistence/preferences/active-view-preference.test.ts
  • src/main/persistence/preferences/active-view-preference.ts
  • src/main/persistence/preferences/persistence-onboarding-language-cohort.test.ts
  • src/main/persistence/profile-state/profile-state-writer-diagnostics.ts
  • src/main/persistence/profile-state/profile-state-writer-sleep.test.ts
  • src/main/ports/workspace-port-page-probe.ts
  • src/main/power/agent-awake-service-platform-assertions.test.ts
  • src/main/power/agent-awake-service.test.ts
  • src/main/power/agent-awake-service.ts
  • src/main/power/agent-awake-status-lease.ts
  • src/main/power/linux-lid-sleep-assertion.test.ts
  • src/main/power/linux-lid-sleep-assertion.ts
  • src/main/power/macos-system-sleep-assertion.test.ts
  • src/main/power/macos-system-sleep-assertion.ts
  • src/main/power/system-power-lifecycle.test.ts
  • src/main/power/system-power-lifecycle.ts
  • src/main/power/system-resume-broadcast.test.ts
  • src/main/power/system-resume-broadcast.ts
  • src/main/repo-backfill-wsl-move.test.ts
  • src/main/repository-icons/repo-icon-autodetect.test.ts
  • src/main/repository-icons/repo-icon-autodetect.ts
  • src/main/repository-icons/repo-icon-file-detection.test.ts
  • src/main/repository-icons/repo-icon-file-detection.ts
  • src/main/repository-icons/repo-icon-href-candidates.ts
  • src/main/repository-icons/repo-icon-source-href.ts
  • src/main/runtime/orca-runtime-test-mocks/setup.spec.ts
  • src/main/runtime/repo-icon-fork-backfill.test.ts
  • src/main/runtime/rpc/repo-add-cli.integration.test.ts
  • src/main/runtime/runtime-repository-clone-controller.ts
  • src/main/runtime/runtime-repository-clone-host-dedupe.test.ts
  • src/main/runtime/runtime-repository-fork-backfill.ts
  • src/main/runtime/runtime-repository-registration-controller.test.ts
  • src/main/runtime/runtime-repository-registration-controller.ts
  • src/main/runtime/runtime-repository-registration-host-dedupe.test.ts
  • src/main/startup/browser-process-user-agent-ordering.test.ts
  • src/main/startup/configure-process.ts
  • src/main/startup/gpu-lifecycle.ts
  • src/main/startup/main-process-observers.ts
  • src/main/startup/main-process-preflight.ts
  • src/main/startup/main-process-quit-pending-writer.test.ts
  • src/main/startup/main-process-quit-update-veto.test.ts
  • src/main/startup/main-process-quit.ts
  • src/main/startup/main-process-ready-foundation.ts
  • src/main/startup/main-process-ready-identity-write.test.ts
  • src/main/startup/main-process-state.ts
  • src/main/startup/main-window-core-services.test.ts
  • src/main/startup/main-window-core-services.ts
  • src/main/startup/quit/app-relaunch.test.ts
  • src/main/startup/quit/app-relaunch.ts
  • src/main/startup/quit/host-shutdown-state.ts
  • src/main/startup/quit/quit-path-durable-write-blocking.test.ts
  • src/main/startup/quit/quit-teardown-deadline.test.ts
  • src/main/startup/quit/quit-teardown-deadline.ts
  • src/main/startup/quit/quit-teardown-start-gate.test.ts
  • src/main/startup/quit/quit-teardown-start-gate.ts
  • src/main/startup/testing/e2e-config.ts
  • src/main/tray/system-tray.test.ts
  • src/main/tray/system-tray.ts
  • src/main/window/attach-main-window-services.test.ts
  • src/main/window/attach-main-window-services.ts
  • src/main/window/clipboard-image-temp-file.ts
  • src/main/window/createMainWindow-close-confirmation.test.ts
  • src/main/window/createMainWindow-low-commit-oom-recovery.test.ts
  • src/main/window/createMainWindow-markdown-editor-focus.test.ts
  • src/main/window/createMainWindow-recovery-reload-watchdog.test.ts
  • src/main/window/createMainWindow-renderer-crash-recovery.test.ts
  • src/main/window/createMainWindow-renderer-launch-failure.test.ts
  • src/main/window/createMainWindow-startup-reveal.test.ts
  • src/main/window/createMainWindow-terminal-focus-shortcuts.test.ts
  • src/main/window/createMainWindow-tray-minimize-close.test.ts
  • src/main/window/createMainWindow-user-quit-close.test.ts
  • src/main/window/createMainWindow-zoom-and-tab-switch-shortcuts.test.ts
  • src/main/window/createMainWindow.test.ts
  • src/main/window/createMainWindow.ts
  • src/main/window/desktop-integration/app-icon.test.ts
  • src/main/window/desktop-integration/app-icon.ts
  • src/main/window/desktop-integration/appkit-scene-mutation.ts
  • src/main/window/desktop-integration/macos-press-and-hold-default.defaults-domain.test.ts
  • src/main/window/desktop-integration/macos-press-and-hold-default.test.ts
  • src/main/window/desktop-integration/macos-press-and-hold-default.ts
  • src/main/window/desktop-integration/system-fonts.test.ts
  • src/main/window/desktop-integration/system-fonts.ts
  • src/main/window/updater-package-recovery-ipc.test.ts
  • src/main/wsl/wsl-orcad-liveness-state.ts
  • src/main/wsl/wsl-orcad-liveness-supervisor.test.ts
  • src/main/wsl/wsl-orcad-liveness-wiring.ts
Files with no reviewable changes: 29
  • src/main/network/page-metadata/html-head-tags.ts
  • src/main/power/system-power-lifecycle.test.ts
  • src/main/macos-permissions/macos-tcc-reset.ts
  • src/main/persistence/preferences/active-view-preference-sync-flush-veto.test.ts
  • src/main/external-editors/external-editor-launch-process-host.test.ts
  • src/main/power/macos-system-sleep-assertion.test.ts
  • src/main/power/system-power-lifecycle.ts
  • src/main/power/macos-system-sleep-assertion.ts
  • src/main/external-editors/jetbrains-windows-gui-launchers.ts
  • src/main/external-editors/editor-launcher-name.ts
  • src/main/macos-permissions/macos-full-disk-access-status.test.ts
  • src/main/media/image-file-signature.ts
  • src/main/window/desktop-integration/system-fonts.test.ts
  • src/main/repository-icons/repo-icon-href-candidates.ts
  • src/main/repository-icons/repo-icon-source-href.ts
  • src/main/persistence/preferences/active-view-preference.test.ts
  • src/main/startup/quit/host-shutdown-state.ts
  • src/main/media/image-file-signature.test.ts
  • src/main/macos-permissions/macos-tcc-prompt-watch.test.ts
  • src/main/startup/quit/quit-teardown-start-gate.ts
  • src/main/power/linux-lid-sleep-assertion.ts
  • src/main/external-editors/vscode-cli-install-paths.ts
  • src/main/macos-permissions/macos-tcc-prompt-watch.ts
  • src/main/power/linux-lid-sleep-assertion.test.ts
  • src/main/window/desktop-integration/system-fonts.ts
  • src/main/startup/quit/quit-teardown-start-gate.test.ts
  • src/main/window/desktop-integration/macos-press-and-hold-default.defaults-domain.test.ts
  • src/main/window/desktop-integration/appkit-scene-mutation.ts
  • src/main/window/desktop-integration/macos-press-and-hold-default.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@nwparker
nwparker force-pushed the module-layout-v2/m02-desktop-integration branch from 30145d8 to 5a90436 Compare November 3, 2026 00:48
@nwparker
nwparker merged commit b89cfbd into main Nov 3, 2026
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant