Skip to content

✨ feat: add pin project to sidebar top#74

Merged
vaayne merged 2 commits intomainfrom
feat/pin-project
Apr 16, 2026
Merged

✨ feat: add pin project to sidebar top#74
vaayne merged 2 commits intomainfrom
feat/pin-project

Conversation

@vaayne
Copy link
Copy Markdown
Owner

@vaayne vaayne commented Apr 16, 2026

Summary

Pinned projects float to the top of the Projects section in the sidebar with a pin.fill icon and a subtle separator before unpinned projects.

Changes

  • Pin/unpin via right-click context menu or ellipsis hover menu
  • Drag across groups auto-toggles pin state
  • ⌘1-9 indices follow pinned-first display order
  • Reuses existing Project.isFavorite field — no schema change
  • Localized strings for en and zh-Hans

Files Changed

  • WorktreeSidebarView.swift — sorted display, pin icon, context menu action, drag-and-drop cross-group logic
  • en.lproj/Localizable.strings + zh-Hans.lproj/Localizable.strings
  • CHANGELOG.md + CHANGELOG.zh-Hans.md

Pinned projects (isFavorite) float to the top of the Projects section
with a pin.fill icon and a separator before unpinned projects.

- Pin/unpin via right-click context menu or ellipsis hover menu
- Drag across groups auto-toggles pin state
- ⌘1-9 indices follow pinned-first display order
- Localized strings for en and zh-Hans

Assisted-by: amp:claude-sonnet-4-20250514
Amp-Thread-ID: https://ampcode.com/threads/T-019d9173-7f35-702e-b783-723ca32bed83
Co-authored-by: Amp <amp@ampcode.com>
Copy link
Copy Markdown

@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: b4602e8b75

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

var result: [String: Int] = [:]
var globalIndex = 1
for project in projects where !project.isCollapsed {
for project in sortedProjects where !project.isCollapsed {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Align quick-jump execution with pinned-first sidebar ordering

This change makes sidebar shortcut indices (⌘1-9) render in pinned-first order by iterating sortedProjects, but the command handler still resolves jumps using unsorted appState.projects in WorkspaceManager.selectWindowByGlobalIndex (see Sources/Mori/App/WorkspaceManager.swift:2126-2134). After a user pins a project, the sidebar hint and the actual window selected by ⌘1-9 can diverge, so the shortcut can open a different window than the one labeled in the UI.

Useful? React with 👍 / 👎.

selectWindowByGlobalIndex now sorts projects pinned-first before
building the window index list, matching the sidebar hint labels.

Assisted-by: amp:claude-sonnet-4-20250514
Amp-Thread-ID: https://ampcode.com/threads/T-019d9173-7f35-702e-b783-723ca32bed83
Co-authored-by: Amp <amp@ampcode.com>
@vaayne vaayne merged commit d330aa9 into main Apr 16, 2026
5 checks passed
@vaayne vaayne deleted the feat/pin-project branch April 16, 2026 02:36
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