Repository navigation
What's Changed
0.97.0 finishes the medium-severity half of the coco ui and CLI design review that 0.96.0 started. Keys mean the same thing on every view, usage errors are one line with exit 2, and a few flags that failed or silently did nothing now work. Three key bindings moved, listed under "Keys that mean one thing".
Highlights
Keys that mean one thing
ris refresh on every view. Rebase-onto on the branches view moved toO, and reword in the rebase plan moved tow. Before,ropened a rebase confirm on branches and a reword prompt in the rebase plan.- Enter on a branch opens the compare diff against the current branch, like Enter on a commit opens its diff. On the current branch it says there is nothing to compare. Checkout moved to
c. Ddeletes the cursored item on branches, tags, stash and remotes.T,Xandxstill work. On an empty tags, stash or remotes listDdoes nothing. It used to fall through to delete-branch and aim at a branch the user wasn't looking at./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".- Leaving a filtered list clears the filter text, so it can't narrow the view underneath.
- Fifteen keybinding help rows lost their issue refs and design rationale and now fit in one line of 100 characters or fewer. Before, each ran up to 277 characters and truncated at 80 columns. A test rejects issue refs and long descriptions.
One-line usage errors and readable help
- A usage error prints one line and a pointer to
coco <cmd> --help, and exits 2. It used to print the full help screen and exit 1. -his an alias for--help. Command help shows the description, the command's own options, then a separate "Global options" group. Top-level help gains examples and a docs link.--colorand--no-colorare accepted.NO_COLOR,FORCE_COLOR=0andTERM=dumbturn color off in the plain CLI, which chalk 4 ignored.- The missing-key and authentication-failure messages name the provider's real environment variable and the user-level config sources that accept a key.
.coco.config.jsonis not one of them, because it ignores credentials. They also cover local providers and Bedrock, and link the auth docs. coco lintexits 2 when commits fail the--severitygate, matchingcoco review. Exit 1 stays for a failure of lint itself.
Flags that do what they say
coco commit --no-verifyand--no-diffwork. yargs read them as negations of flags that don't exist and failed with "Unknown argument: verify", so only--noVerifyworked.coco log --no-mergeshides merge commits. It used to set the unrelatedmergesflag to false, which was already the default, and the graph kept its merges.- A non-numeric value for a number flag is a usage error with exit 2.
log -n abc,review --severity highandwatch --interval soonfell back to the default with no message. - A test fails when a command adds a
noXoption that isn't covered by the rewrite, so the next one can't regress.
Confirms and edits that stay safe
yis ignored for 300 ms on confirms coco raises after an async action: the force-push offer after a rejected push, force-delete, and switch to a new branch. A keystroke typed before the prompt appeared can no longer accept it.rin the changelog view asks before it regenerates, like the other AI workflows.- Interactive
coco changelogandcoco recapprint the text you approved or edited. Before, only the success message printed and the edit was lost. The editor prompt names the command, for example "Edit the changelog". - The reflog checkout confirm pins the target hash, so a refresh that prepends entries can't point
yat another commit.
Frame and list stability
- The PR view budgets rows from its fixed lines first. With five or more checks at 80x24 the checks used to take half the panel and push the footer off screen. Check names pad by display width instead of
padEnd. - Issue and PR triage rows stay on screen while
rrefetches them, instead of clearing to "Loading". - Writes to stderr (
Logger.error,console.error) show on the status line whilecoco uiowns the terminal, instead of drawing over the frame. A redirected stderr is left alone. - The status line shows the first line of a message, cut to the terminal width, with a "+N more lines" count. A new "Copy last error" palette command copies the full text of the most recent error.
- ↑/↓, PgUp/PgDn and Home/End do nothing on an empty list view and on views that hide the history list (PR panel, bisect, changelog). They used to move the hidden history cursor and change the inspector.
Internals
src/lib/ui/negatedFlags.tsholdsNEGATED_FLAG_KEYSandnormalizeNegatedFlags, which runs onprocess.argvbefore yargs and stops at--.UsageErrorandrejectNaN(flag)insrc/lib/ui/usageFailure.tsturn a failed number coercion into a usage error. The.failhandler also treats yargs'YErroras one.isFilterableViewandFILTERABLE_VIEWSininkViewModel.tsdecide where/works.- Jest transpiles tests instead of type-checking them in every suite, which halves a cold run (about 93s to 48s). A new
npm run typecheckruns tsc over the source and the tests, and CI runs it. - Test fixtures that built git repos by hand now use
@gfargo/git-scenarios1.7, across the lib, command, agent and git view suites. Its hermetic git config runs once in jestglobalSetup, so tests no longer read the developer's global git config. The slowest suites run about twice as fast (context.test.ts36.9s to 18.3s,repoContext.test.ts34.0s to 17.1s). - A release builds once, after the version bump, and
verifyReleaserefuses to publish adist/built for a different version. The duplicate lint pass and the rebuilds in the pack checks are gone. - Routine dependency and toolchain bumps.