Skip to content

feat(desktop): route non-setup projects to settings from new workspace modal#3626

Merged
Kitenite merged 1 commit intomainfrom
project-setup-handling-for-v2-workspace-sidebar
Apr 21, 2026
Merged

feat(desktop): route non-setup projects to settings from new workspace modal#3626
Kitenite merged 1 commit intomainfrom
project-setup-handling-for-v2-workspace-sidebar

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Apr 21, 2026

Summary

  • When a user picks a project that isn't set up on the chosen host, the new-workspace modal now sends them to /settings/projects/$projectId (which renders V2ProjectSettings with clone / import / relocate UX) instead of firing a workspace creation that would blow up at "ensure local project."
  • Replaces the tiny advisory "Project needs to be set up" amber text with a clickable Set up project… button in the modal footer.
  • Disables the submit-arrow and unifies submit / ⌘↵ / form-submit through one handleSubmit wrapper that branches on needsSetup.

Why this approach

The merged-in V2ProjectSettings page already owns the full setup flow — pick location, import existing, clone here, relocate, backfill-conflict detection — all calling the same project.setup mutation. Reusing it (instead of inlining setup UX into the modal) keeps one source of truth for setup and avoids schema/pending-row churn.

Test plan

  • Open new-workspace modal, select a project that's set up → submit works as before (fork / ⌘↵ / Enter).
  • Switch to a project that isn't set up on the current host → footer shows Set up project… button, submit arrow is disabled.
  • Click Set up project… → modal closes, navigates to /settings/projects/<id>, renders V2 project settings with the Location section.
  • With a non-setup project selected, press ⌘↵ → same navigation as button click.
  • After setting up the project in settings, reopen the new-workspace modal → project is "Available", submit works normally.

Summary by cubic

Route projects that aren’t set up to the V2 project settings from the new workspace modal, preventing failed workspace creation. Adds a clear “Set up project…” action and disables submit until setup is complete.

  • New Features

    • Redirects non-setup selections to /settings/projects/$projectId (V2 Project Settings) and closes the modal.
    • Replaces amber advisory text with a “Set up project…” button in the modal footer.
    • Disables the prompt submit arrow when setup is needed; ⌘↵/Ctrl+Enter and form submit also route to settings.
  • Refactors

    • Consolidates submit logic into a single handleSubmit that branches on needsSetup.
    • Re-exports SubmitAttachment from useSubmitWorkspace index.

Written for commit ffbc4dd. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Enhanced workspace creation flow to detect when a project requires setup and redirect users to the setup screen instead of proceeding with workspace creation.
    • Added a dedicated "Set up project" button in the workspace creation modal for improved usability.

…e modal

When a user selects a project that isn't set up on the chosen host, the
submit path now redirects to /settings/projects/$projectId (which renders
V2ProjectSettings with clone/import/relocate UX) instead of firing a
workspace creation that would fail at "ensure local project".

Replaces the advisory amber text with a clickable "Set up project…" button
and disables the prompt-submit arrow while setup is pending. Submit,
⌘↵ keyboard, and form onSubmit all route through a single handleSubmit
wrapper that branches on needsSetup.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

📝 Walkthrough

Walkthrough

The workspace creation modal now includes conditional logic that checks if a project requires setup. When needsSetup is true, the submission flow navigates to the project settings page instead of creating a workspace. The modal interface updates to display a setup button with conditional visibility based on the project state.

Changes

Cohort / File(s) Summary
Workspace Creation Flow Control
apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/DashboardNewWorkspaceForm/PromptGroup/PromptGroup.tsx
Added Button and useNavigate imports. Introduced handleSubmit wrapper that conditionally navigates to /settings/projects/$projectId when needsSetup is true, otherwise executes workspace creation. Updated prompt submission, keyboard shortcuts, and button click handlers to use new logic. Modified bottom-bar UI to display "Set up project…" button when setup is needed, hiding the {modKey}↵ hint in that state.
Type Exports
apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/DashboardNewWorkspaceForm/PromptGroup/hooks/useSubmitWorkspace/index.ts
Added re-export of SubmitAttachment type alongside existing useSubmitWorkspace hook export.

Sequence Diagram

