Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions extensions/cli/src/ui/ConfigSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,15 @@ const ConfigSelector: React.FC<ConfigSelectorProps> = ({
}
}

// Add "Create new assistant" option
options.push({
id: "create",
name: "Create new assistant",
type: "create",
displaySuffix: " (opens web)",
});
// Add "Create new assistant" option only when logged in
if (accessToken) {
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 3, 2026

Choose a reason for hiding this comment

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

P2: Conditioning the create option on authentication can leave ConfigSelector with zero options for logged-out first-time users, producing a dead-end selector state with invalid navigation indexes.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At extensions/cli/src/ui/ConfigSelector.tsx, line 115:

<comment>Conditioning the create option on authentication can leave ConfigSelector with zero options for logged-out first-time users, producing a dead-end selector state with invalid navigation indexes.</comment>

<file context>
@@ -111,13 +111,15 @@ const ConfigSelector: React.FC<ConfigSelectorProps> = ({
-          displaySuffix: " (opens web)",
-        });
+        // Add "Create new assistant" option only when logged in
+        if (accessToken) {
+          options.push({
+            id: "create",
</file context>
Fix with Cubic

options.push({
id: "create",
name: "Create new assistant",
type: "create",
displaySuffix: " (opens web)",
});
}

// Determine current config by checking both auth config and service state
const assistantSlug = getAssistantSlug(authConfig);
Expand Down
Loading