Skip to content

feat(desktop): make 'none' the default branch prefix option#1158

Merged
Kitenite merged 2 commits into
mainfrom
kitenite/edit-prefix-and-make-none-default
Feb 3, 2026
Merged

feat(desktop): make 'none' the default branch prefix option#1158
Kitenite merged 2 commits into
mainfrom
kitenite/edit-prefix-and-make-none-default

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 3, 2026

Summary

  • Move "none" to the first position in the branch prefix dropdown
  • Add clickable edit button on branch prefix in new workspace modal

Test plan

  • Open settings > behavior and verify "No prefix" appears first in dropdown
  • Create new workspace and verify the prefix edit button navigates to settings

Summary by CodeRabbit

  • New Features

    • Added a pencil-button in the New Workspace modal to quickly edit branch prefix settings; it closes the modal then opens the behavior settings panel.
  • Chores

    • Reordered branch prefix mode options for improved consistency and presentation.

Move "none" to the first position in BRANCH_PREFIX_MODES and
BRANCH_PREFIX_MODE_LABELS so it appears first in the dropdown,
clearly indicating it's the default choice.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 3, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds an inline "Edit prefix" pencil button to NewWorkspaceModal that closes the modal and navigates to /settings/behavior when clicked; also reorders "none" to the start of branch-prefix constant lists in two files (no behavioral change).

Changes

Cohort / File(s) Summary
Modal — branch-prefix UI
apps/desktop/src/renderer/components/NewWorkspaceModal/NewWorkspaceModal.tsx
Imported useNavigate and HiOutlinePencil. Added a right-aligned "Edit prefix" pencil button next to the Branch name display that calls handleClose() then navigate('/settings/behavior'). Wrapped branch label in a div.
Branch-prefix labels
apps/desktop/src/renderer/routes/_authenticated/settings/utils/branch-prefix/branch-prefix.ts
Moved/inserted the "none": "No prefix" entry to the start of BRANCH_PREFIX_MODE_LABELS (ordering change only).
Branch-prefix modes
packages/local-db/src/schema/zod.ts
Reordered BRANCH_PREFIX_MODES so "none" is first instead of last (ordering change only; exported type unchanged).

Sequence Diagram(s)

sequenceDiagram
    participant User as User
    participant Modal as NewWorkspaceModal
    participant Router as Router (useNavigate)
    participant Settings as Settings Page

    User->>Modal: Click "Edit prefix" (pencil)
    Modal->>Modal: handleClose() — close modal UI
    Modal->>Router: navigate('/settings/behavior')
    Router->>Settings: Render Settings (Behavior / Branch Prefix)
    Settings-->>User: Settings UI shown
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 I nibble a pencil, tap the modal's side,

Off to Behavior settings — a hopping glide.
"None" now leads the list, neat and spry,
A tiny change, a shortcut — hop, goodbye! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete; it lacks required template sections such as Related Issues, Type of Change, and Testing details beyond a checkbox test plan. Fill out all required template sections: add Related Issues links, explicitly mark the Type of Change (likely 'New feature'), provide detailed Testing steps, and include Additional Notes if applicable.
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 (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: reordering branch prefix options to make 'none' the default, which aligns with the primary objective of the PR.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kitenite/edit-prefix-and-make-none-default

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 3, 2026

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) Failed to create
Fly.io Electric (Fly.io) Failed to deploy
Vercel API (Vercel) Failed to deploy
Vercel Web (Vercel) Failed to deploy
Vercel Marketing (Vercel) Failed to deploy
Vercel Admin (Vercel) Failed to deploy
Vercel Docs (Vercel) Failed to deploy

Preview updates automatically with new commits

@Kitenite Kitenite merged commit b7f3742 into main Feb 3, 2026
4 of 6 checks passed
@Kitenite Kitenite deleted the kitenite/edit-prefix-and-make-none-default branch February 3, 2026 00:21
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