Skip to content

fix(docs): replace Info callout inside Step to fix Chinese encoding garbled text - #94880

Closed
LeonidasLux wants to merge 1 commit into
openclaw:mainfrom
LeonidasLux:fix/issue-94504-chinese-encoding
Closed

LeonidasLux wants to merge 1 commit into
openclaw:mainfrom
LeonidasLux:fix/issue-94504-chinese-encoding

Conversation

@LeonidasLux

@LeonidasLux LeonidasLux commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix Chinese character encoding garbled text on /zh-CN/start/onboarding page caused by <Info> Mintlify MDX callout component rendering incorrectly when nested inside a <Step> component.

The <Info> callout renders correctly at the top level (e.g., /zh-CN/start/quickstart) but gets garbled when inside <Step> (which renders as <li>): the CSS class gets a corrupted hash suffix (oc-callout-info-8-3-k-d instead of oc-callout-info) and the <strong> tag contains binary control characters instead of text.

Root cause: <Info> component nested inside <Step> (rendered as <li>) triggers a Mintlify MDX processor bug that corrupts the HTML output. The Mintlify MDX pipeline applies CSS class hashing and component transformation that fails when callout components are inside list item (<li>) elements generated by <Step>.

Fix: Replace the <Info> callout with Markdown italic *This step is optional.* which is semantically equivalent (both indicate the step is optional) and renders correctly inside <Step>.

Fixes #94504

Linked context

Real behavior proof (required for external PRs)

Behavior addressed: On https://docs.openclaw.ai/zh-CN/start/onboarding, the CLI step's <Info> callout rendered with garbled characters:

<aside class="oc-callout oc-callout-info-8-3-k-d"><strong>Info^8�\r\b�\x16�3�K�\x00D�\x11</strong>

The corrupted CSS class and binary control characters in the <strong> tag cause the browser to render garbled Chinese text.

Real setup tested:

  • Runtime: node v24.1.0
  • Environment: openclaw repo at commit bf5e712
  • Validation tool: node scripts/check-docs-mdx.mjs

Exact steps or command run after fix:

cd openclaw
node scripts/check-docs-mdx.mjs docs/start
node scripts/check-docs-mdx.mjs docs

After-fix evidence:

$ node scripts/check-docs-mdx.mjs docs/start
Docs MDX check passed (14 files, 423ms).

$ node scripts/check-docs-mdx.mjs docs
Docs MDX check passed (676 files, 10076ms).

All 676 documentation files pass MDX validation. The fix is a one-line source change from <Info>This step is optional</Info> to *This step is optional.*.

Observed result after the fix: The <Info> callout is replaced with Markdown italic which renders correctly inside <Step> without triggering the Mintlify MDX processor corruption bug. The Chinese locale page /zh-CN/start/onboarding will no longer show garbled characters in the CLI step.

What was not tested: Full Mintlify build. The fix is a source-level workaround for a Mintlify MDX rendering bug; the English rendering is unaffected.

Proof limitations or environment constraints: The actual rendering can only be verified in the Mintlify production build environment. The MDX validation confirms syntactic correctness but cannot validate the Mintlify-specific component rendering pipeline.

Tests and validation

  • check-docs-mdx.mjs docs/start: 14/14 files pass
  • check-docs-mdx.mjs docs: 676/676 files pass
  • Other <Info> callouts verified unaffected (they are at top level, not inside <Step>)
  • No other <Info> inside <Step> patterns found in the docs tree

Risk checklist

Did user-visible behavior change? Yes — the Chinese onboarding page will no longer show garbled characters in the CLI step.

Did config, environment, or migration behavior change? No

Did security, auth, secrets, network, or tool execution behavior change? No

What is the highest-risk area?

  • None — one-line change from <Info>This step is optional</Info> to Markdown italic *This step is optional.*

How is that risk mitigated?

  • The change is semantically equivalent; both formats indicate the step is optional
  • Markdown italic is a standard, well-tested syntax in the Mintlify/MDX pipeline
  • All 676 MDX files pass validation after the change
  • Only the single <Info> callout that was inside <Step> is affected

Current review state

What is the next action?

  • Maintainer review

What is still waiting on author, maintainer, CI, or external proof?

  • Nothing

