Skip to content

Turn docs-smoke into @inth/docs demo app#3

Merged
KayleeWilliams merged 4 commits into
mainfrom
KayleeWilliams/docs-demo-app
Apr 21, 2026
Merged

Turn docs-smoke into @inth/docs demo app#3
KayleeWilliams merged 4 commits into
mainfrom
KayleeWilliams/docs-demo-app

Conversation

@KayleeWilliams
Copy link
Copy Markdown
Collaborator

Convert apps/docs-smoke from a scripts-only fixture into the canonical TanStack Start consumer demo for @inth/docs, with a minimal Geist-based shell, real MDX routes, and Playwright browser coverage for hydration and interactive adapters.

Preserve and rename the existing pipeline fixtures/scripts, add a root demo:dev workflow, and document the three validation layers in the repo and package READMEs.

Expand package-level coverage with server-rendered component tests, safer local agent-doc generation defaults, the distributed "use client" fix, and improved AutoTypeTable fallback handling.

Render extracted AutoTypeTable output on /docs from the type fixture so the package docs show both runtime integration and pipeline-generated table behavior.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Live demo app with routes, playground, interactive component matrix, and rendered MDX fixtures including pipeline-extracted type tables.
  • Documentation

    • Expanded README and guides with demo usage, validation layers, AutoTypeTable notes, and new local/dev/pipeline commands (e.g., demo:dev, pipeline:build, pipeline:test, test:e2e).
  • Tests

    • Playwright E2E smoke suite covering SSR, hydration, interactive adapters, fixture rendering, and external-link safety.
  • Chores

    • Vite-centric dev workflow, new demo/build scripts, tooling/config updates, and added styles for the docs demo.

Walkthrough

Added a live consumer demo app apps/docs-smoke that renders MDX using the package's mdxComponents, wires TanStack Start routing/SSR, introduces pipeline fixtures and type-extraction for AutoTypeTable, adds Playwright E2E tests, UI primitives/styles, pipeline scripts, and supporting docs/tooling changes.

Changes

