Skip to content

[codex] restructure docs app and package docs#11

Merged
KayleeWilliams merged 4 commits into
mainfrom
KayleeWilliams/restructure-docs
May 1, 2026
Merged

[codex] restructure docs app and package docs#11
KayleeWilliams merged 4 commits into
mainfrom
KayleeWilliams/restructure-docs

Conversation

@KayleeWilliams
Copy link
Copy Markdown
Collaborator

Restructures the docs workspace by replacing the docs-smoke app with the example docs app and moving authored package docs into the root docs/ tree.

Adds the @inth/docs generate CLI flow, docs config support, generated navigation/search artifacts, and expanded LLM/search/lint documentation.

Updates package exports, build scripts, tests, workflow wiring, README guidance, and validation coverage for the new docs pipeline.

Validation used: bun run --filter example pipeline:build, bun packages/docs/src/cli.ts lint docs --format json, and browser verification of /docs/lint.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Unified docs CLI with generate and lint commands.
    • Group-based docs configuration, navigation resolution, and LLM full-context outputs.
    • Keyboard-accessible search (Cmd/Ctrl+K) with live results and AI streaming.
    • New docs UI: header, footer, sidebar, search popover, routes, and example app smoke tests.
  • Changes

    • Docs generation now reads repo-root /docs and emits generated docs output and navigation manifest.
    • Tooling and example workspace references switched from the old demo to the new example workspace.
  • Documentation

    • New and reorganized docs and guides (lint, convert, llm, methodology, packaging).

Walkthrough

Moves docs source to repo-root /docs, introduces a new @inth/docs package and CLI (generate|lint), replaces the topics model with group-driven navigation, migrates demo from apps/docs-smokeapps/example (new UI, search/AI), and adds scripts/tests to generate converted markdown, LLM, search, and navigation artifacts.

Changes

