From 304285534c2025dadb0ff62eb7819b4d6e67d957 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 17 May 2026 09:52:58 +0000 Subject: [PATCH 1/2] fix(frontend): add prism/r type shim so tsc unblocks Cloud Build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `react-syntax-highlighter/dist/esm/languages/prism/r` import added in PR #6944 has an ambient declaration in `@types/react-syntax-highlighter`, but with `moduleResolution: bundler` tsc resolves it to the sibling .js file first and never reaches the @types index — TS7016 trips `tsc && vite build` in the frontend Cloud Build trigger. The image never gets rebuilt, so Cloud Run keeps serving the pre-#6961 revision and the landing strip still shows `languages: 1`, the `/libraries` page is still missing the ggplot2 card, and the R code viewer is still empty even though those fixes are merged on main. A project-local shim takes precedence over @types and is enough to get `yarn build` green again, which lets the next merge to main publish the already-merged frontend changes. --- app/src/types/react-syntax-highlighter.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/src/types/react-syntax-highlighter.d.ts diff --git a/app/src/types/react-syntax-highlighter.d.ts b/app/src/types/react-syntax-highlighter.d.ts new file mode 100644 index 0000000000..bb0c86e25a --- /dev/null +++ b/app/src/types/react-syntax-highlighter.d.ts @@ -0,0 +1,9 @@ +// @types/react-syntax-highlighter ships an ambient declaration for this path, +// but TypeScript's bundler module resolution doesn't pick it up — it resolves +// the import to the sibling `.js` file before consulting the @types index, +// breaking `tsc` (and therefore the Cloud Build `yarn build` step) with TS7016. +// A project-local shim wins over @types, so this is enough to unblock the build. +declare module 'react-syntax-highlighter/dist/esm/languages/prism/r' { + const language: unknown; + export default language; +} From f26be7deaae68532e5222cc3058cb6e0c1c83a5d Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 17 May 2026 09:55:01 +0000 Subject: [PATCH 2/2] docs(claude.md): require fixing small build/test blockers in-scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #6961 deferred a known `tsc` error under "Out of scope" and that deferral broke every subsequent frontend Cloud Build — the language count, ggplot2 card, and R code viewer fixes never reached anyplot.ai even though the PR merged green. Codify the rule so the next latent blocker gets fixed in the same PR instead of parked. --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index 903fc96132..2679d77688 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -13,6 +13,7 @@ For detailed project documentation (architecture, commands, workflows, etc.), se - **GitHub Actions workflows ARE allowed to commit/push** - When running as part of `spec-*.yml` or `impl-*.yml` workflows, creating branches, commits, and PRs is expected and required. - **Always write in English** - All output text (code comments, commit messages, PR descriptions, issue comments, documentation) must be in English, even if the user writes in another language. - **Update documentation when making changes** - When adding new features, events, or modifying behavior, always check if related documentation needs updating (e.g., `docs/reference/plausible.md` for analytics events, `docs/workflows/` for workflow changes, `docs/contributing.md` for user-facing changes). +- **Fix small build/test blockers directly, even when out of scope** - If a typecheck error, failing test, lint failure, or other small pipeline blocker shows up while working on something unrelated (incl. things the current PR was not meant to touch), fix it in the same PR or a tiny follow-up — never leave it parked under "out of scope". A latent `tsc` error that doesn't surface locally will silently break the next Cloud Build, which deploys nothing new and leaves production stale even though every PR check looks green (this is exactly how PR #6961's frontend fixes never reached anyplot.ai — the unrelated `prism/r` TS7016 from #6944 was deferred, then blocked the next `yarn build`). The bar: if the fix is < ~20 lines and obviously correct, just do it; if it would expand scope meaningfully, ask first rather than deferring silently. ## PR Follow-Through (mandatory after every `gh pr create`)