Skip to content

refactor: group shared foundation modules by feature owner - #42914

Merged
nwparker merged 1 commit into
mainfrom
module-layout-v2/shared-foundations-aed77188
Nov 16, 2026
Merged

nwparker merged 1 commit into
mainfrom
module-layout-v2/shared-foundations-aed77188

Conversation

@nwparker

@nwparker nwparker commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Group shared code with the feature that owns it so contributors can find related code together. The shared root shrinks from 183 files to 117.

Files Added Deleted Net
Test 42 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​44 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1477 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1433
Prod 889 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1059 $\color{#cf222e}{\Huge{\mathbf{−}}}$​946 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​113

What Changed

  • Move 57 production TypeScript modules, one JSON contract and eight test files into concrete feature directories. Update their desktop, CLI, mobile, build and CI consumers.
  • Import maskMcpEnv from its defining MCP inspection module and remove the configuration module’s forwarding export. Add no barrels, compatibility shims or forwarding aliases.
  • Update explicit resource paths while preserving historical metadata and module initialization order.
  • Move the existing emoji fallback predicate unchanged into the already-used emoji catalog owner. This keeps worktree path code within its file-size limit after import formatting; callers use the defining export.
  • Apply the repository’s test policy to touched files: remove 50 whole registrations (59 potential cases), including two whole external test files. This removes meaningful coverage; no replacement coverage is claimed. Retain 155 registrations (190 potential cases) in the reviewed test programs.

Why

Continue the larger folder cleanup with coherent groups for file access, shell launch, workspace setup, MCP configuration, Git maintenance and hosted review. Concrete owner imports keep dependencies visible.

Linked Issue

Existing maintainer cleanup sequence.

Visual Proof

N/A — file organization and import changes; no intended UI or production behavior change.

Testing

Initial candidate on macOS:

  • Independent whole-tree source audit: 66 moves, exact physical scope, bodies/tokens/literals/import bindings and 57 initializer traces checked.
  • Focused root: 32 files, 177 tests passed.
  • Mobile polling: one test passed using the mobile configuration.
  • Owning runtime driver: 306 tests passed, one skipped.
  • Exact rebased head 06dbe21b: independent audit of all 35,335 tracked files, modes, index entries and physical bytes; all 119 incoming main states preserved, with two reviewed import transports.
  • Current dependency graph: all 30,488 files checked; raw/admitted/physical collectors agree. Five conservative JSON sibling edges are explicitly qualified; actual imports still resolve to the unchanged TypeScript owner.
  • Final pnpm check:changed --base=origin/main --maxWorkers=2 --timeout=3: 49 non-unit checks passed, including desktop/renderer/CLI typechecks, lint, formatting and changed-code quality. Broad units failed/incomplete: two observed process-host development rebuild failures, then the three-minute limit. No current-baseline or full local pass claim.
  • Normal commit hooks passed; no hooks bypassed. Required hosted validation remains pending.

No new tests added for module moves. Actual Playwright journeys are validated separately by hosted CI; no local rendered E2E pass claimed.

Risk

Level: Medium. Shared path changes cross desktop, CLI, mobile, packaging and CI boundaries. A missed runtime/resource path could break those consumers. Removed tests reduce regression detection. Revert the PR to restore paths and test coverage; no persisted data migration.

Review

Independent behavior/import/initializer review and incoming-main preservation review. Hosted checks must pass for the exact final head before merge.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source copied or translated.

Checklist

  • Coherent larger module-layout batch
  • Concrete owner imports; no new barrels or shims
  • Test coverage removals disclosed
  • Cross-platform, remote, mobile and folder workspace impact reviewed
  • Planning and audit artifacts remain local and ignored
  • Final changed checks and required CI completed

@nwparker
nwparker merged commit 61ae970 into main Nov 16, 2026
113 of 114 checks passed
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 16, 2026
…ndow-shortcut-policy to shared/keybindings (stablyai#42914)

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 20, 2026
…ndow-shortcut-policy to shared/keybindings (stablyai#42914)

Co-Authored-By: Claude Code <[email protected]>
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