Cohort / File(s) Summary
Agent skill docs routing
\.agents/skills/inth-docs/SKILL.md
Path priority updated to prefer @inth/docs/docs/*, fallback to packages/docs/docs/* (generated, requires build), then docs/<topic>.mdx; removed old agent-docs entries.
Demo app rename & CI
README.md, .github/workflows/bench.yml, biome.jsonc, package.json, apps/example/*
Renames smoke app to example, updates workflows, dev script, Biome ignores, and project metadata; moves bench/test targets to apps/example.
Removed smoke app
apps/docs-smoke/...
Deletes legacy smoke app pages, routes, components, scripts, generator, and E2E tests.
New example app UI & routing
apps/example/src/components/*, apps/example/src/routes/*, apps/example/src/routeTree.gen.ts, apps/example/src/styles.css
Adds SiteHeader, SiteFooter, DocsShell, SearchBar, Search route, multiple docs routes, updated route typings, styles, and new E2E smoke tests.
Search + AI client state
apps/example/src/lib/use-docs-search.ts, apps/example/src/components/search-bar.tsx, apps/example/src/routes/search.tsx
Implements useDocsSearch hook with debounced search, AbortController, AI streaming; UI components for popover search, keyboard shortcuts, result navigation, and ask-AI flow.
Docs navigation / manifest
packages/docs/src/llm/llm.ts, packages/docs/src/llm/index.ts, packages/docs/scripts/generate-docs.ts, apps/example/src/lib/docs.ts
Replaces topics/sections with group-driven model (DocsConfig/DocsGroup), adds resolveDocsNavigation, writes docs-nav.json, and adapts consumer sidebar and routes to use it.
Package CLI & public API
packages/docs/src/cli.ts, packages/docs/src/cli/generate.ts, packages/docs/src/cli.test.ts, packages/docs/src/index.ts, packages/docs/package.json, packages/docs/tsup.config.ts
Adds testable CLI (generate
Generation scripts & tests
packages/docs/scripts/generate-docs.ts, packages/docs/src/cli.test.ts, apps/example/scripts/*, apps/example/scripts/llm-generate.ts
New unified docs generator (convert → llm → search → nav), updated example scripts to consume @inth/docs APIs, and generation-related tests.
Docs content & grouping
docs/*, docs/docs.config.ts, docs/guides/*, docs/*.mdx
Adds repo-root MDX source, docs.config with groups, new guides, and group: frontmatter metadata.
Lint schema & tooling
packages/docs/src/lint/schema.ts, packages/docs/src/lint/cli.ts
Adds optional group frontmatter to validation schema; refactors lint CLI into exported, testable functions.
Removed packaged agent-docs artifacts
packages/docs/agent-docs/docs/*, packages/docs/agent-docs/llms*.txt, packages/docs/scripts/generate-agent-docs.ts
Deletes legacy packaged agent-docs docs, indexes, and old generator script.
TypeScript & build config
tsconfig.json, apps/example/tsconfig.json, apps/example/vite.config.ts
Adds TS configs and path aliases for @inth/docs, example app TS settings, and integrates remark-gfm into MDX pipeline.

Sequence Diagram(s)

sequenceDiagram
  participant CLI as "CLI (`@inth/docs`)"
  participant FS as "Filesystem (/docs → packages/docs/docs)"
  participant Converter as "convertAllMdx"
  participant LLM as "LLM Generator"
  participant Search as "Search Generator"
  participant Nav as "resolveDocsNavigation"
  participant App as "Example app"

  rect rgba(0,128,0,0.5)
    CLI->>FS: read /docs MDX & docs.config
    CLI->>Converter: convert MDX -> markdown (outDir packages/docs/docs)
    Converter->>LLM: provide converted markdown
    CLI->>LLM: generate llms.txt & full-context files
    CLI->>Search: generate search-index.json & search-content.json
    CLI->>Nav: resolveDocsNavigation(groups + pages)
    Nav->>FS: write docs-nav.json into generated docs
    CLI->>FS: emit success/JSON with artifact paths
    App->>FS: read generated artifacts at build/runtime (docs-nav, search, llms)
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 I hopped from smoke to example's glade,
Grouped the pages, and neatly laid,
A nav that maps each doc and leaf;
CLI hums, generator brings relief.
Rabbit winks: docs built — hurray!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.51% 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 '[codex] restructure docs app and package docs' accurately describes the main change: restructuring the docs workspace by replacing docs-smoke with example app and moving docs to root.
Description check ✅ Passed The description is clearly related to the changeset, explaining the restructuring of the docs workspace, addition of CLI flow, docs config support, and updated documentation.
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

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

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

@KayleeWilliams KayleeWilliams marked this pull request as ready for review April 30, 2026 16:26
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

https://github.com/inthhq/docs/blob/649a51e5a0cae6ffdcbd9969e39bf3ece186bde8/apps/example/package.json#L20
P1 Badge Build @inth/docs before running pipeline scripts

pipeline:build now runs scripts that import @inth/docs/*, whose exports resolve to packages/docs/dist/*; unlike dev, build, and test:e2e, this script does not build @inth/docs first. On a clean checkout (no prebuilt dist), pipeline:build fails immediately with module-resolution errors, so the documented pipeline command is no longer runnable without manual pre-steps.


https://github.com/inthhq/docs/blob/649a51e5a0cae6ffdcbd9969e39bf3ece186bde8/apps/example/scripts/test-pipeline.ts#L14-L17
P1 Badge Point pipeline fixture test at an existing MDX file

pipeline:test still targets apps/example/content/docs/guides/extracted-type-table-fixture.mdx, but this commit removed the content/ tree when replacing docs-smoke with example. As written, the test script references a non-existent file and will fail with ENOENT once execution reaches conversion, which breaks the pipeline validation command.

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

…cture-docs

# Conflicts:
#	apps/example/package.json
#	bun.lock
#	package.json
#	packages/docs/package.json
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: 19

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/example/scripts/llm-generate-real.ts (1)

38-96: 🧹 Nitpick | 🔵 Trivial

Consider extracting shared group structure to reduce duplication.

The groups configuration is defined twice with only description verbosity differing. While the current approach is clear, extracting the shared structure could reduce maintenance burden:

♻️ Optional: Extract shared group slugs/titles
const BASE_GROUPS = [
  { slug: "frameworks", title: "Frameworks", children: [
    { slug: "react", title: "React" },
    { slug: "next", title: "Next.js" },
    { slug: "javascript", title: "JavaScript" },
  ]},
  // ...
] as const;

// Then map with descriptions for each call

However, keeping them separate is also valid if the descriptions are expected to diverge further.

Also applies to: 99-134

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

In `@apps/example/scripts/llm-generate-real.ts` around lines 38 - 96, Extract the
duplicated group definitions into a shared constant (e.g., create BASE_GROUPS
containing slug/title/children structure) and replace both inline groups arrays
with a mapped version that merges per-call description text into BASE_GROUPS;
update occurrences referencing groups in this file (the two groups arrays around
the blocks you edited) to build their final arrays by mapping BASE_GROUPS and
adding the differing description fields so only the descriptions differ while
slugs/titles/children live in one place.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/skills/inth-docs/SKILL.md:
- Around line 18-20: Update the Path Priority section in
.agents/skills/inth-docs/SKILL.md by replacing the command string "bun run
--filter `@inth/docs` build" with the canonical command "bun run --filter
`@inth/docs` docs:generate" so the instruction matches the guidance in
packages/docs/README.md; ensure the line listing items 3–5 reflects this exact
replacement (the token to edit is the command literal in that list).

In @.github/workflows/bench.yml:
- Around line 8-10: The workflow path filter currently references legacy paths
("packages/docs/**", "apps/example/**", ".github/workflows/bench.yml") so
changes under the new repository-root docs/ are missed; update the workflow's
paths list to include "docs/**" (replace or add alongside "packages/docs/**" as
appropriate) so that commits that only modify files under docs/ will trigger the
benchmark workflow.

In `@apps/example/playwright.config.ts`:
- Around line 17-19: The execFileSync call that sets portlessUrl should include
a timeout and maxBuffer so a stalled `portless` CLI can't hang Playwright config
resolution; update the execFileSync invocation (the call that assigns
`portlessUrl`) to pass options including `timeout: 5000` and a larger
`maxBuffer` (e.g., 10MB) alongside `encoding`, so the call fails fast on hangs
and won’t block CI.

In `@apps/example/scripts/bench.ts`:
- Around line 94-133: Extract the duplicated groups array into a single shared
constant (e.g., GROUPS) and reuse it in both generateLLMFiles and
generateLLMFullContextFiles calls; replace the inline groups literals passed to
generateLLMFiles(...) and generateLLMFullContextFiles(...) with that constant so
both functions use the same source of truth and avoid silent drift.

In `@apps/example/scripts/llm-generate.ts`:
- Around line 28-32: The baseUrl fallback chain (variable baseUrl using
INTH_DOCS_AGENT_BASE_URL, BASE_URL, and PORTLESS_URL) lacks documentation for
the BASE_URL fallback; add a concise inline comment above the baseUrl
declaration explaining that BASE_URL is an optional generic deployment URL
fallback (used by other LLM modules) and that precedence is
INTH_DOCS_AGENT_BASE_URL > BASE_URL > PORTLESS_URL > default, and also add a
short entry in the README environment variables section describing BASE_URL and
its role so callers know which env var to set.

In `@apps/example/src/components/docs-shell.tsx`:
- Around line 25-38: The sidebar <nav> in docs-shell.tsx is missing an
aria-label which makes it ambiguous to assistive tech; update the <nav> rendered
around section.links (the nav inside the section.links.map) to include a
descriptive aria-label (e.g., based on section.title or a fallback like "Sidebar
navigation") so each nav landmark is uniquely identified; locate the nav element
in the component that renders section.links and add the aria-label attribute
using the section.title or a clear fallback.

In `@apps/example/src/components/search-bar.tsx`:
- Around line 112-114: The effect that calls useEffect(() => setActiveIndex(0),
[]) only runs on mount and should instead reset selection when the result set
changes; update the dependency array to include the search results prop/state
(e.g., results or items) used by the component so useEffect(() =>
setActiveIndex(0), [results]) runs whenever results change, and additionally
ensure any code that relies on activeIndex (e.g., keyboard handlers)
clamps/validates activeIndex against results.length to avoid out-of-range
indices.
- Around line 170-183: The backdrop close button is positioned behind the dialog
by the "-z-10" which prevents reliable outside-click closing; remove or avoid
using the negative z-index on the button and instead attach the onClick={close}
handler to the overlay container element (the outer <div aria-label="Search
docs" ... role="dialog">) so clicks on the overlay close the dialog, and add an
onClick={e => e.stopPropagation()} to the dialog panel element (the inner <div
className="flex w-full max-w-2xl ...">) so clicks inside the panel don’t bubble
to the overlay; keep the existing aria attributes and the close function name
(close) unchanged.

In `@apps/example/src/lib/use-docs-search.ts`:
- Around line 196-199: The catch block in runSearch(signal) short-circuits on
isAbortError(caughtError) and returns without updating searchStatus, which can
leave it stuck at "loading"; update the abort handling to reset searchStatus
(e.g., set searchStatus = "idle" or call the existing status setter) before
returning so aborted requests always clear the loading state, and ensure the
same reset happens for all early returns and in the finally path if one exists.
- Around line 217-221: cancelPendingAnswer currently only increments
askRequestIdRef and aborts askControllerRef, leaving answerStatus stuck as
"loading"/"streaming"; update cancelPendingAnswer to also reset UI state by
calling the relevant state setters (e.g., setAnswerStatus to "idle" or initial
status, clear/setAnswer to null or empty, and clear any streaming flags) so that
after aborting (askControllerRef.abort and askControllerRef = null) the UI is
not left in a loading/streaming state; reference the existing
cancelPendingAnswer, askControllerRef, askRequestIdRef, answerStatus,
setAnswerStatus and setAnswer to locate where to apply the changes.

In `@apps/example/src/routes/__root.tsx`:
- Around line 54-60: The cleanup currently only cancels the outer
requestAnimationFrame handle (`outer`) while the nested inner handle (`inner`)
can still run and call `document.getElementById(id)?.scrollIntoView(...)`;
change the implementation so both frames are tracked in outer scope (e.g.,
declare `let inner` before calling `requestAnimationFrame`) and in the returned
cleanup call `cancelAnimationFrame` for both `outer` and `inner` (guarding
`inner` if it may be undefined) to ensure neither callback can run after unmount
or hash changes.

In `@apps/example/src/routes/docs/llm.tsx`:
- Line 4: The import of the MDX using a deep relative path (import LlmDoc from
"../../../../../docs/llm.mdx";) is brittle; replace it with a stable workspace
alias (e.g., import LlmDoc from "@docs/llm.mdx") and ensure your build
config/tsconfig paths or bundler alias maps the `@docs/`* to the docs folder so
the LlmDoc import resolves correctly; update any relevant module resolution
settings rather than changing other files in the route.

In `@apps/example/src/routes/playground.tsx`:
- Around line 162-167: The npm command under the commands object is using
invalid npm syntax ("npm run --filter example pipeline:build"); update the 'npm'
entry to use the workspace flag instead—e.g., replace that string with a valid
form such as "npm --workspace example run pipeline:build" (or "npm run -w
example pipeline:build") so the commands object and the command template
(command="bun run --filter example pipeline:{pm}") will invoke npm correctly for
the example workspace.

In `@apps/example/src/routes/search.tsx`:
- Around line 126-144: Replace the plain anchor used for result links with
router-aware navigation for internal docs: detect when result.urlWithHash is an
internal docs path (e.g., startsWith("/docs/")) and render TanStack Router's
Link (preserve className, key, children, and headingPath/excerpt) for those
cases so navigation is client-side; fall back to the existing <a
href={result.urlWithHash}> for external URLs. Ensure the Link uses the same path
including hash fragments (or pass hash/params if your router requires it) and
keep the surrounding markup (the <div>, <h3>, and <p>) unchanged.

In `@apps/example/tests/e2e/smoke.e2e.ts`:
- Around line 119-141: The test "Cmd+K search popover opens, queries, and
navigates" is using page.keyboard.press("Meta+k") which is macOS-specific and
can flake on Linux/Windows CI; update the keyboard action in that test so it
triggers on all platforms (use "ControlOrMeta+k" if your Playwright version
supports it, or dispatch both "Meta+k" and "Control+k" fallbacks) where this
change is around the page.keyboard.press call and the test function name; ensure
the rest of the flow (popover role lookup, popover.getByLabel("Search query"),
waitForResponse, and navigation assertion to REMARK_DOCS_URL) remains unchanged.

In `@biome.jsonc`:
- Line 21: Update the ignore pattern so Biome excludes the generated
docs-nav.json as well as the search files: replace the existing negated glob
"!apps/example/src/generated/docs-search-*.json" with a broader pattern like
"!apps/example/src/generated/*.json" or add an explicit negation
"!apps/example/src/generated/docs-nav.json"; ensure you update the pattern
string in the biome.jsonc entry where
"!apps/example/src/generated/docs-search-*.json" currently appears.

In `@packages/docs/src/cli.ts`:
- Around line 73-76: The .catch((error) => { ... }) handler currently writes
String(error) which drops stack information; change the write to include the
full stack when available (e.g., use error.stack || String(error)) and/or
conditionally include the stack when a debug/verbose flag or environment (e.g.,
process.env.DEBUG or a CLI --debug option) is set so the CLI prints full
error.stack for debugging while preserving the short message in normal mode;
update the process.stderr.write call to use that value and leave process.exit(1)
as-is.

In `@packages/docs/src/cli/generate.ts`:
- Around line 164-189: The inferGroups function currently reads MDX files
sequentially; change the implementation (function inferGroups) to read and parse
files in parallel using Promise.all (or a bounded concurrency helper) so file
reads and frontmatter parsing (matter + normalizeGroupValues) run concurrently,
then merge all discovered slugs into the existing Set before sorting and mapping
to titleizeGroup; ensure you respect file descriptor limits by using a
concurrency limiter (e.g., p-map or manual batching) if the files array is
large.

In `@packages/docs/src/llm/index.ts`:
- Around line 1-18: The index.ts barrel was expanded with many new re-exports
(e.g., generateLLMFullContextFiles, generateLlmsTxt, defineDocsConfig,
resolveDocsNavigation and types like LLMFullContextConfig, LlmsTxtConfig,
DocsConfig, CuratedLink, etc.); revert this expansion and instead expose those
APIs via explicit module entrypoints (create or update a non-index public API
module or individual files that re-export only the intended symbols), or move
the new exports into a dedicated file (e.g., llm-public.ts) and import from that
path in callers so you avoid enlarging an index barrel and comply with the repo
rule against expanding index.{ts,js} barrels.

---

Outside diff comments:
In `@apps/example/scripts/llm-generate-real.ts`:
- Around line 38-96: Extract the duplicated group definitions into a shared
constant (e.g., create BASE_GROUPS containing slug/title/children structure) and
replace both inline groups arrays with a mapped version that merges per-call
description text into BASE_GROUPS; update occurrences referencing groups in this
file (the two groups arrays around the blocks you edited) to build their final
arrays by mapping BASE_GROUPS and adding the differing description fields so
only the descriptions differ while slugs/titles/children live in one place.
🪄 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: 89fbfed6-5632-494b-bc65-8d58790051c5

📥 Commits

Reviewing files that changed from the base of the PR and between a7a724e and 649a51e.

⛔ Files ignored due to path filters (6)
  • 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/**
  • apps/example/src/generated/docs-nav.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-content.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-index.json is excluded by !**/generated/**
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (134)
  • .agents/skills/inth-docs/SKILL.md
  • .github/workflows/bench.yml
  • README.md
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
  • apps/docs-smoke/content/docs/guides/extracted-type-table-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/content/docs/search.mdx
  • apps/docs-smoke/scripts/llm-generate.ts
  • apps/docs-smoke/src/components/docs-shell.tsx
  • apps/docs-smoke/src/components/site-header.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/search.tsx
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • apps/example/.gitignore
  • apps/example/components.json
  • apps/example/package.json
  • apps/example/playwright.config.ts
  • apps/example/scripts/bench.ts
  • apps/example/scripts/convert-real.ts
  • apps/example/scripts/llm-generate-real.ts
  • apps/example/scripts/llm-generate.ts
  • apps/example/scripts/mdx-convert.ts
  • apps/example/scripts/search-generate.ts
  • apps/example/scripts/setup-real-content.ts
  • apps/example/scripts/test-pipeline.ts
  • apps/example/scripts/test-real.ts
  • apps/example/src/components/component-matrix.tsx
  • apps/example/src/components/docs-mdx/accordion.tsx
  • apps/example/src/components/docs-mdx/callout.tsx
  • apps/example/src/components/docs-mdx/card.tsx
  • apps/example/src/components/docs-mdx/command-tabs.tsx
  • apps/example/src/components/docs-mdx/example.tsx
  • apps/example/src/components/docs-mdx/index.ts
  • apps/example/src/components/docs-mdx/mdx-components.ts
  • apps/example/src/components/docs-mdx/mermaid.tsx
  • apps/example/src/components/docs-mdx/selector.tsx
  • apps/example/src/components/docs-mdx/steps.tsx
  • apps/example/src/components/docs-mdx/tabs.tsx
  • apps/example/src/components/docs-mdx/topic-switcher.tsx
  • apps/example/src/components/docs-mdx/type-table.tsx
  • apps/example/src/components/docs-shell.tsx
  • apps/example/src/components/search-bar.tsx
  • apps/example/src/components/site-footer.tsx
  • apps/example/src/components/site-header.tsx
  • apps/example/src/components/ui/badge.tsx
  • apps/example/src/components/ui/button.tsx
  • apps/example/src/components/ui/card.tsx
  • apps/example/src/components/ui/separator.tsx
  • apps/example/src/lib/docs.ts
  • apps/example/src/lib/search.ts
  • apps/example/src/lib/use-docs-search.ts
  • apps/example/src/lib/utils.ts
  • apps/example/src/mdx-components.tsx
  • apps/example/src/mdx.d.ts
  • apps/example/src/routeTree.gen.ts
  • apps/example/src/router.tsx
  • apps/example/src/routes/__root.tsx
  • apps/example/src/routes/api/docs/ask.ts
  • apps/example/src/routes/api/docs/search.ts
  • apps/example/src/routes/docs/components.tsx
  • apps/example/src/routes/docs/convert.tsx
  • apps/example/src/routes/docs/guides/bundle-package-docs.tsx
  • apps/example/src/routes/docs/guides/connect-docs-site.tsx
  • apps/example/src/routes/docs/index.tsx
  • apps/example/src/routes/docs/lint.tsx
  • apps/example/src/routes/docs/llm.tsx
  • apps/example/src/routes/docs/methodology.tsx
  • apps/example/src/routes/docs/remark.tsx
  • apps/example/src/routes/docs/route.tsx
  • apps/example/src/routes/docs/search.tsx
  • apps/example/src/routes/index.tsx
  • apps/example/src/routes/playground.tsx
  • apps/example/src/routes/search.tsx
  • apps/example/src/styles.css
  • apps/example/tests/e2e/smoke.e2e.ts
  • apps/example/tsconfig.json
  • apps/example/type-fixtures/pipeline-example.ts
  • apps/example/vite.config.ts
  • biome.jsonc
  • docs/components.mdx
  • docs/convert.mdx
  • docs/docs.config.ts
  • docs/guides/bundle-package-docs.mdx
  • docs/guides/connect-docs-site.mdx
  • docs/index.mdx
  • docs/lint.mdx
  • docs/llm.mdx
  • docs/methodology.mdx
  • docs/remark.mdx
  • docs/search.mdx
  • package.json
  • packages/docs/.gitignore
  • packages/docs/README.md
  • packages/docs/agent-docs-src/docs/lint.mdx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs/docs/lint.md
  • packages/docs/agent-docs/docs/llm.md
  • packages/docs/agent-docs/docs/llms-full.txt
  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • packages/docs/agent-docs/docs/llms-full/generation.txt
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs/docs/llms-full/generation/llm.txt
  • packages/docs/agent-docs/docs/llms-full/generation/search.txt
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/agent-docs/docs/llms-full/validation.txt
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs/docs/remark.md
  • packages/docs/agent-docs/docs/search.md
  • packages/docs/agent-docs/llms-full.txt
  • packages/docs/agent-docs/llms.txt
  • packages/docs/package.json
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/scripts/generate-docs.ts
  • packages/docs/src/cli.test.ts
  • packages/docs/src/cli.ts
  • packages/docs/src/cli/generate.ts
  • packages/docs/src/index.ts
  • packages/docs/src/internal/package-surface.test.ts
  • packages/docs/src/lint/cli.ts
  • packages/docs/src/lint/schema.ts
  • packages/docs/src/llm/index.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/tsup.config.ts
  • tsconfig.json
💤 Files with no reviewable changes (37)
  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/llms-full/generation.txt
  • apps/docs-smoke/content/docs/guides/extracted-type-table-fixture.mdx
  • apps/docs-smoke/content/docs/index.mdx
  • packages/docs/agent-docs/docs/llms-full.txt
  • packages/docs/agent-docs/docs/index.md
  • apps/docs-smoke/src/components/site-header.tsx
  • packages/docs/agent-docs/llms.txt
  • packages/docs/agent-docs/docs/remark.md
  • packages/docs/agent-docs/llms-full.txt
  • apps/docs-smoke/src/routes/docs/guides/components-fixture.tsx
  • apps/docs-smoke/content/docs/guides/quickstart.mdx
  • apps/docs-smoke/content/docs/meta.json
  • packages/docs/agent-docs/docs/lint.md
  • apps/docs-smoke/content/docs/search.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • apps/docs-smoke/scripts/llm-generate.ts
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/lint.mdx
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • apps/docs-smoke/content/docs/guides/components-fixture.mdx
  • packages/docs/agent-docs/docs/llms-full/generation/search.txt
  • packages/docs/agent-docs/docs/llms.txt
  • apps/docs-smoke/src/routes/__root.tsx
  • apps/docs-smoke/src/routes/docs/index.tsx
  • packages/docs/agent-docs/docs/llm.md
  • packages/docs/agent-docs/docs/search.md
  • apps/docs-smoke/src/components/docs-shell.tsx
  • apps/docs-smoke/src/routes/docs/guides/quickstart.tsx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/llms-full/validation.txt
  • apps/docs-smoke/src/routes/search.tsx
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/agent-docs/docs/convert.md
  • apps/docs-smoke/tests/e2e/smoke.e2e.ts
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs/docs/llms-full/generation/llm.txt

Comment thread .agents/skills/inth-docs/SKILL.md Outdated
Comment thread .github/workflows/bench.yml
Comment thread apps/example/playwright.config.ts
Comment thread apps/example/scripts/bench.ts Outdated
Comment on lines +28 to +32
const baseUrl =
process.env.INTH_DOCS_AGENT_BASE_URL?.trim() ||
process.env.BASE_URL?.trim() ||
process.env.PORTLESS_URL?.trim() ||
"https://docs.example.com";
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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if these environment variables are documented or used elsewhere
rg -n "INTH_DOCS_AGENT_BASE_URL|PORTLESS_URL" --type=md --type=ts -g '!*.gen.ts'

Repository: inthhq/docs

Length of output: 1104


🏁 Script executed:

rg -n "BASE_URL" --type=md --type=ts -g '!*.gen.ts'

Repository: inthhq/docs

Length of output: 1401


Document the BASE_URL fallback in the script or README.

The fallback chain checks INTH_DOCS_AGENT_BASE_URL (documented in README), BASE_URL, and PORTLESS_URL (used in other LLM modules). However, BASE_URL is not documented in the context of this script. Add a comment explaining what BASE_URL is or document it in the README to clarify the expected environment variables and their precedence.

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

In `@apps/example/scripts/llm-generate.ts` around lines 28 - 32, The baseUrl
fallback chain (variable baseUrl using INTH_DOCS_AGENT_BASE_URL, BASE_URL, and
PORTLESS_URL) lacks documentation for the BASE_URL fallback; add a concise
inline comment above the baseUrl declaration explaining that BASE_URL is an
optional generic deployment URL fallback (used by other LLM modules) and that
precedence is INTH_DOCS_AGENT_BASE_URL > BASE_URL > PORTLESS_URL > default, and
also add a short entry in the README environment variables section describing
BASE_URL and its role so callers know which env var to set.

Comment thread apps/example/tests/e2e/smoke.e2e.ts Outdated
Comment thread biome.jsonc Outdated
Comment thread packages/docs/src/cli.ts
Comment thread packages/docs/src/cli/generate.ts
Comment on lines 1 to 18
export {
type CuratedLink,
type CuratedSection,
type FullTopic,
type DocsConfig,
type DocsGroup,
type DocsNavigation,
type DocsNavigationGroup,
type DocsNavigationPage,
defineDocsConfig,
generateLLMFullContextFiles,
generateLlmsTxt,
type LLMFullContextConfig,
type LlmsTxtConfig,
type MarkdownDoc,
type ProductInfo,
type ResolveDocsNavigationConfig,
resolveDocsNavigation,
type SourceDoc,
} from "./llm";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Avoid expanding barrel re-exports in index.ts.

This change extends an index barrel surface. Prefer explicit module entrypoints (or a non-index public API module) to keep import boundaries clear and aligned with repo rules.

As per coding guidelines "**/index.{js,ts,jsx,tsx}: Avoid barrel files (index files that re-export everything)".

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

