Title: Name the key on the row that needs it, and stop hardcoding keys by navbytes · Pull Request #16 · navbytes/opencode-plugins · GitHub
Open Graph Title: Name the key on the row that needs it, and stop hardcoding keys by navbytes · Pull Request #16 · navbytes/opencode-plugins
X Title: Name the key on the row that needs it, and stop hardcoding keys by navbytes · Pull Request #16 · navbytes/opencode-plugins
Description: The keymap is vim's, which is transparent if you already know vim and opaque otherwise: nothing on screen said that the ▸ on a folded turn opens with za. The row tells you the key The selected row, and only the selected row, carries a right-aligned hint for the one action it affords: │ ● T5 add a retry to the flaky test ▸ 6 steps · ~12k · 1 ✗ ~13k › ● T6 now make it pass on CI za fold ~2k za open / za fold on a turn · → expand / ⏎ switch on a branch · space crop on a fat tool result · u restore on a cropped one. It is cursor chrome, not content, so it is passed into rowLine as an argument that the live-search path does not pass — / can never match it. It gives way to the row's own text rather than clipping it on a narrow terminal, and crop mode and the ? pane suppress it (both already own a key legend of their own). l / → opens a folded turn vim's foldopen default includes hor: a horizontal move opens the fold under the cursor. Only opening — nothing in vim closes a fold by moving, so h / ← keep their branch meaning and za / zc stay the way to close one. On a turn row this key did nothing at all before (at depth 0 there is no branch to expand, and deeper the branch is already shown), which is what left it free to mean this. Nothing names a key with a string literal any more A hint is worthless if the key it names is not the key that is bound, so every key on screen now comes from keyLabel(command, keybinds): the ? pane, all five footers, goVerb, the inspector's Crop and branch lines, the zr / zm notices, the discard gate. UNDO_KEY is gone. test/help.test.ts runs its whole suite twice — once on the defaults, once with every verb it documents rebound and branch unbound — which is exactly what a pane assembled from literals cannot survive. Three bugs it caught on the way in: the decisions footer still advertised E export after export moved to ge in beta.1; keyLabel wrote a modifier with no separator, so a rebind to ctrl+u displayed as ctrlu; an unbound command left a headless branch — try something risky… instead of dropping its clause. The footers fit the terminal The tree footer was the one line on screen with no width budget — the header and the status line both had one — and it overflowed at about 97 columns, more with a long branch name. core/help.ts#footerLine drops verbs from the right until the line fits, keeping ? help last since it is the route to everything it dropped. Drift guards test/help.test.ts — the doubled suite above, plus unit tests for keyLabel, rowHint, and footerLine at every width from 40 to 200. test/docs-links.test.ts — the guide's keybinds command list is now held against DEFAULT_KEYS. The list is a hand copy, and a name missing from it is a rebind nobody can discover, since an unknown command name is silently ignored. test/e2e/tui.test.ts — the fold test is rewritten for the world beta.2 actually ships. The default posture opens one turn, not three, so its old assertions were stale; it now walks the real tree (gg, za, zm, l, zr) and checks the hint appears on the cursor's row and only there. I mutation-checked the two guards that matter: restoring a literal c crop and restoring a headless clause each fail the rebind pass. Verification bun run typecheck, bun test (451 pass, 0 fail), bun run build — clean. The fold e2e passed against the real TUI (CTREE_E2E=1, OpenCode 1.18.26 in a pty), including the hint and l-opens-a-fold. The full e2e suite was still running at the time of writing; I will report it on this PR if anything comes back red. What to look at by hand /tree, move up to a folded turn — the row should read za open on the right, and the hint should move with the cursor. l on it opens it; h should not re-fold it. Narrow to ~90 columns: the footer sheds gs consumers, then u undo, and never wraps. "keybinds": { "fold_toggle": "f2", "crop": "none" } — the hint says f2 open, the pane says f2 fold this turn, and crop disappears from both the pane and the footer rather than showing a keyless crop —. 🤖 Generated with Claude Code https://claude.ai/code/session_01VkCWU9Ab6wYHmTke8vuVMv Generated by Claude Code
Open Graph Description: The keymap is vim's, which is transparent if you already know vim and opaque otherwise: nothing on screen said that the ▸ on a folded turn opens with za. The row tells you the key The selected ...
X Description: The keymap is vim's, which is transparent if you already know vim and opaque otherwise: nothing on screen said that the ▸ on a folded turn opens with za. The row tells you the key The selec...
Opengraph URL: https://github.com/navbytes/opencode-plugins/pull/16
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f062e084-5094-f195-2ef5-c702d5b682e4 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D024:EA09B:29F508B:37A4E1F:6B01B9AC |
| html-safe-nonce | b75c9dc53b148758a60eb7a6efcc82762b8d1ee5a226701b4e0f3c9d1a21ce70 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDI0OkVBMDlCOjI5RjUwOEI6MzdBNEUxRjo2QjAxQjlBQyIsInZpc2l0b3JfaWQiOiI0MjA4NTU2OTc1MzIxMTAyNzY1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b21bf8cb816453e0e8d7a28ee6c9a033742331579b84c72908c0ded678220a6b |
| hovercard-subject-tag | pull_request:4484587564 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/navbytes/opencode-plugins/pull/16/files |
| twitter:image | https://avatars.githubusercontent.com/u/25281802?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/25281802?s=400&v=4 |
| og:image:alt | The keymap is vim's, which is transparent if you already know vim and opaque otherwise: nothing on screen said that the ▸ on a folded turn opens with za. The row tells you the key The selected ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/navbytes/opencode-plugins git https://github.com/navbytes/opencode-plugins.git |
| octolytics-dimension-user_id | 25281802 |
| octolytics-dimension-user_login | navbytes |
| octolytics-dimension-repository_id | 1354341697 |
| octolytics-dimension-repository_nwo | navbytes/opencode-plugins |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1354341697 |
| octolytics-dimension-repository_network_root_nwo | navbytes/opencode-plugins |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width