feat(ui): create-workspace dialog + single-source the form across surfaces#257
Merged
Conversation
The Tools dropdown was only on the Template detail page. The sidebar quick-create and the Chat workspace section share useCreateWorkspace (the toolAccess state was already wired) but didn't render the selector — so on those surfaces the launcher option wasn't choosable. Add the dropdown to both. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…faces
The create form was hand-written three times (Workspaces sidebar, Chat
section, template detail page) — each wiring useCreateWorkspace + template
selection + the field JSX itself. Adding a create-time option meant editing
all three, and the sidebar's inline stack had no room to grow.
Extract one CreateWorkspaceForm that owns useCreateWorkspace AND the
template-selection state, so a surface renders <CreateWorkspaceForm /> and
writes zero form logic. Wrap it in CreateWorkspaceDialog (reusing the
existing uta/Dialog shell) for the two sidebar surfaces — a popup with room
to grow instead of a cramped column. The template detail page renders the
same form inline in its panel.
Behavior preserved: the Chat section keeps its date-based default tag
(chat-jun3) + autofocus; per-template reset on the detail page is now a
key={templateName} remount. Future create options are a one-place edit.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2 tasks
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
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.
Summary
useCreateWorkspace+ template selection + the field JSX. Adding a create-time option meant editing all three, and the sidebar's inline stack had no room to grow.CreateWorkspaceFormthat ownsuseCreateWorkspaceand the template-selection state, so a surface renders<CreateWorkspaceForm />and writes zero form logic. Wrap it inCreateWorkspaceDialog(reusing the existinguta/Dialogshell) for the two sidebar surfaces — a popup with room to grow instead of a cramped column. The template detail page renders the same form inline in its panel.chat-jun3) + autofocus; per-template reset on the detail page is now akey={templateName}remount. The 3 surfaces shrank ~245 lines; future options are a one-place edit.Test plan
cd ui && tsc -bcleanvitest --project uipasses (38/38); no spec renders these components, hook + api unchangedBoundary touch
None — UI-only. No trading / auth / broker / migration surface.
🤖 Generated with Claude Code