Which bot or reviewer comments were addressed?

  • N/A

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close: this PR is a plausible narrow workaround, but it duplicates the same source-line fix now better owned by #94510, which preserves the intended Info callout UI, is open, mergeable, maintainer-modifiable, directly closes the user report, and has stronger issue-specific proof.

Root-cause cluster
Relationship: duplicate
Canonical: #94510
Summary: This PR and the canonical candidate target the same docs/start/onboarding.md inline Info callout for the same zh-CN onboarding rendering report; the canonical candidate keeps the callout as block-form Info.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Canonical path: Use #94510 as the canonical landing path, verify the generated zh-CN onboarding page after the docs publish pipeline runs, then close the duplicate workaround PRs and the linked user report.

So I’m closing this here and keeping the remaining discussion on #94510.

Review details

Best possible solution:

Use #94510 as the canonical landing path, verify the generated zh-CN onboarding page after the docs publish pipeline runs, then close the duplicate workaround PRs and the linked user report.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main and v2026.6.9 still contain the inline Info-in-Step source line, and the live zh-CN docs page still renders that callout with corrupted Info markup while block-form Info elsewhere renders normally.

Is this the best way to solve the issue?

No. Italic Markdown avoids the bad inline MDX shape, but the block-form Info fix in #94510 is the better solution because it preserves the intended callout UI while removing the inline component shape.

Security review:

Security review cleared: The diff changes one Markdown docs line and does not touch executable code, workflows, dependencies, lockfiles, secrets, permissions, or supply-chain surfaces.

AGENTS.md: found and applied where relevant.

What I checked:

  • Repository policy read: Root AGENTS.md and docs/AGENTS.md were read; docs policy says English docs in this repo are the source of truth while localized docs are generated elsewhere, so the correct fix boundary is docs/start/onboarding.md plus the publish pipeline. Public docs: docs/AGENTS.md. (docs/AGENTS.md:29, a1828110704f)
  • Current main still has the affected shape: Current main still contains the inline <Info>This step is optional</Info> inside the CLI <Step>, matching the source shape reported as rendering garbled on the zh-CN docs page. Public docs: docs/start/onboarding.md. (docs/start/onboarding.md:82, a1828110704f)
  • This PR is the italic workaround: The submitted diff replaces the inline Info callout with italic Markdown, avoiding the inline component shape but also removing the callout treatment. Public docs: docs/start/onboarding.md. (docs/start/onboarding.md:82, bf5e7122f83c)
  • Canonical candidate preserves the callout: The canonical candidate changes the same source line to block-form <Info>, which removes the inline JSX shape while preserving the intended callout UI. Public docs: docs/start/onboarding.md. (docs/start/onboarding.md:82, 7931226adfb8)
  • Canonical candidate is viable: Live GitHub metadata shows docs(onboarding): normalize inline Info callout to block form #94510 is open, mergeable, clean, maintainer-modifiable, proof-supplied, and linked as closing the same user report. (7931226adfb8)
  • Live symptom still matches the source-shape theory: The live zh-CN onboarding page exposes clean translated Info source text but rendered output still includes the corrupted oc-callout-info-8-3-k-d class and garbled Info text; the zh-CN quickstart block-form control renders normal oc-callout-info markup.

Likely related people:

  • sebslight: February onboarding docs commits introduced and then cleaned up the Steps-based page shape that carried the inline CLI Info callout forward. (role: onboarding docs feature-history contributor; confidence: high; commits: 3011b00d39e9, c8f4bca0c421, c18452598aa0; files: docs/start/onboarding.md, docs/docs.json)
  • steipete: Path history shows many recent onboarding docs edits, including setup wizard, CLI package-manager, and security wording changes adjacent to this page. (role: recent onboarding docs contributor; confidence: medium; commits: 7807e1ef0516, 5287ae3c06cf, 1dd4f92ea275; files: docs/start/onboarding.md)
  • vincentkoc: Recent history shows typography and related-section maintenance on this file, and the release tag snapshot still carries the affected line. (role: recent docs area contributor; confidence: medium; commits: c645ec4555c0, f505c84285d6, 627c19c5cbbe; files: docs/start/onboarding.md)

Codex review notes: model internal, reasoning high; reviewed against a1828110704f.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jun 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chinese character encoding issues

1 participant