Skip to content

Add docs authoring components#6

Merged
KayleeWilliams merged 3 commits into
mainfrom
KayleeWilliams/docs-components-plan
Apr 22, 2026
Merged

Add docs authoring components#6
KayleeWilliams merged 3 commits into
mainfrom
KayleeWilliams/docs-components-plan

Conversation

@KayleeWilliams
Copy link
Copy Markdown
Collaborator

Adds Accordion, Example, and TopicSwitcher to the shared @inth/docs MDX component map with matching markdown-flattening remark plugins. Updates the docs-smoke fixture, styles, component matrix, generated search artifacts, and packaged agent docs to demonstrate the new components. Adds component, conversion, and Playwright coverage for the expanded fixture.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b0b7c3be-876a-4f95-a4f7-a942cb9d5b4d

📥 Commits

Reviewing files that changed from the base of the PR and between 340a291 and 344ed51.

⛔ Files ignored due to path filters (2)
  • apps/docs-smoke/src/generated/docs-search-content.json is excluded by !**/generated/**
  • apps/docs-smoke/src/generated/docs-search-index.json is excluded by !**/generated/**
📒 Files selected for processing (4)
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/content/docs/index.mdx
  • apps/docs-smoke/src/lib/docs.ts
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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:

  • apps/docs-smoke/src/lib/docs.ts
  • 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:

  • apps/docs-smoke/src/lib/docs.ts
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
🧠 Learnings (29)
📓 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/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/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 : Keep documentation organized by categories
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/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{tsx,jsx} : Include proper ARIA attributes in components
📚 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/lib/docs.ts
  • apps/docs-smoke/content/docs/index.mdx
📚 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/lib/docs.ts
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/content/docs/index.mdx
📚 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/src/lib/docs.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/**/*.{ts,tsx} : Document all props and types in Elements package TypeScript code

Applied to files:

  • apps/docs-smoke/src/lib/docs.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/**/*.{ts,tsx} : Document props and usage examples

Applied to files:

  • apps/docs-smoke/src/lib/docs.ts
  • apps/docs-smoke/content/docs/index.mdx
📚 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/src/lib/docs.ts
  • 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/**/*.{ts,tsx} : Document props and usage examples in Elements package components

Applied to files:

  • apps/docs-smoke/src/lib/docs.ts
  • apps/docs-smoke/content/docs/index.mdx
📚 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/lib/docs.ts
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/content/docs/index.mdx
📚 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/**/*.mdx : Keep documentation organized by categories

Applied to files:

  • apps/docs-smoke/src/lib/docs.ts
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/content/docs/index.mdx
📚 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/**/*.mdx : Include code examples where appropriate in documentation

Applied to files:

  • apps/docs-smoke/src/lib/docs.ts
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/content/docs/index.mdx
📚 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/**/*.mdx : Use MDX for documentation pages

Applied to files:

  • apps/docs-smoke/src/lib/docs.ts
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/content/docs/index.mdx
📚 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 : Use MDX for documentation pages in the docs app

Applied to files:

  • apps/docs-smoke/src/lib/docs.ts
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/content/docs/index.mdx
📚 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/content/docs/guides/quickstart.mdx
📚 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/src/components/**/*.tsx : Place reusable components in `src/components` within the docs app

Applied to files:

  • apps/docs-smoke/content/docs/guides/quickstart.mdx