In `@packages/docs/src/llm/index.ts` around lines 1 - 18, The index.ts barrel was
expanded with many new re-exports (e.g., generateLLMFullContextFiles,
generateLlmsTxt, defineDocsConfig, resolveDocsNavigation and types like
LLMFullContextConfig, LlmsTxtConfig, DocsConfig, CuratedLink, etc.); revert this
expansion and instead expose those APIs via explicit module entrypoints (create
or update a non-index public API module or individual files that re-export only
the intended symbols), or move the new exports into a dedicated file (e.g.,
llm-public.ts) and import from that path in callers so you avoid enlarging an
index barrel and comply with the repo rule against expanding index.{ts,js}
barrels.

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: 2

♻️ Duplicate comments (1)
packages/docs/src/cli/generate.ts (1)

164-181: 🧹 Nitpick | 🔵 Trivial

inferGroups still reads files sequentially.

This remains a throughput bottleneck for larger doc trees; a bounded-concurrency approach would reduce end-to-end generate time.

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

In `@packages/docs/src/cli/generate.ts` around lines 164 - 181, The inferGroups
function currently loops files and awaits readFile sequentially causing a
bottleneck; change it to process files with bounded concurrency (e.g., use a
limit like p-limit or a custom semaphore) so multiple readFile calls run in
parallel while capping concurrency, then for each resolved file parse with
matter and call normalizeGroupValues to add trimmed slugs into the slugs Set;
keep existing slug trimming/validation logic and ensure proper error propagation
or logging for failed reads.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/docs/src/cli/generate.ts`:
- Line 368: Call inferGroups and any other setup that can throw inside the same
try/finally that performs sourceMirror.cleanup so temp dirs are always removed;
specifically move the call to inferGroups(sourceMirror.docsDir) into the
existing try block (or create a new try immediately after creating sourceMirror)
and ensure sourceMirror.cleanup() runs in the finally. Also ensure pipeline
execution exceptions are caught locally (wrap pipeline.run/await in a try/catch
inside the command) so you can format and return command-local errors (instead
of allowing them to bubble) while still running the finally cleanup; update
references in this file to inferGroups and sourceMirror.cleanup and the pipeline
invocation to reflect the new scoping.
- Around line 133-137: The current code uses a type assertion (args.format =
value as GenerateFormat) which bypasses TypeScript's type system; replace it
with a proper type guard so the compiler can narrow type safely: add an
isGenerateFormat(value: string): value is GenerateFormat function that checks
FORMAT_VALUES.has(value) (or otherwise validates allowed values), call that
guard instead of FORMAT_VALUES.has in the conditional, throw if it returns
false, and then assign args.format = value without an assertion; reference
readValue, argv, FORMAT_VALUES, args.format, and GenerateFormat when making the
change.

---

Duplicate comments:
In `@packages/docs/src/cli/generate.ts`:
- Around line 164-181: The inferGroups function currently loops files and awaits
readFile sequentially causing a bottleneck; change it to process files with
bounded concurrency (e.g., use a limit like p-limit or a custom semaphore) so
multiple readFile calls run in parallel while capping concurrency, then for each
resolved file parse with matter and call normalizeGroupValues to add trimmed
slugs into the slugs Set; keep existing slug trimming/validation logic and
ensure proper error propagation or logging for failed reads.
🪄 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: 79a47f17-ac88-40c9-b337-85abee79e726

📥 Commits

Reviewing files that changed from the base of the PR and between 649a51e and bbee315.

⛔ Files ignored due to path filters (3)
  • apps/example/src/generated/docs-search-content.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-index.json is excluded by !**/generated/**
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • apps/example/package.json
  • apps/example/tsconfig.json
  • package.json
  • packages/docs/package.json
  • packages/docs/src/cli/generate.ts
  • packages/docs/tsup.config.ts
📜 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:

  • packages/docs/tsup.config.ts
  • packages/docs/src/cli/generate.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/tsup.config.ts
  • packages/docs/src/cli/generate.ts
🧠 Learnings (31)
📓 Common learnings
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/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/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 : 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: Keep documentation organized by categories 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/**/{layout,page}.tsx : Keep layouts and pages separate in the docs app directory
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
📚 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/example/package.json
📚 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} : Make sure all dependencies are correctly specified in React hooks

Applied to files:

  • apps/example/package.json
  • package.json
📚 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} : Specify all dependencies in hook dependency arrays correctly

Applied to files:

  • package.json
📚 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} : Specify all dependencies in hook dependency arrays correctly

Applied to files:

  • 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:

  • package.json
📚 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/**/index.{ts,tsx} : Use `packageDocumentation` for entrypoint docs in TSDoc comments

Applied to files:

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

Applied to files:

  • packages/docs/tsup.config.ts
  • packages/docs/package.json
📚 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/tsup.config.ts
  • packages/docs/package.json
📚 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} : Make sure builtins are correctly instantiated

Applied to files:

  • packages/docs/tsup.config.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 **/*.{ts,tsx} : Export type definitions for public API and avoid TypeScript enums; use const objects or 'as const' assertions instead due to runtime overhead and tree-shaking limitations

Applied to files:

  • packages/docs/tsup.config.ts
  • packages/docs/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:

  • packages/docs/tsup.config.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 export empty modules that don't change anything

Applied to files:

  • packages/docs/tsup.config.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/tsup.config.ts
  • packages/docs/package.json
📚 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/tsup.config.ts
  • packages/docs/package.json
📚 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/tsup.config.ts
  • packages/docs/package.json
📚 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 specified modules when loaded by import or require

Applied to files:

  • packages/docs/tsup.config.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 __dirname and __filename in the global scope

Applied to files:

  • packages/docs/tsup.config.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} : Make sure to use the "use strict" directive in script files

Applied to files:

  • packages/docs/tsup.config.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/**/*.tsx : Use TypeScript for all components (.tsx)

Applied to files:

  • packages/docs/tsup.config.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 TypeScript namespaces

Applied to files:

  • packages/docs/tsup.config.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 the TypeScript directive ts-ignore

Applied to files:

  • packages/docs/tsup.config.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/package.json
📚 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 export or module.exports in test files

Applied to files:

  • packages/docs/package.json
📚 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/cli/generate.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} : Write clear summary sentences in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/cli/generate.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/**/*.{js,jsx} : Write JSDoc summaries with intent in JavaScript files

Applied to files:

  • packages/docs/src/cli/generate.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 `async/await` syntax instead of promise chains for better readability

Applied to files:

  • packages/docs/src/cli/generate.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 `async/await` syntax instead of promise chains for better readability

Applied to files:

  • packages/docs/src/cli/generate.ts
🔇 Additional comments (5)
apps/example/package.json (1)

2-2: Rename + remark-gfm dependency wiring look correct.

This aligns with the example app migration and the MDX plugin usage in apps/example/vite.config.ts.

Also applies to: 60-60

package.json (1)

6-7: Workspace-level script/dependency updates are consistent with the app rename.

dev --filter=example matches the PR’s new active workspace and related CI/test wiring.

Also applies to: 18-18

packages/docs/tsup.config.ts (1)

5-5: Build entrypoint and shebang target updates are coherent.

Switching to src/cli.ts + dist/cli.js is correctly reflected in both entry and onSuccess.

Also applies to: 17-17, 32-32

packages/docs/package.json (1)

12-15: Package surface and CLI packaging changes look aligned.

The new root export, single bin entry, and build/docs script flow are consistent with the introduced src/cli.ts command router.

Also applies to: 61-61, 68-68, 71-71, 99-99, 112-112

packages/docs/src/cli/generate.ts (1)

225-292: Source mirroring/filter flow is clean and testable.

The SourceMirror abstraction and explicit cleanup contract improve command composability and make filtered runs predictable.

Comment thread packages/docs/src/cli/generate.ts Outdated
Comment thread packages/docs/src/cli/generate.ts Outdated
}
return 1;
}
const groups = await inferGroups(sourceMirror.docsDir);
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

Ensure failures before/inside pipeline always clean up temp dirs and return command-local errors.

inferGroups (Line 368) executes before the try/finally that performs sourceMirror.cleanup(), so an exception there can leak temp directories. Also, pipeline exceptions currently bypass command-local formatting/exit handling.

♻️ Suggested restructure (cleanup + consistent error output)
-  const groups = await inferGroups(sourceMirror.docsDir);
-
-  try {
+  try {
+    const groups = await inferGroups(sourceMirror.docsDir);
     await convertAllMdx({
       srcDir: sourceMirror.docsDir,
       outDir: path.join(outDir, "docs"),
       remarkPlugins: [...defaultRemarkPlugins],
       enrichFrontmatterFromGit: args.enrichGit,
@@
-    if (args.format === "json") {
+    if (args.format === "json") {
       io.stdout.write(`${renderGenerateResult(result)}\n`);
     } else {
       io.stdout.write(`Generated docs pipeline output in ${outDir}\n`);
     }
+  } catch (error) {
+    const message = error instanceof Error ? error.message : String(error);
+    if (args.format === "json") {
+      io.stderr.write(`${JSON.stringify({ error: message }, null, 2)}\n`);
+    } else {
+      io.stderr.write(`@inth/docs generate: ${message}\n`);
+    }
+    return 1;
   } finally {
     await sourceMirror.cleanup();
   }

Also applies to: 370-423

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

In `@packages/docs/src/cli/generate.ts` at line 368, Call inferGroups and any
other setup that can throw inside the same try/finally that performs
sourceMirror.cleanup so temp dirs are always removed; specifically move the call
to inferGroups(sourceMirror.docsDir) into the existing try block (or create a
new try immediately after creating sourceMirror) and ensure
sourceMirror.cleanup() runs in the finally. Also ensure pipeline execution
exceptions are caught locally (wrap pipeline.run/await in a try/catch inside the
command) so you can format and return command-local errors (instead of allowing
them to bubble) while still running the finally cleanup; update references in
this file to inferGroups and sourceMirror.cleanup and the pipeline invocation to
reflect the new scoping.

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

39-42: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Local workflow command appears stale after the app migration.

bun run demo:dev is out of sync with the apps/example migration and is likely to fail for contributors following this section.

Suggested fix
 bun install
-bun run demo:dev
+bun run dev
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 39 - 42, The README's local run instruction still
shows the old command "bun run demo:dev"; update that line to the current dev
command that launches the migrated app in apps/example (replace with the
repository's actual dev command, e.g., "pnpm --filter example dev" or "pnpm dev
--filter example"), and ensure the install step matches the package manager used
(update "bun install" to "pnpm install" if the repo now uses pnpm); change the
single line containing "bun run demo:dev" to the new command and verify it
starts the app in apps/example.
🤖 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/example/src/components/docs-shell.tsx`:
- Around line 30-37: The nav Link currently only indicates active state
visually; update the Link component (the JSX using Link, cn, pathname and
link.to) to expose that state to assistive tech by adding aria-current="page"
when pathname === link.to (i.e., set aria-current conditionally so it is present
only for the active link, e.g., aria-current={pathname === link.to ? "page" :
undefined}).