sequenceDiagram
    actor User
    participant PromptGroup
    participant handleSubmit
    participant Modal
    participant useNavigate
    participant WorkspaceAPI

    User->>PromptGroup: Submit or press Enter
    PromptGroup->>handleSubmit: handleSubmit(files?)
    handleSubmit->>handleSubmit: Check selectedProject.needsSetup
    
    alt needsSetup is true
        handleSubmit->>Modal: closeModal()
        handleSubmit->>useNavigate: navigate(/settings/projects/$projectId)
    else needsSetup is false
        handleSubmit->>WorkspaceAPI: createWorkspace(files)
        WorkspaceAPI-->>PromptGroup: Workspace created
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A project needs its setup dance,
So now the modal shows its chance—
No workspace yet, just navigate!
To settings where you'll configure fate,
A button guides with gentle care. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: routing non-setup projects to settings from the new workspace modal, matching the core feature introduced in this PR.
Description check ✅ Passed The PR description is comprehensive and well-structured, covering the summary of changes, rationale, and a detailed test plan with checkboxes. All key sections from the template are included and properly filled out.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch project-setup-handling-for-v2-workspace-sidebar

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 21, 2026

Greptile encountered an error while reviewing this PR. Please reach out to support@greptile.com for assistance.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/DashboardNewWorkspaceForm/PromptGroup/PromptGroup.tsx (1)

429-445: Minor: consider keeping the ⌘↵ affordance visible alongside the setup button.

Pressing ⌘↵ still triggers handleSubmit()handleGoToSetup() when needsSetup is true (via the window keydown handler at Line 176-183), but the {modKey}↵ hint is hidden in that branch, so users lose the visual cue that the shortcut still does something useful (navigate to setup). If that's intentional (i.e., you want the button CTA to be the only discoverable action), feel free to ignore; otherwise rendering both the button and the hint — or swapping the hint's label — would preserve keyboard discoverability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/DashboardNewWorkspaceForm/PromptGroup/PromptGroup.tsx`
around lines 429 - 445, The UI hides the keyboard shortcut hint when needsSetup
is true even though the global keydown handler still calls handleGoToSetup;
update the render in PromptGroup.tsx so that when needsSetup is true you render
the Button (handleGoToSetup) and also render the modKey↵ hint (or an alternate
label like “⌘↵ to setup”) next to it instead of omitting it, preserving keyboard
discoverability; ensure the change references the needsSetup conditional, the
Button that calls handleGoToSetup, and the existing modKey display so the hint
remains visible while the button remains primary.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/DashboardNewWorkspaceForm/PromptGroup/PromptGroup.tsx`:
- Around line 429-445: The UI hides the keyboard shortcut hint when needsSetup
is true even though the global keydown handler still calls handleGoToSetup;
update the render in PromptGroup.tsx so that when needsSetup is true you render
the Button (handleGoToSetup) and also render the modKey↵ hint (or an alternate
label like “⌘↵ to setup”) next to it instead of omitting it, preserving keyboard
discoverability; ensure the change references the needsSetup conditional, the
Button that calls handleGoToSetup, and the existing modKey display so the hint
remains visible while the button remains primary.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d7bfa86b-a2c9-42dd-a34b-4604c1d4aed1

📥 Commits

Reviewing files that changed from the base of the PR and between 0358690 and ffbc4dd.

📒 Files selected for processing (2)
  • apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/DashboardNewWorkspaceForm/PromptGroup/PromptGroup.tsx
  • apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/DashboardNewWorkspaceForm/PromptGroup/hooks/useSubmitWorkspace/index.ts

@Kitenite Kitenite merged commit 9e3e073 into main Apr 21, 2026
5 of 7 checks passed
@Kitenite Kitenite deleted the project-setup-handling-for-v2-workspace-sidebar branch April 21, 2026 21:56
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