📚 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/content/docs/guides/quickstart.mdx
📚 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/content/docs/guides/quickstart.mdx
📚 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} : Test with screen readers in Elements package component 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: 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: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: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: 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: 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: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
📚 Learning: 2026-04-18T15:01:52.722Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.722Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Use meaningful variable names instead of magic numbers - extract constants with descriptive names

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 **/*.{ts,tsx,js,jsx} : Use meaningful variable names instead of magic numbers - extract constants with descriptive names

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.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 meaningful variable names instead of magic numbers - extract constants with descriptive names

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
🔇 Additional comments (5)
apps/docs-smoke/content/docs/index.mdx (1)

126-126: Good specificity update for fixture scope.

Line 126 now explicitly lists the runtime adapters covered by the fixture, which makes the docs-smoke contract clearer and easier to validate against tests.

apps/docs-smoke/content/docs/guides/quickstart.mdx (1)

71-77: TopicSwitcher guidance is consistent with conversion behavior.

This doc update correctly connects runtime authoring (TopicSwitcher) with pipeline placeholder resolution ({framework}), which matches the implemented remark/docs-context behavior.

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

7-7: Nice fix: callout expectation is now explicit and maintainable.

Using COMPONENT_FIXTURE_CALLOUT_COUNT makes fixture intent clearer and avoids a brittle inline number.


134-141: Expanded fixture assertions correctly cover new adapters.

The new checks for [data-inth-accordion], [data-inth-example], and [data-inth-topic-switcher] are a solid smoke-level guard for the added MDX components.

apps/docs-smoke/src/lib/docs.ts (1)

150-164: Component matrix expansion is well-structured and consistent.

The three new entries are clearly named and correctly annotated with runtime/pipeline/agent coverage, matching the fixture and e2e updates.


📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added Accordion, Example, and TopicSwitcher UI components (collapsible sections, runnable examples with preview/source files, and topic/framework navigation with active state).
  • Documentation
    • Expanded guides, quickstart, and component docs with usage, authoring guidance, examples, and framework-topic notes.
  • Styles
    • Added CSS for accordion, example card, and topic switcher layouts.
  • Tests
    • Extended unit and smoke tests to validate rendering, accessibility, and conversion output for the new components.

Walkthrough

Adds three MDX adapter components—Accordion, Example, TopicSwitcher—with React implementations, CSS, remark-to-markdown transformers, docs updates, tests, and integration into mdxComponents, default remark pipeline, and docs-smoke fixtures.

Changes

Cohort / File(s) Summary
React Component Implementations
packages/docs/src/components/accordion.tsx, packages/docs/src/components/example.tsx, packages/docs/src/components/topic-switcher.tsx
New exported React components and prop types: Accordion/AccordionItem, Example (preview/code/sourceFiles handling, stable keys), and TopicSwitcher (items, active state, external-link handling, aria states).
MDX Integration & Exports
packages/docs/src/components/index.ts, packages/docs/src/components/mdx-components.ts
Barrel exports and mdxComponents map updated to expose the three new components for MDX rendering and type expansion.
Remark Conversion Plugins
packages/docs/src/remark/plugins/accordion.remark.ts, packages/docs/src/remark/plugins/example.remark.ts, packages/docs/src/remark/plugins/topic-switcher.remark.ts, packages/docs/src/remark/index.ts
Added and exported three remark transformers converting Accordion/Example/TopicSwitcher JSX into mdast (titles, paragraphs, fenced code, link lists, placeholder resolution) and appended them to defaultRemarkPlugins.
Docs & Authoring Guidance
packages/docs/agent-docs-src/docs/components.mdx, packages/docs/agent-docs/docs/components.md, packages/docs/agent-docs/docs/llms-full/authoring/components.txt
Expanded component inventory and authoring docs with usage, TSX examples, and notes (e.g., remark flattening for Accordion, Example code-as-data, TopicSwitcher items schema).
Smoke Demo & MDX Fixtures
apps/docs-smoke/content/docs/guides/components-fixture.mdx, apps/docs-smoke/content/docs/guides/quickstart.mdx, apps/docs-smoke/content/docs/index.mdx
Fixture updates adding UI sections for accordion/example/topic-switcher, swap FrameworkTabs → TopicSwitcher, and update runtime components description and callout content.
Styling
apps/docs-smoke/src/styles.css
Added Tailwind-style CSS rules keyed to data-inth-* attributes for accordion, example card (header/preview/code/source file), and topic switcher (list, active state, descriptions).
Tests & Matrix
packages/docs/src/components/components.test.tsx, packages/docs/src/remark/remark-output.test.ts, apps/docs-smoke/tests/e2e/smoke.e2e.ts, apps/docs-smoke/src/lib/docs.ts
Added/expanded Vitest cases for new components and remark conversions, e2e assertions (new data-inth-* elements and updated callout count), and appended componentMatrix entries.

Sequence Diagram(s)

sequenceDiagram
  participant Author as MDX Author
  participant MDX as MDX Renderer (mdxComponents)
  participant Runtime as Runtime Components (Accordion / Example / TopicSwitcher)
  participant Remark as Remark Plugins
  participant Output as Markdown / Rendered HTML

  Author->>MDX: Author MDX using <Accordion>/<Example>/<TopicSwitcher>
  MDX->>Runtime: Map JSX tags to React components via mdxComponents
  Runtime->>Output: Render HTML with data-inth-* attributes
  MDX->>Remark: Conversion step invokes remark plugins for these components
  Remark->>Output: Emit mdast nodes (paragraphs, lists, fenced code) with placeholder resolution
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐰 I hopped through MDX fields today,
Folds and examples came out to play,
Topics pivot, links take flight,
Code and prose now spring to light,
Docs bloom bright in morning's ray. ✨

🚥 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 'Add docs authoring components' clearly and concisely summarizes the main change: introducing three new MDX authoring components (Accordion, Example, TopicSwitcher) to the documentation system.
Description check ✅ Passed The description is directly related to the changeset, detailing the addition of three new components to the MDX map with remark plugins, updates to fixtures and styles, and test coverage additions.
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

@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

🤖 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`:
- Line 133: Replace the magic number 3 in the assertion await
expect(page.locator("[data-inth-callout]")).toHaveCount(3) with a named constant
(e.g., EXPECTED_CALLOUT_COUNT or CALLOUT_EXPECTED_COUNT) declared near the top
of the test file or test block; update the assertion to await
expect(page.locator("[data-inth-callout]")).toHaveCount(EXPECTED_CALLOUT_COUNT)
so intent is explicit and easier to update as fixtures change.

In `@packages/docs/src/components/example.tsx`:
- Around line 48-61: The key generation in the sourceFiles.map callback
(currently using `${sourceFile.filename}:${sourceFile.language ?? "tsx"}`) can
collide for duplicate filename+language entries; update the map to include a
stable fallback such as the map index or a unique id (e.g., map((sourceFile,
idx) => ...) and set the key to `${sourceFile.filename}:${sourceFile.language ??
"tsx"}:${idx}` or use a sourceFile.id when available) so each rendered <div>
gets a truly unique key.

In `@packages/docs/src/remark/plugins/topic-switcher.remark.ts`:
- Around line 112-115: When removing an empty items node (the block that checks
if items.length === 0), adjust the visitor return to prevent skipping the next
sibling: after parent.children.splice(index, 1) return [SKIP, index] instead of
SKIP so traversal resumes at the correct shifted index; update the return in the
visitor handling that branch (the code using parent.children.splice(index, 1),
index, and SKIP) accordingly.
- Around line 32-42: The isTopicItem type guard currently uses a type assertion
("as Record<string, unknown>") which bypasses TypeScript narrowing; change it to
check property existence with the in operator (e.g., 'value' in value, 'label'
in value, 'href' in value) and then perform the typeof checks on those
properties so you don't use assertions—update the isTopicItem function to first
ensure the keys exist on the input and then verify typeof item.value ===
"string", typeof item.label === "string", and typeof item.href === "string"
without any "as" casts.
🪄 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: 7f38789b-5def-4f2b-9b41-1b8c48a152cb

📥 Commits

Reviewing files that changed from the base of the PR and between 6556ed5 and a790bee.

⛔ Files ignored due to path filters (2)
  • apps/docs-smoke/src/generated/docs-search-content.json is excluded by !**/generated/**
  • apps/docs-smoke/src/generated/docs-search-index.json is excluded by !**/generated/**
📒 Files selected for processing (20)
  • 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/src/lib/docs.ts
  • apps/docs-smoke/src/styles.css
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/accordion.tsx
  • packages/docs/src/components/components.test.tsx
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/src/remark/index.ts
  • packages/docs/src/remark/plugins/accordion.remark.ts
  • packages/docs/src/remark/plugins/example.remark.ts
  • packages/docs/src/remark/plugins/topic-switcher.remark.ts
  • packages/docs/src/remark/remark-output.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{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:

  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/remark/remark-output.test.ts
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/src/components/components.test.tsx
  • packages/docs/src/components/accordion.tsx
  • packages/docs/src/remark/plugins/accordion.remark.ts
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/src/remark/plugins/topic-switcher.remark.ts
  • packages/docs/src/remark/index.ts
  • packages/docs/src/remark/plugins/example.remark.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:

  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/remark/remark-output.test.ts
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/src/components/components.test.tsx
  • packages/docs/src/components/accordion.tsx
  • packages/docs/src/remark/plugins/accordion.remark.ts
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/src/remark/plugins/topic-switcher.remark.ts
  • packages/docs/src/remark/index.ts
  • packages/docs/src/remark/plugins/example.remark.ts
**/index.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Avoid barrel files (index files that re-export everything)

