spacetime dev - Replace template selection with fuzzy-filterable menu#4470
spacetime dev - Replace template selection with fuzzy-filterable menu#4470clockwork-labs-bot wants to merge 2 commits intomasterfrom
spacetime dev - Replace template selection with fuzzy-filterable menu#4470Conversation
The old flow had two steps: (1) select from a short highlights list, then (2) if 'Use Template' was chosen, dump a flat list and type an ID. The user couldn't filter or navigate the full template list interactively. Now uses a single FuzzySelect showing all templates (ID + description). Type to fuzzy-filter by template ID or description, arrow keys to navigate, Enter to select. 'Clone from GitHub' and 'None (server only)' are at the bottom. Default highlights to the first highlighted template (react-ts). GitHub URL support is preserved — selecting 'Clone from GitHub' prompts for an owner/repo or git URL.
bfops
left a comment
There was a problem hiding this comment.
Works great for me!
Would you like to initialize a new project? yes
✔ Project name · zeke-test
✔ Project path · ./zeke-test
✔ Database name · zeke-test
? Select a template (type to filter, arrows to navigate) › rust
❯ basic-rs - A basic Rust client and server template with only stubs for code
chat-console-rs - Rust server/client implementing quickstart chat
nextjs-ts - Next.js App Router with TypeScript server
tanstack-ts - TanStack Start (React + TanStack Query/Router) with TypeScript server
chat-console-cs - C# server/client implementing quickstart chat
chat-react-ts - TypeScript server/client implementing quickstart chat
angular-ts - Angular web app with TypeScript server
if I type something that doesn't match, <Enter> does nothing.
I didn't test the github repo variant but code looks reasonable to me (and didn't change any of the details of parsing the url or anything).
spacetime dev - Replace template selection with fuzzy-filterable menu
dismissing my review because I'm waiting for another approval and I don't want the bot merging this prematurely
684f81c to
a89dd79
Compare
cloutiertyler
left a comment
There was a problem hiding this comment.
This is the only one that I would change (or at least would like the chance to discuss first).
The idea with the old setup was that we'd have a more beginner friendly "pick your framework" selection, and then only if you opted to use a template would you be presented with the list of more complex template names. I think we should preserve the two step process, but I think probably both should be fuzzy selectors.
The old template selection in
spacetime dev/spacetime inithad a two-step flow:The user couldn't filter or navigate the full template list interactively.
Now: A single
FuzzySelectshowing all templates with their ID and description. The user can:react-ts,chat-react-ts, etc.)Special options at the bottom:
Clone from GitHub (owner/repo or git URL)— prompts for a repo inputNone (server only)— prompts for server language onlyDefault selection is the first highlighted template (react-ts).
Net -24 lines (31 added, 55 removed).