Skip to content

feat(plugin-page): a curated page and a featured image, instead of the whole README - #146

Merged
viztor merged 1 commit into
mainfrom
feat/plugin-page
Nov 2, 2026
Merged

viztor merged 1 commit into
mainfrom
feat/plugin-page

Conversation

@viztor

@viztor viztor commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Why you had such a big README: the plugin page renders ONE document inline — the Markdown that meta.detail in locale/<language>.json names, or, when nothing declares one, the whole README.md. This package declared nothing, so its page rendered 461 lines of engineering notes above the settings card.

Why there was no featured image: same reason. The image is whatever the detail document shows; a page that falls back to a text-only README has nothing to show but the icon.

What changes

locale/{en,zh}.json declare meta.detail, pointing at a 19-line page per language:

  • the featured image at the top;
  • one paragraph on what the patch does;
  • a four-row table of what the card actually gives you (gateway requests · sessions · quota · routing);
  • three links to where the rest lives (the README, the meter doc, the endpoint measurements).

The full README keeps its job — the reference — and stops being the front door.

The image

docs/media/hero.svg, drawn in the icon's own language: the pale family frame behind the vibrant OpenCode mark, the DeepSeek-blue → purple gradient, and the meter's ring as the motif — the meter is the surface this plugin is known by. It opens both the plugin page and the README.

OpenCode Patch — session affinity, gateway headers and live Go quota

Shipping and guarding it

package.json files names the two documents and the image — the detail-image route serves package-relative paths, so a package that ships one and not the other works here and not for a user.

test/plugin-detail.test.ts holds the contract, from the host's own rules:

asserted why
every locale declares a detail a language that declares nothing gets the whole README
the path is relative and inside the package anything else is invalid, which renders nothing rather than falling back
the file exists and npm ships it repo-present / tarball-missing is the failure users see
the document opens with an image that exists and is shipped the page's header is this document
under 40 lines it is rendered inline, above the card
it links the reference pages a short page has to hand off

Verified against the host's own resolver

en     origin=locale path=docs/detail.md         lines=19 image=2960B
zh-CN  origin=locale path=docs/detail.zh-CN.md   lines=19 image=2960B
zh     origin=locale path=docs/detail.zh-CN.md   lines=19 image=2960B
ja     origin=locale path=docs/detail.md         lines=19 image=2960B

origin=locale, not readme — the fallback is gone in every language.

gate result
suite 1233 passed / 83 files
vp check 0 errors
scripts/check.ts passes

The locale files and the detail documents are read per request, so the page picks this up without a host restart — only lib/ needs one.

…e whole README

The plugin page renders ONE document inline: the Markdown `meta.detail` in
`locale/<language>.json` names, or — when nothing declares one — the whole
`README.md`. This package declared nothing, so its page rendered 461 lines of
engineering notes above the settings card; the report was "why do I have such a
big readme here".

**`locale/{en,zh}.json` now declare `meta.detail`,** pointing at a 19-line page
in each language: the featured image, one paragraph, a four-row table of what the
card actually gives you, and three links to where the rest lives. The full
README keeps its job — the reference — and stops being the front door.

**The featured image is `docs/media/hero.svg`,** drawn in the icon's own
language (the pale family frame behind the vibrant OpenCode mark, the
DeepSeek-blue to purple gradient) with the meter's ring as the motif, because
the meter is the surface this plugin is known by. It opens both the detail page
and the README.

**Both files are shipped:** `package.json` `files` names the two documents and
the image, because the detail-image route serves package-relative paths and a
package that ships one but not the other works here and not for a user.

**`test/plugin-detail.test.ts` holds the contract**, from the host's own rules:
every locale declares a detail, the path is relative and inside the package, the
file exists AND npm ships it, the document opens with an image that exists and is
shipped, it stays under 40 lines, and it hands off to the reference pages.

Verified against the host's own resolver (`@deepseek-ai/dsh-plugin-detail`):
`en` and `ja` resolve `docs/detail.md`, `zh-CN` and `zh` resolve
`docs/detail.zh-CN.md`, both `origin=locale` rather than the README fallback,
and the image resolves and reads in every case.

The new document is also added to the language-pair gate, which needed two of its
own thresholds relaxed: a page with no commands is legitimate, and a floor tuned
to a 461-line README is not a floor a short page should have to meet.
@viztor
viztor merged commit 624cd9f into main Nov 2, 2026
3 checks passed
@viztor
viztor deleted the feat/plugin-page branch November 2, 2026 15:07
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