Skip to content

[docs] fix mintlify parse error in de/dashboard.mdx#229

Merged
NiveditJain merged 1 commit into
mainfrom
luv-docs-de-fix
Apr 29, 2026
Merged

[docs] fix mintlify parse error in de/dashboard.mdx#229
NiveditJain merged 1 commit into
mainfrom
luv-docs-de-fix

Conversation

@NiveditJain
Copy link
Copy Markdown
Member

@NiveditJain NiveditJain commented Apr 29, 2026

Summary

  • Drop the inner German „…" quotation marks from two <Tab title="…"> attributes in docs/de/dashboard.mdx so MDX parsing succeeds.
  • Background: [auto] update translations #228's German translation rendered the tab labels as title="Tab „Richtlinien"" and title="Tab „Aktivität"". The inner straight " closes the JSX attribute, leaving a stray " before > that mintlify reports as Unexpected character " (parse error at de/dashboard.mdx:65:32). Every other locale leaves the tab label without inner quotes, so this matches them.
  • Fixes the failing docs job on main (run 25084614625).

Test plan

  • Docs CI (mint validate) passes on this branch
  • Spot-check rendered German dashboard page for "Tab Richtlinien" / "Tab Aktivität" labels

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Fixed validation errors in German documentation that prevented proper rendering of dashboard content.
    • Corrected formatting in German dashboard tab titles to ensure documentation compatibility.

The German translation in #228 added inner „..." quotation marks
inside `<Tab title="…">` attributes, which broke MDX parsing — the
inner straight `"` ended the attribute value and the trailing `"`
produced `Unexpected character "`. Drop the inner quotes to match
how every other locale renders the tab labels and unblock the docs
CI job on main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

A malformed JSX attribute quoting issue in German dashboard tab titles was fixed by removing inner quotation marks, and a changelog entry was added to document the fix. No logic or structural changes were made.

Changes