Files:

  • packages/docs/src/components/index.ts
  • packages/docs/src/remark/index.ts
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{test,spec}.{js,ts,jsx,tsx}: Write assertions inside it() or test() blocks
Avoid done callbacks in async tests - use async/await instead
Don't use .only or .skip in committed code
Keep test suites reasonably flat - avoid excessive describe nesting

Files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/components/components.test.tsx
**/*.{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:

  • packages/docs/src/components/components.test.tsx
  • packages/docs/src/components/accordion.tsx
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.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:

  • packages/docs/src/components/components.test.tsx
  • packages/docs/src/components/accordion.tsx
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.tsx
🧠 Learnings (87)
📓 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/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/**/*.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 : Keep documentation organized by categories
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
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
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/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
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
📚 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/content/docs/index.mdx
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/example.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
  • packages/docs/src/remark/plugins/example.remark.ts
📚 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/**/*.mdx : Use MDX for documentation pages

Applied to files:

  • apps/docs-smoke/content/docs/index.mdx
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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 : Use MDX for documentation pages in the docs app

Applied to files:

  • apps/docs-smoke/content/docs/index.mdx
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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/content/docs/index.mdx
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/components/components.test.tsx
  • packages/docs/src/components/accordion.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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/content/docs/index.mdx
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/components/components.test.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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/**/*.mdx : Include code examples where appropriate in documentation

