Skip to content

Fix auth UX bugs and lint issues#2

Merged
nearestnabors merged 3 commits intomainfrom
refactor/ui-apps-dry
Feb 2, 2026
Merged

Fix auth UX bugs and lint issues#2
nearestnabors merged 3 commits intomainfrom
refactor/ui-apps-dry

Conversation

@nearestnabors
Copy link
Copy Markdown
Owner

Summary

  • Fix double auth box showing when unauthenticated (conversation-list and auth-button UIs were both appearing)
  • Fix "All caught up!" showing before auth prompt when no username set
  • Fix lint issues causing CI failures on main

Changes

  • xConversations now returns AuthRequiredResponse directly when auth is needed
  • conversation-list UI parses initial data as JSON to detect auth state
  • Extract handleAuthError helper to reduce cognitive complexity
  • Move MENTION_PATTERN regex to top level for performance
  • Fix block statements, import order, unused vars

Test plan

  • All 86 tests pass
  • Lint check passes
  • Build succeeds
  • Manual test: revoke X permissions, ask for conversations → single auth prompt appears

🤖 Generated with Claude Code

nearestnabors and others added 3 commits February 2, 2026 01:10
The auth-status tool was returning JSON without authRequired: true,
but the UI's isAuthRequired() check requires that field to transition
from loading state to auth-required state.

Added authRequired: true and message field to auth response.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tests ensure AuthRequiredResponse format is correct to prevent
the "Checking connection..." hang bug from recurring.

Tests verify:
- authRequired: true is present (the bug was missing this)
- All required fields: service, authUrl, state, message
- Invalid inputs are rejected
- Documents expected response formats

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- xConversations now returns AuthRequiredResponse directly when auth
  is needed, preventing agent from calling x_auth_status separately
- conversation-list UI parses initial data as JSON to detect auth state
- UI detects error responses from x_get_conversations and shows auth
- Extract handleAuthError helper to reduce cognitive complexity
- Move MENTION_PATTERN regex to top level for performance
- Fix lint issues (block statements, import order, unused vars)

Fixes two issues:
1. Double auth boxes when unauthenticated (both conversation-list and
   auth-button UIs were showing)
2. "All caught up!" showing before auth prompt when no username set

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nearestnabors nearestnabors merged commit 3def8c7 into main Feb 2, 2026
1 check passed
@nearestnabors nearestnabors deleted the refactor/ui-apps-dry branch February 2, 2026 19:51
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