[codex] restructure docs app and package docs#11
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughMoves docs source to repo-root Changes
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
There was a problem hiding this comment.
💡 Codex Review
https://github.com/inthhq/docs/blob/649a51e5a0cae6ffdcbd9969e39bf3ece186bde8/apps/example/package.json#L20
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
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
There was a problem hiding this comment.
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 | 🔵 TrivialConsider extracting shared group structure to reduce duplication.
The
groupsconfiguration 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 callHowever, 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
⛔ Files ignored due to path filters (6)
apps/docs-smoke/src/generated/docs-search-content.jsonis excluded by!**/generated/**apps/docs-smoke/src/generated/docs-search-index.jsonis excluded by!**/generated/**apps/example/src/generated/docs-nav.jsonis excluded by!**/generated/**apps/example/src/generated/docs-search-content.jsonis excluded by!**/generated/**apps/example/src/generated/docs-search-index.jsonis excluded by!**/generated/**bun.lockis excluded by!**/*.lock
📒 Files selected for processing (134)
.agents/skills/inth-docs/SKILL.md.github/workflows/bench.ymlREADME.mdapps/docs-smoke/content/docs/guides/components-fixture.mdxapps/docs-smoke/content/docs/guides/extracted-type-table-fixture.mdxapps/docs-smoke/content/docs/guides/quickstart.mdxapps/docs-smoke/content/docs/index.mdxapps/docs-smoke/content/docs/meta.jsonapps/docs-smoke/content/docs/search.mdxapps/docs-smoke/scripts/llm-generate.tsapps/docs-smoke/src/components/docs-shell.tsxapps/docs-smoke/src/components/site-header.tsxapps/docs-smoke/src/routes/__root.tsxapps/docs-smoke/src/routes/docs/guides/components-fixture.tsxapps/docs-smoke/src/routes/docs/guides/quickstart.tsxapps/docs-smoke/src/routes/docs/index.tsxapps/docs-smoke/src/routes/search.tsxapps/docs-smoke/tests/e2e/smoke.e2e.tsapps/example/.gitignoreapps/example/components.jsonapps/example/package.jsonapps/example/playwright.config.tsapps/example/scripts/bench.tsapps/example/scripts/convert-real.tsapps/example/scripts/llm-generate-real.tsapps/example/scripts/llm-generate.tsapps/example/scripts/mdx-convert.tsapps/example/scripts/search-generate.tsapps/example/scripts/setup-real-content.tsapps/example/scripts/test-pipeline.tsapps/example/scripts/test-real.tsapps/example/src/components/component-matrix.tsxapps/example/src/components/docs-mdx/accordion.tsxapps/example/src/components/docs-mdx/callout.tsxapps/example/src/components/docs-mdx/card.tsxapps/example/src/components/docs-mdx/command-tabs.tsxapps/example/src/components/docs-mdx/example.tsxapps/example/src/components/docs-mdx/index.tsapps/example/src/components/docs-mdx/mdx-components.tsapps/example/src/components/docs-mdx/mermaid.tsxapps/example/src/components/docs-mdx/selector.tsxapps/example/src/components/docs-mdx/steps.tsxapps/example/src/components/docs-mdx/tabs.tsxapps/example/src/components/docs-mdx/topic-switcher.tsxapps/example/src/components/docs-mdx/type-table.tsxapps/example/src/components/docs-shell.tsxapps/example/src/components/search-bar.tsxapps/example/src/components/site-footer.tsxapps/example/src/components/site-header.tsxapps/example/src/components/ui/badge.tsxapps/example/src/components/ui/button.tsxapps/example/src/components/ui/card.tsxapps/example/src/components/ui/separator.tsxapps/example/src/lib/docs.tsapps/example/src/lib/search.tsapps/example/src/lib/use-docs-search.tsapps/example/src/lib/utils.tsapps/example/src/mdx-components.tsxapps/example/src/mdx.d.tsapps/example/src/routeTree.gen.tsapps/example/src/router.tsxapps/example/src/routes/__root.tsxapps/example/src/routes/api/docs/ask.tsapps/example/src/routes/api/docs/search.tsapps/example/src/routes/docs/components.tsxapps/example/src/routes/docs/convert.tsxapps/example/src/routes/docs/guides/bundle-package-docs.tsxapps/example/src/routes/docs/guides/connect-docs-site.tsxapps/example/src/routes/docs/index.tsxapps/example/src/routes/docs/lint.tsxapps/example/src/routes/docs/llm.tsxapps/example/src/routes/docs/methodology.tsxapps/example/src/routes/docs/remark.tsxapps/example/src/routes/docs/route.tsxapps/example/src/routes/docs/search.tsxapps/example/src/routes/index.tsxapps/example/src/routes/playground.tsxapps/example/src/routes/search.tsxapps/example/src/styles.cssapps/example/tests/e2e/smoke.e2e.tsapps/example/tsconfig.jsonapps/example/type-fixtures/pipeline-example.tsapps/example/vite.config.tsbiome.jsoncdocs/components.mdxdocs/convert.mdxdocs/docs.config.tsdocs/guides/bundle-package-docs.mdxdocs/guides/connect-docs-site.mdxdocs/index.mdxdocs/lint.mdxdocs/llm.mdxdocs/methodology.mdxdocs/remark.mdxdocs/search.mdxpackage.jsonpackages/docs/.gitignorepackages/docs/README.mdpackages/docs/agent-docs-src/docs/lint.mdxpackages/docs/agent-docs/docs/components.mdpackages/docs/agent-docs/docs/convert.mdpackages/docs/agent-docs/docs/index.mdpackages/docs/agent-docs/docs/lint.mdpackages/docs/agent-docs/docs/llm.mdpackages/docs/agent-docs/docs/llms-full.txtpackages/docs/agent-docs/docs/llms-full/authoring.txtpackages/docs/agent-docs/docs/llms-full/authoring/components.txtpackages/docs/agent-docs/docs/llms-full/authoring/remark.txtpackages/docs/agent-docs/docs/llms-full/generation.txtpackages/docs/agent-docs/docs/llms-full/generation/convert.txtpackages/docs/agent-docs/docs/llms-full/generation/llm.txtpackages/docs/agent-docs/docs/llms-full/generation/search.txtpackages/docs/agent-docs/docs/llms-full/overview.txtpackages/docs/agent-docs/docs/llms-full/validation.txtpackages/docs/agent-docs/docs/llms.txtpackages/docs/agent-docs/docs/remark.mdpackages/docs/agent-docs/docs/search.mdpackages/docs/agent-docs/llms-full.txtpackages/docs/agent-docs/llms.txtpackages/docs/package.jsonpackages/docs/scripts/generate-agent-docs.tspackages/docs/scripts/generate-docs.tspackages/docs/src/cli.test.tspackages/docs/src/cli.tspackages/docs/src/cli/generate.tspackages/docs/src/index.tspackages/docs/src/internal/package-surface.test.tspackages/docs/src/lint/cli.tspackages/docs/src/lint/schema.tspackages/docs/src/llm/index.tspackages/docs/src/llm/llm.test.tspackages/docs/src/llm/llm.tspackages/docs/tsup.config.tstsconfig.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
| const baseUrl = | ||
| process.env.INTH_DOCS_AGENT_BASE_URL?.trim() || | ||
| process.env.BASE_URL?.trim() || | ||
| process.env.PORTLESS_URL?.trim() || | ||
| "https://docs.example.com"; |
There was a problem hiding this comment.
🧹 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.
| 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"; |
There was a problem hiding this comment.
🛠️ 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.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
packages/docs/src/cli/generate.ts (1)
164-181: 🧹 Nitpick | 🔵 Trivial
inferGroupsstill 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
⛔ Files ignored due to path filters (3)
apps/example/src/generated/docs-search-content.jsonis excluded by!**/generated/**apps/example/src/generated/docs-search-index.jsonis excluded by!**/generated/**bun.lockis excluded by!**/*.lock
📒 Files selected for processing (6)
apps/example/package.jsonapps/example/tsconfig.jsonpackage.jsonpackages/docs/package.jsonpackages/docs/src/cli/generate.tspackages/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
Preferunknownoveranywhen 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.tspackages/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
Preferfor...ofloops over.forEach()and indexedforloops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Useconstby default,letonly when reassignment is needed, nevervar
Alwaysawaitpromises in async functions - don't forget to use the return value
Useasync/awaitsyntax 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
Removeconsole.log,debugger, andalertstatements from production code
ThrowErrorobjects with descriptive messages, not strings or other values
Usetry-catchblocks 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 useeval()or assign directly todocument.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.tspackages/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.jsonpackage.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.tspackages/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.tspackages/docs/package.jsonpackages/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.tspackages/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.tspackages/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.tspackages/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.tspackages/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.tspackages/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.tspackages/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.tspackages/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-gfmdependency 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=examplematches 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.jsis correctly reflected in bothentryandonSuccess.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.tscommand 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
SourceMirrorabstraction and explicit cleanup contract improve command composability and make filtered runs predictable.
| } | ||
| return 1; | ||
| } | ||
| const groups = await inferGroups(sourceMirror.docsDir); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
39-42:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winLocal workflow command appears stale after the app migration.
bun run demo:devis out of sync with theapps/examplemigration 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
⛔ Files ignored due to path filters (3)
apps/example/src/generated/docs-nav.jsonis excluded by!**/generated/**apps/example/src/generated/docs-search-content.jsonis excluded by!**/generated/**apps/example/src/generated/docs-search-index.jsonis excluded by!**/generated/**
📒 Files selected for processing (21)
.agents/skills/inth-docs/SKILL.md.github/workflows/bench.ymlREADME.mdapps/example/playwright.config.tsapps/example/scripts/bench.tsapps/example/scripts/llm-generate.tsapps/example/src/components/docs-shell.tsxapps/example/src/components/search-bar.tsxapps/example/src/lib/use-docs-search.tsapps/example/src/routes/__root.tsxapps/example/src/routes/docs/llm.tsxapps/example/src/routes/playground.tsxapps/example/src/routes/search.tsxapps/example/tests/e2e/smoke.e2e.tsapps/example/tsconfig.jsonbiome.jsoncdocs/convert.mdxpackages/docs/README.mdpackages/docs/src/cli.test.tspackages/docs/src/cli.tspackages/docs/src/cli/generate.ts
There was a problem hiding this comment.
♻️ Duplicate comments (1)
apps/example/src/components/search-bar.tsx (1)
361-365: 🧹 Nitpick | 🔵 Trivial | 💤 Low valueHardcoded 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
📒 Files selected for processing (3)
README.mdapps/example/src/components/docs-shell.tsxapps/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
Preferunknownoveranywhen 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.tsxapps/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
Preferfor...ofloops over.forEach()and indexedforloops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Useconstby default,letonly when reassignment is needed, nevervar
Alwaysawaitpromises in async functions - don't forget to use the return value
Useasync/awaitsyntax 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
Removeconsole.log,debugger, andalertstatements from production code
ThrowErrorobjects with descriptive messages, not strings or other values
Usetry-catchblocks 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 useeval()or assign directly todocument.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.tsxapps/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 thekeyprop 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
AvoiddangerouslySetInnerHTMLunless absolutely necessary
Use proper image components (e.g., Next.js<Image>) over<img>tags
Use Next.js<Image>component for images
Usenext/heador 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 ofReact.forwardRefin React 19+
Files:
apps/example/src/components/docs-shell.tsxapps/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
Addrel="noopener"when usingtarget="_blank"on links
Files:
apps/example/src/components/docs-shell.tsxapps/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 lintdirectly in the public entrypoint description.
31-57: Example app migration docs are coherent.The move from
apps/docs-smoketoapps/exampleis consistently reflected across local workflow, pipeline commands, and validation scope.
94-101: Docs generation guidance matches package behavior.Source/output locations and the
docs:generatecommand 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/docs→packages/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
activeIndexreset effect now correctly responds to result changes viavisibleResultKeydependency, addressing the previous review concern.
201-208: LGTM!The backdrop click-to-close approach using
z-0for the backdrop andz-10for the panel is a valid fix for the previous z-index issue. Both are within thez-50overlay container, so clicks outside the panel will correctly triggerclose.
392-434: LGTM!Icon components are properly implemented with
aria-hidden="true"for accessibility.
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 generateCLI 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.