Skip to content

Harden Markdown builds and styling - #95

Open
moshloop wants to merge 27 commits into
mainfrom
markdown-build-styling
Open

Harden Markdown builds and styling#95
moshloop wants to merge 27 commits into
mainfrom
markdown-build-styling

Conversation

@moshloop

@moshloop moshloop commented Sep 3, 2026

Copy link
Copy Markdown
Member

What

  • Support pnpm 11 workspace overrides during staging installs.
  • Add validated pre-compilation Markdown redaction.
  • Fix heading flow and GitHub alert styling.

Why

  • Keep generated manifests and resolutions consistent, exclude redacted content from output, and improve alert readability.

Map diagram endpoints explicitly and wait for layout stabilization so arrows render against final coordinates and remain correctly positioned in print output
Ensure @LiVe templates render through the browser path automatically and raw MDX is transformed before React in dev mode. Prevents incorrect static rendering and React parse failures.
Add doctor coverage for the shared Facet module store and Tailwind package/plugin layout. This surfaces missing or incompatible dependencies and supports repair through `facet doctor --skip-modules --fix`.
Add immutable shared module stores, persistent build-key digests, Tailwind v3/v4 CSS handling, filtered Markdown transforms, and low-priority subprocess execution to reduce repeated install, scan, and render costs. Add skip-modules support and improve cache invalidation, diagnostics, and loader cleanup.

BREAKING CHANGE: Replace the positional computeTemplateBuildKey API and remove FacetDirectory.needsInstall and isInstallBroken; callers must use the new options-based and module-preparation APIs.
Add Facet server rendering for HTML/PDF jobs while preserving local data loading and validation, with explicit failures instead of local fallback.
Introduce version-pinned shared modules, CSS post-processing controls, render timing diagnostics, and expanded API coverage for live/PDF options.
BREAKING CHANGE: Require Node.js >=20.19; shared-module server mode rejects request-specific dependencies and local-only render options.
Make browser-backed diagrams render consistently in HTML/PDF output and expand the playground with reusable datasheet, diagram, Markdown, and MDX examples. Keep shared playground links reproducible through URL-synced toolbar state and surface server timings in the log dialog.
Deprioritize shell, SSR, and PDF browser work to reduce contention with interactive workloads. Extend benchmark profiling across stdout and stderr, and support numeric logger verbosity levels.\n\nBREAKING CHANGE: PersistentLoaderRequest replaces the verbose option with verbosity
Build and install the CLI from a versioned npm package with symlinked development installs and linked-version reporting. Add shared module-cache warmup, bundled runtime assets, and repeatable Kubernetes lab deployment with optional ingress.\nBREAKING CHANGE: The npm CLI now requires Node.js >=20.19 instead of >=18.
Expand the kitchen-sink report to exercise GFM, raw HTML, GitHub alerts, collapsible details, footnotes, and Mermaid diagrams. Add the rendering dependencies and remote HTML/PDF CLI integration coverage.
Replace react-xarrows rendering with measured SVG geometry so arrows stay aligned as diagram layouts settle. Preserve anchors, paths, markers, labels, and animation while adding layout readiness and geometry regression coverage.
Add PNG output with configurable capture dimensions, selectors, viewports, and autocropping. Extend request validation, caching, streamed results, and playground previews for image renders.
Add PNG generation across the CLI, render API, and remote rendering path. Capture selected elements at natural size with viewport-aware scaling and optional painted-pixel autocropping. Bundle Sharp resolution for native module environments, document the new format, and cover local, API, remote, and cropping behavior with tests.
Centralize data-file loading with YAML support and clear validation errors. Select the appropriate JSON Schema draft while preserving renderer annotations without weakening actual constraints.
Bundle icon data and load template utilities so live and SSR renders preserve glyphs and diagram layout. Resolve the Vite root reliably and include sharp for SEA autocrop support. Add React 19 diagram coverage for finite arrow geometry.
Promote Document as the canonical wrapper across examples, playground templates, and Storybook while retaining DatasheetTemplate as a deprecated compatibility alias.
Add a validated font-size scale that keeps typography consistent across HTML, PNG, and PDF output.
Align Tailwind utilities, inline styles, and packaged PostCSS processing with the shared point-based scale while preventing stale CSS caches and unsafe stylesheet interpolation.
Add component test discovery and coverage for scaling, packaging, rendering, and cache invalidation.
Correct PDF output that ignored the declared typography scale, overflowed page boxes, and misreported debug annotations. Apply consistent font scaling and printable-height sizing across page surfaces, load the intended sans font, and prevent oversized page-number replacements from corrupting streams. Add focused coverage for rendered typography, scaling, pagination, annotations, and placeholder safety.
Synchronize public facet declarations with current component exports, including document, table, finding, formatting, heatmap, and typography APIs. Align StatCard tests with absolute deltas, slate neutral colors, and reduction semantics.

