
December 03, 20268 min read
Six PRs merged on December 4 made coco stop reusing keys, and stop printing a help screen for a typo.
The 0.96 post ended with a promise. The design review had more findings than the nine high-severity ones, and the key changes needed a decision about which binding wins. 0.97.0 is those decisions, plus the medium-severity CLI findings, shipped as six user-facing PRs (#2379 to #2384) that all merged on December 4, plus test and release internals covered in a companion post. 78 source files changed, and 9,161 tests pass at the v0.97.0 tag.
If you’re new here, coco is the AI-powered git CLI I maintain. It writes commit messages, changelogs and reviews, and it ships coco ui, a full-screen terminal workstation for history, status, branches, conflicts, PRs and more.
Last time the bugs sat at the seam between coco and the terminal. This time they sit at the seam between coco and its own vocabulary. A key should mean the same thing on every view, and a flag should do what its name says. When they don’t, you find out by pressing something.
On most views r refreshes. On the branches view it opened a rebase-onto confirm, and in the rebase plan it opened a reword prompt. Same letter, and you’d press it for a refresh without looking. Rebase-onto is O now and reword is w. r refreshes everywhere.
Delete had the same problem in a different shape. Branches used D, tags used T, remotes used x and the stash used X. Now D deletes the cursored item on branches, tags, stash and remotes, and the old keys still work. A test written for the new key caught one bad edge. On an empty tags list, D fell through to the delete-branch binding and aimed at a branch you weren’t looking at. On an empty tags, stash or remotes list it now does nothing.
This is the one change in the release that can surprise you, so it gets its own heading. On a commit, Enter opens its diff. On a branch, Enter used to check it out. Now Enter on a branch opens the compare diff against the current branch, and says so when the branch is the current one. Checkout moved to c. The reasoning is in the PR: Enter should read the same on every list, and opening a detail is safer than switching your working tree.
Old tests encoded the previous keys as expected behavior, so several had to change with the bindings. Passing tests had been vouching for the inconsistency.
/ now opens the filter only on list views. On status, diff, conflicts, blame, file-history, compose, bisect, pull-request, changelog and rebase it says “no filter on the <view> view” instead of opening a prompt that filters nothing. Leaving a filtered list also clears the text, so it can’t narrow the view you land on.
The key help got the same pass. Fifteen descriptions carried issue refs like #882 and design rationale such as “Capital B disambiguates from gb”, and some ran to 277 characters, so every row truncated at 80 columns. Each is now one sentence of 100 characters or fewer, the rationale moved into comments on the bindings, and a test rejects issue refs and long descriptions.
A usage error used to print the full help screen and exit 1. It now prints one line, a pointer to coco <cmd> --help, and exits 2. -h works as an alias for --help, and command help shows the command’s own options before a separate “Global options” group. Top-level help gains examples and a docs link.
Two smaller CLI fixes go with it. NO_COLOR, FORCE_COLOR=0 and TERM=dumb turn color off in the plain CLI, which chalk 4 ignores on its own, and --color and --no-color are accepted. And coco lint exits 2 when commits fail the --severity gate, matching coco review. Exit 1 stays for lint itself failing.
The missing-key message got a rewrite too. It names the provider’s real environment variable and the user-level config sources that accept a key. It stops pointing at .coco.config.json, which ignores credentials, so the old advice could never have worked.
coco’s option is spelled noVerify. yargs reads --no-verify as the negation of a flag called verify, which doesn’t exist, so coco commit --no-verify failed with “Unknown argument: verify”. --no-diff failed the same way. coco log --no-merges was worse. It set the unrelated merges flag to false, which was already the default, and the graph kept its merges without a word.
A small rewrite step now maps the three git-style spellings onto their canonical flags before yargs parses anything. It stops at --, and negation of other flags like --no-color is untouched. A test fails if a command adds another noX option that isn’t in the list.
The sibling bug was numbers. coco log -n abc, coco review --severity high and coco watch --interval soon all passed NaN to the command, which quietly fell back to its default. Each is now a usage error with exit 2.
y for 300 ms. A key typed before the prompt appeared can’t accept it.coco changelog and coco recap print the text you approved or edited. Before, only the success message printed and the edit was lost.coco ui owns the terminal. Long messages show their first line with a “+N more lines” count, and a new “Copy last error” palette command copies the whole text.Three of these changes can break something you already do. Enter on a branch no longer checks it out. r no longer rebases on the branches view, and r no longer rewords in the rebase plan. And a script that tests for exit code 1 after a usage error will now see 2.
Several findings from the review are still open. Status messages from logger.log still go to stdout, so a piped run mixes progress lines with results. Enter does nothing on tags, worktrees, remotes and issues. The check list in the PR view fits the screen now but still doesn’t scroll. The “Thanks for using coco” sign-off still prints after a failed command. And only three flags got git-style negation, so the other camelCase flags still lack kebab-case spellings.
0.96 was about what the terminal sends. 0.97 is about what coco tells you a key will do. The fixes look small, one letter moved here, one message reworded there, but they share a cause. Each view was correct on its own and its tests passed, and nobody had looked at the keys across all of them at once.
brew install gfargo/tap/coco
# or
npm install -g git-coco
Enter now opens a detail on commits and branches, and does nothing on tags, worktrees, remotes and issues. If you could have a detail view on only one of those next, which would you pick, and what would you want it to show?
Discussion
Comments are powered by Disqus. Sign in once, comment anywhere.
