Repository navigation
fix(mobile): two more table parsers hold a pipe in a cell (OTA phase C follow-up) - #22114
Conversation
The mobile preview parser splits a table row on every pipe, so a cell that escaped one becomes two cells and keeps the backslash. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The editor's markdown-table-rows already splits on unescaped pipes only and unescapes the cell; it has no imports of its own, so owning the rule once costs the preview parser nothing. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Its splitter strips the trailing pipe before walking escapes and reads `\\|` as an escaped pipe, so a row ending in `\|` loses the pipe and a cell holding a backslash swallows the separator after it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Its own delimiter grammar stays local: a single dash still opens a table here, which the editor's three-dash separator would reject. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
markdown-table-rows.ts joins through the PR comment renderer. Measured on this head: 4,332 modules / 990 local, and it is the only file under rich-markdown/ in the closure, so nothing came with it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughBoth mobile table parsers now use Priority: ⬇️ Low 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the implementation, motivation, tests, and gate results, but it omits most required template sections. It does not provide an ELI5 section, a Resolution Update the description to include all required template sections. Add a linked issue using
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Shared row splitter adopted —
mobile-markdown-parser.tsandpr-sidebar/markdown-blocks.tsdrop their localsplitTableRowand read rows throughrich-markdown/markdown-table-rows.ts, so\|now survives inside the cell that escaped it and\\|correctly ends a cell instead of being read as an escaped pipe. - Escaped-pipe coverage — both suites pin the new cases with exact
toEqualexpectations (| a \| b | c |→['a | b', 'c'],| x\\|y |→['x\', 'y'], plus a row with no closing pipe ending\|); the PR comment parser keeps its single-dashisTableDelimiterwith a comment explaining the deliberate divergence from the editor's three-dash separator. - Closure pin — the session-route module count moves 4,331 → 4,332 for the one shared leaf, with the reasoning recorded alongside the existing measurement log.
I read the complete diff and validated the shared splitTableRow semantics against every new and existing case, including the 2,197-row delimiter sweep in markdown-table-delimiter-performance.test.ts. I also ran the two changed mobile suites (31 passed) and oxlint on the changed files (0 warnings / 0 errors). No other mobile parser still hand-rolls a pipe splitter. The change is a clean consolidation with red-first tests.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…ached it (#22119) #18790 added the freebuff agent icon to mobile-agent-icon-assets.ts, which the session page reaches. It merged between #22114's closure measurement (4,332) and its merge, so main pins one module short. Measured on main's tip 059ee59 and named by diffing the closure at 226f4a0 against it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

Summary
Two more table parsers could not hold a pipe inside a cell. #22054 fixed the rich-markdown editor's copy; the PR comment renderer and the mobile markdown preview each carried their own splitter.
The preview parser split on every pipe, so
| a \| b | c |became three cells and kept the backslash. The PR comment parser already unescaped\|, but stripped a row's trailing pipe before walking escapes (a row ending\|lost the pipe) and read\\|as an escaped pipe, merging the cells either side of a real separator.Both now read rows through
mobile/src/components/rich-markdown/markdown-table-rows.ts, which splits on unescaped pipes and unescapes the cell. It imports nothing, so it joins the session page's closure alone: 4,331 modules to 4,332, repinned by measurement (the lane's first draft claimed no closure change; the lead's gate caught the pin). The PR comment parser keeps its own delimiter check: a single dash opens a table there, which the editor's three-dash separator would reject.Red-first: each parser's escaped-pipe cases were committed failing, then fixed. The existing 2,197-row delimiter grammar sweep in
markdown-table-delimiter-performance.test.tsstill agrees with the original regex. No golden.Commits
a1cb6804c026b51bbc80b6471145e5a2d275bb5587a75d2f7eorigin/main(8307dc5d7b)753dfb689bGates
Lane gates all exit 0 on
87a75d2f7e(mobile 804 files / 8,969 passed; ratchet 800 files). Lead gate at base8307dc5d7bbelow.Lead gate on
753dfb689bagainst8307dc5d7b: all lint gates 0;config/scripts249 files passed; mobile 804 files passed; no machine paths.