Skip to content

fix (desktop): cmd+n no project selected#919

Merged
AviPeltz merged 2 commits into
mainfrom
fix-real-quick
Jan 23, 2026
Merged

fix (desktop): cmd+n no project selected#919
AviPeltz merged 2 commits into
mainfrom
fix-real-quick

Conversation

@AviPeltz
Copy link
Copy Markdown
Collaborator

@AviPeltz AviPeltz commented Jan 23, 2026

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • New Features
    • NEW_WORKSPACE hotkey now intelligently pre-selects the current project context when creating a new workspace, improving workflow efficiency.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

The dashboard layout now retrieves the current workspace from the matched route and uses its projectId to pre-select a project when opening the NEW_WORKSPACE hotkey modal. This enables contextual project selection based on the active workspace.

Changes

Cohort / File(s) Summary
Route-based workspace context
apps/desktop/src/renderer/routes/_authenticated/_dashboard/layout.tsx
Adds useMatchRoute and electronTrpc imports for route matching and workspace queries. Implements useMatchRoute to extract currentWorkspaceId from the route, fetches the corresponding workspace via electronTrpc.workspaces.get.useQuery (enabled conditionally), and passes currentWorkspace?.projectId to the NEW_WORKSPACE hotkey to enable project pre-selection. Updates dependency array to include currentWorkspace?.projectId.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Through routes we hop to find the space,
A workspace matched, a project placed,
The hotkey shines with context bright,
New workspaces spring up right! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is almost entirely empty, with only the bug fix checkbox marked but all required sections lacking substantive content: Description, Related Issues, Testing, Screenshots, and Additional Notes are unfilled. Provide a detailed description of the bug fix, link any related issues, document the testing performed, and explain the fix's impact and rationale.
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 clearly identifies the main change: fixing the cmd+n keyboard shortcut behavior when no project is selected in the desktop application.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@AviPeltz AviPeltz merged commit 012cbc7 into main Jan 23, 2026
5 checks passed
@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 Kitenite deleted the fix-real-quick branch January 25, 2026 07:41
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