fix(admin): name npm in the Browse tab's install steps, not a workspace filter - #270
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes MEI-106.
The problem
installSteps()generatedpnpm add <package> --filter @meith/webfor 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 bycreate-meith, or graduated out of the stock image byboard:eject— is a singlepackage.jsonwhoseforum-webneeds a hoistednode_modules. There, the command fails three ways over:--filter @meith/webnames 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-meitheven ships an.npmrcwithsave-exact=true).MEI-102 fixed the docs half of this, so
mainshipped the screen anddocs/customization/marketplace.mdgiving 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: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
apps/community/src/server/marketplace-admin.tsinstallStepsemitsnpm install <package>for both the plugin and theme branches.apps/community/src/components/admin/marketplace-listing.tsxpnpmprefix, so the new command would have rendered as muted prose instead of a code chip. Nownpm/community— the two prefixes actually emitted, with no dead branch left behind.apps/community/src/server/marketplace-admin.test.tsdocs/customization/marketplace.mdpnpm add" to name both shapes.docs/guides/operations/operating.mdnpm install, with one line saying the first line readspnpm add … --filterin 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 ownRun \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--filteror starts withpnpm.still names npm on the stock image, where the steps describe the board being graduated to— pins the behaviour for theBOARD_PLUGINS_MANIFESTcase, so the reasoning above is a test rather than a comment.Validation
pnpm verifypasses 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:checkall pass.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
npmorcommunity.Generated by Claude Code