-
Notifications
You must be signed in to change notification settings - Fork 32
🤖 feat: upfront workspace name generation with magic wand toggle #910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add frontend name generation with debounced AI calls - New useWorkspaceName hook with auto-generate checkbox control - Frontend creates workspace with generated name, then sends message - Remove legacy backend async name generation flow - Simplify sendMessage to require workspaceId (no more null for creation) - Remove createForFirstMessage, generateAndApplyAIName, placeholder names - Backend uses preferred small models (Haiku, Codex-mini) for generation _Generated with mux_
8bcfd40 to
04ef1de
Compare
- Clicking into name field disables auto-generation, allowing edit - Wand icon toggles auto-generation on/off - Colored wand = auto enabled, grayscale = disabled - Loading spinner replaces wand during generation
…alignment - When clicking into field, generated name becomes editable instead of clearing - Use inset-y-0 + flex items-center for proper vertical centering of wand icon
Remove Promise.race timeout - with voice input, messages can go from empty to complete instantly, so we must ensure the generated name reflects the total content, not a partial intermediate state.
Replace 6 individual name-related props with single WorkspaceNameState object. Reduces indirection and keeps component interface cleaner.
- Add cancelPendingGeneration() that properly resolves waiting promises before invalidating requests (prevents hanging waiters) - Track requestId in generationPromiseRef to match cancellation correctly - Use pendingMessageRef to capture message at schedule time, avoiding stale closures when debounced callback fires - Clear pendingMessageRef in all cleanup paths - waitForGeneration now uses captured message from pendingMessageRef instead of potentially stale closure value
…Model - Changed getPreferredNameModel to async, calls aiService.createModel() to test if models are available instead of duplicating API key logic - Removes dependency on Config, avoiding duplication of provider-specific env var checking (ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, etc.) - Updated tests to use mock AIService instead of mock Config - Single source of truth for provider availability in AIService
…vailable If Haiku/GPT-Mini aren't available (no Anthropic/OpenAI key), fall back to the user's configured message model. This avoids confusing errors when users have only configured alternative providers.
…text - Track confirmed name separately (creatingWithName) from input field name - Show 'Generating name…' briefly while waitForGeneration completes - Then show the actual name that will be used for the workspace - Simplified welcome text in empty state
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Workspace names are now generated before creation, with a magic wand toggle for auto/manual control.
useWorkspaceNamehook with debounced generationGenerated with
mux