BREAKING CHANGE: Remove legacy DatasheetTemplate PageConfig usage and the TerminalOutput command and SeverityStatCard downIsGood props from the declared API.
Unify TSX/MDX callouts with GitHub markdown alert tones, shared icons, annotation headers, and emphasis styling. Add focused component coverage and Storybook examples for the expanded API.

BREAKING CHANGE: Remove the `info` and `success` variants; use `note` and `tip` instead
Add GitHub-style alert rendering and fail-closed Classified regions across Markdown/MDX, CLI, API, and cached builds. Redacted content is removed before compilation and remote-render policies are preserved. Document and test callout tones, policy parsing, CSS, and rendering behavior.

BREAKING CHANGE: CalloutBox no longer accepts the info or success variants; use note, tip, important, warning, caution, or default
Read workspace-level pnpm overrides and explicitly disable frozen-lockfile mode during staging installs to keep generated consumer manifests and pnpm 11 resolution consistent. Remove obsolete dependency checksums from the chart test module.
Remove classified Markdown regions before compilation so redacted content is absent from generated bundles and output. Enforce explicit attribute policies and fail builds when classification rules are missing or malformed.
Restore correct block-level heading flow and style GitHub Markdown alert tones consistently with CalloutBox variants, including readable labels and icons.
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 160 files, which is 60 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 1d7f5153-b25c-4e17-b341-088df31ac5a9

📥 Commits

Reviewing files that changed from the base of the PR and between 5bcbf72 and d924a09.

