Skip to content

fix(frontend): disable New chat when the workspace has no providers - #1431

Merged
willdady merged 1 commit into
mainfrom
fix/new-chat-disabled-without-providers
Oct 13, 2026
Merged

willdady merged 1 commit into
mainfrom
fix/new-chat-disabled-without-providers

Conversation

@willdady

Copy link
Copy Markdown
Owner

Summary

 <AppSidebar>
+  useHasNoProviders(scope)          // true only when the Providers read resolved empty
   <SidebarHeader>
-    <Button asChild><Link>New chat</Link></Button>
+    hasNoProviders
+      ? <Tooltip> <span tabIndex=0><Button disabled>New chat</Button></span>
+          "Add a provider to start a chat"              // canConfigureWorkspaceResource
+          "Ask an organization admin to add a provider" // otherwise
+      : <Button asChild><Link>New chat</Link></Button>

 <CommandMenu>
+  useHasNoProviders(scope)
-  <CommandItem>New chat</CommandItem>
+  <CommandItem disabled={hasNoProviders}>New chat</CommandItem>

Loading or errored Providers read → data undefined → New chat stays enabled. The Chat docs page now says New chat is unavailable until the Workspace has a Provider.

Closes #1428

Evidence

  • Before: AppSidebar New chat > disables New chat once the workspace is known to have no providers fails (link to /chat rendered); CommandMenu > disables New chat… fails (item navigates).
    After: both pass, plus tooltip wording for org admin / delegated Workspace Owner / non-delegated Workspace Owner, and loading / errored / has-providers still navigating. pnpm lint, typecheck, format:check, test all green.

Merge Danger

Door: two-way

Blast Radius: small

One extra Providers read (SWR-deduped) in the sidebar and command menu. Worst case a stale empty cache briefly disables New chat until revalidation.

🤖 Generated with Claude Code

The sidebar button and the command menu item now stay disabled once the
Providers read resolves empty, with a tooltip on the sidebar saying who
can add one. Loading or errored reads leave New chat enabled.

Closes #1428

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@willdady
willdady merged commit c4b5c1e into main Oct 13, 2026
5 checks passed
@willdady
willdady deleted the fix/new-chat-disabled-without-providers branch October 13, 2026 08:27
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.

Sidebar's "New chat" button stays enabled when the workspace has no providers

1 participant