Applied to files:

  • apps/docs-smoke/content/docs/index.mdx
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
  • packages/docs/src/remark/plugins/example.remark.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/**/*.{ts,tsx} : Document props and usage examples in Elements package components

Applied to files:

  • apps/docs-smoke/content/docs/index.mdx
  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/components/accordion.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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/content/docs/index.mdx
  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/components/accordion.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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/**/*.mdx : Keep documentation organized by categories

Applied to files:

  • apps/docs-smoke/content/docs/index.mdx
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/src/lib/docs.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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} : Write clear summary sentences in TSDoc and JSDoc comments

Applied to files:

  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
📚 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} : Use `deprecated` with migration guidance in TSDoc and JSDoc comments

Applied to files:

  • apps/docs-smoke/content/docs/guides/quickstart.mdx
📚 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/content/docs/guides/quickstart.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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/src/components/**/*.tsx : Place reusable components in `src/components` within the docs app

Applied to files:

  • apps/docs-smoke/content/docs/guides/quickstart.mdx
📚 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/content/docs/guides/quickstart.mdx
📚 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/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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/src/lib/docs.ts
  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/example.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/src/remark/plugins/example.remark.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 **/index.{ts,tsx,js,jsx} : Avoid barrel files (index files that re-export everything)

Applied to files:

  • packages/docs/src/components/index.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/**/index.{ts,tsx} : Export type definitions for public API in Elements package

