Skip to content

feat(#827): lock the welcome-back modal during offline catch-up - #831

Merged
zgeoff merged 5 commits into
mainfrom
fix/827-resync-lockout
Jul 23, 2026
Merged

feat(#827): lock the welcome-back modal during offline catch-up#831
zgeoff merged 5 commits into
mainfrom
fix/827-resync-lockout

Conversation

@zgeoff

@zgeoff zgeoff commented Jul 23, 2026

Copy link
Copy Markdown
Owner

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.

  • Dialog gains a dismissible?: boolean prop (default true); false drops escape, backdrop-outside, and the close trigger, leaving the caller's own state as the only way to close it.
  • Dialog backdrop/positioner get zIndex: '[20]' so a modal always paints above the nav rail.
  • WelcomeBackModal renders the fast-forwarding state through a non-dismissible dialog; all terminal outcomes keep the existing dismissible dialog.
  • ExploreCurrentPanel's start effect withholds firing while resyncStatus?.kind === 'fast-forwarding', so a mounted panel can't send a start underneath the lockout overlay.

Testing

  • bun run typecheck passes
  • bun run test passes
  • bun run lint passes
  • New tests added for new functionality

zgeoff added 3 commits July 24, 2026 02:30
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.
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 15b58f32-8b4c-49bf-9d82-87a6398f868e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds a non-dismissible dialog mode, renders fast-forwarding resync as a locked catch-up state, and prevents ExploreCurrentPanel from starting activity until resync completes. Tests cover dialog interactions, modal rendering, and deferred activity starts.

Changes

Offline resync lockout

Layer / File(s) Summary
Non-dismissible dialog support
libs/design/design-system/src/components/dialog/dialog.tsx, libs/design/design-system/src/components/dialog/dialog.test.tsx, libs/design/design-system/src/components/dialog/dialog.stories.tsx
Adds dismissible={false} support that disables escape, outside-click, and built-in close controls, with tests and a Storybook story.
Fast-forwarding welcome-back state
apps/web/src/routes/-game/welcome-back-modal.tsx, apps/web/src/routes/-game/welcome-back-modal.test.tsx
Renders fast-forwarding resync as a locked catch-up dialog and updates tally formatting and assertions.
Activity start resync gate
apps/web/src/routes/-explore-current/explore-current-panel.tsx, apps/web/src/routes/-explore-current/explore-current-panel.test.tsx
Suppresses startActivity during fast-forwarding and sends one request after resync clears, with coverage for both states.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • zgeoff/vers#580: Provides the resync status protocol consumed by these UI guards.
  • zgeoff/vers#642: Also changes WelcomeBackModal resync-status rendering and formatting.
  • zgeoff/vers#656: Also modifies WelcomeBackModal handling for another resync state.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: locking the welcome-back modal during offline catch-up.
Description check ✅ Passed The description matches the implemented modal lockout and explore-panel gating changes.
Linked Issues check ✅ Passed The PR blocks dismiss paths and start-activity during fast-forwarding, matching #827's hard-block requirement.
Out of Scope Changes check ✅ Passed The added story, tests, and z-index tweak support the blocking-modal change and stay in scope.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/827-resync-lockout

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 72db2df and 4f5debf.

📒 Files selected for processing (7)
  • apps/web/src/routes/-explore-current/explore-current-panel.test.tsx
  • apps/web/src/routes/-explore-current/explore-current-panel.tsx
  • apps/web/src/routes/-game/welcome-back-modal.test.tsx
  • apps/web/src/routes/-game/welcome-back-modal.tsx
  • libs/design/design-system/src/components/dialog/dialog.stories.tsx
  • libs/design/design-system/src/components/dialog/dialog.test.tsx
  • libs/design/design-system/src/components/dialog/dialog.tsx

Comment thread apps/web/src/routes/-explore-current/explore-current-panel.tsx Outdated
Comment thread apps/web/src/routes/-game/welcome-back-modal.tsx Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/web/src/routes/-game/welcome-back-modal.tsx Outdated
@zgeoff
zgeoff merged commit dde343a into main Jul 23, 2026
6 checks passed
@zgeoff
zgeoff deleted the fix/827-resync-lockout branch July 23, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Offline resync must hard-block input until it completes

1 participant