Cohort / File(s) Summary
Demo app config & scripts
apps/docs-smoke/vite.config.ts, apps/docs-smoke/package.json, apps/docs-smoke/tsconfig.json, package.json
Vite/TanStack Start dev/build config, new dev/build/pipeline scripts, TS paths, and top-level demo:dev turbo script.
Routing & router artifacts
apps/docs-smoke/src/routeTree.gen.ts, apps/docs-smoke/src/router.tsx, apps/docs-smoke/src/routes/...
Generated TanStack route tree and router factory; root document, docs route with server loader for type extraction, plus home, quickstart, components-fixture, and playground routes.
MDX integration & types
apps/docs-smoke/src/mdx-components.tsx, apps/docs-smoke/src/mdx.d.ts, apps/docs-smoke/src/lib/*
Added useMDXComponents merger, MDX module declaration, demo route/type constants, and cn utility.
UI components & primitives
apps/docs-smoke/src/components/*, apps/docs-smoke/src/components/ui/*
New SiteHeader, DocsShell, ComponentMatrix and UI primitives (Badge, Button, Card, Separator) implemented with CVA/Radix patterns.
Styles
apps/docs-smoke/src/styles.css
Global Tailwind-based theme, .docs-prose typography, attribute-driven component styling and color tokens.
Docs content & meta
apps/docs-smoke/content/docs/index.mdx, .../guides/*.mdx, apps/docs-smoke/content/docs/meta.json, README.md, packages/docs/README.md
New/updated MDX pages (package overview, quickstart tweak, Components Fixture, AutoTypeTable fixture); meta.json pages list extended; README updates describe live demo and validation layers.
Pipeline & conversion scripts
apps/docs-smoke/scripts/*, apps/docs-smoke/type-fixtures/pipeline-example.ts
Scripts switched to local package source imports; mdx-convert and test-pipeline construct remarkPlugins with basePath; added pipeline test script and TypeScript fixture.
Playwright & E2E
apps/docs-smoke/playwright.config.ts, apps/docs-smoke/tests/e2e/smoke.e2e.ts
Playwright config and five smoke tests validating SSR, hydration, AutoTypeTable output, external-link safety, and selector interactivity.
Package docs tooling & tests
packages/docs/scripts/generate-agent-docs.ts, packages/docs/package.json, packages/docs/tsup.config.ts, packages/docs/src/components/components.test.tsx, packages/docs/src/remark/plugins/type-table.remark.ts
Agent baseUrl fallback and CI check change, package script edits, tsup post-build ensures "use client", added unit tests, and type-table fallback now uses createTable.
Misc config & tooling
biome.jsonc, apps/docs-smoke/components.json, apps/docs-smoke/scripts/*
Biome include patterns adjusted; new Shadcn UI generator config; various script import path changes to consume workspace sources.

Sequence Diagram(s)

sequenceDiagram
    participant Browser
    participant Server as TanStack Start
    participant DocsPkg as "@inth/docs"
    participant FS as File System

    Browser->>Server: GET /docs/ (SSR)
    Server->>Server: loader getAutoTypeTableExample()
    Server->>DocsPkg: extractTypeFromFile(path)
    DocsPkg->>FS: read pipeline-example.ts
    FS-->>DocsPkg: file contents / AST
    DocsPkg-->>Server: extracted type data
    Server->>Server: render MDX + AutoTypeTable markup
    Server-->>Browser: HTML + hydration payload
    Browser->>Browser: hydrate MDX components (mdxComponents + overrides)
    Browser->>Browser: AutoTypeTable displays extracted type
Loading
sequenceDiagram
    participant CI as Runner
    participant TestScript as test-pipeline.ts
    participant Remark as Remark pipeline
    participant Output as Markdown

    CI->>TestScript: run pipeline:test
    TestScript->>TestScript: build remarkPlugins (filter + basePath)
    TestScript->>Remark: convertMdxFile(fixture, remarkPlugins)
    Remark->>Remark: run plugins (type extraction)
    Remark-->>Output: generated markdown table
    TestScript->>TestScript: validate markers (|value|, |label|, |featured|)
    alt markers present
        TestScript-->>CI: success
    else
        TestScript-->>CI: fail + stderr
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

Possibly related PRs

Poem

🐰 I hopped through routes and MDX blooms bright,

Types plucked by pipelines, then shown in light.
Playwright blinked and the demo came alive,
A rabbit dances—docs and tests both thrive! 🥕✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main transformation: converting docs-smoke from a fixture into a demo app for @inth/docs.
Description check ✅ Passed The description comprehensively outlines the changes, covering the conversion to a TanStack Start demo, validation layers, testing additions, and improvements to package-level features.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 602b50daf7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"pipeline:test": "bun run scripts/test-pipeline.ts",
"pipeline:setup-real": "bun run scripts/setup-real-content.ts",
"pipeline:test-real": "bun run pipeline:setup-real && bun run scripts/test-real.ts",
"pipeline:bench": "bun run pipeline:setup-real && bun run scripts/bench.ts",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add bench alias to keep benchmark workflow running

This script rename leaves only pipeline:bench, but the benchmark job still executes cd apps/docs-smoke && bun run bench in .github/workflows/bench.yml (line 47), so the workflow now exits with Script not found "bench" and stops producing benchmark summaries. Please either restore a bench alias here or update the workflow command to bun run pipeline:bench so CI continues to collect benchmark data.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 18

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs-smoke/content/docs/guides/components-fixture.mdx`:
- Around line 17-66: The page explains how the fixture renders components but
lacks a copy-pastable MDX example; add a fenced MDX code snippet that shows
imports and usage for the same components referenced in the text (e.g.,
importing Callout, Tabs/Tab, PackageCommandTabs, TypeTable, AutoTypeTable,
Mermaid) and a minimal working example using Callout, a Tabs/Tab set,
PackageCommandTabs with a {pm} placeholder, a simple Mermaid chart, and a
TypeTable with the same type shape shown; place this snippet near the top of the
guide so readers can copy it directly and validate how Callout, Tabs, TypeTable
and AutoTypeTable are authored in MDX.

In `@apps/docs-smoke/package.json`:
- Line 33: The package.json dependency "nitro": "latest" causes
non-deterministic installs; replace the "latest" tag with the specific stable
version you tested (e.g., change the value of the "nitro" dependency in
package.json to the exact version string you validated) so CI and the demo use a
pinned, deterministic release.

In `@apps/docs-smoke/playwright.config.ts`:
- Line 14: The current strict check reuseExistingServer: process.env.CI !==
"true" misses many CI setups; change it to compute a robust isCI flag from
process.env.CI (e.g., treat "1","true","yes" (case-insensitive) or any non-empty
value as CI) and set reuseExistingServer to !isCI. Update the code around
reuseExistingServer and process.env.CI to derive isCI once (used by
reuseExistingServer) so CI environments with varied truthy values are correctly
detected.

In `@apps/docs-smoke/scripts/mdx-convert.ts`:
- Around line 19-21: The repoRoot calculation assumes process.cwd() equals the
script folder which can break when invoked elsewhere; replace use of
process.cwd() by deriving the script directory via import.meta.url (use
fileURLToPath and path.dirname) to set scriptsRoot, then compute repoRoot =
join(scriptsRoot, "..", "..") and srcDir accordingly; update references to
scriptsRoot, repoRoot, and srcDir in this file (mdx-convert.ts) so path
resolution is robust regardless of the current working directory.

In `@apps/docs-smoke/scripts/setup-real-content.ts`:
- Around line 22-24: The runGit helper currently awaits execFileAsync("git",
args) with no error handling; wrap the call in a try/catch inside the runGit
function (referencing the runGit function and execFileAsync) and on failure log
or throw a new Error that includes the git arguments (args.join(' ')) and the
original error message/stack (err.message or err) so callers get a clear,
contextual failure message; preserve the original error by including it as cause
or rethrowing after logging if desired.

In `@apps/docs-smoke/src/components/component-matrix.tsx`:
- Around line 3-12: The switch in coverageClassName(coverage: ComponentCoverage)
currently uses a default to cover "runtime"; change it to handle the "runtime"
variant explicitly (add a case "runtime" returning the same class as the current
default) and replace the default with an exhaustive check (e.g., a never-typed
fallback that throws) so TypeScript will surface missing variants if
ComponentCoverage changes.

In `@apps/docs-smoke/src/components/site-header.tsx`:
- Around line 23-30: The active navigation Link (rendered via Link with
className computed by cn and keyed by route.to) only receives visual styling but
lacks semantic indication for assistive tech; update the Link rendering to set
aria-current="page" when pathname === route.to (i.e., the active route condition
used for the bg-secondary/text-foreground classes) so screen readers announce
the current page—use the same pathname === route.to check to conditionally add
the aria-current attribute on the Link component.

In `@apps/docs-smoke/src/components/ui/button.tsx`:
- Around line 30-49: The Button component lacks a default type and ref
forwarding: update the Button to use React.forwardRef and adjust the signature
so it accepts a ref (forwarded to Comp) and still accepts ButtonProps; when
asChild is false ensure the native "button" element receives a default
type="button" unless a type prop is explicitly provided; locate the Button
function and ButtonProps and ensure the forwarded ref is applied to Comp (which
is either Slot or "button") and that className uses cn(buttonVariants(...)) as
before so styling is preserved.

In `@apps/docs-smoke/src/lib/docs.ts`:
- Around line 88-90: The ComponentCoverage entry for AutoTypeTable incorrectly
lists coverage as "pipeline-only" while AutoTypeTable is rendered at runtime in
the Docs route; update the coverage to include runtime (e.g., change coverage to
"runtime" or a combined value) or modify the ComponentCoverage type to allow
multiple coverage layers and then set AutoTypeTable to include both "pipeline"
and "runtime"; locate the AutoTypeTable entry in the ComponentCoverage data and
the ComponentCoverage type/enum definition and make the corresponding change so
the docs index route rendering matches the declared coverage.

In `@apps/docs-smoke/src/routes/docs/index.tsx`:
- Around line 6-39: getAutoTypeTableExample currently calls extractTypeFromFile
on every request, rebuilding a TypeScript program each time; move the expensive
work to module scope by computing and caching the extracted type once (e.g. a
module-level Promise or const) using the same repoRoot/path resolution logic,
then have getAutoTypeTableExample simply return the cached value. Specifically,
compute repoRoot and call
extractTypeFromFile("./apps/docs-smoke/type-fixtures/pipeline-example.ts","PipelineExampleOptions",
repoRoot) at module initialization (or expose a cachedPromise) and reference
that cached result inside getAutoTypeTableExample/loader so extractTypeFromFile
is not invoked per request.

In `@apps/docs-smoke/src/routes/playground.tsx`:
- Around line 43-76: The repeated conditional blocks rendering different
scenario panels (based on activeValue) should be replaced with a data-driven
content map to reduce duplication; create a Record like scenarioContent keyed by
the same values used for activeValue containing title and description, then in
the render (where activeValue is read) look up scenarioContent[activeValue] and
render a single shared panel structure (the rounded div with className, inner h2
and p) only when a content entry exists; update references to activeValue and
ensure keys match ("consumer", "pipeline", "router") so adding new scenarios
only requires adding entries to scenarioContent.

In `@apps/docs-smoke/tests/e2e/smoke.e2e.ts`:
- Around line 42-53: Multiple expect calls repeatedly call
page.locator("[data-inth-auto-type-table]"); assign that locator to a variable
(e.g., const autoTypeTable = page.locator("[data-inth-auto-type-table]")) at the
top of the test in smoke.e2e.ts, then replace the four expect(...) calls to use
autoTypeTable.containsText checks (await
expect(autoTypeTable).toContainText("PipelineExampleOptions"), etc.) so the DOM
is queried once and the assertions remain unchanged.

In `@apps/docs-smoke/tsconfig.json`:
- Around line 4-11: The tsconfig include array is missing Playwright E2E test
sources so TypeScript won't check them; update the "include" array in the
tsconfig.json to add the pattern for Playwright tests (e.g., add
"tests/e2e/**/*.ts") so files under tests/e2e are included in compilation and
type-checking; locate the "include" JSON array in the tsconfig.json (the one
listing "playwright.config.ts", "scripts/**/*", "src/**/*.d.ts", "src/**/*.ts",
"src/**/*.tsx", "vite.config.ts") and append the new glob entry.

