Repository navigation
docs: correct stale facts and fill gaps across hunk.dev docs - #1186
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| and bus handlers; version 5 added line highlighters and line-granular navigation | ||
| (`revealLine`); version 4 added keyboard modes and docked panes, with API-v3 | ||
| sidebar names remaining as deprecated aliases. | ||
| The API generation this Hunk speaks (currently `31`). Branch on it if you want one file to support several Hunk versions, or declare `"hunk": {"apiVersion": N}` in a folder extension's `package.json` so an older Hunk refuses to install it. |
There was a problem hiding this comment.
Version check happens when loading
The new apiVersion guidance says older Hunk versions refuse to install the extension, but the check runs when Hunk loads it. Installation can succeed while the extension remains unavailable. Change “refuses to install it” to “refuses to load it” so authors know when the requirement takes effect.
| The API generation this Hunk speaks (currently `31`). Branch on it if you want one file to support several Hunk versions, or declare `"hunk": {"apiVersion": N}` in a folder extension's `package.json` so an older Hunk refuses to install it. | |
| The API generation this Hunk speaks (currently `31`). Branch on it if you want one file to support several Hunk versions, or declare `"hunk": {"apiVersion": N}` in a folder extension's `package.json` so an older Hunk refuses to load it. |
Prompt To Fix With AI
This is a comment left during a code review.
Path: website/src/content/docs/docs/extend/extension-api.md
Line: 10
Comment:
**Version check happens when loading**
The new `apiVersion` guidance says older Hunk versions refuse to install the extension, but the check runs when Hunk loads it. Installation can succeed while the extension remains unavailable. Change “refuses to install it” to “refuses to load it” so authors know when the requirement takes effect.
```suggestion
The API generation this Hunk speaks (currently `31`). Branch on it if you want one file to support several Hunk versions, or declare `"hunk": {"apiVersion": N}` in a folder extension's `package.json` so an older Hunk refuses to load it.
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Good catch — the check lives in host.ts (describeApiVersionRefusal) and runs at load time; install doesn't check the version. Changed this line to "refuses to load it with a clear message", and fixed the same claim in extensions.md's publishing steps (46c6b0c).
Responded by Claude Code using claude-opus-5-5.
An audit of every docs page against the source found wrong or stale facts, a broken first-run agent flow, and shipped commands missing from the reference. - Agent notes start hidden; say so on the agent pages, quick start, README, and in the bundled hunk-review skill, which now tells agents to --focus their first note. - Rewrite skill setup around `npx skills add` and `hunk skill show`. - Add `hunk log` (drop the leftover publicDocs: false) and `hunk gh` to the generated CLI reference; gh help and the reference now share structured metadata, and a test requires every top-level command in `hunk --help` to appear in the reference. - Document the sidecar JSON schema, note kinds, replies, comment list types, daemon security and env vars, and the post-upgrade fix. - Correct the extension API version, trust state path, Windows paths, platform matrix, HUNK_INSTALL_DIR contents, pager/difftool undo, Windows text pager, jj diff semantics, vcs placement, pager config tables, watch placement, and the VCS adapter detect sample. - Move the Vercel deployment runbook out of the user docs into docs/website-deployment.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
327fb9f to
46c6b0c
Compare
|
Rebased onto
|
Problem
An audit of all 29 hunk.dev docs pages against the source turned up three kinds of problem:
showAgentNotes: false). Neither the "Review with an agent" page nor the bundledhunk-reviewskill says so. A user who follows the walkthrough, or an agent that adds a note without--focus, ends up with notes the user never sees.hunk logshipped in 0.22 but is still hidden by a leftoverpublicDocs: false. The generator never walks the bundledhunk ghextension command.diff.toolhunk diff <revset>semanticsdetectsample, which fails from subdirectoriesChanges
Code and generated output
packages/hunk/src/app/cli.ts:hunk logis now public.[target]everywhere; the metadata said[revision-expression]and Commander said[revision].packages/hunk-gh/src/help.ts:hunk ghhelp is now structuredGITHUB_CLI_REFERENCEmetadata.hunk gh --help,registerCliCommand, and the docs generator all read it.scripts/generate/generate-docs.tsrenders ahunk ghsection with:pr/commit/compare--repooptiongenerate-docs.test.tsparses the realhunk --helpand fails if any listed command lacks a section incli.md.hunk gh --helpnow lists its options andGH_TOKEN/GITHUB_TOKEN.gh commit --helpandgh compare --helpgain the token line.packages/hunk/src/hunk-review/skillDocument.ts: the skill tells agents that notes start hidden, to--focustheir first note, and what eachcomment list --typevalue means. Skill output regenerated.[pager]example now showsmode = "unified"instead ofmenu_bar = false, which is already the pager default. It also says that[pager]applies to--pagerand thathunk pagermatches[patch]. The configuration guide changes the same way, and the test that runs the guide's TOML examples is updated to match.Docs pages
npx skills add modem-dev/hunk -g --skill hunk-review, withhunk skill showas the fallback.a,--agent-notes,--focus).--typevalues↑/↓(they move the current line), thecanchor, and the/rebind consequence. Added selection, copy, and note keys plus the OSC 52 copy note.more.showdefaults, and the two-revisiondiffform.vcsplacement.watch = true. A top-levelwatch = truealso applies tohunk pagerandhunk patch -, which then fail.[pager]→[patch]relationship, the0/1/2layout key mapping, and corrected transparency wording.detectsample that walks up the tree and typechecks.hunk.log()output is not displayed yet.HUNK_INSTALL_DIRholds, and the README's agent setup and config path.packages/hunk/README.mdis kept identical to the root README.help/deployment.md(the Vercel runbook andhunk-webcutover) is out of the user sidebar and now lives atdocs/website-deployment.md. Its contradictions are fixed and it now lists/install.sh,/changelog/, and/compare/.Non-goals and follow-ups
This pass only corrects facts and fixes the broken agent flow. It is the first slice of the audit; follow-ups:
hunk gh,hunk log,hunk status,hunk open, uninstall and shell completions.watch = truebreakshunk pager. Documented here, behavior unchanged.hunk.log()output is never displayed.hunk extension listdoesn't print npm extension ids.Validation
bun run check:docs,bun run typecheck,bun run lint,bun run deps:check: pass.bun run format:check: passes on the committed files.bun run website:check,bun run website:build,bun run website:links: pass (64 pages). Every new in-page anchor resolves in the built output.bun test scripts/generate packages/hunk-gh packages/hunk/src/app/cli.test.ts packages/hunk/src/hunk-review: 366 pass, 0 fail.detectsample typechecks against the realhunkdiff/extensiontypes.resolveConfiguredCliInput: a top-levelwatch = truereaches pager input, and a config-layermenu_baroverrides the pager's default.bun run testhas 73 failures:scripts/generate/config-examples.test.ts, which still expected the old pager example. Fixed in this PR.main: every other failure also fails on a cleanmaincheckout (ae34231) when the same files run on their own, file for file with identical counts. The files:filesystemSource*.test.ts,controller.filesystem.test.ts,core/watch/observer.fs.test.tsextensions/{hostRuntimeModules,installedPackageResolution,startup}.test.tsAppHost.{extension-dialogs,extension-navigation,extension-sidebar,reload,workspace}.test.tsxtest/cli/log.test.tslog.test.tsfailures come from a locally installed user extension (~/.config/hunk/extensions/installed/hunk-diff-context) whose load warning ends up on stderr.observer.fs.test.tsis flaky: 8–9 failures on both branches.🤖 Generated with Claude Code