Skip to content

fix(admin): name npm in the Browse tab's install steps, not a workspace filter - #270

Merged
jouwdan merged 1 commit into
mainfrom
claude/mei-106-install-steps-for-this-board
Aug 27, 2026
Merged

fix(admin): name npm in the Browse tab's install steps, not a workspace filter#270
jouwdan merged 1 commit into
mainfrom
claude/mei-106-install-steps-for-this-board

Conversation

@jouwdan

@jouwdan jouwdan commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Fixes MEI-106.

The problem

installSteps() generated pnpm add <package> --filter @meith/web for every Not installed listing. That command only works in a checkout of this repository. What actually reads that screen is a board, and a board — scaffolded by create-meith, or graduated out of the stock image by board:eject — is a single package.json whose forum-web needs a hoisted node_modules. There, the command fails three ways over: --filter @meith/web names a workspace that does not exist, pnpm's default isolated linker produces a tree the board cannot build from, and the project is npm-based to begin with (create-meith even ships an .npmrc with save-exact=true).

MEI-102 fixed the docs half of this, so main shipped the screen and docs/customization/marketplace.md giving the same audience contradictory instructions.

A correction to my own triage note on the ticket

I had claimed onStockImage() was "exactly the distinction this needs" and that the ticket's preferred option 1 was therefore available. That was too strong, and checking it before writing code is what caught it: onStockImage() separates the stock image from everything else, but "everything else" is both a graduated npm board and this repository's pnpm dev checkout — and those two want different commands. It is not the discriminator option 1 asks for, and no other reliable signal exists in the app.

It also turns out not to be needed. The panel's own copy is "To install this on your own board:", and both operator-facing cases resolve to npm install:

  • graduated / scaffolded board — it is the npm workspace;
  • stock image — it cannot install into itself at all (the screen already says so and links to graduation), so the steps describe the board you would graduate to, which is the same shape.

So this takes the ticket's option 2 — one unbranched npm install <package> — which is both simpler and correct for every board that sees the screen. The monorepo form stays where its reader really is in a checkout: docs/customization/plugins.md. I have updated the ticket to match.

Changes

File Change
apps/community/src/server/marketplace-admin.ts installSteps emits npm install <package> for both the plugin and theme branches.
apps/community/src/components/admin/marketplace-listing.tsx Step styling matched on the pnpm prefix, so the new command would have rendered as muted prose instead of a code chip. Now npm / community — the two prefixes actually emitted, with no dead branch left behind.
apps/community/src/server/marketplace-admin.test.ts Existing expectation updated; two tests added (see below).
docs/customization/marketplace.md Browse-tab paragraph matches the screen, plus why it names npm. Corrects the opening "Installing … is still pnpm add" to name both shapes.
docs/guides/operations/operating.md Found while checking the docs agree — the operator guide's Plugins section had the same monorepo-only command in a copy-pasteable block, for the same audience. Now npm install, with one line saying the first line reads pnpm add … --filter in a checkout of this repository.

Left deliberately alone: docs/customization/plugins.md:63 (its reader is in this checkout, per the ticket) and the generator's own Run \pnpm add … --filter` firsterror inscripts/board-plugins.mjs` (that code path only ever runs in-repo).

Tests

Two added, both failing before this change:

  • names npm, not a pnpm workspace filter — the board reading this screen is a single package (MEI-106) — sweeps every generated step for a plugin and a theme, asserting none contains --filter or starts with pnpm .
  • still names npm on the stock image, where the steps describe the board being graduated to — pins the behaviour for the BOARD_PLUGINS_MANIFEST case, so the reasoning above is a test rather than a comment.

Validation

  • pnpm verify passes on this branch (exit 0) — 466 test files, 8186 tests, lint, guards, all three typechecks.
  • marketplace-admin.test.ts: 22 passed.
  • pnpm i18n:check, pnpm comments:check, pnpm docs:links:check, pnpm site:docs:check all pass.
  • Formatted only the files touched, per AGENTS.md.

Not verified here: how the chip renders in a browser. The condition is a string-prefix match and the steps it now receives all start with npm or community .


Generated by Claude Code

…ce filter

The generated steps for a "Not installed" listing read `pnpm add <package>
--filter @meith/web`, which only works in a checkout of this repository.
What reads that screen is a board: a single package.json whose forum-web
needs a hoisted node_modules, where the filter names a workspace that does
not exist and pnpm's default linker produces a tree the board cannot build
from. On the stock image, which cannot install into itself at all, the
steps describe the board being graduated to — the same shape.

Since the docs half of this already landed, the screen and
docs/customization/marketplace.md were contradicting each other on the
same audience. operating.md's Plugins section carried the same
monorepo-only command in a copy-pasteable block; both now name npm and
say where the pnpm form still belongs.

The step-styling condition in marketplace-listing.tsx matched on the
`pnpm ` prefix, so the new command would have rendered as prose rather
than a code chip.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GVdrZfcwVhvJpZWUKWxYs9
@jouwdan
jouwdan merged commit 4cec2b2 into main Aug 27, 2026
15 checks passed
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.

2 participants