Skip to content

fix(dashboard): complete stale socket guards, cross-platform shortcut, quest navigation#84

Merged
justinjdev merged 2 commits intofeat/command-dashboardfrom
worktree-fellowship-fix-frontend-ux
Mar 21, 2026
Merged

fix(dashboard): complete stale socket guards, cross-platform shortcut, quest navigation#84
justinjdev merged 2 commits intofeat/command-dashboardfrom
worktree-fellowship-fix-frontend-ux

Conversation

@justinjdev
Copy link
Copy Markdown
Owner

Summary

  • Complete stale socket instance guards in websocket.ts — add ws !== socket check to onmessage handler and CONNECTING state check to prevent duplicate connections
  • Normalize keyboard shortcut key check with toLowerCase() in Shell.svelte for cross-platform robustness
  • Add reactive reset when navigating between quest detail pages to prevent stale data display

Addresses CodeRabbit review comments from PR #76.

Test plan

  • Verify Cmd+K and Ctrl+K both toggle command palette
  • Verify websocket reconnection doesn't process messages from stale sockets
  • Verify navigating between quest detail pages loads fresh data
  • Verify npm run check passes in dashboard/

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 21, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bb347a3d-2dd4-4320-b493-f55140dc92db

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-fellowship-fix-frontend-ux

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 and usage tips.

@justinjdev justinjdev marked this pull request as ready for review March 21, 2026 22:47
justinjdev and others added 2 commits March 21, 2026 17:49
…ard shortcut

- Add `ws !== socket` guard to onmessage and onerror handlers in
  websocket.ts to prevent stale socket instances from mutating shared
  state during reconnection races
- Add CONNECTING state check to prevent duplicate connection attempts
- Normalize keyboard shortcut key check with toLowerCase() for
  cross-platform robustness (Caps Lock edge case)

Addresses CodeRabbit review comments from PR #76.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…onerror cleanup

- Reset dataLoaded/loadFailed state when questName changes to prevent
  stale data when navigating between quest detail pages
- Revert onerror stale guard — errored sockets should always be closed
  for cleanup; the onclose handler already guards shared state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@justinjdev justinjdev force-pushed the worktree-fellowship-fix-frontend-ux branch from 2f5c19c to 219142e Compare March 21, 2026 22:49
@justinjdev justinjdev merged commit 964c5c3 into feat/command-dashboard Mar 21, 2026
1 check was pending
@justinjdev justinjdev deleted the worktree-fellowship-fix-frontend-ux branch March 21, 2026 22:49
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