Repository navigation
fix(docs): preserve rendered source text and navigation - #992
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. Reviewed October 7, 2026, 6:10 AM ET / 10:10 UTC (Revision 4). ClawSweeper reviewWhat this changesThe PR repairs documentation text preservation, metadata parsing, link destinations and heading navigation, adds renderer regressions, and clarifies scoped menu-click documentation. Merge readiness⛔ Needs changes before merge - 2 items remain The consolidated repairs remain useful and are not implemented on current main. The previously reported shell-comment styling defect remains on this head. Likely related people: steipete, with high-confidence routing based on prior docs-site work. Priority: P2 Review scores
Verification
How this fits togetherPeekaboo’s documentation builder converts Markdown into static website pages. Its renderer supplies article text, highlighted examples, heading anchors and table-of-contents links. flowchart LR
A[Markdown documents] --> B[Metadata extraction]
B --> C[Article renderer]
C --> D[Code highlighting]
C --> E[Heading and link allocation]
D --> F[Static documentation pages]
E --> F
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the fragment-based renderer while recognizing shell comments across the complete line and preserving literal hashes inside strings. Do we have a high-confidence way to reproduce the issue? Yes, source inspection establishes the remaining styling trigger: a quoted span after a shell comment marker splits the fragment that the comment regex consumes. No new runtime reproduction was executed. Is this the best way to solve the issue? Yes, separating source text from rendered fragments is a focused repair, but shell comment recognition must retain line-wide context to preserve existing styling. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3a9590594ea4. LabelsLabel changes: No label changes. Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
PR SummaryLow Risk Overview The syntax highlighter no longer uses private-use placeholder characters (which could corrupt paths and large JSON blocks); it applies pattern passes on separate fragments so literal code, entities, and markup in fences stay intact. Front matter is normalized for CRLF before parsing so metadata does not leak into articles. Fenced code at end-of-file is flushed instead of dropped. Links and TOC text decode renderer-owned entities once (no double-escaped Adds a shared Reviewed by Cursor Bugbot for commit 1adc7b7. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7a60928. Configure here.
scripts/build-docs-site.mjs carried four literal NUL bytes in the inline() renderer's inline-code stash placeholder (one template literal, one regex literal). The first sat at byte 13289, past Git's 8000-byte binary sniff, so Git still diffed the file as text, but the autoreview helper scans the whole file and refused every diff touching it as a binary change. Spell them as \u0000 escapes instead. Runtime strings and regex semantics are unchanged: the generated _site output is byte-identical across all 79 files. Add a standalone guard test that the docs-site sources contain no literal NUL bytes, run test:docs-site over tests/docs-site-*.test.mjs, and have macOS CI call pnpm run test:docs-site. Those two wiring edits match open PR #992 byte-for-byte, so either PR can land first without conflicts.
Consolidate the reproduced CRLF metadata, entity/link, heading identity, EOF fence, and highlighter token defects from #939, #931, #940, #969, and #971. Keep highlighted fragments separate from source text and retain the shared renderer gate. Reconcile the Unreleased note and menu-preparation documentation with current main. All 25 docs-site regressions pass; independent Codex review is clean through P2. Co-authored-by: Rudy Mizrahi Celekli <47457359+rudycelekli@users.noreply.github.com>
3cfafcb to
1adc7b7
Compare

Documentation rendering lost literal code text, leaked CRLF front matter into articles, double-escaped TOC text and link queries, reused heading anchors, and discarded fenced code at EOF. This consolidates the verified fixes from #939, #931, #940, #969 and #971, with credit to @rudycelekli.
The highlighter now keeps rendered fragments separate from source text, with no reserved source characters or 6,400-token limit. The page-wide heading allocator preserves natural anchors and assigns unique duplicate/fallback IDs. Front matter is normalized before extraction; renderer-owned entities are decoded once; link suffixes remain intact; EOF flushes the pending fence. Normal macOS CI now runs the complete shared renderer gate.
Verification:
Reconciled with current main after #977; the Unreleased entry is now included and the final diff has a clean post-reconciliation review. The original contributor PRs are closed in favor of this consolidated successor. It also corrects the newly landed menu documentation to distinguish serialized evidence across preparation/dispatch from the native leaf identity check within dispatch; the unchanged contract source was supplied to review. Exact-head macOS/CodeQL CI is required before merge. No website deployment, release, or version bump is performed by this work.
Co-authored-by: Rudy Mizrahi Celekli 47457359+rudycelekli@users.noreply.github.com