Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

Summary

Adds UI-only workspace draft placeholders so a single project can have multiple in-progress workspace creations at once.

Background

Previously, workspace creation persisted a single pending draft per project (a fixed localStorage scope). Clicking “New workspace” repeatedly just reopened the same draft.

Implementation

  • Introduces a per-draft draftId dimension for /project routes.
  • Adds draft-scoped storage via __draft__/${projectPath}/${draftId} and a persisted draft index (workspaceDraftsByProject).
  • Renders draft rows in the sidebar (with live prompt preview + delete).
  • Workspace creation from a draft:
    • Temporarily prefixes the created workspace title with [Draft].
    • Immediately promotes the title (removes prefix) after creation.
    • Clears/removes the draft placeholder + its localStorage.

Validation

  • make static-check

Risks

  • If updateTitle fails (offline/older backend), a created workspace may keep the [Draft] prefix; user can rename manually.

Generated with mux • Model: openai:gpt-5.2 • Thinking: xhigh • Cost: $20.37

@github-actions github-actions bot added the enhancement New feature or functionality label Jan 26, 2026
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.

Reviewed commit: 3bd9d089e7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ibetitsmike
Copy link
Contributor Author

@codex review

Fixed orphaned draft placeholders when a section is deleted: drafts whose sectionId no longer exists are now treated as unsectioned (and navigation normalizes the sectionId).

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Adds UI-only workspace creation drafts (placeholders) under projects so repeated "new workspace" clicks open independent drafts with per-draft persisted prompts via localStorage.

---

_Generated with `mux` • Model: `openai:gpt-5.2` • Thinking: `xhigh` • Cost: `$3.93`_

<!-- mux-attribution: model=openai:gpt-5.2 thinking=xhigh costs=3.93 -->
- Stop prefixing newly-created workspaces with "[Draft]" (titles should be final after submit).
- Key the creation ChatInput by pendingDraftId so switching drafts fully resets ephemeral UI
  state and avoids the "Creating workspace" overlay leaking into other drafts.

---

_Generated with `mux` • Model: `openai:gpt-5.2` • Thinking: `high` • Cost: `$26.47`_

<!-- mux-attribution: model=openai:gpt-5.2 thinking=high costs=26.47 -->
@ibetitsmike ibetitsmike force-pushed the mike/workspace-draft-placeholders branch from a0d950f to 74a8ae7 Compare January 27, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant