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(editor): organize core modules by feature owner - #42325
Group the remaining editor files by the feature that owns them, so changes to loading, Monaco, file ownership, or panel controls are easier to find.
What Changed
Move 111 modules into concrete editor folders: monaco, loading, panel, file-ownership, model-lifetime, conflict-review, contextual-copy, commands, and file-drop. Keep EditorPanel, EditorContent, and the lazy-view registry as substantive root owners.
Update callers, test mocks, active metadata and CI source selectors to the new paths. Replace borrowed keybinding and formatting imports with their defining owners, and remove one erased forwarding alias. Monaco registrations, ambient declarations, contexts, model maps and lazy-view identities stay intact.
Retire existing tests and assertion fragments covered by the repository's test anti-pattern policy. Retain 83 meaningful cases and their original 210 assertions, producers and synchronization barriers. No new tests or forwarding modules.
Why
The editor root still mixes independent responsibilities. Whole-module moves create clearer ownership while preserving the existing component and runtime boundaries.
Linked Issue
Ongoing maintainer-requested folder cleanup.
Visual Proof
N/A — module ownership and import paths change; rendered output and interaction behavior are preserved.
Testing
macOS local validation:
34 owning unit-test files: 83 cases passed. The log-tail file passed again after removing dead support left by the existing-test cleanup.
Full root typecheck and mobile production/test typechecks passed.
Desktop production and E2E builds passed; web projection/build verification passed.
Hidden Electron E2E passed both flows: tracked file open/edit/save/reopen and same-path host model/undo isolation.
Five moved source-selector targets still select the intended existing E2E routes.
Final pnpm check:changed ran after the last amend, immediately before push: all 38 static/type gates passed. Its broad related-unit selection timed out after 120.9 seconds (overall exit 1); stderr included localhost:3000 connection failures without completed failed-test attribution. This is not a full unit-gate pass or a pre-existing-failure claim. The 83 owning cases and focused reruns passed separately. Hosted required CI must pass before merge.
I manually tested these changes locally (the two rendered flows above were exercised by existing automated Electron E2E tests)
Automated tests updated under the repository's existing-test policy; no new behavior or tests added
Every added test fails without this change and avoids the test anti-patterns (no added tests)
Risk
Level: Medium. The main risk is an incorrect module request, missed CI selector, or changed registration/lazy identity breaking editor loading or file ownership. Independent source and test audits check these boundaries. A plain revert restores the previous layout; there are no data migrations.
Review
Two independent final source audits passed, preserving production bodies, eager/bare registrations, contexts, maps, ambient declarations and lazy identities. The independent test audit preserved all retained cases, producers, assertions and synchronization barriers. A narrow follow-up review removed only a write-only log-tail test callback capture.
Agent skill upstream boundary
Not applicable; no upstream skill-installer material copied or translated.
Notes
Path moves preserve platform guards, host-qualified ownership, remote behavior and folder-workspace support. Historical CI timing data remains byte-for-byte unchanged. Planning and validation evidence remain local.
Checklist
This PR is focused on the remaining editor-core ownership boundaries
I explained what changed and why
I stated the risk and how to back it out
N/A for visual proof, with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered
Applicable lint, typecheck, scoped tests and builds passed; full hosted CI must pass before merge, and the local broad-unit timeout is disclosed above.
The editor code now uses import paths that match reorganized component directories. Related configuration and workflow-routing paths were updated. The diff also removes several editor test files and changes assertions in other tests. Most listed source changes update imports without changing runtime logic.
Merge Risk: Low · up to 25826
This is mostly a file-move refactor with no shown behavior change. Some tests covering unsaved-file recovery and editor content sync were removed, so those paths are less protected against future regressions. Owner awareness or a follow-up is advisable before merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the refactor type and scope (editor) and the main change: organizing core editor modules into feature-owner folders. The raw summary confirms the bulk of the changeset is module reloca…
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 follows the repository template closely. It has the ELI5, What Changed, Why, Linked Issue, Visual Proof (N/A with reason), Testing, Risk (Medium, with a revert path), Agent skill upstr…
Full details: Title check
Explanation
The title names the refactor type and scope (editor) and the main change: organizing core editor modules into feature-owner folders. The raw summary confirms the bulk of the changeset is module relocation with updated import paths across editor, store, and CI routing files, so the title matches the primary change.
Full details: Description check
Explanation
The description follows the repository template closely. It has the ELI5, What Changed, Why, Linked Issue, Visual Proof (N/A with reason), Testing, Risk (Medium, with a revert path), Agent skill upstream boundary, Notes, and Checklist sections. It discloses the local broad-unit test timeout and the hosted CI requirement. Two areas are thin. The Linked Issue section cites only "Ongoing maintainer-requested folder cleanup" and no issue number, while the template says an issue should always be linked. The AI Disclosure section is absent, which is acceptable only if the author is a StablyAI team member. The Testing section mixes manual and automated claims, and the first manual-test box is checked only by reference to existing E2E tests.
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.
Retain callback-suppression checks for both bridges.
Both bridges subscribe to the same model. The model-value assertion can pass even if an external update also calls onContentChange and marks a file dirty.
Keep the second bridge result. After the external update, assert that neither callback ran. Then apply a user edit and assert that both active callbacks receive it. This preserves the event contract that the removed tests exercised.
Retain direct tests for the toast action and dismissal.
reopenClosedUnsavedFiles does not exercise the state owned by showClosedUnsavedFilesToast. The toast callbacks suppress duplicate clicks, retain failed files for retry, and release kept buffers on dismissal.
Keep focused tests for those transitions. Include dismissal while reopening is pending. These tests protect unsaved-buffer recovery and cleanup, which the helper-only assertions cannot check.
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: 7f77be82-3ad3-4a0a-b943-e2b4ad3e2795
Commits
Reviewing files that changed from the base of the PR and between aaa61af and 2582697.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
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
Group the remaining editor files by the feature that owns them, so changes to loading, Monaco, file ownership, or panel controls are easier to find.
What Changed
Move 111 modules into concrete editor folders:
monaco,loading,panel,file-ownership,model-lifetime,conflict-review,contextual-copy,commands, andfile-drop. KeepEditorPanel,EditorContent, and the lazy-view registry as substantive root owners.Update callers, test mocks, active metadata and CI source selectors to the new paths. Replace borrowed keybinding and formatting imports with their defining owners, and remove one erased forwarding alias. Monaco registrations, ambient declarations, contexts, model maps and lazy-view identities stay intact.
Retire existing tests and assertion fragments covered by the repository's test anti-pattern policy. Retain 83 meaningful cases and their original 210 assertions, producers and synchronization barriers. No new tests or forwarding modules.
Why
The editor root still mixes independent responsibilities. Whole-module moves create clearer ownership while preserving the existing component and runtime boundaries.
Linked Issue
Ongoing maintainer-requested folder cleanup.
Visual Proof
N/A — module ownership and import paths change; rendered output and interaction behavior are preserved.
Testing
macOS local validation:
34 owning unit-test files: 83 cases passed. The log-tail file passed again after removing dead support left by the existing-test cleanup.
Full root typecheck and mobile production/test typechecks passed.
Desktop production and E2E builds passed; web projection/build verification passed.
Hidden Electron E2E passed both flows: tracked file open/edit/save/reopen and same-path host model/undo isolation.
Five moved source-selector targets still select the intended existing E2E routes.
Final
pnpm check:changedran after the last amend, immediately before push: all 38 static/type gates passed. Its broad related-unit selection timed out after 120.9 seconds (overall exit 1); stderr included localhost:3000 connection failures without completed failed-test attribution. This is not a full unit-gate pass or a pre-existing-failure claim. The 83 owning cases and focused reruns passed separately. Hosted required CI must pass before merge.I manually tested these changes locally (the two rendered flows above were exercised by existing automated Electron E2E tests)
Automated tests updated under the repository's existing-test policy; no new behavior or tests added
Every added test fails without this change and avoids the test anti-patterns (no added tests)
Risk
Level: Medium. The main risk is an incorrect module request, missed CI selector, or changed registration/lazy identity breaking editor loading or file ownership. Independent source and test audits check these boundaries. A plain revert restores the previous layout; there are no data migrations.
Review
Two independent final source audits passed, preserving production bodies, eager/bare registrations, contexts, maps, ambient declarations and lazy identities. The independent test audit preserved all retained cases, producers, assertions and synchronization barriers. A narrow follow-up review removed only a write-only log-tail test callback capture.
Agent skill upstream boundary
Notes
Path moves preserve platform guards, host-qualified ownership, remote behavior and folder-workspace support. Historical CI timing data remains byte-for-byte unchanged. Planning and validation evidence remain local.
Checklist