Repository navigation
fix: preserve emphasis in Markdown table row labels - #205349
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. What this changesThis PR repairs generated bold formatting around Markdown table row labels while preserving authored inline formatting. Example: Convert a two-column table containing the row label prefix to bullets.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this PR open: it addresses a current rendering bug, but the earlier CJK and URL regressions remain reachable in multiword labels. Reviewed head: Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe shared Markdown table converter turns parsed tables into fallback Markdown, which channel formatters then interpret using their own emphasis and linkification rules. flowchart LR
A[Authored Markdown table] --> B[Shared table parser]
B --> C[Bullet table converter]
C --> D[Row label repair]
D --> E[Channel formatter]
E --> F[Rendered message]
Technical reviewBest possible solution: Repair generated bold delimiters while preserving adjacent authored syntax consistently in both the single-slice and multiple-slice paths. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the original raw-wrapper defect on main and the remaining multiple-slice regression paths; no target code was executed during this read-only review. Is this the best way to solve the issue? The shared converter is the appropriate repair boundary, but its multiple-slice branch still rewrites neighboring syntax without the preservation checks added for single-slice labels. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7c15131629bd. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +257, Tests +110. Total +367 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)
Reviewed November 25, 2026, 10:05 AM ET / 15:05 UTC (Revision 3). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…restoration-ci-189390-20261127 * commit '6feeb50a3f14fbf0aa5167d342f186dc4d67fc18': (9846 commits) fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341) refactor(codex): centralize native completion delivery (#206447) fix(subagents): finish claimed stops after session rotation (#206405) fix: let owners fork a chat with exec after a subagent or exec completion (#206483) test(cli): gate agent --local cold-start processes and workers (#206466) perf(ci): skip baseline inventory when line-cap debt is empty (#189909) refactor(test): share core process-result fixtures (#174149) refactor(ci): reuse canonical budget flag parsing (#189480) fix: recover Codex chats after oversized requests (#206475) fix(agents): skip the bootstrap ritual in one-shot runs (#206477) fix(test): preserve stack coordinates in redacted failure reports (#152384) fix(gateway): return consistent unavailable response guidance (#191933) fix: preserve emphasis in Markdown table row labels (#205349) fix(nextcloud-talk): keep webhook spool helpers private (#206470) perf(plugins): overlay native receipts once per visible root (#206464) fix: keep GitHub comment approvals alive and skip repeat approval on the session PR (#206129) perf(config): retain one snapshot for unchanged validation results (#206465) refactor(test): reuse canonical secret fixture cleanup (#189492) refactor(subagents): own descendant Stop cancellation (#206444) refactor(subagents): keep announce cleanup action type private (#206407) ...
* fix: preserve emphasis in Markdown table row labels * fix: narrow indexed Markdown row label runs * fix(markdown): brace the table label return * fix(markdown): preserve neighboring row label source * fix(markdown): preserve adjacent table label source when formatting loses meaning * fix: keep Markdown row label sorting immutable * fix: preserve emphasis and URLs in multiword table labels
What Problem This Solves
When OpenClaw converts a Markdown table to bullets, it makes the first column of each row bold. A label written as
pre**fix**could display asprefix****with onlyprebold. A mix of adjacent italic and bold text could also expose asterisks.User Impact
The entire label reads prefix. In
x*old***a**_b_, all ofxoldabis bold, with italics onoldandb. The following line keeps its own formatting. Teams preserves CJK italics on either side of the repaired span, and Matrix keeps the authored destination of a bare URL such ashttps://example.com/a_b.Why This Change Was Made
The bullet formatter keeps the authored spelling whenever adding bold preserves its text and formatting. For labels that need repair, the shared Markdown renderer carries italics and strikethrough across the affected text. Code delimiters, reference keys, link destinations, and escaped punctuation keep their authored syntax. For labels with multiple inline constructs, the formatter copies unaffected source slices and repairs the strong delimiters within the affected slice. It uses the shared CJK emphasis rules to locate those boundaries. When the constructs touch, the formatter compares the rendered text, link destinations and ranges, and coverage of each non-bold style. If formatting changes their meaning, it can remove just the redundant strong delimiters from the authored source and check an alternate bold wrapper. This builds on the earlier table-cell source preservation work. Earlier table-cell repair
Evidence
46113.pre**fix**前*斜体:*后, Teams kept the full label bold and斜体:italic. Forpre**fix**(https://example.com/a_b), Matrix kept the exact URL in both the link text and destination. Independent review passed all 40 original and 36 combined Teams/Matrix controls.toSorted. All 4,096 deterministic baseline/candidate projections matched and retained their input spans. The repository format check, source syntax check and normal commit hook passed. All 26 registered table tests and the previously failing core lint job passed on this revision. The sender checks above used synthetic transports.Multiword label compatibility
On f95af114, the formatter checks the full label after reconstructing its parts. Adding a trailing word to the two adjacent-markup examples reproduced the review findings on the previous revision. Its table suite passed 26 cases and failed exactly the two added regressions. The corrected source passed all 28 cases in Vitest 5.0.5. The Teams formatter kept the CJK text italic. Matrix emitted the authored
https://example.com/a_bdestination with no added backslash. Both single-word controls stayed byte-identical and the following price row remained intact. These results exercise the real formatter and serialization code with synthetic input. Current-head hosted qualification is pending.