Skip to content

fix: reload status on undelegation - #122

Merged
GabrielePicco merged 1 commit into
mainfrom
fix/delegated-status-check-v2
Jul 22, 2026
Merged

fix: reload status on undelegation#122
GabrielePicco merged 1 commit into
mainfrom
fix/delegated-status-check-v2

Conversation

@GabrielePicco

@GabrielePicco GabrielePicco commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Improved delegated dice-roll reliability when callbacks are delayed or missed.
    • Added clearer handling for rolling, waiting, timeout, and undelegation states.
    • Prevented stale connection updates from affecting current roll results.
    • Avoided reusing client seeds while previous roll callbacks remain unresolved.
    • Ensured cached transaction data is not reused across different network endpoints.
  • User Experience

    • Improved roll latency indicators and result status messaging.
    • Enhanced roll history updates with clearer completion and timeout information.

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
binary-prediction-demo Ready Ready Preview, Comment Jul 22, 2026 1:24pm
counter-session-keys Ready Ready Preview, Comment Jul 22, 2026 1:24pm
er-rolldice Ready Ready Preview, Comment Jul 22, 2026 1:24pm
magicblock-counter-example Ready Ready Preview, Comment Jul 22, 2026 1:24pm
magicblock-engine-examples Ready Ready Preview, Comment Jul 22, 2026 1:24pm
magicblock-rewards-dashboard Ready Ready Preview, Comment Jul 22, 2026 1:24pm
rps-example Ready Ready Preview, Comment Jul 22, 2026 1:24pm
spl-tokens Ready Ready Preview, Comment Jul 22, 2026 1:24pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3488fdb6-9e26-4503-8306-9dba264303a3

📥 Commits

Reviewing files that changed from the base of the PR and between 5e252df and 86d1492.

📒 Files selected for processing (3)
  • roll-dice/anchor/app/app/delegated/page.tsx
  • roll-dice/anchor/app/lib/solana-utils.ts
  • roll-dice/anchor/app/lib/types.ts

Walkthrough

Changes

Delegated dice flow

Layer / File(s) Summary
Roll generation and callback completion
roll-dice/anchor/app/app/delegated/page.tsx
Roll tracking now uses generations and callback sources, with explicit pending-history transitions and expanded timeout/subscription cleanup.
Ephemeral connection and delegation synchronization
roll-dice/anchor/app/app/delegated/page.tsx, roll-dice/anchor/app/lib/solana-utils.ts, roll-dice/anchor/app/lib/types.ts
Player refresh, validator connection changes, delegation polling, initialization, and cleanup use generation guards; cached blockhashes are scoped to RPC endpoints.
Roll execution and guarded reconciliation
roll-dice/anchor/app/app/delegated/page.tsx
Rolls reserve client seeds, subscribe to callback logs, reconcile delayed transactions, poll with guards, and update UI state during active roll and delegation lifecycles.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/delegated-status-check-v2

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.

❤️ Share

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

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.

1 participant