⛔ Files ignored due to path filters (3)
  • chart/test/go.sum is excluded by !**/*.sum
  • cli/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (160)
  • .dockerignore
  • .github/workflows/release.yml
  • .github/workflows/test.yml
  • .gitignore
  • Dockerfile
  • Makefile
  • README.md
  • Taskfile.yml
  • chart/templates/ingress.yaml
  • chart/values.lab.yaml
  • chart/values.yaml
  • cli/examples/BenchmarkMixedReport.tsx
  • cli/npm/facet-cli/README.md
  • cli/npm/facet-cli/package.json
  • cli/package.json
  • cli/pnpm-workspace.yaml
  • cli/scripts/benchmark-render.mjs
  • cli/scripts/build-sea.cjs
  • cli/scripts/pack-npm-cli.cjs
  • cli/scripts/pack-npm-cli.test.ts
  • cli/scripts/task-install.test.ts
  • cli/src/builders/facet-directory.test.ts
  • cli/src/builders/facet-directory.ts
  • cli/src/builders/remark-config.test.ts
  • cli/src/builders/remark-config.ts
  • cli/src/bundler/build-cache.test.ts
  • cli/src/bundler/build-cache.ts
  • cli/src/bundler/live-snapshot.ts
  • cli/src/bundler/module-store.test.ts
  • cli/src/bundler/module-store.ts
  • cli/src/bundler/renderer.ts
  • cli/src/bundler/ssr-pool.ts
  • cli/src/bundler/vite-builder.ts
  • cli/src/bundler/vite-server.ts
  • cli/src/cli.ts
  • cli/src/commands/doctor.test.ts
  • cli/src/commands/doctor.ts
  • cli/src/generators/html.ts
  • cli/src/generators/pdf.ts
  • cli/src/generators/png.ts
  • cli/src/index.ts
  • cli/src/loaders/css.ts
  • cli/src/loaders/ssr.ts
  • cli/src/server/archive.ts
  • cli/src/server/config.test.ts
  • cli/src/server/config.ts
  • cli/src/server/facet-types.ts
  • cli/src/server/playground-controls-script.ts
  • cli/src/server/playground-examples-script.ts
  • cli/src/server/playground-html.test.ts
  • cli/src/server/playground-html.ts
  • cli/src/server/preview.ts
  • cli/src/server/render-cache.ts
  • cli/src/server/render-format.ts
  • cli/src/server/render-pipeline.ts
  • cli/src/server/render-stream.ts
  • cli/src/server/request.test.ts
  • cli/src/server/request.ts
  • cli/src/server/routes.ts
  • cli/src/server/template-workspaces.ts
  • cli/src/types.ts
  • cli/src/utils/area-scale.test.ts
  • cli/src/utils/assets.test.ts
  • cli/src/utils/assets.ts
  • cli/src/utils/browser-html.test.ts
  • cli/src/utils/browser-html.ts
  • cli/src/utils/browser-readiness.ts
  • cli/src/utils/data-loader.test.ts
  • cli/src/utils/data-loader.ts
  • cli/src/utils/debug-annotations.test.ts
  • cli/src/utils/debug-annotations.ts
  • cli/src/utils/font-scale.test.ts
  • cli/src/utils/font-size.test.ts
  • cli/src/utils/font-size.ts
  • cli/src/utils/live-template.test.ts
  • cli/src/utils/live-template.ts
  • cli/src/utils/logger.test.ts
  • cli/src/utils/logger.ts
  • cli/src/utils/pdf-generator-priority.test.ts
  • cli/src/utils/pdf-generator.ts
  • cli/src/utils/pdf-multipass.ts
  • cli/src/utils/pdf-security-timings.test.ts
  • cli/src/utils/pdf-security.ts
  • cli/src/utils/performance.test.ts
  • cli/src/utils/performance.ts
  • cli/src/utils/png-generator.test.ts
  • cli/src/utils/png-generator.ts
  • cli/src/utils/png-trim.test.ts
  • cli/src/utils/png-trim.ts
  • cli/src/utils/remote-resolver.ts
  • cli/src/utils/server-render.test.ts
  • cli/src/utils/server-render.ts
  • cli/src/utils/sharp.ts
  • cli/src/utils/shell.ts
  • cli/src/utils/stylesheet-scale.test.ts
  • cli/src/utils/subprocess-priority.test.ts
  • cli/src/utils/subprocess-priority.ts
  • cli/src/utils/tailwind-v4.test.ts
  • cli/src/utils/tailwind.test.ts
  • cli/src/utils/tailwind.ts
  • cli/src/utils/template-source.ts
  • cli/src/utils/type-scale.test.ts
  • cli/src/utils/type-scale.ts
  • cli/src/utils/validator.test.ts
  • cli/src/utils/validator.ts
  • cli/src/version.test.ts
  • cli/src/version.ts
  • cli/test/computed-type.test.ts
  • cli/test/facet-redact.test.ts
  • cli/test/fixtures/live-template.tsx
  • cli/test/fixtures/react19-diagram/package.json
  • cli/test/fixtures/react19-diagram/shared.tsx
  • cli/test/fixtures/react19-diagram/template.tsx
  • cli/test/fixtures/report-priority.cjs
  • cli/test/fixtures/standard-template.tsx
  • cli/test/markdown-styles.test.ts
  • cli/test/page-number.test.ts
  • cli/test/react19-diagram.test.ts
  • cli/test/remote-rendering.test.ts
  • cli/test/render-api.test.ts
  • cli/tsdown.config.ts
  • cli/tsdown.sea.config.ts
  • examples/.gitignore
  • examples/kitchen-sink/MarkdownReport.md
  • examples/quickstart/.gitignore
  • examples/quickstart/MyDatasheet.tsx
  • examples/quickstart/README.md
  • openapi.yaml
  • package.json
  • pnpm-workspace.yaml
  • postcss.config.js
  • postcss/apply-font-scale.mjs
  • postcss/facet-font-scale.mjs
  • remark/facet-redact.mjs
  • src/components/Avatar.tsx
  • src/components/Badge.tsx
  • src/components/CalloutBox.test.tsx
  • src/components/CalloutBox.tsx
  • src/components/DatasheetTemplate.tsx
  • src/components/Document.test.tsx
  • src/components/Document.tsx
  • src/components/MatrixTable.tsx
  • src/components/StatCard.test.tsx
  • src/components/SyntaxHighlighter.tsx
  • src/components/TerminalOutput.tsx
  • src/components/diagram/Arrow.tsx
  • src/components/diagram/Diagram.test.tsx
  • src/components/diagram/Diagram.tsx
  • src/components/diagram/context.ts
  • src/components/diagram/geometry.test.ts
  • src/components/diagram/geometry.ts
  • src/components/index.tsx
  • src/components/utils/alertIcons.tsx
  • src/stories/components/CalloutBox.stories.tsx
  • src/stories/components/Document.stories.tsx
  • src/styles.css
  • src/utils/font-scale.ts
  • src/utils/theme.ts
  • tailwind.config.js
  • vitest.config.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@socket-security

socket-security Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​vite@​8.1.5981008297100
Addednpm/​tailwindcss@​4.3.31001008498100
Addednpm/​react@​19.2.71001008497100
Addednpm/​@​tailwindcss/​vite@​4.3.31001008998100
Addednpm/​react-dom@​19.2.71001009298100
Addednpm/​sharp@​0.35.39710010093100
Addednpm/​@​vitejs/​plugin-react@​6.0.310010010095100

View full report

Comment thread cli/src/builders/facet-directory.ts Fixed
Keep release, test, and runtime environments consistent with the repository’s pnpm requirement while covering packaged remark assets, layered CSS imports, and sharp diagnostics.
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