Conversation
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>
There was a problem hiding this comment.
💡 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 { |
There was a problem hiding this comment.
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>
Summary
Pinned projects float to the top of the Projects section in the sidebar with a
pin.fillicon and a subtle separator before unpinned projects.Changes
Project.isFavoritefield — no schema changeFiles Changed
WorktreeSidebarView.swift— sorted display, pin icon, context menu action, drag-and-drop cross-group logicen.lproj/Localizable.strings+zh-Hans.lproj/Localizable.stringsCHANGELOG.md+CHANGELOG.zh-Hans.md