feat(desktop): add hunk-level review progress - #1218
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: 6e3dbcf971
ℹ️ 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".
| guard self.current_review_generation(change, active_file) == | ||
| Some(review_generation) else { |
There was a problem hiding this comment.
Fence queued hunk updates by the visible surface
When an active-hunk event has already been queued and the user switches between Line/Token/Tree or collapses the active semantic section, those actions clear review_active_hunk but do not change the file's review generation. This guard therefore accepts the late event because it checks only the file and generation, restoring a hunk from the now-hidden surface and allowing “Mark viewed” to update the wrong hunk. Carry and validate the surface/semantic-input identity in the message, or otherwise invalidate the generation when the visible hunk universe changes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in d58bcb00. Active-hunk callbacks now carry a monotonic visible-surface generation. Line/Token/Tree switches, semantic section/filter changes, Source/Diff transitions, and semantic-input replacement invalidate it, and the reducer validates row, diff, and surface generations. This rejects a late callback even after a Line → Token → Line ABA round trip. I added a focused white-box reducer regression for that case while preserving exact-review reselection idempotency. Rebased onto current main and validated just check, just test (3410 native, 3183 JS, 28 cram), just build, desktop Playwright (31/31), and a --no-open SeekMoon package.
d58bcb0 to
bd8b940
Compare
bd8b940 to
0522b68
Compare
Review now tracks changed-line coverage across Line, Token, and Tree modes. Marking every hunk completes the file; marking the file reviewed marks every hunk, and unmarking a hunk returns the file to partial or unreviewed state. The toolbar shows the active hunk position, including a global position across semantic sections.
Coverage uses only real original/modified changed ranges, excluding joined navigation context. Active-hunk updates are fenced by changed-file identity, diff generation, and surface generation. Whole-file coverage comes from the current ready logical Line diff, so opening another file while Token or Tree remains selected works even when the hidden Line editor has never been laid out. Semantic filters do not redefine the whole-file range.
Rebased onto
cd0d5f97(main). Conflict resolution preserves the new Visible/Ignored diff model: only Visible changes become review hunks, first/last navigation targets, or file review coverage; Ignored changes retain their layout role. Generated interfaces retain the upstream package-graph messages. The four commits retain their original responsibilities;git range-diffshows only these compatibility adaptations and the existing test fixture's migration toDocumentDiffChange.Validation on rebased head
0522b684:moon info && moon fmt; the JS-only fileeditor interface was also generated and checked from the JS backend output.just checkandjust buildpassed.just test: 3,252 Native tests, 3,225 JS tests, 24 cram cases, and both real CLI lifecycle checks passed.just editor-test: 1,090 wasm, 1,876 JS, and 1,224 Native tests passed.just editor-test-browser: 107 passed.just desktop-test-browser: 64 passed, including Token/Tree file-switch regressions for automatic file completion and hunk unmarking after whole-file completion.Earlier packaged macOS QA on
bd8b9409:moon -C desktop run --target native package/macos -- --release --target app --no-open; bundle signature verification passed. Tested Proton/CEF with the native Git/file-watch bridge.Known issue — pointer selection does not update the active hunk:
The same issue reproduces in Token and Tree when one semantic section contains multiple hunks. Clicking a different semantic section updates the section, but clicking another hunk inside that section retains the old navigation index. Use explicit F7/Shift+F7 or toolbar change navigation before marking. This known issue is not fixed by the rebase.