Skip to content

fix: show auth config notice on Sign In button when Clerk key is missing#486

Open
Xenon010101 wants to merge 1 commit into
algoscope-hq:mainfrom
Xenon010101:fix/bug-445-clerk-missing-ux
Open

fix: show auth config notice on Sign In button when Clerk key is missing#486
Xenon010101 wants to merge 1 commit into
algoscope-hq:mainfrom
Xenon010101:fix/bug-445-clerk-missing-ux

Conversation

@Xenon010101
Copy link
Copy Markdown
Contributor

@Xenon010101 Xenon010101 commented May 30, 2026

Description

When VITE_CLERK_PUBLISHABLE_KEY is not configured, the Sign In button now shows a hover-visible warning tooltip with a clear message.

Related Issue

Fixes #445

Summary by CodeRabbit

  • New Features
    • Enhanced the Sign In button with a helpful hover tooltip that displays when authentication is not configured. This tooltip provides users with clear setup instructions and configuration guidance, featuring improved visual styling and better formatting. The enhancement ensures consistent, helpful information is displayed across all device types and screen layouts.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 30, 2026

Deploy Preview for astounding-nougat-da0f6a ready!

Name Link
🔨 Latest commit 4140a5e
🔍 Latest deploy log https://app.netlify.com/projects/astounding-nougat-da0f6a/deploys/6a1a8a356fd828000851f172
😎 Deploy Preview https://deploy-preview-486--astounding-nougat-da0f6a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@Xenon010101 is attempting to deploy a commit to the adityapaul2603-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 30, 2026

📝 Walkthrough

Walkthrough

The PR improves the UX when VITE_CLERK_PUBLISHABLE_KEY is not set by replacing bare disabled "Sign In" buttons with wrapped, grouped containers that display helpful amber tooltips on hover. Both desktop and mobile layouts receive identical tooltip guidance explaining the missing configuration.

Changes

Auth Configuration Fallback UI

Layer / File(s) Summary
Disabled Sign In button with configuration tooltip
src/components/Navbar.jsx
Desktop (lines 326–336) and mobile (lines 459–469) branches wrap the disabled "Sign In" button in a relative group container, adding an amber-styled conditional tooltip that reveals on hover with instructions to set VITE_CLERK_PUBLISHABLE_KEY in .env.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • algoscope-hq/AlgoScope#462: Modifies Navbar.jsx Sign In button styling and container behavior in unauthenticated/fallback Clerk states.
  • algoscope-hq/AlgoScope#443: Updates the disabled "Sign In" fallback button styling in Navbar.jsx when auth is not configured.
  • algoscope-hq/AlgoScope#289: Modifies the Clerk "not configured" fallback auth UI in Navbar.jsx for missing VITE_CLERK_PUBLISHABLE_KEY.

Suggested labels

type:bug, level:intermediate

Suggested reviewers

  • Bimbok

Quick context for review: This directly addresses issue #445 by transforming the broken UX into a helpful fallback. The Tailwind group / group-hover: pattern here is a clean way to toggle the tooltip visibility on parent hover—both layouts use the same pattern symmetrically, so they're safe to review together. No algorithmic complexity or performance concerns; this is pure UX polish. ✨

🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is minimal but identifies the change and links issue #445. However, it lacks detail on what changed, testing verification, and UI evidence as required by the template. Expand description with file changes, testing steps completed, UI before/after evidence, and release note category selection per the template.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a config notice tooltip to the Sign In button when Clerk is misconfigured.
Linked Issues check ✅ Passed The PR implements the core requirement from issue #445: surfacing a user-facing tooltip when VITE_CLERK_PUBLISHABLE_KEY is missing instead of relying solely on console.warn.
Out of Scope Changes check ✅ Passed Only Navbar.jsx is modified to add tooltip UI when Clerk is unconfigured, which directly addresses issue #445 with no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Algorithm Complexity ✅ Passed PR contains UI component changes only—no algorithm implementation to verify. Custom check for algorithm complexity is not applicable.
Conventional Commits ✅ Passed Commit message follows conventional commits format with "fix:" prefix and clearly describes the bug fix for the missing auth config notice.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@src/components/Navbar.jsx`:
- Around line 326-336: Currently the "Sign In" disabled button and its tooltip
(the element containing VITE_CLERK_PUBLISHABLE_KEY) rely on group-hover and are
not discoverable via keyboard or touch; update the Navbar.jsx sign-in block so
the helper message is always visible (or at least visible when the wrapper
receives focus) instead of using group-hover opacity, e.g. render a persistent
helper text element beneath the disabled Sign In button (the button with class
"theme-button-primary" and the surrounding "relative group" wrapper) or make the
wrapper focusable and wire aria-describedby on the button to the tooltip element
(the absolute div that mentions VITE_CLERK_PUBLISHABLE_KEY) so keyboard and
screen-reader users can discover the notice without hover.
🪄 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.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 425876aa-b061-4078-9c33-3d72fec2d435

📥 Commits

Reviewing files that changed from the base of the PR and between 9f6f2f6 and 4140a5e.

📒 Files selected for processing (1)
  • src/components/Navbar.jsx

Comment thread src/components/Navbar.jsx
Comment on lines +326 to +336
<div className="relative group">
<button
title="Auth not configured"
disabled
className="theme-button-primary relative group overflow-hidden rounded-xl border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-900/40 text-slate-700 dark:text-slate-200 px-6 py-2 text-sm font-bold transition-all duration-300 shadow-md opacity-50 cursor-not-allowed"
className="theme-button-primary rounded-xl border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-900/40 text-slate-500 dark:text-slate-500 px-6 py-2 text-sm font-bold opacity-50 cursor-not-allowed"
>
Sign In
</button>
</>
<div className="absolute right-0 top-full mt-2 w-64 rounded-lg border border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-950 px-3 py-2 text-xs text-amber-700 dark:text-amber-300 shadow-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none z-50">
Authentication not configured. Set <code className="font-mono text-amber-800 dark:text-amber-200">VITE_CLERK_PUBLISHABLE_KEY</code> in your <code className="font-mono text-amber-800 dark:text-amber-200">.env</code> file.
</div>
</div>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Make the missing-auth notice non-hover-only (keyboard + touch accessible).

Right now the warning depends on group-hover, but both fallback buttons are disabled (not focusable), and mobile users typically can’t hover. This means the config message can remain undiscoverable in the exact failure mode this PR targets.

A simple fix is to render a persistent helper text under the disabled button (or show it via focusable wrapper + aria-describedby), instead of hover-only tooltip behavior.

As per coding guidelines, src/components/** should “focus on React best practices … Ensure styles follow Tailwind CSS patterns.” A critical notice should not rely on hover-only Tailwind interaction for discoverability.

Also applies to: 459-469

🤖 Prompt for 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.

In `@src/components/Navbar.jsx` around lines 326 - 336, Currently the "Sign In"
disabled button and its tooltip (the element containing
VITE_CLERK_PUBLISHABLE_KEY) rely on group-hover and are not discoverable via
keyboard or touch; update the Navbar.jsx sign-in block so the helper message is
always visible (or at least visible when the wrapper receives focus) instead of
using group-hover opacity, e.g. render a persistent helper text element beneath
the disabled Sign In button (the button with class "theme-button-primary" and
the surrounding "relative group" wrapper) or make the wrapper focusable and wire
aria-describedby on the button to the tooltip element (the absolute div that
mentions VITE_CLERK_PUBLISHABLE_KEY) so keyboard and screen-reader users can
discover the notice without hover.

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.

[Bug]: Sign In button is unclickable when VITE_CLERK_PUBLISHABLE_KEY is not set

1 participant