Skip to content

docs(extensions): add example gallery - #688

Open
benvinegar wants to merge 1 commit into
mainfrom
docs/extension-example-gallery
Open

docs(extensions): add example gallery#688
benvinegar wants to merge 1 commit into
mainfrom
docs/extension-example-gallery

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Summary

  • add a dedicated examples/extensions/README.md gallery covering all four opt-in extension packages and their runnable scenarios
  • distinguish installable examples from the bundled sidebar and VCS backends that serve as production reference implementations
  • replace the stale “two examples” references in the root README and extension authoring guide
  • cross-link the gallery from the website's extension overview, custom-sidebar guide, and file-preview guide

Why

The examples were already mostly centralized under examples/extensions/, but their indexes disagreed: the examples README listed four packages while the root README and authoring guide exposed only two, and the website split the others across topic pages. This gives extension authors one canonical inventory without moving or duplicating the implementations.

Validation

  • bun run format:check
  • focused extension-doc, generated-doc, and website-link tests — 16 passing
  • bun run website:check
  • bun run website:build
  • bun run website:links
  • bun run check:pack — 25 extension guide examples typecheck for NodeNext and bundler consumers

This PR description was generated by Pi using OpenAI GPT-5.6-sol

@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hunk-web Ready Ready Preview Aug 8, 2026 3:07pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This documentation-only PR adds a canonical gallery for four opt-in extension examples and cross-links it from the main authoring and website guides.

  • Distinguishes installable examples from bundled sidebar and VCS reference implementations.
  • Replaces stale two-example inventories with the complete four-example list.
  • Adds focused links from sidebar and file-preview documentation.
  • Two gallery details need correction: the website origin and the promise that every linked README currently has a runnable exact command.

Confidence Score: 4/5

The PR appears safe to merge after addressing two non-blocking documentation accuracy issues in the new gallery.

The extension inventories and repository paths are otherwise consistent, but the gallery uses a noncanonical website domain and promises an exact runnable command that one linked example does not currently provide.

Files Needing Attention: examples/extensions/README.md

Important Files Changed

Filename Overview
examples/extensions/README.md Adds the canonical extension gallery and reference links; contains a noncanonical website origin and overstates the readiness of one example command.
docs/extensions.md Replaces the stale two-example section with an accurate four-example inventory and gallery link.
website/src/content/docs/docs/extend/extensions.md Adds a complete gallery section with valid repository links and clarifies the existing single-file example.
README.md Replaces the partial extension-example list with a concise link to the new gallery.
website/src/content/docs/docs/extend/custom-sidebars.md Adds a valid direct link to the review-triage sidebar example.
website/src/content/docs/docs/extend/file-previews.md Adds valid links to the gallery and its three file-view examples.
Prompt To Fix All With AI
### Issue 1
examples/extensions/README.md:25
**Use the canonical website origin**

These three links use `hunkdiff.dev`, while the website configuration and deployment documentation consistently use `hunk.dev`; readers are therefore sent through an origin that is not maintained as part of the documented website deployment.

```suggestion
Start with the [extension authoring guide](../../docs/extensions.md), then use the focused website guides for [custom sidebars](https://hunk.dev/docs/extend/custom-sidebars/), [file previews](https://hunk.dev/docs/extend/file-previews/), and [VCS adapters](https://hunk.dev/docs/extend/vcs-adapters/).
```

### Issue 2
examples/extensions/README.md:12
**Exact-command promise is inaccurate**

The gallery promises an exact command in every linked README, but the rendered-Markdown command references `before.md` and `after.md`, which are absent from the checkout. Following that example therefore does not provide the advertised runnable scenario; point it at included fixtures or identify the arguments as user-supplied files.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "docs(extensions): add example gallery" | Re-trigger Greptile


## Learn the API

Start with the [extension authoring guide](../../docs/extensions.md), then use the focused website guides for [custom sidebars](https://hunkdiff.dev/docs/extend/custom-sidebars/), [file previews](https://hunkdiff.dev/docs/extend/file-previews/), and [VCS adapters](https://hunkdiff.dev/docs/extend/vcs-adapters/).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Use the canonical website origin

These three links use hunkdiff.dev, while the website configuration and deployment documentation consistently use hunk.dev; readers are therefore sent through an origin that is not maintained as part of the documented website deployment.

Suggested change
Start with the [extension authoring guide](../../docs/extensions.md), then use the focused website guides for [custom sidebars](https://hunkdiff.dev/docs/extend/custom-sidebars/), [file previews](https://hunkdiff.dev/docs/extend/file-previews/), and [VCS adapters](https://hunkdiff.dev/docs/extend/vcs-adapters/).
Start with the [extension authoring guide](../../docs/extensions.md), then use the focused website guides for [custom sidebars](https://hunk.dev/docs/extend/custom-sidebars/), [file previews](https://hunk.dev/docs/extend/file-previews/), and [VCS adapters](https://hunk.dev/docs/extend/vcs-adapters/).
Prompt To Fix With AI
This is a comment left during a code review.
Path: examples/extensions/README.md
Line: 25

Comment:
**Use the canonical website origin**

These three links use `hunkdiff.dev`, while the website configuration and deployment documentation consistently use `hunk.dev`; readers are therefore sent through an origin that is not maintained as part of the documented website deployment.

```suggestion
Start with the [extension authoring guide](../../docs/extensions.md), then use the focused website guides for [custom sidebars](https://hunk.dev/docs/extend/custom-sidebars/), [file previews](https://hunk.dev/docs/extend/file-previews/), and [VCS adapters](https://hunk.dev/docs/extend/vcs-adapters/).
```

---

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!

| [`jsx-file-view/`](jsx-file-view/) | The smallest fixed-height React/OpenTUI file-view proof of concept, including hooks, semantic theme props, and row fallback | Custom JSX rows |
| [`jsx-file-view-gallery/`](jsx-file-view-gallery/) | TypeScript change-atlas cards, CSS color swatches, dependency-version deltas, and a mixed raw/custom five-file review | Realistic file-view layouts and fallback behavior |

Each folder has its own README with an exact command and notes on the API contract it exercises. Run an example directly from this checkout with `--extension` while developing. To install one, copy its complete folder into `~/.config/hunk/extensions/` and install any dependency its `package.json` declares.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Exact-command promise is inaccurate

The gallery promises an exact command in every linked README, but the rendered-Markdown command references before.md and after.md, which are absent from the checkout. Following that example therefore does not provide the advertised runnable scenario; point it at included fixtures or identify the arguments as user-supplied files.

Knowledge Base Used: Extension System: API, Loading, and Host Integration

Prompt To Fix With AI
This is a comment left during a code review.
Path: examples/extensions/README.md
Line: 12

Comment:
**Exact-command promise is inaccurate**

The gallery promises an exact command in every linked README, but the rendered-Markdown command references `before.md` and `after.md`, which are absent from the checkout. Following that example therefore does not provide the advertised runnable scenario; point it at included fixtures or identify the arguments as user-supplied files.

**Knowledge Base Used:** [Extension System: API, Loading, and Host Integration](https://app.greptile.com/modem/-/custom-context/knowledge-base/modem-dev/hunk/-/docs/extension-system.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant