Sync shared session after window document open#1091
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 404c197451
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Register with app controller's recent documents | ||
| appSessionController.openRecent(recent) | ||
| // Register with app controller's recent documents (without re-opening) | ||
| appSessionController.registerRecent(recent) |
There was a problem hiding this comment.
Update shared session when registering an opened document
Calling appSessionController.registerRecent(recent) here updates only the recents list and skips the DocumentOpeningCoordinator path that sets DocumentSessionController.currentDocument and parse/export state. After opening a file in a window, the shared app controller can remain unloaded, so app-level flows that still rely on that shared controller (like command-menu export and workspace-scoped settings) act as if no document is open or export an empty tree.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 9aeca6f. The shared app session now mirrors the opened window session state instead of only updating recents, so command-menu export and workspace-scoped settings stay in sync without re-opening the document.
404c197 to
9aeca6f
Compare
🔍 SwiftLint Code Quality Report✅ No violations found! Code quality check passed. |
📊 Coverage Gate ResultsThreshold: 67% |
🔍 SwiftLint Code Quality Report✅ No violations found! Code quality check passed. |
📊 Coverage Gate ResultsThreshold: 67% |
🔍 SwiftLint Code Quality Report✅ No violations found! Code quality check passed. |
📊 Coverage Gate ResultsThreshold: 67% |
Summary
Testing
swift test --disable-sandbox --filter DocumentSessionControllerTestsswift test --disable-sandbox --filter WindowSessionControllerTestsNotes
registerRecent(recent)leaving the shared session unloaded