Fix bug where initial proofreading split action failed#9412
Fix bug where initial proofreading split action failed#9412MichaelBuessemeyer merged 4 commits intomasterfrom
Conversation
…sion present for necessary requests
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA bug fix ensures proofreading annotations no longer fail during split operations. The fix defers retrieval of the annotation version in the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| // Getting latest annotation version as it might have changed due to e.g. making the mapping editable. | ||
| const annotationVersion = yield* select((state) => state.annotation.version); | ||
|
|
There was a problem hiding this comment.
The fix is easy: Load the annotation version !after! the mapping was potentially made editable (which changes the version).
The returned annotationVersion of this function as later used in the sagas handling split operations. On the master the version before making the mapping editable was returned.
=> This lead to the proofreading sagas requesting edges to split with an annotation version, where the version was actually lower than the version where it was made editable. Thus, the server correctly replied with an error.
=> Moving the select "lower" in the function fixed the bug easily
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@unreleased_changes/9412.md`:
- Line 2: Replace the changelog sentence "Fixed a bug where the initial
operation of a proofreading annotation failed if it a split action." with the
corrected, concise wording "Fixed a bug where the initial operation of a
proofreading annotation failed if it involved a split action." ensuring the rest
of the entry remains unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c4c5312c-801b-4c0b-8f67-79010dc0a777
📒 Files selected for processing (2)
frontend/javascripts/viewer/model/sagas/volume/proofread_saga.tsunreleased_changes/9412.md
unreleased_changes/9412.md
Outdated
| @@ -0,0 +1,2 @@ | |||
| ### Fixed | |||
| - Fixed a bug where the initial operation of a proofreading annotation failed if it a split action. | |||
There was a problem hiding this comment.
Fix wording typo in changelog sentence.
Line 2 has a grammar issue (“if it a split action”). Suggested concise rewrite:
Fixed a bug where the initial operation of a proofreading annotation failed if it involved a split action.
Based on learnings, changelog entries should remain concise and avoid unnecessary detail.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@unreleased_changes/9412.md` at line 2, Replace the changelog sentence "Fixed
a bug where the initial operation of a proofreading annotation failed if it a
split action." with the corrected, concise wording "Fixed a bug where the
initial operation of a proofreading annotation failed if it involved a split
action." ensuring the rest of the entry remains unchanged.
There was a problem hiding this comment.
ok thanks for the pointer. Fixed it now. But involved seems like a wrong verb here. Imo "is" is better. Is this grammatically correct now?
There was a problem hiding this comment.
@MichaelBuessemeyer, glad the typo is fixed! Using "is" introduces a tense mismatch — the sentence uses past tense ("failed") but "is" is present tense. For changelog entries, keeping consistent past tense is standard style.
Here are a few grammatically correct options, all in past tense:
- "…failed if it involved a split action." — the operation included/comprised a split
- "…failed if it was a split action." — the operation was of the type split
- "…failed when performing a split action." — slightly more direct
Any of these work well. Option 1 (involved) or option 3 (when performing) would be my recommendation for clarity. 🐇
daniel-wer
left a comment
There was a problem hiding this comment.
LGTM 👍 I cherry-picked this fix at some point for one of my branches, so it's tested already :)
Co-authored-by: Daniel <daniel.werner@scalableminds.com>
Fixes a bug noticed in #9102. Might be good to get this easy fix merged before #9102 is merged. Should be an easy win to fix this imo.
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
(Please delete unneeded items, merge only when none are left open)