Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cdb9f538ff
ℹ️ 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".
| fromScope[0] = now == null ? () -> { } : signal.apply(now).subscribe(() -> SwingUtilities.invokeLater(() -> { | ||
| if (this.scope == now) told.run(); | ||
| })); |
There was a problem hiding this comment.
Prevent callbacks after stopping a follower
When a project signal races with MainWindow.dispose(), its EDT lambda may already be queued even though the returned stop action removes the subscriptions; this check only verifies that the project is still current. If the scope remains current, catalogChanged or changesRecorded therefore runs after disposal and can repopulate the disposed FileTreeView or attach fresh listeners. Track the subscription's stopped state or generation here and reject queued deliveries after it is stopped.
AGENTS.md reference: AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
| move.run(); | ||
| Runnable fromProject = this.changed.subscribe(move); |
There was a problem hiding this comment.
Close the switch gap before subscribing
follows binds to the current scope before registering for project changes. If openProject completes a switch during MainWindow construction between these statements, set fires while there is no project-change listener; the later checkWindowCreation can pass once switching is finished, but the catalog/change followers remain attached to the retired scope, so subsequent changes in the project displayed by the window never refresh its tree or tabs. Make the initial binding and change subscription atomic, or recheck the scope after subscribing.
AGENTS.md reference: AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
731197c to
c7926a4
Compare
03ba0b4 to
d7be006
Compare
c7926a4 to
9c9c5db
Compare
d7be006 to
90b90b9
Compare
CurrentProject holds the project Companion shows; its follows moves a follower to the next project on a switch and drops what the project before told. The application publishes the current project from makeCurrent, and the main window follows the current catalog and change record itself, so CompanionUi's two relays and their scope checks go. A log navigation that finds its file listed supersedes an earlier one still looking. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
9c9c5db to
e5e3da3
Compare
…ecided The configuration and resource files have no owner that reads them, so the Changes page's read remains what drops a change put back outside Companion. The step that would have moved it into the owners, with connection numbers, goes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
90b90b9 to
3a12518
Compare
Second part of the last step of
docs/SYSTEMS.md(8b), stacked on #119: the current project is state the window follows, instead of the application relaying the current project's changes to the UI after checking which project they came from.Finish line
CurrentProjectTest.aFollowerHearsOnlyTheCurrentProjectAndMovesWithASwitchCurrentProject.follows)CurrentProjectTestApplicationNavigationTest,ProjectSwitchLifecycleTestWhat changes
CurrentProjectholds the project Companion shows and fires when another becomes current.follows(scope -> signal, told)follows that signal of whichever project is current, moves on a switch, and delivers on the Swing thread only while that project is still current, so no follower checks where a change came from. Stopping rejects queued deliveries and pending rebinding; registration precedes the initial binding so a concurrent switch cannot be missed.CompanionApplication.makeCurrent, the one place the current project changes, publishes it toCurrentProject. The application's lifecycle keeps reading its own field under its lock.CompanionUi.catalogChangedandchangesRecorded, and the application's two relays with their scope checks, go.Left as it is
CurrentProject.followswould change how seven tests build it, for the same behavior.Focused
:companion:testchecks pass locally. CI runs the full build for the updated head.🤖 Generated with Claude Code