Fix Neovim Terminal detail page rendering the Home Row Mods editor#903
Conversation
Code ReviewOverviewThis PR fixes a rendering bug where the Neovim Terminal detail page incorrectly showed the Home Row Mods interactive keyboard editor instead of the pack's 19-motion table. The PR description is excellent — clear root cause analysis, two independent fixes, each with good justification. Change 1:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad1ca8ea05
ℹ️ 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".
| // Control, Numpad) leave bindings empty so Pack Detail renders the | ||
| // collection's mappings via MappingTableContent — the collection's | ||
| // 19 motions are the single source of truth. | ||
| bindings: [], |
There was a problem hiding this comment.
Preserve Neovim key suggestions after emptying bindings
When this pack's bindings are emptied, Pack.affectedKeys becomes empty because it is derived only from bindings, and PackRegistry.packsTargeting(kanataKey:) only considers affectedKeys plus suggestedForKeys. Since this pack does not add any suggestedForKeys, selecting any Neovim motion key such as h, j, k, or / in the Mapper inspector will no longer surface the Neovim Terminal pack, even though it did before via the explicit bindings. Add representative suggestedForKeys when moving the mappings to the collection table.
Useful? React with 👍 / 👎.
Micah's visual check of the new Neovim Terminal detail page (#893) found it rendering the HRM interactive keyboard instead of the pack's motions. Two compounding causes: 1. PackDetailView.isHomeRowModsPack was a heuristic — "≥4 bindings on home-row keys" — which misfires on any Vim-flavored pack: Neovim's bindings include j, k, l, d. Replaced with an exact associatedCollectionID == homeRowMods check. No other pack matched the heuristic (all other home-row-adjacent packs have empty bindings), so this is behavior-preserving outside the bug. 2. The Neovim pack carried 19 explicit PackBindingTemplates (added in #891 to satisfy testPackBindingsMatchCollectionMappings). The idiomatic shape for table-style packs (Vim Navigation, Mission Control, Numpad) is the opposite: EMPTY bindings, so Pack Detail falls through to MappingTableContent and renders the collection's mappings — single source of truth, identical styling to Rules. Reverted bindings to [] with a comment. The invariant test skips empty-bindings packs by design, so it stays green. Net: the Neovim detail page now shows the activation hint + the 19-motion table, exactly like Vim Navigation's page. Verified: PackCollectionIntegration / PackOwnership / PackRegistry suites green; deployed via quick-deploy for visual confirmation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ad1ca8e to
fe85394
Compare
Code Review — Fix Neovim Terminal detail pageOverview: Small, focused bug fix with two cleanly scoped changes: swap a fragile binding-count heuristic for an exact ID check, and revert the Neovim Terminal pack to the idiomatic empty-bindings pattern shared with Vim Navigation, Mission Control, and Numpad. PackDetailView.swift —
|
| Correctness | ✅ Both root causes correctly addressed |
| Test coverage | testPackBindingsMatchCollectionMappings now skips Neovim Terminal — consider a collection-level assertion |
| Style/conventions | ✅ Follows table-style pattern; comment explains the idiom |
| Security/performance | ✅ No concerns |
The fix is ready to merge as-is; the test gap is low-risk but worth a follow-up ticket if not addressed here.
Second visual-review finding on the new detail page (#903 fixed the wrong-component issue): the sheet rendered at the 560pt default while MappingTableContent's five columns (Key / Description / Action / +Shift / +Ctrl) need the 760pt wide layout — content clipped on both edges, the icon and +Ctrl column cut off. preferredDetailWidth keeps a hardcoded wide-pack allowlist; every other table-style pack (Vim Navigation, Mission Control, Numpad, Symbol, Fun) is listed and neovim-terminal wasn't. Added it, plus a comment warning the next table-pack author — this is the same add-a-pack-forget-the-side-table class of bug as the orange-box issue, just in a different registry. The trailing_comma lint warning on the set literal is pre-existing style in this file. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
#908) Second visual-review finding on the new detail page (#903 fixed the wrong-component issue): the sheet rendered at the 560pt default while MappingTableContent's five columns (Key / Description / Action / +Shift / +Ctrl) need the 760pt wide layout — content clipped on both edges, the icon and +Ctrl column cut off. preferredDetailWidth keeps a hardcoded wide-pack allowlist; every other table-style pack (Vim Navigation, Mission Control, Numpad, Symbol, Fun) is listed and neovim-terminal wasn't. Added it, plus a comment warning the next table-pack author — this is the same add-a-pack-forget-the-side-table class of bug as the orange-box issue, just in a different registry. The trailing_comma lint warning on the set literal is pre-existing style in this file. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Dashboard: Friday morning state — all Thu work merged, today is notes + screenshots 6 of 10 gates closed. Thursday's two Neovim detail-page bugs (#903 wrong component, #908 sheet clipping) are on master. Verdict + schedule updated to Friday: gates 8 (notes) and 9 (screenshot pass) close today, ~1h total; gate 7 RC + gate 10 video on Sat. Countdown to 1 day. * Dashboard: fix system category count clobbered by countdown replace The Fri-AM countdown edit globally replaced <span class=num>2</span> and accidentally knocked the 'system' category bar from its (already wrong) 2 down to 1. Real count is 3 (macOS Function Keys, Leader Key, Fast Navigation); categories now sum to 22 again. Caught by codex + claude review on #910. * Dashboard: Saturday release-day state — #899 + #921 merged, cutting the RC 8 of 10 gates closed. Countdown to 0 (TODAY). Verdict → 'Shipping today': cmd-removal + screenshot cleanup merged after gating two runner flakes (#922). Gate 7 (RC) now in-progress; gate 9 closed (screenshots stripped/preserved via #921/#920); gate 8 finalizing with qualified import framing. Also fixes the system category count (3, not the review-flagged 1). * Dashboard: Saturday release-day — burndown, verdict, footer to current Burndown now plots actual through Sat (no leftover Thu projection): Sat is the current marker near the floor; ~3h of execution left (RC + smoke + publish), not feature work. Verdict reflects release-prep #923 merged (version → 1.0.0/build 4, appcast + squatting-tag cleanup) with the signed RC building. Footer timestamp Wed → Sat 2026-06-13; drops the overclaimed "auto-synced" wording (it's hand-maintained). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Dashboard: note overlay picker blocker found + fixed in RC QA (#924) RC QA surfaced the overlay output-type picker being unclickable; root-caused to WindowAnchoredPopover's identity-only Equatable discarding content updates, fixed and reworked into a drill-down with Launch App search (#924). Verdict now reflects re-cutting the RC from master with the fix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Micah's visual once-over of the new Neovim Terminal detail page (#893) caught it rendering the Home Row Mods interactive keyboard instead of the pack's motions. Two compounding causes, both fixed:
1.
isHomeRowModsPackwas a heuristic that misfires on Vim-flavored packsThe dispatch's first branch matched any pack with ≥4 bindings on home-row keys (PackDetailView.swift:475). Neovim's bindings include j, k, l, d — exactly 4. Replaced with an exact
associatedCollectionID == homeRowModscheck. Verified no other pack matched the heuristic (every other home-row-adjacent pack has empty bindings), so this is behavior-preserving outside the bug.2. The pack's explicit bindings were the wrong shape
#891 added 19 explicit
PackBindingTemplates to satisfytestPackBindingsMatchCollectionMappings— but the idiomatic shape for table-style packs (Vim Navigation, Mission Control, Numpad) is empty bindings, which routes Pack Detail toMappingTableContentrendering the collection's mappings directly: single source of truth, identical styling to the Rules tab. Reverted to[]. The invariant test skips empty-bindings packs by design, so it stays green.Result
The Neovim detail page now shows the activation hint + the full 19-motion table — same presentation as Vim Navigation's page.
Verification