feat: npm packages index, per-package detail pages, and self-hosted webfonts - close #224 - #223
Conversation
Load the design-system fonts via @fontsource-variable (variable wght axis, latin subset) from globalStyles, so they render for every visitor rather than only those with the fonts installed. Prefer the "X Variable" family, keeping the plain name and a generic fallback. Served from our own origin, within the CSP.
Add a /npm index that auto-discovers published (non-private) workspace packages from their package.json via import.meta.glob, rendering each as a DomainCard (name, description, keyword tags, version badge) linking to its detail page when one exists, otherwise to npm. Add the vite-plugin-msw-server detail page (hero + rendered README), a reusable CommandSnippet with copy-to-clipboard, a DomainCard badge/children slot, copy/check icons, and header/footer links to /npm.
Give every published workspace package a detail page (hero + rendered README, sourced from its package.json). The /npm index now links each card to its detail page rather than npm. Extract and unit-test the toEntry helper for both the detail-page and npm-fallback cases so the routing branch stays covered.
📝 WalkthroughWalkthroughThis PR adds package directory pages and shared UI for package hero/readme/index rendering, updates navigation and theming for the new pages, and changes coverage/Codecov and package metadata plumbing for web test and publish workflows. ChangesNPM Packages Directory
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Bundle ReportChanges will increase total bundle size by 231.9kB (0.3%) ⬆️. This is within the configured threshold ✅ Detailed changes
ℹ️ *Bundle size includes cached data from a previous commit Affected Assets, Files, and Routes:view changes for bundle: @soroush.tech/dev-esmAssets Changed:
Files in
Files in
Files in
Files in
Files in
view changes for bundle: @soroush.tech/prod-esmAssets Changed:
Files in
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/web/src/common/Footer/Footer.test.tsx (1)
63-101: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winMissing test for the new "NPM Packages" footer link.
CONNECTIVITYinFooter.tsxnow includes a new{ href: '/npm/', label: 'NPM Packages' }entry, but no corresponding assertion was added here alongside the Experience Graph, GitHub Repository, and LinkedIn tests. As per coding guidelines,pnpm test:coveragemust verify 100% coverage on all touched files.✅ Suggested addition
it('renders LinkedIn link', () => { renderWithTheme(<Footer />) expect(screen.getByRole('link', { name: 'LinkedIn' })).toHaveAttribute( 'href', 'https://www.linkedin.com/in/masoud-soroush-4139b152' ) + }) + + it('renders NPM Packages link', () => { + renderWithTheme(<Footer />) + expect(screen.getByRole('link', { name: 'NPM Packages' })).toHaveAttribute('href', '/npm/') })🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/common/Footer/Footer.test.tsx` around lines 63 - 101, The Footer test suite is missing coverage for the new NPM Packages link added in Footer.tsx. Update Footer.test.tsx by adding an assertion in the existing connectivity describe block using renderWithTheme and getByRole for the “NPM Packages” link, verifying its href matches the CONNECTIVITY entry (/npm/). Keep the test alongside the existing Experience Graph, GitHub Repository, and LinkedIn link assertions.Source: Coding guidelines
🧹 Nitpick comments (8)
apps/web/src/common/Footer/Footer.tsx (1)
28-28: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove commented-out dead code.
Leftover commented-out link entry should be deleted rather than kept in the source.
🧹 Suggested cleanup
- - // { href: '/wiki/', label: 'Technical Wiki' }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/common/Footer/Footer.tsx` at line 28, The Footer link list contains commented-out dead code that should be removed. Delete the leftover commented Technical Wiki entry from the Footer component’s link configuration, and keep the footer items in the relevant data structure clean and uncommented.apps/web/src/common/CommandSnippet/CommandSnippet.tsx (1)
20-27: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueUnmounted-state update via stale
setTimeout.If the component unmounts before
COPIED_RESET_MSelapses, the pendingsetTimeoutstill callssetCopiedon an unmounted component. React no longer warns/errors for this, but it's wasted work and a latent leak pattern if this logic grows. Consider clearing the timeout on unmount via a ref +useEffectcleanup.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/common/CommandSnippet/CommandSnippet.tsx` around lines 20 - 27, The CommandSnippet handleCopy flow leaves a pending setTimeout that can call setCopied after unmount, so add cleanup around the timeout in CommandSnippet.tsx. Update the CommandSnippet component to store the timeout id in a ref, clear any existing timeout before scheduling a new one, and add a useEffect cleanup to cancel it on unmount so the copied-reset logic cannot run against an unmounted component.apps/web/src/section/PackageHero/PackageHero.tsx (1)
22-26: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueStale "promote once a second page consumes it" note.
Per the PR stack,
PackageHerois consumed by five package pages (bench,npm,playwright-coverage,styled-system,vite-plugin-msw-server) added later in this same stack. This comment will be inaccurate as soon as those pages land — worth updating or removing now to avoid drift.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/section/PackageHero/PackageHero.tsx` around lines 22 - 26, The JSDoc note in PackageHero is now stale because PackageHero is already used by multiple package pages in this stack. Update or remove the “promote once a second package page consumes it” wording in the PackageHero component comment so it reflects the current shared usage across the package pages, and keep the description aligned with the actual role of PackageHero.apps/web/vitest.config.ts (1)
45-49: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider deduplicating the alias array.
The
packagesalias entry (and the pre-existingmsw/srcentries) is now duplicated identically between the top-levelresolve.aliasand theunitproject'sresolve.alias. Extracting a shared constant would prevent future drift between the two lists.♻️ Example refactor
+const testAliases = [ + { find: /^msw$/, replacement: resolve(__dirname, 'node_modules/msw') }, + { find: 'src', replacement: resolve(__dirname, './src') }, + { find: 'packages', replacement: resolve(__dirname, '../../packages') }, +] + export default defineConfig({ resolve: { - alias: [ - { find: /^msw$/, replacement: resolve(__dirname, 'node_modules/msw') }, - { find: 'src', replacement: resolve(__dirname, './src') }, - { find: 'packages', replacement: resolve(__dirname, '../../packages') }, - ], + alias: testAliases, }, ... { resolve: { - alias: [ - { find: /^msw$/, replacement: resolve(__dirname, 'node_modules/msw') }, - { find: 'src', replacement: resolve(__dirname, './src') }, - { find: 'packages', replacement: resolve(__dirname, '../../packages') }, - ], + alias: testAliases, },Also applies to: 79-83
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/vitest.config.ts` around lines 45 - 49, The alias list in vitest.config.ts is duplicated between the top-level resolve.alias and the unit project’s resolve.alias, which risks drift. Extract the shared alias entries into a single constant and reuse it in both places, keeping the existing msw, src, and packages mappings centralized and consistent.apps/web/src/section/PackageIndex/PackageIndex.data.ts (2)
18-25: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win
keywordstyped as required but not guaranteed by realpackage.jsonfiles.
PackageJson.keywordsis declared as requiredstring[], but nothing validates that every workspacepackage.jsonactually has this field. If one is missing,toEntrypassesundefinedthrough, and any downstream.mapoverkeywords(e.g., rendering tags) will throw at runtime.🛡️ Proposed defensive default
export const toEntry = (pkg: PackageJson, hasPage: boolean): PackageEntry => { const slug = pkg.name.split('/')[1] return { name: pkg.name, description: pkg.description, version: pkg.version, - keywords: pkg.keywords, + keywords: pkg.keywords ?? [], href: hasPage ? `/${slug}/` : `https://www.npmjs.com/package/${pkg.name}`, target: hasPage ? undefined : '_blank', } }Also applies to: 31-41
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/section/PackageIndex/PackageIndex.data.ts` around lines 18 - 25, The PackageJson shape used by PackageIndex.data.ts assumes keywords is always present, but real package.json entries may omit it and cause downstream failures in toEntry and any keyword rendering. Update the PackageJson interface and the toEntry logic to treat keywords as optional and default it to an empty array when absent, using the existing PackageJson and toEntry symbols to keep the index card data safe.
43-53: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFragile positional path parsing for package/page discovery.
The
../../../../../depth (line 46) andpath.split('/')[3](line 52) are magic-index assumptions tied to this file's exact location and route depth. Either would silently break discovery (not a build error) if the file moves orsrc/pagesnesting changes.Consider deriving the slug more defensively, e.g. via a regex capture instead of a fixed split index:
const pagedSlugs = new Set( Object.keys(import.meta.glob('/src/pages/*/+Page.tsx')) .map((path) => path.match(/^\/src\/pages\/([^/]+)\/\+Page\.tsx$/)?.[1]) .filter((slug): slug is string => Boolean(slug)) )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/section/PackageIndex/PackageIndex.data.ts` around lines 43 - 53, The package/page discovery in PackageIndex.data.ts relies on fragile positional path parsing, so replace the hardcoded package glob depth and the path.split-based slug extraction with a more defensive approach. Update the packageJsons/import.meta.glob usage and the pagedSlugs derivation in PackageIndex.data.ts to infer the package slug via pattern matching or another location-independent method, using the existing packageJsons and pagedSlugs symbols to keep discovery stable if the file moves or page nesting changes.apps/web/src/pages/bench/+data.ts (1)
1-6: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated
data()boilerplate across all package pages.This exact
data(pageContext) => ({ meta: pageSocialMeta(pageContext) })implementation is repeated identically instyled-system/+data.tsand (per the PR stack) innpm,playwright-coverage, andvite-plugin-msw-serveras well. Consider extracting a single shared helper (e.g.src/renderer/head) that each page's+data.tssimply re-exports, so the logic has one source of truth.♻️ Example consolidation
// src/renderer/head.ts (or similar shared module) export function pageData(pageContext: PageContext): HeadMeta { return { meta: pageSocialMeta(pageContext) } }-import type { PageContext } from 'vike/types' -import { pageSocialMeta, type HeadMeta } from 'src/renderer/head' - -export function data(pageContext: PageContext): HeadMeta { - return { meta: pageSocialMeta(pageContext) } -} +export { pageData as data } from 'src/renderer/head'🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/pages/bench/`+data.ts around lines 1 - 6, The page-level data() implementation is duplicated across multiple package pages, so consolidate this boilerplate into a shared helper in the head/renderer area and have each +data.ts re-export or delegate to it. Update the bench page’s data(pageContext) and the matching styled-system, npm, playwright-coverage, and vite-plugin-msw-server pages to use the shared function so pageSocialMeta(pageContext) and the HeadMeta return shape live in one source of truth.apps/web/src/pages/bench/bench.data.ts (1)
1-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider extracting a shared
repoUrlbuilder.This hardcoded GitHub URL template (
.../tree/main/packages/<name>) will likely repeat across all five per-package*.data.tsfiles. Centralizing it avoids five-way drift if the org/branch ever changes.♻️ Proposed helper
+// e.g. src/section/PackageHero/utils.ts +export function repoUrlFor(dir: string) { + return `https://github.com/soroush-tech/soroush.tech/tree/main/packages/${dir}` +}- repoUrl: 'https://github.com/soroush-tech/soroush.tech/tree/main/packages/bench', + repoUrl: repoUrlFor('bench'),🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/pages/bench/bench.data.ts` around lines 1 - 11, The `hero` object in `bench.data.ts` hardcodes a package-specific GitHub repo URL template that will be duplicated across the per-package data files, so extract a shared `repoUrl` builder and use it here instead of repeating the string. Update the `hero` definition to call that shared helper for the `repoUrl` field, and reference the existing `hero` export and any shared utility you introduce so the package pages all stay in sync when the org, branch, or base path changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/common/CommandSnippet/CommandSnippet.tsx`:
- Around line 22-27: The CommandSnippet copy handler does not guard against
missing clipboard support or write failures. Update handleCopy in
CommandSnippet.tsx to first check navigator.clipboard/writeText availability,
then handle writeText rejections in the promise chain so the click handler does
not throw or leave an unhandled rejection. If the copy fails, keep the copied
state false and add appropriate fallback/user feedback handling around the
command copy action.
In `@apps/web/src/section/PackageReadme/README.md`:
- Line 14: Fix the markdownlint MD038 issue in the stripReadmeChrome
documentation text by removing the trailing space inside the inline code span
that shows the heading marker. Update the sentence referencing stripReadmeChrome
so the backticked `#` marker has no extra space, keeping the wording otherwise
the same.
---
Outside diff comments:
In `@apps/web/src/common/Footer/Footer.test.tsx`:
- Around line 63-101: The Footer test suite is missing coverage for the new NPM
Packages link added in Footer.tsx. Update Footer.test.tsx by adding an assertion
in the existing connectivity describe block using renderWithTheme and getByRole
for the “NPM Packages” link, verifying its href matches the CONNECTIVITY entry
(/npm/). Keep the test alongside the existing Experience Graph, GitHub
Repository, and LinkedIn link assertions.
---
Nitpick comments:
In `@apps/web/src/common/CommandSnippet/CommandSnippet.tsx`:
- Around line 20-27: The CommandSnippet handleCopy flow leaves a pending
setTimeout that can call setCopied after unmount, so add cleanup around the
timeout in CommandSnippet.tsx. Update the CommandSnippet component to store the
timeout id in a ref, clear any existing timeout before scheduling a new one, and
add a useEffect cleanup to cancel it on unmount so the copied-reset logic cannot
run against an unmounted component.
In `@apps/web/src/common/Footer/Footer.tsx`:
- Line 28: The Footer link list contains commented-out dead code that should be
removed. Delete the leftover commented Technical Wiki entry from the Footer
component’s link configuration, and keep the footer items in the relevant data
structure clean and uncommented.
In `@apps/web/src/pages/bench/`+data.ts:
- Around line 1-6: The page-level data() implementation is duplicated across
multiple package pages, so consolidate this boilerplate into a shared helper in
the head/renderer area and have each +data.ts re-export or delegate to it.
Update the bench page’s data(pageContext) and the matching styled-system, npm,
playwright-coverage, and vite-plugin-msw-server pages to use the shared function
so pageSocialMeta(pageContext) and the HeadMeta return shape live in one source
of truth.
In `@apps/web/src/pages/bench/bench.data.ts`:
- Around line 1-11: The `hero` object in `bench.data.ts` hardcodes a
package-specific GitHub repo URL template that will be duplicated across the
per-package data files, so extract a shared `repoUrl` builder and use it here
instead of repeating the string. Update the `hero` definition to call that
shared helper for the `repoUrl` field, and reference the existing `hero` export
and any shared utility you introduce so the package pages all stay in sync when
the org, branch, or base path changes.
In `@apps/web/src/section/PackageHero/PackageHero.tsx`:
- Around line 22-26: The JSDoc note in PackageHero is now stale because
PackageHero is already used by multiple package pages in this stack. Update or
remove the “promote once a second package page consumes it” wording in the
PackageHero component comment so it reflects the current shared usage across the
package pages, and keep the description aligned with the actual role of
PackageHero.
In `@apps/web/src/section/PackageIndex/PackageIndex.data.ts`:
- Around line 18-25: The PackageJson shape used by PackageIndex.data.ts assumes
keywords is always present, but real package.json entries may omit it and cause
downstream failures in toEntry and any keyword rendering. Update the PackageJson
interface and the toEntry logic to treat keywords as optional and default it to
an empty array when absent, using the existing PackageJson and toEntry symbols
to keep the index card data safe.
- Around line 43-53: The package/page discovery in PackageIndex.data.ts relies
on fragile positional path parsing, so replace the hardcoded package glob depth
and the path.split-based slug extraction with a more defensive approach. Update
the packageJsons/import.meta.glob usage and the pagedSlugs derivation in
PackageIndex.data.ts to infer the package slug via pattern matching or another
location-independent method, using the existing packageJsons and pagedSlugs
symbols to keep discovery stable if the file moves or page nesting changes.
In `@apps/web/vitest.config.ts`:
- Around line 45-49: The alias list in vitest.config.ts is duplicated between
the top-level resolve.alias and the unit project’s resolve.alias, which risks
drift. Extract the shared alias entries into a single constant and reuse it in
both places, keeping the existing msw, src, and packages mappings centralized
and consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9ced6822-79e3-435c-a366-636e84874e88
⛔ Files ignored due to path filters (3)
apps/web/src/assets/icons/check.svgis excluded by!**/*.svgapps/web/src/assets/icons/content_copy.svgis excluded by!**/*.svgpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!pnpm-lock.yaml
📒 Files selected for processing (71)
apps/web/package.jsonapps/web/src/common/CommandSnippet/CommandSnippet.test.tsxapps/web/src/common/CommandSnippet/CommandSnippet.tsxapps/web/src/common/CommandSnippet/README.mdapps/web/src/common/CommandSnippet/const.tsapps/web/src/common/CommandSnippet/index.tsapps/web/src/common/DomainCard/DomainCard.test.tsxapps/web/src/common/DomainCard/DomainCard.tsxapps/web/src/common/Footer/Footer.test.tsxapps/web/src/common/Footer/Footer.tsxapps/web/src/common/Header/Header.test.tsxapps/web/src/common/Header/Header.tsxapps/web/src/pages/bench/+Page.tsxapps/web/src/pages/bench/+config.tsapps/web/src/pages/bench/+data.test.tsapps/web/src/pages/bench/+data.tsapps/web/src/pages/bench/bench.data.test.tsapps/web/src/pages/bench/bench.data.tsapps/web/src/pages/bench/bench.e2e.tsapps/web/src/pages/npm/+Page.tsxapps/web/src/pages/npm/+config.tsapps/web/src/pages/npm/+data.test.tsapps/web/src/pages/npm/+data.tsapps/web/src/pages/npm/npm.e2e.tsapps/web/src/pages/playwright-coverage/+Page.tsxapps/web/src/pages/playwright-coverage/+config.tsapps/web/src/pages/playwright-coverage/+data.test.tsapps/web/src/pages/playwright-coverage/+data.tsapps/web/src/pages/playwright-coverage/playwright-coverage.data.test.tsapps/web/src/pages/playwright-coverage/playwright-coverage.data.tsapps/web/src/pages/playwright-coverage/playwright-coverage.e2e.tsapps/web/src/pages/styled-system/+Page.tsxapps/web/src/pages/styled-system/+config.tsapps/web/src/pages/styled-system/+data.test.tsapps/web/src/pages/styled-system/+data.tsapps/web/src/pages/styled-system/styled-system.data.test.tsapps/web/src/pages/styled-system/styled-system.data.tsapps/web/src/pages/styled-system/styled-system.e2e.tsapps/web/src/pages/vite-plugin-msw-server/+Page.tsxapps/web/src/pages/vite-plugin-msw-server/+config.tsapps/web/src/pages/vite-plugin-msw-server/+data.test.tsapps/web/src/pages/vite-plugin-msw-server/+data.tsapps/web/src/pages/vite-plugin-msw-server/vite-plugin-msw-server.data.test.tsapps/web/src/pages/vite-plugin-msw-server/vite-plugin-msw-server.data.tsapps/web/src/pages/vite-plugin-msw-server/vite-plugin-msw-server.e2e.tsapps/web/src/section/PackageHero/PackageHero.test.tsxapps/web/src/section/PackageHero/PackageHero.tsxapps/web/src/section/PackageHero/README.mdapps/web/src/section/PackageHero/index.tsapps/web/src/section/PackageIndex/PackageIndex.data.test.tsapps/web/src/section/PackageIndex/PackageIndex.data.tsapps/web/src/section/PackageIndex/PackageIndex.test.tsxapps/web/src/section/PackageIndex/PackageIndex.tsxapps/web/src/section/PackageIndex/README.mdapps/web/src/section/PackageIndex/index.tsapps/web/src/section/PackageReadme/PackageReadme.test.tsxapps/web/src/section/PackageReadme/PackageReadme.tsxapps/web/src/section/PackageReadme/README.mdapps/web/src/section/PackageReadme/index.tsapps/web/src/section/PackageReadme/utils.test.tsapps/web/src/section/PackageReadme/utils.tsapps/web/src/theme/Icon/icons.tsapps/web/src/theme/Typography/Typography.test.tsxapps/web/src/theme/globalStyles.tsapps/web/src/theme/themes.tsapps/web/src/vite-env.d.tsapps/web/tsconfig.app.jsonapps/web/tsconfig.shared.jsonapps/web/vite.config.tsapps/web/vitest.config.tspackages/vite-plugin-msw-server/README.md
Address PR review and Codecov patch coverage: - CommandSnippet: guard navigator.clipboard?.writeText (insecure/unsupported contexts) and catch write rejections so the handler never throws or leaves an unhandled rejection, with unit tests for both paths. - PackageReadme README: drop the trailing space inside a code span (MD038). - e2e coverage: include the package-page components (PackageHero, PackageReadme, PackageIndex, CommandSnippet). They have no Storybook/browser tests, so those coverage flags reported them uncovered; the real-browser e2e render now covers them via the package pages.
Reframe the package around its headline job — deterministic SSR in end-to-end tests — across every surface where it's described: - README: e2e-first hero callout, a real framework support matrix (dev SSR vs. build SSG per framework), a "Testing with Playwright" snippet, FAQ entries for Nuxt/SvelteKit/Remix, and links to the runnable examples repo. - package.json: bump to 1.0.0 and rewrite the npm description to lead with e2e. - web: update the package page meta description and hero tagline to match. Also point the published packages' homepage fields at their soroush.tech pages instead of the GitHub README (patch-bumping bench, playwright-coverage, and styled-system, which change only the homepage).
…sses Splitting web coverage into unit/browser/storybook Codecov flags failed patch coverage for simple JSX components: each flag runs `all: true` over the whole tree, so a tier that never executes a file reports its lines at 0, and Codecov's cross-flag union leaves those lines red even though another tier covers them. Add a merged `web` upload — one V8 pass over unit + browser + storybook (as `test:coverage` does locally) — that reports each file once with real execution data. Scope the patch status to `web`/`e2e`/`api` + the package flags so the per-tier flags stay uploaded for visibility but no longer gate. `project` is left at its default. The package entries in the patch-flags list are generated by `gen:publish-options`, alongside the existing flag and component blocks.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/vite-plugin-msw-server/README.md (1)
10-15: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winFix heading-level skip flagged by markdownlint.
Line 10 jumps from the
#@soroush.tech/...h1 straight to an h3 blockquote heading (### 🎭 Made for end-to-end tests), skipping h2.📝 Suggested fix
-> ### 🎭 Made for end-to-end tests +> ## 🎭 Made for end-to-end tests🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/vite-plugin-msw-server/README.md` around lines 10 - 15, The README heading hierarchy skips from the top-level title to an h3, which triggers the markdownlint heading-level rule. Update the introductory section in README so the “Made for end-to-end tests” heading uses the next proper level (an h2) and keeps the surrounding Playwright/Cypress copy unchanged. Use the existing heading text in the README block near the intro to locate it.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/vite-plugin-msw-server/README.md`:
- Around line 10-15: The README heading hierarchy skips from the top-level title
to an h3, which triggers the markdownlint heading-level rule. Update the
introductory section in README so the “Made for end-to-end tests” heading uses
the next proper level (an h2) and keeps the surrounding Playwright/Cypress copy
unchanged. Use the existing heading text in the README block near the intro to
locate it.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: decf16bb-5334-44ce-8da9-a0c67d14b900
📒 Files selected for processing (20)
.codecov.yml.github/workflows/ci.md.github/workflows/ci.ymlREADME.mdapps/web/package.jsonapps/web/scripts/coverage-check.tsapps/web/src/pages/bench/bench.e2e.tsapps/web/src/pages/playwright-coverage/playwright-coverage.e2e.tsapps/web/src/pages/styled-system/styled-system.e2e.tsapps/web/src/pages/vite-plugin-msw-server/+config.tsapps/web/src/pages/vite-plugin-msw-server/vite-plugin-msw-server.data.tsapps/web/src/pages/vite-plugin-msw-server/vite-plugin-msw-server.e2e.tsapps/web/src/test/e2e/coverage.tspackage.jsonpackages/bench/package.jsonpackages/playwright-coverage/package.jsonpackages/styled-system/package.jsonpackages/vite-plugin-msw-server/README.mdpackages/vite-plugin-msw-server/package.jsonscripts/gen-publish-options.mjs
✅ Files skipped from review due to trivial changes (7)
- apps/web/src/pages/vite-plugin-msw-server/vite-plugin-msw-server.data.ts
- apps/web/scripts/coverage-check.ts
- packages/bench/package.json
- packages/styled-system/package.json
- apps/web/src/pages/vite-plugin-msw-server/+config.ts
- packages/vite-plugin-msw-server/package.json
- packages/playwright-coverage/package.json
🚧 Files skipped from review as they are similar to previous changes (5)
- apps/web/src/pages/vite-plugin-msw-server/vite-plugin-msw-server.e2e.ts
- apps/web/src/pages/playwright-coverage/playwright-coverage.e2e.ts
- apps/web/src/pages/styled-system/styled-system.e2e.ts
- apps/web/src/pages/bench/bench.e2e.ts
- apps/web/src/test/e2e/coverage.ts