Applied to files:

  • packages/docs/src/components/index.ts
  • packages/docs/src/remark/index.ts
📚 Learning: 2026-04-18T15:01:52.722Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.722Z
Learning: Applies to **/index.{js,ts,jsx,tsx} : Avoid barrel files (index files that re-export everything)

Applied to files:

  • packages/docs/src/components/index.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} : Avoid barrel files (index files that re-export everything)

Applied to files:

  • packages/docs/src/components/index.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 **/index.{js,jsx,ts,tsx} : Avoid barrel files (index files that re-export everything)

Applied to files:

  • packages/docs/src/components/index.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/**/*.{ts,tsx} : Export type definitions for public API

Applied to files:

  • packages/docs/src/components/index.ts
  • packages/docs/src/remark/index.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/**/*.{ts,tsx} : Document all props and types in Elements package TypeScript code

Applied to files:

  • packages/docs/src/components/index.ts
  • packages/docs/src/components/accordion.tsx
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.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} : Include TSDoc comments for components in Elements package

Applied to files:

  • packages/docs/src/components/index.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 **/*.{ts,tsx} : Export type definitions for public API in TypeScript libraries

Applied to files:

  • packages/docs/src/components/index.ts
  • packages/docs/src/remark/index.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/**/*.{ts,tsx} : Include TypeScript examples

Applied to files:

  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.ts
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/example.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/src/remark/plugins/example.remark.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/**/*.{ts,tsx} : Document all props and types

Applied to files:

  • packages/docs/src/components/index.ts
  • packages/docs/src/components/accordion.tsx
  • packages/docs/src/components/topic-switcher.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:

  • packages/docs/src/components/index.ts
  • packages/docs/src/components/mdx-components.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} : Use `export type` for types

Applied to files:

  • packages/docs/src/components/index.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 **/*.{tsx,jsx} : Components should be namespaced under a single parent (e.g., `FormWizard.Root`, `FormWizard.Step`)

Applied to files:

  • packages/docs/src/components/index.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/**/*.{tsx,jsx} : Follow the Radix UI primitives pattern

Applied to files:

  • packages/docs/src/components/index.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 **/*.{tsx,jsx} : Include proper ARIA attributes in components

Applied to files:

  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/components/accordion.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/agent-docs/docs/components.md
📚 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} : Use compound components pattern in Elements package (e.g., `Component.Root`, `Component.Child`)

Applied to files:

  • packages/docs/src/components/mdx-components.ts
  • packages/docs/agent-docs-src/docs/components.mdx
📚 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:

  • packages/docs/src/components/mdx-components.ts
  • packages/docs/src/components/components.test.tsx
  • packages/docs/src/components/accordion.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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} : Use compound components pattern (e.g., `Component.Root`, `Component.Child`)

Applied to files:

  • packages/docs/src/components/mdx-components.ts
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
📚 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} : Don't define components inside other components

Applied to files:

  • packages/docs/src/components/mdx-components.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 **/*.{jsx,tsx} : Don't define components inside other components

Applied to files:

  • packages/docs/src/components/mdx-components.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} : Use Vitest for testing framework