Kitenite added a commit that referenced this pull request May 4, 2026
Add v2 project setup section (#3566, #3605, #3606, #3592, #3626, #3632),
scheduled agent runs (#3576), Opus 4.7 (#3579), v1 review comments in pane
(#3596), configurable v2 link-click (#3600), Copy Branch Name (#3635),
safer terminal preset defaults (#3546), and /pricing page (#3639). Expand
bug fixes with v2 git correctness, cross-fork PR misattribution, terminal
paste/Unicode/Shift+Enter, and security bumps.
Kitenite added a commit that referenced this pull request May 6, 2026
…-27) (#3792)

* docs: generate weekly changelog 2026-04-27

* docs: reframe weekly changelog around v2 public beta

Lead with v2 public beta + Settings → Experimental enable, restructure
around the v1→v2 migration story, sidebar overhaul, cross-workspace
terminals, and v2 chat. Pull in ~30 v2 PRs the bot missed and demote
non-v2 items (Hosts page, marketing menu) to a brief "Also this week".

* docs: pull in missed v2 features and bug fixes

Add v2 project setup section (#3566, #3605, #3606, #3592, #3626, #3632),
scheduled agent runs (#3576), Opus 4.7 (#3579), v1 review comments in pane
(#3596), configurable v2 link-click (#3600), Copy Branch Name (#3635),
safer terminal preset defaults (#3546), and /pricing page (#3639). Expand
bug fixes with v2 git correctness, cross-fork PR misattribution, terminal
paste/Unicode/Shift+Enter, and security bumps.

* docs(changelog): add v2 public beta hero screenshot

* docs(changelog): add Settings → Experimental screenshot, compress hero

pngquant compression: v2-public-beta.png 704KB → 166KB (76%),
v2-enable-flag.png 160KB → 36KB (78%). No visible quality loss.

* docs(changelog): tighten v2 launch prose, condense bullet groups

* docs(changelog): reframe cloud-first pillar as remote workspaces

* docs(changelog): cut parallel-agents and honest-state pillars, fold into sub-sections

* docs(changelog): tweak title and lead phrasing

* docs(changelog): rewrite v2 launch lede around Twitter narrative

Pull the launch story (physical limits, 3 ex-CTOs, cloud workspaces)
into the lede, restructure pillars around Remote workspaces, Reimagined
diff view, and Superset CLI, and add v2-remote-workspaces and
v2-changes-pane screenshots to back the new sections.

* docs(changelog): add CLI install snippet and docs link

* docs(changelog): cut narrative lede, match standard changelog tone

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kiet Ho <hoakiet98@gmail.com>
saddlepaddle pushed a commit that referenced this pull request May 6, 2026
…-27) (#3792)

* docs: generate weekly changelog 2026-04-27

* docs: reframe weekly changelog around v2 public beta

Lead with v2 public beta + Settings → Experimental enable, restructure
around the v1→v2 migration story, sidebar overhaul, cross-workspace
terminals, and v2 chat. Pull in ~30 v2 PRs the bot missed and demote
non-v2 items (Hosts page, marketing menu) to a brief "Also this week".

* docs: pull in missed v2 features and bug fixes

Add v2 project setup section (#3566, #3605, #3606, #3592, #3626, #3632),
scheduled agent runs (#3576), Opus 4.7 (#3579), v1 review comments in pane
(#3596), configurable v2 link-click (#3600), Copy Branch Name (#3635),
safer terminal preset defaults (#3546), and /pricing page (#3639). Expand
bug fixes with v2 git correctness, cross-fork PR misattribution, terminal
paste/Unicode/Shift+Enter, and security bumps.

* docs(changelog): add v2 public beta hero screenshot

* docs(changelog): add Settings → Experimental screenshot, compress hero

pngquant compression: v2-public-beta.png 704KB → 166KB (76%),
v2-enable-flag.png 160KB → 36KB (78%). No visible quality loss.

* docs(changelog): tighten v2 launch prose, condense bullet groups

* docs(changelog): reframe cloud-first pillar as remote workspaces

* docs(changelog): cut parallel-agents and honest-state pillars, fold into sub-sections

* docs(changelog): tweak title and lead phrasing

* docs(changelog): rewrite v2 launch lede around Twitter narrative

Pull the launch story (physical limits, 3 ex-CTOs, cloud workspaces)
into the lede, restructure pillars around Remote workspaces, Reimagined
diff view, and Superset CLI, and add v2-remote-workspaces and
v2-changes-pane screenshots to back the new sections.

* docs(changelog): add CLI install snippet and docs link

* docs(changelog): cut narrative lede, match standard changelog tone

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kiet Ho <hoakiet98@gmail.com>
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.

1 participant