In `@apps/docs-smoke/vite.config.ts`:
- Around line 10-19: Replace the inline tree parameter type with the mdast Root
type: import { Root } from "mdast" and change the returned function signature
from (tree: { children?: Array<{ type?: string }> }) => { ... } to (tree: Root)
=> { ... }; keep the existing runtime logic (checking tree.children and
filtering by node.type !== "yaml") but rely on the Root type for stronger typing
in stripYamlFrontmatter.

In `@packages/docs/package.json`:
- Line 47: The current change removed the environment guard from the
"docs:agent" npm script allowing release builds to run a placeholder generation
step; restore a gated script so generation only runs when an explicit env flag
is set (e.g., DOCS_AGENT=true) or in CI, while keeping the "build" script
calling "docs:agent" unchanged. Update the "docs:agent" entry in package.json to
check for a CI or DOCS_AGENT environment variable and no-op (or fail-fast in CI
absence) otherwise, so the script will only perform agent-doc generation when
intended; reference the "docs:agent" and "build" script names to locate and
modify the entry.

In `@packages/docs/scripts/generate-agent-docs.ts`:
- Around line 11-18: The current fallback to baseUrl (const baseUrl /
INTH_DOCS_AGENT_BASE_URL) logs a mild notice via process.stdout.write which can
be missed in CI; change the behavior so CI is obvious by (1) writing the warning
to process.stderr.write instead of stdout when INTH_DOCS_AGENT_BASE_URL is
unset, (2) and/or injecting a clear marker/comment into generated files
indicating the fallback URL is in use (add logic where the generator writes
output to include a sentinel comment), and (3) if running in CI (detect
process.env.CI or process.env.GITHUB_ACTIONS), fail fast by throwing or exiting
non‑zero rather than silently using the placeholder URL. Ensure you update the
code paths around baseUrl and the existing process.stdout.write usage to
implement these checks and behaviors.

In `@packages/docs/tsup.config.ts`:
- Around line 22-30: The post-build hook in tsup.config.ts unconditionally
prepends "use client"; to the entire components bundle (variable components /
file "dist/components/index.js"), forcing all exports to be client components;
change this by removing the blanket prepend and instead ensure "use client" is
applied only at source-level for interactive components (e.g., leave Selector
as-is and add the directive to source files that use hooks like useState/useId)
or alter the post-build step to target only specific interactive entry files
rather than the whole bundle; if keeping the broad approach is intentional, add
a clear comment or documentation note in the build config explaining that
Callout/Card/Steps and other presentational components will be client-rendered.