Applied to files:

  • packages/docs/src/remark/remark-output.test.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} : Write unit tests for components in Elements package using Vitest

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/components/components.test.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/**/*.{ts,tsx,js,jsx} : Use `remarks` for long-form context in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/remark/index.ts
  • packages/docs/src/remark/plugins/example.remark.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 accessibility features in Elements package component tests

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/src/components/components.test.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/**/*.test.{ts,tsx} : Test accessibility features

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/src/components/components.test.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 **/*.{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:

  • packages/docs/src/remark/remark-output.test.ts
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/src/components/components.test.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} : Document generator output with `yields` in JSDoc comments

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/remark/plugins/example.remark.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:

  • packages/docs/src/remark/remark-output.test.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
  • packages/docs/src/components/components.test.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 error boundaries in Elements package component tests

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/src/components/components.test.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 **/*.{test,spec}.{ts,tsx,js,jsx} : Include accessibility tests for components

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/src/components/components.test.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 **/*.{test,spec}.{ts,tsx,js,jsx} : Include integration tests for component combinations

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/src/components/components.test.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/**/*.test.{ts,tsx} : Test error boundaries

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
  • packages/docs/src/components/components.test.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/**/*.test.{ts,tsx} : Write unit tests for components

Applied to files:

  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/src/components/components.test.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 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

Applied to files:

  • packages/docs/src/components/components.test.tsx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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} : Support screen readers through semantic markup in components

Applied to files:

  • packages/docs/src/components/components.test.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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 **/*.{tsx,jsx} : 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 (`<button>`, `<nav>`, etc.) instead of divs with roles

Applied to files:

  • packages/docs/src/components/components.test.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 Learning: 2026-04-18T15:01:52.722Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.722Z
Learning: Applies to **/*.{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

Applied to files:

  • packages/docs/src/components/components.test.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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,html} : Use proper heading hierarchy in HTML/React components

Applied to files:

  • packages/docs/src/components/accordion.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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} : List required props first in component definitions, provide optional props with clear defaults, support common HTML attributes, and allow style customization through className

Applied to files:

  • packages/docs/src/components/accordion.tsx
  • packages/docs/src/components/example.tsx
  • packages/docs/src/components/topic-switcher.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} : Implement ARIA attributes in Elements package components for accessibility

Applied to files:

  • packages/docs/src/components/accordion.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} : Implement ARIA attributes

Applied to files:

  • packages/docs/src/components/accordion.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,html} : Use semantic HTML and ARIA attributes for accessibility - use semantic elements (`<button>`, `<nav>`, etc.) instead of divs with roles

Applied to files:

  • packages/docs/src/components/accordion.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/topic-switcher.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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:

  • packages/docs/src/components/accordion.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} : Support common HTML attributes in component props

