Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

@ibetitsmike ibetitsmike commented Nov 18, 2025

This PR removes the temporary fallback workspace title generation and surfaces provider errors to the user during first-message workspace creation.

- Revert fallback chat-{timestamp} behavior
- generateWorkspaceName now throws SendMessageError-compatible objects
- IpcMain maps errors to Result<void, SendMessageError> so UI shows provider toasts

_Generated with `mux`_
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Return Result from title generator (no throws)
- Update IPC call sites and logs
- Apply Prettier

_Generated with _
- Keep fail-fast for missing/invalid config
- Use temporary chat-{timestamp} for providers without title support
- Clean up comments

_Generated with _
…itle when provider lacks title support

- Creation flow now uses ChatInputToast + createErrorToast for SendMessageError, matching workspace UX
- Title generator no longer blocks on missing API key for non-Anthropic/OpenAI providers; uses chat-{timestamp} fallback instead

_Generated with `mux`_
- Creation ChatInput no longer wipes the input when workspace creation fails
- useCreationWorkspace.handleSend now returns boolean success so UI can decide when to clear

_Generated with _
…back)

- Title generator now builds a LanguageModel from the exact model string, via PROVIDER_REGISTRY
- Supports anthropic/openai/openrouter/ollama; errors if required API key missing
- Removed temporary chat-* fallback path and dead code

_Generated with _
- generateWorkspaceName now calls AIService.createModel with the exact model string
- Removed provider-specific logic and fallbacks; errors propagate via SendMessageError
- Updated ipcMain to pass aiService instead of config

_Generated with _
@ammario
Copy link
Member

ammario commented Nov 18, 2025

I'm a little confused by the purpose of this PR. If we fail to generate the name (IMO) we should generate a placeholder like "-". We should have renaming the workspace automatically after first create and let the user do it as it involves a fallible rename dir operation.

@ibetitsmike
Copy link
Contributor Author

@ammario the purpose is to avoid all of that "I'll fix it up later" flow and fail fast before

- Force NODE_ENV='test' in telemetry client tests so initTelemetry short-circuits
- Pin MUX_ROOT to temp .mux in systemMessage tests to avoid host config bleed

_Generated with _
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