In `@README.md`:
- Around line 35-37: The three README bullets repetitively start with "It" —
reword them for varied openings and clearer phrasing: 1) change the first bullet
to start with the outcome/subject (e.g., "Renders real `.mdx` fixture files
using the package's exported `mdxComponents`"), 2) change the second to lead
with the tool or purpose (e.g., "Uses TanStack Start for SSR and hydration
coverage"), and 3) change the third to focus on the behavior (e.g., "Keeps
`AutoTypeTable` in pipeline validation rather than treating it as a live-runtime
feature"); keep the same technical terms (`.mdx`, `mdxComponents`, TanStack
Start, SSR, hydration, `AutoTypeTable`, pipeline validation) but vary sentence
openings for better flow.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 060fb2b2-852d-483e-90dd-b755483c42b7

📥 Commits

Reviewing files that changed from the base of the PR and between e277804 and 602b50d.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (50)
  • README.md
  • apps/docs-smoke/components.json
  • apps/docs-smoke/content/docs/guides/auto-type-table-fixture.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/content/docs/index.mdx
  • apps/docs-smoke/content/docs/meta.json
  • apps/docs-smoke/package.json
  • apps/docs-smoke/playwright.config.ts
  • apps/docs-smoke/scripts/bench.ts
  • apps/docs-smoke/scripts/convert-real.ts
  • apps/docs-smoke/scripts/llm-generate-real.ts
  • apps/docs-smoke/scripts/llm-generate.ts
  • apps/docs-smoke/scripts/mdx-convert.ts
  • apps/docs-smoke/scripts/setup-real-content.ts
  • apps/docs-smoke/scripts/test-pipeline.ts
  • apps/docs-smoke/scripts/test-real.ts
  • apps/docs-smoke/src/components/component-matrix.tsx
  • apps/docs-smoke/src/components/docs-shell.tsx
  • apps/docs-smoke/src/components/site-header.tsx
  • apps/docs-smoke/src/components/ui/badge.tsx
  • apps/docs-smoke/src/components/ui/button.tsx
  • apps/docs-smoke/src/components/ui/card.tsx
  • apps/docs-smoke/src/components/ui/separator.tsx
  • apps/docs-smoke/src/lib/docs.ts
  • apps/docs-smoke/src/lib/utils.ts
  • apps/docs-smoke/src/mdx-components.tsx
  • apps/docs-smoke/src/mdx.d.ts
  • apps/docs-smoke/src/routeTree.gen.ts
  • apps/docs-smoke/src/router.tsx
  • apps/docs-smoke/src/routes/__root.tsx
  • apps/docs-smoke/src/routes/docs/guides/components-fixture.tsx
  • apps/docs-smoke/src/routes/docs/guides/quickstart.tsx
  • apps/docs-smoke/src/routes/docs/index.tsx
  • apps/docs-smoke/src/routes/docs/route.tsx
  • apps/docs-smoke/src/routes/index.tsx
  • apps/docs-smoke/src/routes/playground.tsx
  • apps/docs-smoke/src/styles.css
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • apps/docs-smoke/tsconfig.json
  • apps/docs-smoke/type-fixtures/pipeline-example.ts
  • apps/docs-smoke/vite.config.ts
  • biome.jsonc
  • package.json
  • packages/docs/README.md
  • packages/docs/package.json
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/components/components.test.tsx
  • packages/docs/src/remark/plugins/type-table.remark.ts
  • packages/docs/tsup.config.ts

Comment thread apps/docs-smoke/content/docs/guides/components-fixture.mdx
Comment thread apps/docs-smoke/package.json Outdated
Comment thread apps/docs-smoke/playwright.config.ts Outdated
webServer: {
command: "bun run dev",
port: 3000,
reuseExistingServer: process.env.CI !== "true",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Harden CI detection for reuseExistingServer.

The strict string comparison can miss CI environments where CI is set to non-"true" truthy values.

Suggested fix
-    reuseExistingServer: process.env.CI !== "true",
+    reuseExistingServer: !process.env.CI,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
reuseExistingServer: process.env.CI !== "true",
reuseExistingServer: !process.env.CI,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs-smoke/playwright.config.ts` at line 14, The current strict check
reuseExistingServer: process.env.CI !== "true" misses many CI setups; change it
to compute a robust isCI flag from process.env.CI (e.g., treat "1","true","yes"
(case-insensitive) or any non-empty value as CI) and set reuseExistingServer to
!isCI. Update the code around reuseExistingServer and process.env.CI to derive
isCI once (used by reuseExistingServer) so CI environments with varied truthy
values are correctly detected.

Comment thread apps/docs-smoke/scripts/mdx-convert.ts Outdated
Comment thread apps/docs-smoke/scripts/setup-real-content.ts
Comment thread apps/docs-smoke/vite.config.ts
Comment thread packages/docs/package.json Outdated
"check-types": "tsc --noEmit",
"docs:agent": "bun run docs:agent:check-env && bun run docs:agent:generate",
"docs:agent:check-env": "bun -e \"if (!process.env.INTH_DOCS_AGENT_BASE_URL) throw new Error('INTH_DOCS_AGENT_BASE_URL must be set')\"",
"docs:agent": "bun run docs:agent:generate",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Release builds can silently ship placeholder agent-doc URLs.

Line 47 removes the env gate from docs:agent, but build still executes docs:agent first. That weakens fail-fast behavior for publish/release paths.

Proposed fix (keep local default, restore CI/release guard)
   "scripts": {
-    "build": "bun run docs:agent && tsup",
+    "build": "bun run docs:agent && tsup",
+    "build:ci": "bun run docs:agent:ci && tsup",
     "dev": "tsup --watch",
     "check-types": "tsc --noEmit",
     "docs:agent": "bun run docs:agent:generate",
+    "docs:agent:ci": "bun run docs:agent:check-env && bun run docs:agent:generate",
+    "docs:agent:check-env": "node -e \"if(!process.env.INTH_DOCS_AGENT_BASE_URL){throw new Error('INTH_DOCS_AGENT_BASE_URL is required for CI/release builds')}\"",
     "docs:agent:generate": "bun run ./scripts/generate-agent-docs.ts",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/package.json` at line 47, The current change removed the
environment guard from the "docs:agent" npm script allowing release builds to
run a placeholder generation step; restore a gated script so generation only
runs when an explicit env flag is set (e.g., DOCS_AGENT=true) or in CI, while
keeping the "build" script calling "docs:agent" unchanged. Update the
"docs:agent" entry in package.json to check for a CI or DOCS_AGENT environment
variable and no-op (or fail-fast in CI absence) otherwise, so the script will
only perform agent-doc generation when intended; reference the "docs:agent" and
"build" script names to locate and modify the entry.

Comment thread packages/docs/scripts/generate-agent-docs.ts Outdated
Comment on lines +22 to +30
const components = "dist/components/index.js";
const contents = await readFile(cli, "utf8");
if (!contents.startsWith("#!")) {
await writeFile(cli, `#!/usr/bin/env node\n${contents}`);
}
const componentContents = await readFile(components, "utf8");
if (!componentContents.startsWith('"use client";')) {
await writeFile(components, `"use client";\n${componentContents}`);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider the implications of blanket "use client" on all components.

This post-build hook prepends "use client"; to the entire components bundle, marking all exports as client components. While this ensures interactive components like Selector (which uses useState/useId) work correctly in RSC environments, it also forces purely presentational components (Callout, Card, Steps, etc.) to be client-rendered unnecessarily.

If this is an intentional trade-off for simpler consumer DX, consider documenting this behavior. Otherwise, a more granular approach would be to ensure only interactive components have the directive at the source level (which Selector already does).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/tsup.config.ts` around lines 22 - 30, The post-build hook in
tsup.config.ts unconditionally prepends "use client"; to the entire components
bundle (variable components / file "dist/components/index.js"), forcing all
exports to be client components; change this by removing the blanket prepend and
instead ensure "use client" is applied only at source-level for interactive
components (e.g., leave Selector as-is and add the directive to source files
that use hooks like useState/useId) or alter the post-build step to target only
specific interactive entry files rather than the whole bundle; if keeping the
broad approach is intentional, add a clear comment or documentation note in the
build config explaining that Callout/Card/Steps and other presentational
components will be client-rendered.

Comment thread README.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
apps/docs-smoke/package.json (1)

38-38: ⚠️ Potential issue | 🟠 Major

Pin nitro to an exact tested version, not latest.

Line 38 is non-deterministic and can silently change behavior between installs/CI runs.

🔧 Suggested change
-    "nitro": "latest",
+    "nitro": "x.y.z",
#!/bin/bash
set -euo pipefail

echo "Current spec in apps/docs-smoke/package.json:"
jq -r '.dependencies.nitro' apps/docs-smoke/package.json

echo
echo "Lockfiles present:"
fd -H '^(bun\.lock|bun\.lockb|pnpm-lock\.yaml|package-lock\.json|yarn\.lock)$' || true

echo
echo "Resolved nitro entries (if present):"
for f in bun.lock bun.lockb pnpm-lock.yaml package-lock.json yarn.lock; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    rg -n -C2 'nitro' "$f" | head -40 || true
  fi
done

echo
echo 'Expected: package.json should use an exact stable semver (not "latest").'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs-smoke/package.json` at line 38, The dependency "nitro" in
package.json is pinned to "latest" which is non-deterministic; replace the
"nitro": "latest" entry with an exact tested semver (for example the resolved
version from your lockfile like "x.y.z") so installs are deterministic, commit
the change, and re-run the provided verification script to confirm the
lockfile(s) and resolved nitro entries match the pinned version. Ensure you
update the package.json dependency named "nitro" and use the exact version
string (not a range or "latest").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@apps/docs-smoke/package.json`:
- Line 38: The dependency "nitro" in package.json is pinned to "latest" which is
non-deterministic; replace the "nitro": "latest" entry with an exact tested
semver (for example the resolved version from your lockfile like "x.y.z") so
installs are deterministic, commit the change, and re-run the provided
verification script to confirm the lockfile(s) and resolved nitro entries match
the pinned version. Ensure you update the package.json dependency named "nitro"
and use the exact version string (not a range or "latest").

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b0698bfe-e82a-4fea-82a9-b8793edfff6d

📥 Commits

Reviewing files that changed from the base of the PR and between 602b50d and d4946bb.

📒 Files selected for processing (1)
  • apps/docs-smoke/package.json
📜 Review details
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/*.{ts,tsx} : Use Next.js App Router conventions in the docs app
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.{ts,tsx} : Implement responsive design with Tailwind CSS in the docs app; use a mobile-first approach
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/page.tsx : Place page components in appropriate route segments within the docs app
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in MDX documentation pages of the docs app
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.{ts,tsx} : Implement responsive design using Tailwind breakpoints in the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/app/**/* : Use Next.js App Router conventions
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in documentation
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document props and usage examples in Elements package components
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When configuring devtools, load the devtools-vite-plugin skill file from node_modules/tanstack/devtools-vite/skills/devtools-vite-plugin/SKILL.md

Applied to files:

  • apps/docs-smoke/package.json
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx,md} : Include TypeScript examples in Elements package documentation

Applied to files:

  • apps/docs-smoke/package.json
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Use Vitest for testing framework

Applied to files:

  • apps/docs-smoke/package.json
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.tsx : Use TypeScript for all components (.tsx) in the docs app

Applied to files:

  • apps/docs-smoke/package.json
🔇 Additional comments (3)
apps/docs-smoke/package.json (3)

28-37: No additional actionable findings in this dependency block beyond Line 38.

Also applies to: 39-43


46-57: No actionable issues found in this devDependency block.


7-25: Script wiring looks consistent with the demo/E2E flow.

Line 7 (--port 3000) and Line 11 align with apps/docs-smoke/playwright.config.ts (baseURL/webServer on 3000), and the pipeline:* delegation keeps old entrypoints intact.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

♻️ Duplicate comments (1)
apps/docs-smoke/scripts/mdx-convert.ts (1)

20-23: ⚠️ Potential issue | 🔴 Critical

Fix root path depth: current joins point to apps/ and scripts/*, not the app/repo roots.

This path math regresses behavior: repoRoot resolves one level too shallow, and srcDir/outDir are now under scripts/, which can break conversion input/output and AutoTypeTable extraction base-path resolution.

♻️ Proposed fix
 const scriptsRoot = dirname(fileURLToPath(import.meta.url));
-const repoRoot = join(scriptsRoot, "..", "..");
-const srcDir = join(scriptsRoot, "content");
-const outDir = join(scriptsRoot, "public");
+const appRoot = join(scriptsRoot, "..");
+const repoRoot = join(appRoot, "..", "..");
+const srcDir = join(appRoot, "content");
+const outDir = join(appRoot, "public");

Also applies to: 26-26

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs-smoke/scripts/mdx-convert.ts` around lines 20 - 23, repoRoot is
currently only two levels up from scriptsRoot which points at apps/.../scripts,
so repoRoot should go up three levels and srcDir/outDir should be built off
repoRoot (not scriptsRoot); change repoRoot to join(scriptsRoot, "..", "..",
"..") and update srcDir and outDir to join(repoRoot,
"<app-specific-path>/content") and join(repoRoot, "<app-specific-path>/public")
(i.e. make srcDir/outDir relative to repoRoot rather than scriptsRoot) so
scriptsRoot, repoRoot, srcDir, and outDir resolve to the repository and app
content/public roots correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs-smoke/src/components/ui/button.tsx`:
- Around line 41-52: The Button drops the type prop when asChild is true (so
<Button asChild type="submit"> loses type); update the props spread for Comp so
type is forwarded for asChild usage while keeping the default "button" when not
asChild. Concretely, change the spread logic around ...(asChild ? {} : { type:
type ?? "button" }) to spread a computed type object that forwards type when
provided for asChild (e.g., when asChild pass { type } only if type is defined)
and otherwise supplies { type: type ?? "button" }; update the return in the
Button component (symbols: ButtonProps, asChild, Slot, Comp, type, ref,
className, buttonVariants, cn) to use that computed object so type is not
silently dropped.

In `@apps/docs-smoke/src/routes/playground.tsx`:
- Around line 71-74: Replace the unsafe type assertion in the content assignment
by adding a type guard function (e.g., isScenarioKey) that checks whether a
value is a key of scenarioContent, implement it to return value is keyof typeof
scenarioContent using the runtime "in" check, and then use that guard in the
conditional (e.g., if (isScenarioKey(activeValue)) content =
scenarioContent[activeValue];) so activeValue is properly narrowed without using
"as keyof typeof scenarioContent".

In `@apps/docs-smoke/tests/e2e/smoke.e2e.ts`:
- Around line 104-119: In the "playground route updates selector content" test,
avoid querying page.locator("[data-inth-selector-content]") three times: cache
that locator in a local variable (e.g., const selectorContent =
page.locator("[data-inth-selector-content]")) after navigating and selecting the
option via page.selectOption("[data-inth-selector-control]", "pipeline"), then
use selectorContent for the subsequent expects (toHaveAttribute, toContainText
"Pipeline test", toContainText "stable `basePath`") to improve readability and
reduce repeated DOM queries.

In `@packages/docs/scripts/generate-agent-docs.ts`:
- Around line 11-16: The current assignment to baseUrl uses the nullish
coalescing operator so an empty INTH_DOCS_AGENT_BASE_URL ("") bypasses the
fallback; change the logic to treat empty/whitespace strings as missing: read
and trim process.env.INTH_DOCS_AGENT_BASE_URL into a local (e.g., envBase =
process.env.INTH_DOCS_AGENT_BASE_URL?.trim()), then set baseUrl = envBase ?
envBase : "https://example.invalid/@inth/docs" and update the existing check
that uses isCI to test the same envBase truthiness (e.g., if (!envBase) { if
(isCI) ... }) so downstream uses of baseUrl are never an empty string.

---

Duplicate comments:
In `@apps/docs-smoke/scripts/mdx-convert.ts`:
- Around line 20-23: repoRoot is currently only two levels up from scriptsRoot
which points at apps/.../scripts, so repoRoot should go up three levels and
srcDir/outDir should be built off repoRoot (not scriptsRoot); change repoRoot to
join(scriptsRoot, "..", "..", "..") and update srcDir and outDir to
join(repoRoot, "<app-specific-path>/content") and join(repoRoot,
"<app-specific-path>/public") (i.e. make srcDir/outDir relative to repoRoot
rather than scriptsRoot) so scriptsRoot, repoRoot, srcDir, and outDir resolve to
the repository and app content/public roots correctly.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: aac45bd0-92a8-41b3-9f03-384aed33ec20

📥 Commits

Reviewing files that changed from the base of the PR and between d4946bb and 9e5b6df.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • README.md
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
  • apps/docs-smoke/package.json
  • apps/docs-smoke/playwright.config.ts
  • apps/docs-smoke/scripts/mdx-convert.ts
  • apps/docs-smoke/scripts/setup-real-content.ts
  • apps/docs-smoke/src/components/component-matrix.tsx
  • apps/docs-smoke/src/components/site-header.tsx
  • apps/docs-smoke/src/components/ui/button.tsx
  • apps/docs-smoke/src/lib/docs.ts
  • apps/docs-smoke/src/routes/docs/index.tsx
  • apps/docs-smoke/src/routes/playground.tsx
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • apps/docs-smoke/tsconfig.json
  • apps/docs-smoke/vite.config.ts
  • packages/docs/package.json
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/tsup.config.ts

Comment thread apps/docs-smoke/src/components/ui/button.tsx
Comment thread apps/docs-smoke/src/routes/playground.tsx Outdated
Comment thread apps/docs-smoke/tests/e2e/smoke.e2e.ts
Comment thread packages/docs/scripts/generate-agent-docs.ts Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs-smoke/tests/e2e/smoke.e2e.ts`:
- Around line 9-14: The tests parse HTML from the HTTP response without first
asserting the response succeeded, which can yield false positives; update each
test that calls request.get(...) (the response variable used before converting
to html) to assert the response status (e.g., expect(response.status).toBe(200)
or expect(response.ok).toBeTruthy()) immediately after awaiting request.get(...)
and before calling response.text() or performing substring assertions (affecting
the blocks that define response and html and then check html contains ...).
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: da5bf72e-af67-4b4a-ac5b-53d87f749ae2

📥 Commits

Reviewing files that changed from the base of the PR and between 9e5b6df and 66c3787.

📒 Files selected for processing (4)
  • apps/docs-smoke/src/components/ui/button.tsx
  • apps/docs-smoke/src/routes/playground.tsx
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/scripts/generate-agent-docs.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

Files:

  • packages/docs/scripts/generate-agent-docs.ts
  • apps/docs-smoke/src/routes/playground.tsx
  • apps/docs-smoke/src/components/ui/button.tsx
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use descriptive names for functions, variables, and types for meaningful naming
Add comments for complex logic, but prefer self-documenting code

Files:

  • packages/docs/scripts/generate-agent-docs.ts
  • apps/docs-smoke/src/routes/playground.tsx
  • apps/docs-smoke/src/components/ui/button.tsx
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{jsx,tsx}: Use function components over class components in React
Call hooks at the top level only, never conditionally
Specify all dependencies in hook dependency arrays correctly
Use the key prop for elements in iterables (prefer unique IDs over array indices)
Nest children between opening and closing tags instead of passing as props
Don't define components inside other components
Avoid dangerouslySetInnerHTML unless absolutely necessary
Use proper image components (e.g., Next.js <Image>) over <img> tags
Use Next.js <Image> component for images
Use next/head or App Router metadata API for head elements in Next.js
Use Server Components for async data fetching instead of async Client Components in Next.js
Use ref as a prop instead of React.forwardRef in React 19+

Files:

  • apps/docs-smoke/src/routes/playground.tsx
  • apps/docs-smoke/src/components/ui/button.tsx
**/*.{jsx,tsx,html}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{jsx,tsx,html}: Use semantic HTML and ARIA attributes for accessibility: provide meaningful alt text for images, use proper heading hierarchy, add labels for form inputs, include keyboard event handlers alongside mouse events, use semantic elements instead of divs with roles
Add rel="noopener" when using target="_blank" on links

Files:

  • apps/docs-smoke/src/routes/playground.tsx
  • apps/docs-smoke/src/components/ui/button.tsx
🧠 Learnings (67)
📓 Common learnings
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in MDX documentation pages of the docs app
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in documentation
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/*.{ts,tsx} : Use Next.js App Router conventions in the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document props and usage examples
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document props and usage examples in Elements package components
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.tsx : Use TypeScript for all components (.tsx) in the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx,md} : Include TypeScript examples in Elements package documentation
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Document expected failures with `throws` in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/scripts/generate-agent-docs.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Use optional chaining (`?.`) and nullish coalescing (`??`) for safer property access

Applied to files:

  • packages/docs/scripts/generate-agent-docs.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use optional chaining (`?.`) and nullish coalescing (`??`) for safer property access

Applied to files:

  • packages/docs/scripts/generate-agent-docs.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use optional chaining (`?.`) and nullish coalescing (`??`) for safer property access

Applied to files:

  • packages/docs/scripts/generate-agent-docs.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't use optional chaining where undefined values aren't allowed

Applied to files:

  • packages/docs/scripts/generate-agent-docs.ts
📚 Learning: 2025-12-01T15:20:41.963Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/posthog-integration.mdc:0-0
Timestamp: 2025-12-01T15:20:41.963Z
Learning: Applies to **/*.{js,ts,tsx,jsx} : Never hallucinate an API key. Instead, always use the API key populated in the .env file.

Applied to files:

  • packages/docs/scripts/generate-agent-docs.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't misuse the non-null assertion operator (!) in TypeScript files

Applied to files:

  • packages/docs/scripts/generate-agent-docs.ts
  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Use optional and default parameter strings correctly in JSDoc comments

Applied to files:

  • packages/docs/scripts/generate-agent-docs.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't hardcode sensitive data like API keys and tokens

Applied to files:

  • packages/docs/scripts/generate-agent-docs.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/page.tsx : Place page components in appropriate route segments within the docs app

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/*.{ts,tsx} : Use Next.js App Router conventions in the docs app

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/app/**/page.tsx : Place page components in appropriate route segments

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When adding new routes and pages, load the router-core skill file from node_modules/tanstack/router-core/skills/router-core/SKILL.md

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/app/**/* : Use Next.js App Router conventions

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When adding auth and route guards, load the router-core auth-and-guards skill file from node_modules/tanstack/router-core/skills/router-core/auth-and-guards/SKILL.md

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When implementing code splitting, load the router-core code-splitting skill file from node_modules/tanstack/router-core/skills/router-core/code-splitting/SKILL.md

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When implementing type safety patterns, load the router-core type-safety skill file from node_modules/tanstack/router-core/skills/router-core/type-safety/SKILL.md

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When setting up navigation and links between pages, load the router-core navigation skill file from node_modules/tanstack/router-core/skills/router-core/navigation/SKILL.md

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/{layout,page}.tsx : Keep layouts and pages separate in the docs app directory

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Document components with purpose and use case, required and optional props, context requirements, example usage, and common pitfalls

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{tsx,jsx} : For each component, documentation should include: purpose and use case, required and optional props, context requirements, example usage, and common pitfalls

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Extract complex conditions into well-named boolean variables

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in MDX documentation pages of the docs app

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/pkgs/open-graph/**/*.{ts,tsx} : Use `lineClamp` property to prevent text overflow; test with real content and edge cases

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Extract complex conditions into well-named boolean variables

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't use unnecessary fragments

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{ts,tsx} : Use const assertions (`as const`) for immutable values and literal types

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{ts,tsx} : Leverage TypeScript's type narrowing instead of type assertions

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use const assertions (`as const`) for immutable values and literal types

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Leverage TypeScript's type narrowing instead of type assertions

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use `as const` instead of literal types and type annotations

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Implement compound components pattern with components namespaced under a single parent (e.g., FormWizard.Root, FormWizard.Step), using React Context for state management

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document props and usage examples

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{tsx,jsx} : Use `next/head` or App Router metadata API for head elements

Applied to files:

  • apps/docs-smoke/src/routes/playground.tsx
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Always include a `type` attribute for button elements

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Implement asChild prop using Radix UI's Slot to allow component replacement while maintaining functionality and support custom styling

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.{tsx,jsx} : Follow the Radix UI primitives pattern

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2026-03-19T22:57:54.730Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/typography.mdc:0-0
Timestamp: 2026-03-19T22:57:54.730Z
Learning: Applies to **/*.{ts,tsx,css} : Use `text-label-xs` through `text-label-xl` tokens for UI labels in buttons, form fields, and other interface controls

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{tsx,jsx} : Implement asChild prop using Radix UI's Slot for composition support

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Follow the Radix UI primitives pattern in Elements package components

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Each component should use forwardRef pattern with proper ElementRef typing, support asChild prop, className customization, and extend HTMLAttributes

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{tsx,jsx} : Use ref as a prop instead of `React.forwardRef` (React 19+)

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{tsx,jsx} : Implement component base using `forwardRef`, supporting asChild, className, and spreading props

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{jsx,tsx} : Use ref as a prop instead of `React.forwardRef` in React 19+

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{jsx,tsx} : Use ref as a prop instead of `React.forwardRef`

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{tsx,jsx} : Each component should follow the specified structure using `forwardRef`, proper prop typing, and support for `asChild`, `className`, and HTML attributes

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{ts,tsx} : Use proper type definitions for all props and refs in TypeScript components

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx} : Always implement full TypeScript support with proper type definitions for all props and refs, including generic constraints where necessary

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{tsx,jsx} : Allow component replacement while maintaining functionality via asChild prop

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.{tsx,jsx} : Support composition through `asChild` prop

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Support composition through `asChild` prop in Elements package components

Applied to files:

  • apps/docs-smoke/src/components/ui/button.tsx
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Test accessibility features in Elements package component tests

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include unit tests for components, integration tests for component combinations, accessibility tests, and error boundary tests

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Test accessibility features

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Include integration tests for Elements package components

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include accessibility tests for components

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Test with screen readers in Elements package component tests

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include integration tests for component combinations

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2026-03-19T22:58:00.031Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2026-03-19T22:58:00.031Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write comprehensive unit tests with clear test case names describing what is being tested

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Include integration tests

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Test error boundaries in Elements package component tests

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Avoid done callbacks in async tests - use async/await instead

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Write unit tests for components

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Test error boundaries

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
🔇 Additional comments (4)
packages/docs/scripts/generate-agent-docs.ts (1)

11-26: Fallback URL handling and CI guard look correct.

This now correctly normalizes empty/whitespace env values, fails fast in CI, and emits a clear local warning while preserving a deterministic fallback URL.

As per coding guidelines: "Use optional chaining (?.) and nullish coalescing (??) for safer property access" — using process.env.INTH_DOCS_AGENT_BASE_URL?.trim() improves safe env access.

apps/docs-smoke/src/components/ui/button.tsx (1)

30-64: Button polymorphic behavior and button-type safety look correct.

Good fix: native button now defaults to type="button", while asChild preserves explicit type only when provided, and ref/className forwarding remains intact.

apps/docs-smoke/src/routes/playground.tsx (1)

15-37: Type-safe scenario rendering is implemented cleanly.

Using as const + isScenarioKey gives safe indexing without assertions, and the null fallback keeps invalid states harmless.

Also applies to: 76-95

apps/docs-smoke/tests/e2e/smoke.e2e.ts (1)

42-47: Nice locator reuse in assertions.

Caching [data-inth-auto-type-table] and [data-inth-selector-content] improves readability and reduces repeated locator construction.

Also applies to: 109-113

Comment on lines +9 to +14
const response = await request.get("/");
const html = await response.text();

expect(html).toContain("Reference app for");
expect(html).toContain("Consumer contract");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Assert HTTP success before validating SSR HTML content.

On Line 9, Line 29, Line 53, and Line 83, the tests parse HTML without asserting response success first. A 4xx/5xx page could still satisfy substring checks and produce false positives.

Proposed fix
 test("home route renders the consumer QA overview and route links", async ({
   page,
   request,
 }) => {
   const response = await request.get("/");
+  expect(response.ok()).toBeTruthy();
   const html = await response.text();

   expect(html).toContain("Reference app for");
   expect(html).toContain("Consumer contract");
@@
 test("docs route renders package docs and extracted AutoTypeTable output", async ({
   page,
   request,
 }) => {
   const response = await request.get("/docs");
+  expect(response.ok()).toBeTruthy();
   const html = await response.text();

   expect(html).toContain("@inth/docs");
   expect(html).toContain("PipelineExampleOptions");
@@
 test("quickstart route renders MDX content on the server and hydrates interactive adapters", async ({
   page,
   request,
 }) => {
   const response = await request.get("/docs/guides/quickstart");
+  expect(response.ok()).toBeTruthy();
   const html = await response.text();

   expect(html).toContain("Quickstart");
@@
 test("components fixture renders package adapters and preserves external link safety", async ({
   page,
   request,
 }) => {
   const response = await request.get("/docs/guides/components-fixture");
+  expect(response.ok()).toBeTruthy();
   const html = await response.text();

   expect(html).toContain("Components Fixture");

Also applies to: 29-34, 53-59, 83-88

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs-smoke/tests/e2e/smoke.e2e.ts` around lines 9 - 14, The tests parse
HTML from the HTTP response without first asserting the response succeeded,
which can yield false positives; update each test that calls request.get(...)
(the response variable used before converting to html) to assert the response
status (e.g., expect(response.status).toBe(200) or
expect(response.ok).toBeTruthy()) immediately after awaiting request.get(...)
and before calling response.text() or performing substring assertions (affecting
the blocks that define response and html and then check html contains ...).

@KayleeWilliams KayleeWilliams merged commit b922d77 into main Apr 21, 2026
1 of 2 checks passed
@KayleeWilliams KayleeWilliams deleted the KayleeWilliams/docs-demo-app branch April 21, 2026 14:14
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.

1 participant