fix(app): dismiss question dock after skipping when all questions are settled#387
Conversation
… settled When skipCurrent was called on the last question (or when there is only one question), it cleared the answer but stayed on the same page without any visible action. The user was stuck and needed to click Submit separately. Extract resolveSkipAction as a pure decision function and make skipCurrent call submit() when no unsettled questions remain, consistent with how next() already auto-submits on the last question.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds an exported helper ChangesSkip Logic Enhancement
Sequence Diagram(s)(Skipped — changes are focused and don't introduce a multi-component sequential interaction needing visualization.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 8/10 reviews remaining, refill in 9 minutes and 10 seconds. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a resolveSkipAction utility to handle navigation or submission logic after a question is skipped, along with corresponding unit tests. Feedback was provided to optimize the search for unsettled questions by avoiding redundant checks in the second loop of the utility function.
Summary
When the user clicks "Skip" on a single-question dock (or the last question), the dock now auto-submits and closes instead of staying open with no visible action.
Why
skipCurrentcleared the answer to[]but then just refocused the same question when no unsettled questions remained. The user had to notice the subtle progress-dot change and click Submit as a second step. On a single-question dock, this made skipping feel broken.next()already handled the last-question case by callingsubmit()—skipCurrentnow does the same.Related Issue
None.
Review Focus
resolveSkipActionpure function and its test coverageRisk Notes
None. The behavior change only applies when all questions are already settled after skipping, which is exactly the case where the user wants to dismiss the dock.
How To Verify
Checklist
dev, Conventional Commits in EnglishSummary by CodeRabbit
Tests
Bug Fixes