Applied to files:

  • packages/docs/src/components/accordion.tsx
  • packages/docs/src/components/topic-switcher.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} : Give heading elements content that's accessible to screen readers (not hidden with `aria-hidden`)

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
📚 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} : Add practical `example` snippets in JSDoc comments

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/example.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/src/remark/plugins/example.remark.ts
📚 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} : Use `example` for non-obvious usage in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/src/components/example.tsx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/src/remark/plugins/example.remark.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 **/*.{tsx,jsx} : Use `next/head` or App Router metadata API for head elements

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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:

  • packages/docs/src/components/topic-switcher.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} : Support keyboard navigation, include proper ARIA attributes, and maintain semantic markup for screen reader support and focus management

Applied to files:

  • packages/docs/src/components/topic-switcher.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/**/*.{ts,tsx} : Implement responsive design with Tailwind CSS in the docs app; use a mobile-first approach

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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/**/*.{ts,tsx,css} : Prefer utility classes over custom CSS in the docs app

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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/**/*.{ts,tsx} : Implement responsive design using Tailwind breakpoints in the docs app

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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 semantic typography tokens from `inth/optin` (text-title-*, text-display-*, text-paragraph-*, text-label-*, text-subheading-*) instead of Tailwind's default text size classes

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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/**/*.{tsx,ts} : Implement responsive design with Tailwind CSS using a mobile-first approach

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 Learning: 2026-02-01T08:57:09.557Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/typography.mdc:0-0
Timestamp: 2026-02-01T08:57:09.557Z
Learning: Applies to **/*.{ts,tsx,css} : Use semantic typography tokens from `inth/optin` (such as `text-title-*`, `text-display-*`, `text-paragraph-*`, `text-label-*`, `text-subheading-*`) instead of Tailwind's default text sizes like `text-3xl`, `text-4xl`, etc.

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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} : Avoid Tailwind default text sizes `text-3xl`, `text-4xl`, `text-5xl`, `text-6xl`, `text-7xl`, `text-8xl`, `text-9xl` in favor of semantic tokens

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 Learning: 2026-02-01T08:57:09.557Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/typography.mdc:0-0
Timestamp: 2026-02-01T08:57:09.557Z
Learning: Applies to **/*.{ts,tsx} : Use `text-paragraph-xs` through `text-paragraph-xl` tokens for body text, `text-label-xs` through `text-label-xl` for UI labels in buttons and form fields, and `text-subheading-*` for uppercase subheadings with wide tracking

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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-title-h1` through `text-title-h6` tokens for heading elements with appropriate line-height, letter-spacing, and font-weight based on semantic heading level

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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,css,scss} : Avoid external styling dependencies like Tailwind in Elements package

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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-display-sm`, `text-display-md`, `text-display-lg`, `text-display-xl`, or `text-display-2xl` tokens for hero sections and large decorative text larger than h1

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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-paragraph-xs` through `text-paragraph-xl` tokens for body text content

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 Learning: 2026-02-01T08:57:09.557Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/typography.mdc:0-0
Timestamp: 2026-02-01T08:57:09.557Z
Learning: Applies to **/*.{ts,tsx} : Use `text-title-h1` through `text-title-h6` tokens for heading elements, with appropriate line-height, letter-spacing, and font-weight already included

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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} : Arbitrary values like `text-[11px]`, `md:text-[125px]` for component-specific or responsive sizing, and generic utility classes `text-sm`, `text-base`, `text-lg` are acceptable exceptions to the semantic typography token requirement

Applied to files:

  • apps/docs-smoke/src/styles.css
📚 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 `next/head` or App Router metadata API for head elements

Applied to files:

  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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 semantic elements instead of role attributes in JSX

Applied to files:

  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
📚 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} : Use `privateRemarks` for maintainer-only notes in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/remark/index.ts

Comment thread apps/docs-smoke/tests/e2e/smoke.e2e.ts Outdated
Comment thread packages/docs/src/components/example.tsx
Comment thread packages/docs/src/remark/plugins/topic-switcher.remark.ts
Comment thread packages/docs/src/remark/plugins/topic-switcher.remark.ts
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: a790beecc9

ℹ️ 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".

Comment on lines +62 to +64
try {
const parsed = JSON5.parse(raw);
if (!Array.isArray(parsed)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Parse sourceFiles without JSON5-only restrictions

parseSourceFiles uses JSON5.parse(raw) for the entire sourceFiles expression, but JSON5 does not accept JavaScript template literals. In MDX, multi-line snippets are commonly authored as sourceFiles={[{ code: `...` }]}, so parsing fails and the catch path silently returns an empty array, dropping all secondary files from converted markdown. This causes incomplete agent/search output for valid Example authoring patterns.

Useful? React with 👍 / 👎.

Comment on lines +31 to +32
item.href.startsWith("http://") ||
item.href.startsWith("https://");
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 Guard TopicSwitcher link checks for missing href

The component calls item.href.startsWith(...) without a null check. items values in MDX are runtime data and are not type-checked, so a single malformed item (for example, an omitted href) will throw and break rendering for the entire page. Adding a defensive check before calling string methods avoids a full-page failure from content mistakes.

Useful? React with 👍 / 👎.

…omponents-plan

# Conflicts:
#	apps/docs-smoke/src/generated/docs-search-content.json
#	apps/docs-smoke/src/generated/docs-search-index.json
@KayleeWilliams KayleeWilliams merged commit 8d016c1 into main Apr 22, 2026
2 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request May 9, 2026
8 tasks
@KayleeWilliams KayleeWilliams deleted the KayleeWilliams/docs-components-plan branch May 9, 2026 02:30
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