Skip to content

feat(desktop): place newly added projects at the top of the sidebar - #6002

Closed
AviPeltz wants to merge 1 commit into
mainfrom
feat-prepend-new-projects
Closed

AviPeltz wants to merge 1 commit into
mainfrom
feat-prepend-new-projects

Conversation

@AviPeltz

@AviPeltz AviPeltz commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

New workspaces prepend to the top of their project's lane (getPrependTabOrder), but newly added projects appended to the bottom of the sidebar's project list (getNextTabOrder). One-line swap to the existing prepend helper so a just-added project lands at the top — it's the one you're about to work in, and it matches workspace placement semantics.

Applies to every path that first places a project in the sidebar (add repository, folder import, project setup finalize).

Note: best paired with #5999 — without it, the live query's stale incremental ordering can render a newly prepended project at the bottom until reload, which is exactly the confusion that surfaced this.

https://claude.ai/code/session_01SSUQYFamkYAjs5sDQC5RLS


Open in Stage

Summary by cubic

Newly added projects now appear at the top of the sidebar, matching how new workspaces prepend.
We now use getPrependTabOrder when inserting a project so the one you just added shows first across add repository, folder import, and project setup finalize.

Written for commit 6f46514. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Newly created projects now appear first in the dashboard sidebar, making them easier to access immediately.

New workspaces already prepend to the top of their project's lane; new
projects appended to the bottom of the project list. Use the existing
prepend helper so the project you just added — the one you're about to
work in — lands first, consistent with workspace placement.

Claude-Session: https://claude.ai/code/session_01SSUQYFamkYAjs5sDQC5RLS
@ghost

ghost commented Jul 27, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 1 individual chapter for you:

Title
1 Prepend new projects to sidebar
Open in Stage

Chapters generated by Stage for commit 6f46514 on Jul 27, 2026 10:00pm UTC.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cc542566-d366-4780-ac31-67f86200820c

📥 Commits

Reviewing files that changed from the base of the PR and between f95badd and 6f46514.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/hooks/useDashboardSidebarState/useDashboardSidebarState.ts

📝 Walkthrough

Walkthrough

Newly created sidebar projects now use a prepended tab order, placing the project just created first.

Changes

Sidebar project ordering

Layer / File(s) Summary
Prepend new project tab order
apps/desktop/src/renderer/routes/_authenticated/hooks/useDashboardSidebarState/useDashboardSidebarState.ts
New project records use getPrependTabOrder(...), with an inline comment documenting the ordering behavior.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: kitenite

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, but it misses the template's How I tested it section and checklist items. Add the required What & why, How I tested it, and Checklist sections, including verification steps and checklist status.
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 (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is conventional and accurately summarizes the main change: newly added projects are placed at the top of the sidebar.
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.
✨ 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 feat-prepend-new-projects

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.

@AviPeltz

Copy link
Copy Markdown
Collaborator Author

Folding into #5999 — the prepend behavior depends on that PR's ordering fix to render correctly, so they ship together.

@AviPeltz AviPeltz closed this Jul 27, 2026
@AviPeltz
AviPeltz deleted the feat-prepend-new-projects branch July 27, 2026 22:04
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

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