Skip to content

fix: DialogTitle accessibility warning and async wisp error in AuthPr…#65

Merged
creatorcluster merged 3 commits into
creatorcluster:mainfrom
Coder-soft:main
Jul 10, 2026
Merged

fix: DialogTitle accessibility warning and async wisp error in AuthPr…#65
creatorcluster merged 3 commits into
creatorcluster:mainfrom
Coder-soft:main

Conversation

@Coder-soft

@Coder-soft Coder-soft commented Jul 10, 2026

Copy link
Copy Markdown

…ovider

  • Replace bindSupabase with manual wisp.identify/reset in auth state listener to catch async errors (wisp not initialized was throwing unhandled promise rejection)
  • Add visually hidden DialogTitle to CommandDialog to fix Radix accessibility warning

Summary by CodeRabbit

  • Accessibility

    • Improved the command menu for screen readers by adding an accessible title.
  • Bug Fixes

    • Improved authentication state tracking so sign-in, sign-out, and session restoration are reflected more reliably in related services.

…ovider

- Replace bindSupabase with manual wisp.identify/reset in auth state listener to catch async errors (wisp not initialized was throwing unhandled promise rejection)
- Add visually hidden DialogTitle to CommandDialog to fix Radix accessibility warning
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

@Coder-soft is attempting to deploy a commit to the yamura3's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Coder-soft, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4b517ad3-f7df-4231-b765-e55bc4ea704a

📥 Commits

Reviewing files that changed from the base of the PR and between 342f392 and b30732d.

📒 Files selected for processing (5)
  • src/components/AdBlockDetector.tsx
  • src/hooks/useHeartedResources.ts
  • src/hooks/useUserFavorites.ts
  • src/pages/ResourcesHub.tsx
  • src/pages/Showcase.tsx
📝 Walkthrough

Walkthrough

The command dialog gains an accessible hidden title. AuthProvider now directly synchronizes Wisp identity with initial sessions, sign-ins, and sign-outs while tolerating uninitialized Wisp state.

Changes

Command dialog accessibility

Layer / File(s) Summary
Accessible command dialog title
src/components/ui/command.tsx
CommandDialog renders a visually hidden DialogTitle labeled “Command Menu”.

Auth analytics integration

Layer / File(s) Summary
Wisp identity lifecycle
src/providers/AuthProvider.tsx
AuthProvider identifies existing and signed-in users, resets on sign-out, and removes the previous Wisp binding cleanup.

Estimated code review effort: 2 (Simple) | ~15 minutes

Poem

A rabbit hops through dialogs bright,
And hides a title just right.
Wisp follows auth from day to night,
Sign in, sign out, identity in flight.
Ears perk up—everything’s polite!

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the two main changes: the DialogTitle accessibility fix and the Wisp error handling update.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the command dialog accessibility label and Wisp auth identity handling.

  • Adds a visually hidden title inside CommandDialog.
  • Replaces bindSupabase with manual Wisp identify and reset calls.
  • Identifies existing sessions after getSession() resolves.

Confidence Score: 4/5

The Wisp auth path needs a small fix before merging.

  • Async Wisp failures can still escape the new wrappers.
  • Some non-sign-in auth session updates no longer refresh the Wisp identity.
  • The command dialog accessibility change looks safe.

src/providers/AuthProvider.tsx

Important Files Changed

Filename Overview
src/components/ui/command.tsx Adds a hidden DialogTitle to satisfy the dialog accessible-name requirement.
src/providers/AuthProvider.tsx Replaces the Supabase Wisp binding with manual identify/reset calls, but the new error handling can still miss async failures.

Reviews (1): Last reviewed commit: "fix: DialogTitle accessibility warning a..." | Re-trigger Greptile

Comment on lines +7 to +12
function tryIdentify(userId: string) {
try { wisp.identify(userId); } catch { /* wisp not initialized */ }
}
function tryReset() {
try { wisp.reset(); } catch { /* wisp not initialized */ }
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Async Wisp Rejections Escape

When wisp.identify() or wisp.reset() returns a rejected Promise because Wisp is not initialized, this synchronous try/catch does not catch it. The auth listener can still produce the unhandled promise rejection this change is meant to prevent.

Suggested change
function tryIdentify(userId: string) {
try { wisp.identify(userId); } catch { /* wisp not initialized */ }
}
function tryReset() {
try { wisp.reset(); } catch { /* wisp not initialized */ }
}
function tryIdentify(userId: string) {
Promise.resolve()
.then(() => wisp.identify(userId))
.catch(() => { /* wisp not initialized */ });
}
function tryReset() {
Promise.resolve()
.then(() => wisp.reset())
.catch(() => { /* wisp not initialized */ });
}

Comment on lines +28 to +31
if (event === "SIGNED_IN" && session?.user.id) {
tryIdentify(session.user.id);
} else if (event === "SIGNED_OUT") {
tryReset();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Session Refresh Skips Identify

Supabase auth changes that keep a user signed in, such as token refresh or user update events, still carry the current session but no longer call Wisp identify. If Wisp uses the current auth session or user metadata for its identity state, those updates can leave analytics tied to stale user data until a full sign-out and sign-in happens.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

- AdBlockDetector: remove dead isBlocked state (set but never read)
- Showcase: remove redundant aspect-video from inner font/json/document previews
- ResourcesHub: replace useState/useEffect tab with useSearchParams for URL sync
- useUserFavorites: add isSchemaReady to query enabled condition to prevent pointless refetches
- useHeartedResources: use heartedResources state instead of localStorage read in isHearted/toggleHeart
@creatorcluster creatorcluster merged commit f5f9c3f into creatorcluster:main Jul 10, 2026
1 of 3 checks passed
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.

2 participants