Cohort / File(s) Summary
Bug Fix Documentation
CHANGELOG.md
Added entry under Fixes section documenting the resolution of malformed JSX attribute quoting in German dashboard tab titles.
JSX Attribute Fix
docs/de/dashboard.mdx
Removed inner quotation marks from two German tab labels in the Richtlinien section to resolve mintlify validate parsing errors.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Quotes within quotes caused quite the fright,
German tabs tangled, JSX not right,
Strip them away, let the parser be free,
Now Richtlinien shines, as clear as can be!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing a mintlify parse error in the German dashboard documentation by removing malformed quotation marks.
Description check ✅ Passed The description clearly explains the problem, solution, and reasoning, though it omits the standard template sections like 'Type of Change' and 'Checklist'.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch luv-docs-de-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@CHANGELOG.md`:
- Line 6: The changelog entry "Fix `mintlify validate` failing on
`docs/de/dashboard.mdx` after `#228` added German „...\" quotation marks inside
two `<Tab title=\"…\">` attributes — the inner straight `\"` ended the JSX
attribute value, then the leftover `\"` produced an `Unexpected character \"`
parse error. Drop the inner quotes (matching how every other locale renders the
tab labels) so the docs CI job passes again." is missing the PR number; append
the PR number in parentheses at the end of that single-line entry (e.g., add "
(#<PR_NUMBER>)") so the entry follows the required format.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9f764b5c-fa5d-4c8d-9801-cdec7bb5bc32

📥 Commits

Reviewing files that changed from the base of the PR and between 42bc8ff and 39700c5.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • docs/de/dashboard.mdx

Comment thread CHANGELOG.md
## Unreleased

### Fixes
- Fix `mintlify validate` failing on `docs/de/dashboard.mdx` after #228 added German „..." quotation marks inside two `<Tab title="…">` attributes — the inner straight `"` ended the JSX attribute value, then the leftover `"` produced an `Unexpected character "` parse error. Drop the inner quotes (matching how every other locale renders the tab labels) so the docs CI job passes again.
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

Append PR number to the changelog entry.

The entry is missing the PR number. As per coding guidelines, each changelog entry should end with the PR number in parentheses.

📝 Proposed fix to add PR number
-- Fix `mintlify validate` failing on `docs/de/dashboard.mdx` after `#228` added German „..." quotation marks inside two `<Tab title="…">` attributes — the inner straight `"` ended the JSX attribute value, then the leftover `"` produced an `Unexpected character "` parse error. Drop the inner quotes (matching how every other locale renders the tab labels) so the docs CI job passes again.
+- Fix `mintlify validate` failing on `docs/de/dashboard.mdx` after `#228` added German „..." quotation marks inside two `<Tab title="…">` attributes — the inner straight `"` ended the JSX attribute value, then the leftover `"` produced an `Unexpected character "` parse error. Drop the inner quotes (matching how every other locale renders the tab labels) so the docs CI job passes again (`#229`).

As per coding guidelines: Each changelog entry should be a single line: short description followed by PR number (e.g., - Add foo support (#123)).

📝 Committable suggestion

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

Suggested change
- Fix `mintlify validate` failing on `docs/de/dashboard.mdx` after #228 added German „..." quotation marks inside two `<Tab title="…">` attributes — the inner straight `"` ended the JSX attribute value, then the leftover `"` produced an `Unexpected character "` parse error. Drop the inner quotes (matching how every other locale renders the tab labels) so the docs CI job passes again.
- Fix `mintlify validate` failing on `docs/de/dashboard.mdx` after `#228` added German „..." quotation marks inside two `<Tab title="…">` attributes — the inner straight `"` ended the JSX attribute value, then the leftover `"` produced an `Unexpected character "` parse error. Drop the inner quotes (matching how every other locale renders the tab labels) so the docs CI job passes again (`#229`).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 6, The changelog entry "Fix `mintlify validate` failing
on `docs/de/dashboard.mdx` after `#228` added German „...\" quotation marks inside
two `<Tab title=\"…\">` attributes — the inner straight `\"` ended the JSX
attribute value, then the leftover `\"` produced an `Unexpected character \"`
parse error. Drop the inner quotes (matching how every other locale renders the
tab labels) so the docs CI job passes again." is missing the PR number; append
the PR number in parentheses at the end of that single-line entry (e.g., add "
(#<PR_NUMBER>)") so the entry follows the required format.

@NiveditJain NiveditJain merged commit 11147a8 into main Apr 29, 2026
9 checks passed
NiveditJain added a commit that referenced this pull request Apr 29, 2026
Per CodeRabbit feedback on #231: each CHANGELOG entry should be a single
line ending in its PR number. Tag mintlify-de and block-read-outside-cwd
fixes with their actual merged PRs (#229, #230) instead of #231.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
NiveditJain added a commit that referenced this pull request Apr 29, 2026
* [hooks] decouple hook chain from clsx/tailwind

The hook handler (`src/hooks/handler.ts`) was transitively pulling in
`lib/utils.ts` via:

  handler.ts
    -> resolve-permission-mode.ts
      -> lib/codex-sessions.ts
        -> lib/log-entries.ts
          -> lib/utils.ts (imports clsx + tailwind-merge)

`lib/utils.ts` is the dashboard's shadcn `cn()` helper — it has no business
on the runtime path of a CLI hook. The only thing the hook chain actually
needed from it was `formatDate`, an `Intl.DateTimeFormat` wrapper with no
third-party deps.

When a Claude Code session opened a clone of this repo whose
`$CLAUDE_PROJECT_DIR` resolved into an ancestor that shadowed bun's global
install cache (e.g. `/home/nivedit/prs/failproofai-231/`, with `node_modules`
missing locally but `/home/nivedit/node_modules` present and clsx-less),
every hook event crashed with:

  ResolveMessage: Cannot find package 'clsx' from .../lib/utils.ts

Move `formatDate` into a dedicated `lib/format-date.ts` and update the four
server-side and three dashboard callers. `lib/utils.ts` now only exports
`cn` so the hook handler no longer transitively requires `clsx`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* [changelog] condense unreleased entries to one-liners

Per CodeRabbit feedback on #231: each CHANGELOG entry should be a single
line ending in its PR number. Tag mintlify-de and block-read-outside-cwd
fixes with their actual merged PRs (#229, #230) instead of #231.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
NiveditJain added a commit that referenced this pull request Apr 29, 2026
Bumps package.json from 0.0.9 to 0.0.9-beta.2 and rolls the ## Unreleased
changelog section into ## 0.0.9 — 2026-04-28.

Adds since v0.0.9-beta.1:

Features:
- Show OpenAI Codex projects on the /projects page alongside Claude Code
  projects, with CLI badges per row and per session; /project/[name] is
  Codex-aware and the session viewer renders the CLI badge beside the
  Session Log header (#232)

Fixes:
- mintlify validate parse error in docs/de/dashboard.mdx (#229)
- block-read-outside-cwd false-deny on globs and -v host:/path (#230)
- decouple hook chain from clsx/tailwind via lib/format-date.ts (#231)

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
NiveditJain added a commit that referenced this pull request Apr 29, 2026
Promotes the version from 0.0.9-beta.3 to 0.0.9 stable. The
## 0.0.9 — 2026-04-28 changelog section is already up to date with the
contents below; no CHANGELOG churn required.

0.0.9 contents:

Features:
- OpenAI Codex hook integration via `failproofai policies --install --cli codex`
  (or --cli claude codex for both); supports all six Codex hook events,
  PermissionRequest wired through policy-evaluator, per-CLI telemetry tagging,
  interactive arrow-key CLI selector when both agents detected (#220, #222, #223)
- Activity dashboard CLI filter alongside event-type, policy, and session-id
  filters; Codex sessions in the activity feed are now clickable, with the
  existing log viewer rendering Codex transcripts via lib/codex-sessions.ts (#226)
- Surface Slack community link in CLI banner and Reach Us menu (#225)
- Show OpenAI Codex projects on the /projects page alongside Claude Code projects,
  with CLI badges per row and per session; /project/[name] is Codex-aware and the
  session viewer renders the CLI badge beside the Session Log header (#232)

Fixes:
- Trailing blank line after enabled-policies summary in install output (#224)
- Resolve hook bin via $CLAUDE_PROJECT_DIR (was relative path) (#219)
- Mintlify validation of Arabic built-in-policies docs
- Mintlify parse error in docs/de/dashboard.mdx (#229)
- block-read-outside-cwd false-deny on globs and -v host:/path (#230)
- Decouple hook chain from clsx/tailwind via lib/format-date.ts (#231)

Docs:
- Bump built-in policy count from 32 to 39 in README and translations (#207)

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
NiveditJain added a commit that referenced this pull request Apr 30, 2026
* [docs] sanitize JSX attribute quotes in auto-translated MDX

The German translator periodically emits `<Tab title="Tab „Richtlinien"">`
where it intends `„…"` typographic quotes but uses ASCII `"` for the
closing — the inner straight `"` terminates the JSX attribute and the
real attribute close becomes a stray `"` before `>`, which trips
`mintlify validate` with `Unexpected character "`.

PR #229 fixed this once by hand on `docs/de/dashboard.mdx`. The next
auto-translation run regenerated the same broken markup, so the same
parse error landed on `main` again after #246.

Make it stick:

- `scripts/translate-docs/mdx-translator.ts` adds `sanitizeJsxAttributes`,
  which strips stray trailing ASCII `"` after a JSX attribute close and
  drops unmatched typographic opening quotes (`„`, `"`, `«`, `‹`, `「`,
  `『`) inside the same value. Matched pairs (e.g. `「ポリシー」`) are
  preserved. Wired into `translateMdxPage` ahead of `rewriteInternalLinks`.
- `scripts/translate-docs/translator.ts` extends rule #2 of the system
  prompt to forbid ASCII `"` inside JSX attribute values entirely, so
  the LLM is less likely to produce the pattern in the first place.
- `__tests__/scripts/translate-docs/mdx-translator.test.ts` covers the
  exact `de/dashboard.mdx` failure plus self-close, multi-attribute,
  matched typographic pairs, empty-value, and multiple-on-one-line cases.
- `docs/de/dashboard.mdx` drops the inner German quotes from the two
  `<Tab title>` attributes (mirrors #229) so CI on `main` goes green
  immediately rather than waiting for the next translation cycle.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* [docs] address CodeRabbit review on sanitizeJsxAttributes

Two findings on PR #247:

1. mdx-translator.ts:50 — `cleaned.split(open).join("")` removed *every*
   occurrence of an opener when `opens > closes`, so a value containing
   one matched typographic pair plus one stray opener (e.g.
   `„Foo“ und „Bar`) lost the matched pair too. Fix: drop only the
   surplus = opens - closes openers, scanning from the right with
   `lastIndexOf` so the leftmost matched pair is preserved.

2. mdx-translator.test.ts — add a regression test for that mixed case
   (one matched „…“ pair + one dangling „) so the bug above can't
   recur.

Also drop the English curly “…” pair from the openings list. U+201C
is both the German closer and the English-curly opener, so processing
the English pair after the German pair would strip the very German
closer we just preserved. The remaining pairs (German, French ×2,
Japanese ×2) all have unambiguous openers.

1177 unit tests pass (was 1176 — the new mixed-case test is the +1).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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