Fix command-hold shortcut hints and prevent sidebar truncation - #2767
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR simplifies shortcut hint visibility logic by removing the dependency on keyboard shortcut chord detection. The Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@vendor/bonsplit`:
- Line 1: The parent repo's gitlink for submodule vendor/bonsplit points at an
unreachable commit (7cd3b5e038e28264c6efc9492d17126e29c8765d); resolve by either
pushing that missing commit to the vendor/bonsplit remote main branch so the
pointer is reachable, or update the parent repo's submodule pointer to a
reachable commit (for example the submodule's current origin/main HEAD 9155d09)
by updating the submodule (git submodule update --init; cd vendor/bonsplit; git
fetch && git checkout <reachable-commit-or-main>), committing the changed
gitlink in the parent repo, and pushing the parent branch.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a5efef71-e770-47dc-8f8b-a81258f49922
📒 Files selected for processing (3)
Sources/ContentView.swiftcmuxTests/ShortcutAndCommandPaletteTests.swiftvendor/bonsplit
Greptile SummaryThis PR makes two independent fixes: it removes a chord-guard in Confidence Score: 5/5Safe to merge — targeted, well-tested fixes with no regressions identified. Both changes are narrowly scoped: removing a two-line chord guard and stripping unused parameters from a layout helper. The existing Equatable conformance, showsWorkspaceShortcutHint rendering, and settings snapshot are all still intact. The new regression test follows the established pattern (isolated UserDefaults suite + defer restore) and directly validates the fixed behavior. No P0/P1 issues found. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User holds Command key] --> B[ShortcutHintModifierPolicy.shouldShowHints]
B --> C{normalized == command only?}
C -- No --> D[return false — no hints]
C -- Yes --> E{showHintsOnCommandHold enabled?}
E -- No --> D
E -- Yes --> F[return true — show hints]
F --> G[TabItemView renders hints]
G --> H{showsWorkspaceShortcutHint?}
H -- Yes --> I[Render hint pill in ZStack\noverflows layout — no title truncation]
H -- No --> J{showCloseButton?}
J -- Yes --> K[Render close button\nwidth = 16px]
J -- No --> L[trailingAccessoryWidth = 0]
style D fill:#f66,color:#fff
style F fill:#6a6,color:#fff
style I fill:#69f,color:#fff
Reviews (1): Last reviewed commit: "Fix command-hold shortcut hints and keep..." | Re-trigger Greptile |
…ows-all-hints Fix command-hold shortcut hints and prevent sidebar truncation
Summary
Linked submodule PR
Summary by cubic
Fixes Command-hold shortcut hints so they always show, even when workspace-by-number uses a chorded remap. Also prevents sidebar title truncation by removing extra hint-pill width, while keeping Control-hold scoped to control-only hints.
Bug Fixes
Dependencies
vendor/bonsplitto include the new hint-reveal policy and tests.Written for commit f8dfdef. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Tests
Chores