feat(#827): lock the welcome-back modal during offline catch-up - #831
Conversation
Add a `dismissible` prop (default true) that drops escape, backdrop, and close-trigger dismissal along with the close button, and give the backdrop/positioner a z-index above the nav rail so a modal dialog always paints on top of it.
Render fast-forwarding through the new non-dismissible dialog so a player can't dismiss the catch-up gate and act on stale state; terminal outcomes keep their existing dismissible dialog and actions unchanged.
Gate the panel's start effect on resync status so a mounted panel under the lockout overlay can't queue a start behind the resync; it re-attempts once catch-up clears rather than latching a stale scope.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR adds a non-dismissible dialog mode, renders fast-forwarding resync as a locked catch-up state, and prevents ChangesOffline resync lockout
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/routes/-explore-current/explore-current-panel.tsx`:
- Line 52: Update the ExploreCurrentPanel function signature so its props
parameter uses Readonly<ExploreCurrentPanelProps>, preserving the existing
component behavior and prop type.
In `@apps/web/src/routes/-game/welcome-back-modal.tsx`:
- Around line 64-65: Update formatTally in
apps/web/src/routes/-game/welcome-back-modal.tsx (lines 64-65) to singularize
“attempt” and “level-up” when their respective counts equal one, while retaining
plural forms otherwise. Update the expected text in
apps/web/src/routes/-game/welcome-back-modal.test.tsx (line 29) and the demo
copy in libs/design/design-system/src/components/dialog/dialog.stories.tsx (line
18) to use “1 level-up”.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 14ba34bf-ef54-4eb2-82ea-57e9eea3ab99
📒 Files selected for processing (7)
apps/web/src/routes/-explore-current/explore-current-panel.test.tsxapps/web/src/routes/-explore-current/explore-current-panel.tsxapps/web/src/routes/-game/welcome-back-modal.test.tsxapps/web/src/routes/-game/welcome-back-modal.tsxlibs/design/design-system/src/components/dialog/dialog.stories.tsxlibs/design/design-system/src/components/dialog/dialog.test.tsxlibs/design/design-system/src/components/dialog/dialog.tsx
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Description
Closes #827
While an offline catch-up is fast-forwarding, the welcome-back modal now locks the player out instead of offering a dismiss path, and the explore panel withholds its own start call until the catch-up clears.
Dialoggains adismissible?: booleanprop (default true);falsedrops escape, backdrop-outside, and the close trigger, leaving the caller's own state as the only way to close it.zIndex: '[20]'so a modal always paints above the nav rail.WelcomeBackModalrenders thefast-forwardingstate through a non-dismissible dialog; all terminal outcomes keep the existing dismissible dialog.ExploreCurrentPanel's start effect withholds firing whileresyncStatus?.kind === 'fast-forwarding', so a mounted panel can't send a start underneath the lockout overlay.Testing
bun run typecheckpassesbun run testpassesbun run lintpasses