Summary
Adds a public
/npmsection showcasing the workspace's published npm packages, a detail page per package, and self-hosts the design-system webfonts.Commits
@fontsource-variable(variablewghtaxis, latin subset) so they render for every visitor instead of only those with the fonts installed locally. Served from our own origin, within the CSP./npmauto-discovers published (non-private) packages from theirpackage.jsonviaimport.meta.glob, rendering each as aDomainCard(name, description, keyword tags, version badge). Adds the msw-server detail page (hero + rendered README), a reusableCommandSnippet(copy-to-clipboard), aDomainCardbadge/children slot, copy/check icons, and header/footer links to/npm.package.json. The index now links each card to its detail page (npm is the fallback for packages without a page).toEntryis extracted and unit-tested for both routing cases./npmlisting@soroush.tech/bench/bench/@soroush.tech/playwright-coverage/playwright-coverage/@soroush.tech/styled-system/styled-system/@soroush.tech/vite-plugin-msw-server/vite-plugin-msw-server/Private packages (
eslint-config,schema,vite-plugin-sitemap,vite-plugin-watch) are excluded automatically. Adding a package — or its detail page — updates the index with no code change.Verification
pnpm lint✓pnpm test:coverage— 1942 tests, 100% statements / functions / linespnpm build✓ (15 sitemap URLs; all four package pages prerender)/npmindex specs passSummary by CodeRabbit
/npm,/bench,/styled-system,/playwright-coverage,/vite-plugin-msw-server) with hero sections and rendered README content.