Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

@ammar-agent ammar-agent commented Nov 14, 2025

Summary

  • Preserve the user's start message (plus -t/-r flags) when /new launches the chat-based creation flow by reusing the parsed payload; added parser tests to cover whitespace and runtime cases.
  • Autofocus the creation chat input whenever the new workspace view opens and reuse a single computed creationProjectPath so the view only renders when a concrete project exists.

Testing

  • bun test src/utils/slashCommands/parser.test.ts
  • bun test src/hooks/useStartWorkspaceCreation.test.ts
  • make static-check

Generated with mux

@ammar-agent ammar-agent force-pushed the fix-workspace-creation-regression branch 2 times, most recently from 7b3af8c to 899556e Compare November 14, 2025 18:23
- Export normalizeRuntimePreference for reuse
- Extract persistWorkspaceCreationPrefill to centralize localStorage writes
- Add getFirstProjectPath helper to avoid repeated Array.from calls
- Guard event handler against missing projectPath detail
- Add unit tests covering normalization and persistence edge cases
- Update App.tsx to use getFirstProjectPath helper

_Generated with `mux`_
- Remove unused imports from App.tsx
- Use proper type import in test file

_Generated with `mux`_
_Generated with `mux`_
@ammar-agent ammar-agent force-pushed the fix-workspace-creation-regression branch from 899556e to 72f3337 Compare November 14, 2025 18:42
When user types "/new\nmessage here", the message was being lost
because the parser only extracted startMessage when a workspace name
was provided.

Now correctly extract and pass startMessage, trunkBranch, and runtime
flags even when no workspace name is specified (creation modal flow).

Added tests:
- /new with message but no workspace name
- /new with flags and message but no workspace name

_Generated with `mux`_
- Track creation chat input ref and focus on mount
- Reuse derived project path for creation view rendering

_Generated with `mux`_
@ammar-agent ammar-agent changed the title 🤖 refactor: simplify workspace creation flow 🤖 fix: preserve /new start message and focus creation input Nov 14, 2025
@ammario ammario merged commit 3643542 into main Nov 14, 2025
13 checks passed
@ammario ammario deleted the fix-workspace-creation-regression branch November 14, 2025 19:49
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.

2 participants