Skip to content

spacetime dev - Replace template selection with fuzzy-filterable menu#4470

Open
clockwork-labs-bot wants to merge 2 commits intomasterfrom
bot/fuzzy-template-select
Open

spacetime dev - Replace template selection with fuzzy-filterable menu#4470
clockwork-labs-bot wants to merge 2 commits intomasterfrom
bot/fuzzy-template-select

Conversation

@clockwork-labs-bot
Copy link
Collaborator

The old template selection in spacetime dev / spacetime init had a two-step flow:

  1. Select from a short highlights list (just React)
  2. If "Use Template" → dump a flat list and type an ID or GitHub URL

The user couldn't filter or navigate the full template list interactively.

Now: A single FuzzySelect showing all templates with their ID and description. The user can:

  • Type to fuzzy-filter by template ID or description (e.g. typing "react" matches react-ts, chat-react-ts, etc.)
  • Arrow keys to navigate the filtered list
  • Enter to select

Special options at the bottom:

  • Clone from GitHub (owner/repo or git URL) — prompts for a repo input
  • None (server only) — prompts for server language only

Default selection is the first highlighted template (react-ts).

Net -24 lines (31 added, 55 removed).

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
bfops previously approved these changes Feb 26, 2026
Copy link
Collaborator

@bfops bfops left a comment

Choose a reason for hiding this comment

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

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).

@bfops bfops changed the title Replace template selection with fuzzy-filterable menu spacetime dev - Replace template selection with fuzzy-filterable menu Feb 26, 2026
@bfops bfops dismissed their stale review February 26, 2026 03:26

dismissing my review because I'm waiting for another approval and I don't want the bot merging this prematurely

@bfops bfops disabled auto-merge February 26, 2026 03:26
@jdetter jdetter force-pushed the bot/fuzzy-template-select branch from 684f81c to a89dd79 Compare February 26, 2026 05:12
Copy link
Collaborator

@jdetter jdetter left a comment

Choose a reason for hiding this comment

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

Tested working, thank you @bfops !

Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

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

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.

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.

4 participants