In `@apps/example/src/components/search-bar.tsx`:
- Around line 170-172: The hardcoded keyboard hint "⌘K" in the SearchBar
component should be platform-aware; replace the static <kbd> content with a
computed label (e.g., shortcutLabel) determined by a small helper like isMac()
that checks navigator.platform or navigator.userAgent for "Mac" (or uses
navigator.userAgentData if available) and returns "⌘K" for macOS and "Ctrl+K"
for Windows/Linux; update the JSX where the <kbd> element is rendered to use
this label and optionally add aria-keyshortcuts or title attributes referencing
the same computed shortcut.

---

Outside diff comments:
In `@README.md`:
- Around line 39-42: The README's local run instruction still shows the old
command "bun run demo:dev"; update that line to the current dev command that
launches the migrated app in apps/example (replace with the repository's actual
dev command, e.g., "pnpm --filter example dev" or "pnpm dev --filter example"),
and ensure the install step matches the package manager used (update "bun
install" to "pnpm install" if the repo now uses pnpm); change the single line
containing "bun run demo:dev" to the new command and verify it starts the app in
apps/example.
🪄 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: 4c5882ff-a3ad-4dc6-851f-3478da477312

📥 Commits

Reviewing files that changed from the base of the PR and between bbee315 and 235e775.

⛔ Files ignored due to path filters (3)
  • apps/example/src/generated/docs-nav.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-content.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-index.json is excluded by !**/generated/**
📒 Files selected for processing (21)
  • .agents/skills/inth-docs/SKILL.md
  • .github/workflows/bench.yml
  • README.md
  • apps/example/playwright.config.ts
  • apps/example/scripts/bench.ts
  • apps/example/scripts/llm-generate.ts
  • apps/example/src/components/docs-shell.tsx
  • apps/example/src/components/search-bar.tsx
  • apps/example/src/lib/use-docs-search.ts
  • apps/example/src/routes/__root.tsx
  • apps/example/src/routes/docs/llm.tsx
  • apps/example/src/routes/playground.tsx
  • apps/example/src/routes/search.tsx
  • apps/example/tests/e2e/smoke.e2e.ts
  • apps/example/tsconfig.json
  • biome.jsonc
  • docs/convert.mdx
  • packages/docs/README.md
  • packages/docs/src/cli.test.ts
  • packages/docs/src/cli.ts
  • packages/docs/src/cli/generate.ts

Comment thread apps/example/src/components/docs-shell.tsx
Comment thread apps/example/src/components/search-bar.tsx
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/example/src/components/search-bar.tsx (1)

361-365: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Hardcoded Mac shortcut in empty state instructions.

The ⌘↵ keyboard hint is Mac-specific while the main trigger button correctly uses platform detection. Consider reusing the same pattern here for consistency.

♻️ Suggested fix
+const modifierLabel = shortcutLabel.startsWith("⌘") ? "⌘" : "Ctrl+";
...
         <kbd className="rounded border border-border bg-background px-1 py-0.5 font-mono text-[10px]">
-          ⌘↵
+          {modifierLabel}↵
         </kbd>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/example/src/components/search-bar.tsx` around lines 361 - 365, The
empty-state keyboard hint currently hardcodes the Mac shortcut "⌘↵"; update the
JSX in search-bar.tsx to reuse the existing platform-aware shortcut logic used
by the main trigger button (e.g., the same isMac/isMacOS check or the helper
that generates the key hint) so the <kbd> content renders a platform-appropriate
label (Cmd+Enter on macOS, Ctrl+Enter on Windows/Linux). Locate the JSX that
renders the <kbd className=...>⌘↵</kbd> and replace the literal with the same
derived value or helper call used elsewhere in this component so both places
stay consistent across platforms.
🤖 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/example/src/components/search-bar.tsx`:
- Around line 361-365: The empty-state keyboard hint currently hardcodes the Mac
shortcut "⌘↵"; update the JSX in search-bar.tsx to reuse the existing
platform-aware shortcut logic used by the main trigger button (e.g., the same
isMac/isMacOS check or the helper that generates the key hint) so the <kbd>
content renders a platform-appropriate label (Cmd+Enter on macOS, Ctrl+Enter on
Windows/Linux). Locate the JSX that renders the <kbd className=...>⌘↵</kbd> and
replace the literal with the same derived value or helper call used elsewhere in
this component so both places stay consistent across platforms.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5d787de8-c763-4663-ad3e-2015bdc29a1e

📥 Commits

Reviewing files that changed from the base of the PR and between 235e775 and d003978.

📒 Files selected for processing (3)
  • README.md
  • apps/example/src/components/docs-shell.tsx
  • apps/example/src/components/search-bar.tsx
📜 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:

  • apps/example/src/components/docs-shell.tsx
  • apps/example/src/components/search-bar.tsx
**/*.{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/example/src/components/docs-shell.tsx
  • apps/example/src/components/search-bar.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:

  • apps/example/src/components/docs-shell.tsx
  • apps/example/src/components/search-bar.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/example/src/components/docs-shell.tsx
  • apps/example/src/components/search-bar.tsx
🧠 Learnings (49)
📓 Common learnings
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/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: Keep documentation organized by categories 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/**/*.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/app/**/{layout,page}.tsx : Keep layouts and pages separate in the docs app directory
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
📚 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/example/src/components/docs-shell.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/**/*.{ts,tsx} : Use Next.js App Router conventions in the docs app

Applied to files:

  • apps/example/src/components/docs-shell.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/example/src/components/docs-shell.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/example/src/components/docs-shell.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/example/src/components/docs-shell.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/src/components/**/*.tsx : Place reusable components in `src/components` within the docs app

Applied to files:

  • apps/example/src/components/docs-shell.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/example/src/components/docs-shell.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/example/src/components/docs-shell.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/**/*.tsx : Use TypeScript for all components (.tsx) in the docs app

Applied to files:

  • apps/example/src/components/docs-shell.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/example/src/components/docs-shell.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 **/*.{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:

  • apps/example/src/components/docs-shell.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:

  • apps/example/src/components/docs-shell.tsx
📚 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:

  • apps/example/src/components/docs-shell.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:

  • apps/example/src/components/docs-shell.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} : Make sure anchors have content that's accessible to screen readers

Applied to files:

  • apps/example/src/components/docs-shell.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:

  • apps/example/src/components/docs-shell.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} : Include proper ARIA attributes in components

Applied to files:

  • apps/example/src/components/docs-shell.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:

  • apps/example/src/components/docs-shell.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 WAI-ARIA guidelines in Elements package components

Applied to files:

  • apps/example/src/components/docs-shell.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:

  • apps/example/src/components/docs-shell.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 valid ARIA state and property values

Applied to files:

  • apps/example/src/components/docs-shell.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} : Make sure all anchors are valid and navigable

Applied to files:

  • apps/example/src/components/docs-shell.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/example/src/components/docs-shell.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} : Maintain focus management in interactive components

Applied to files:

  • apps/example/src/components/search-bar.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} : Handle focus management

Applied to files:

  • apps/example/src/components/search-bar.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} : Assign `tabIndex` to non-interactive HTML elements with `aria-activedescendant`

Applied to files:

  • apps/example/src/components/search-bar.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 keyboard navigation in components

Applied to files:

  • apps/example/src/components/search-bar.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} : Handle focus management in Elements package components

Applied to files:

  • apps/example/src/components/search-bar.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 keyboard navigation

Applied to files:

  • apps/example/src/components/search-bar.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 the `key` prop for elements in iterables (prefer unique IDs over array indices)

Applied to files:

  • apps/example/src/components/search-bar.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} : Do not rely on `z-index` or `calc()` CSS properties; control element stacking through DOM order

Applied to files:

  • apps/example/src/components/search-bar.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} : Handle event propagation properly in components

Applied to files:

  • apps/example/src/components/search-bar.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} : Don't set `aria-hidden="true"` on focusable elements

Applied to files:

  • apps/example/src/components/search-bar.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} : Make static elements with click handlers use a valid role attribute

Applied to files:

  • apps/example/src/components/search-bar.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:

  • README.md
📚 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:

  • README.md
📚 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:

  • README.md
📚 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:

  • README.md
📚 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:

  • README.md
📚 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:

  • README.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,md} : Include TypeScript examples in Elements package documentation

Applied to files:

  • README.md
📚 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:

  • README.md
📚 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:

  • README.md
📚 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:

  • README.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/**/*.{test,spec}.{ts,tsx} : Include integration tests for Elements package components

Applied to files:

  • README.md
📚 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:

  • README.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/**/*.{test,spec}.{ts,tsx} : Test accessibility features in Elements package component tests

Applied to files:

  • README.md
📚 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 deploying the app, load the start-core deployment skill file from node_modules/tanstack/start-client-core/skills/start-core/deployment/SKILL.md

Applied to files:

  • README.md
🔇 Additional comments (10)
README.md (4)

15-15: CLI naming update is clear and consistent.

Good change using @inth/docs lint directly in the public entrypoint description.


31-57: Example app migration docs are coherent.

The move from apps/docs-smoke to apps/example is consistently reflected across local workflow, pipeline commands, and validation scope.


94-101: Docs generation guidance matches package behavior.

Source/output locations and the docs:generate command align with the generator script and package build wiring.


117-133: Agent bundle and fallback path documentation looks correct.

The packaged bundle description and node_modules/@inth/docs/docspackages/docs/docs/ fallback are clearly documented.

apps/example/src/components/docs-shell.tsx (1)

25-42: Accessibility improvements look correct and complete.

The sidebar landmarks are now explicitly labeled, and active-page state is exposed via aria-current="page" on links. This resolves the prior assistive-tech ambiguity and keeps navigation semantics solid.

apps/example/src/components/search-bar.tsx (5)

1-25: LGTM!

Imports are well-organized and constants are appropriately extracted with descriptive names.


26-36: LGTM!

Platform detection for shortcut label is SSR-safe and correctly handles Mac vs. Windows/Linux.


132-137: LGTM!

The activeIndex reset effect now correctly responds to result changes via visibleResultKey dependency, addressing the previous review concern.


201-208: LGTM!

The backdrop click-to-close approach using z-0 for the backdrop and z-10 for the panel is a valid fix for the previous z-index issue. Both are within the z-50 overlay container, so clicks outside the panel will correctly trigger close.


392-434: LGTM!

Icon components are properly implemented with aria-hidden="true" for accessibility.

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