You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a narrow phone screen, wide Markdown tables in the mobile rich editor squeezed every column into tiny vertical strips of letters. Tables in the rich editor now stay comfortably wide per column and scroll sideways inside the document without dragging the whole page.
Added display: block, overflow-x: auto, and overscroll-behavior-x: contain to table in richMarkdownEditorStyle().
Added min-width: 10em, max-width: 22em, overflow-wrap: break-word, and word-break: keep-all to th, td.
Before: A 7-column Markdown table on a 390px viewport had width: 358px and scrollWidth: 358px, squishing all columns together.
After: The table box remains bounded inside the 390px viewport (width: 358px, right edge 374px), while inner columns lay out cleanly (scrollWidth: 1065px) and pan horizontally (scrollLeft verified at 200px) with overscroll-behavior-x: contain containing horizontal overscroll.
Why
Markdown tables in technical specifications and release notes frequently exceed 4–5 columns. Giving cells a 10em–22em width envelope with word-break: keep-all (preserving CJK word legibility while overflow-wrap: break-word wraps long identifiers/URLs) and making table an overflow-x scroll container fixes readability in CSS alone without altering ProseMirror/TipTap schema DOM wrappers.
Rendered from the mobile web bundle with the repo's official render harness (config/scripts/mobile-web-app/preview/mobile-web-app-render-harness.mjs) at 390×844 dark theme with a 7-column demo Markdown table (zero personal data, zero page errors or bridge faults).
Before (main, squished at 358px)
After (this PR, scrollable 1065px inside 358px box)
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Why no unit test file is added: this is a pure CSS stylesheet change in document-style.ts; asserting literal CSS strings in a unit test is an inventory/string-copy anti-pattern (docs/agents-md-refs/test-antipatterns.md) that does not prove browser layout behavior, so behavioral verification was performed via real Chromium layout geometry and scroll checks in the official mobile web render harness:
Verified table layout & scroll behavior at phone width (390×844) via config/scripts/mobile-web-app/preview/mobile-web-app-render-harness.mjs: before width: 358 / scrollWidth: 358; after width: 358, scrollWidth: 1065, right: 374 <= 390, scrollLeft pan to 200, zero page errors or bridge faults.
Ran pnpm -C mobile typecheck and full 39-step pnpm lint (all exit 0).
AI Disclosure
Codex (gpt-6.1-sol) implemented the stylesheet change, ran typecheck and 39-step lint, and produced the 390×844 render-harness screenshots and geometry reports.
Gemini (gemini-4-argon) reviewed the diff and render geometry reports, removed the string-copy stylesheet test per test-antipatterns.md, and prepared the issue and PR.
Review
AI review summary (gemini-4-argon):
Cross-platform: Pure CSS inside the mobile rich Markdown editor stylesheet; behaves identically across iOS WKWebView, Android Chromium WebView, and mobile web browsers.
SSH / remote: Unaffected; no RPC, host, or file-serialization changes.
Performance: CSS-only layout rule scoped to table and th, td inside the rich editor; zero runtime JS cost.
UI: Preserves existing table borders, padding, and dark/light theme tokens while preventing viewport overflow and accidental parent swipe overscroll (overscroll-behavior-x: contain).
Security: Static stylesheet string with no dynamic interpolation; no security surface change.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Walkthrough
The rich Markdown editor now displays tables as horizontally scrollable blocks with contained horizontal overscroll. Table cells have minimum and maximum widths and rules for breaking long words. A Vitest test checks these styles.
Severity of issue fixed: Medium
Merge Risk: Minimal · up to 1ca7a
The mobile table-scrolling change is covered by a focused regression test with no identified merge-blocking risk.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title is concise, specific, and accurately describes the main stylesheet change: enabling horizontal scrolling for wide rich Markdown tables on mobile.
Linked Issues check
Issue #36412 requires wide tables in the mobile rich Markdown editor to scroll horizontally instead of compressing columns. The stylesheet adds display: block, overflow-x: auto, and `overscroll-be…
Out of Scope Changes check
The whole-PR diff contains only the scoped rich Markdown table stylesheet changes and one focused regression test. These changes directly support issue #36412. No unrelated product, runtime, or public…
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Description check
The description is complete and follows the required template. It explains the user impact, implementation, rationale, linked issue, visual proof, testing, AI disclosure, scope considerations, and che…
Full details: Linked Issues check
Explanation
Issue #36412 requires wide tables in the mobile rich Markdown editor to scroll horizontally instead of compressing columns. The stylesheet adds display: block, overflow-x: auto, and overscroll-behavior-x: contain to table. It adds the requested min-width, max-width, overflow-wrap, and word-break rules to th, td. The new test checks all seven declarations.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff contains only the scoped rich Markdown table stylesheet changes and one focused regression test. These changes directly support issue #36412. No unrelated product, runtime, or public API changes are present.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.
Full details: Description check
Explanation
The description is complete and follows the required template. It explains the user impact, implementation, rationale, linked issue, visual proof, testing, AI disclosure, scope considerations, and checklist status. It reports lint and typecheck results but does not report full test or build results.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
On a narrow phone screen, wide Markdown tables in the mobile rich editor squeezed every column into tiny vertical strips of letters. Tables in the rich editor now stay comfortably wide per column and scroll sideways inside the document without dragging the whole page.
What Changed
mobile/src/components/rich-markdown/document-style.ts:display: block,overflow-x: auto, andoverscroll-behavior-x: containtotableinrichMarkdownEditorStyle().min-width: 10em,max-width: 22em,overflow-wrap: break-word, andword-break: keep-alltoth, td.Before: A 7-column Markdown table on a 390px viewport had
width: 358pxandscrollWidth: 358px, squishing all columns together.After: The table box remains bounded inside the 390px viewport (
width: 358px, right edge374px), while inner columns lay out cleanly (scrollWidth: 1065px) and pan horizontally (scrollLeftverified at200px) withoverscroll-behavior-x: containcontaining horizontal overscroll.Why
Markdown tables in technical specifications and release notes frequently exceed 4–5 columns. Giving cells a
10em–22emwidth envelope withword-break: keep-all(preserving CJK word legibility whileoverflow-wrap: break-wordwraps long identifiers/URLs) and makingtablean overflow-x scroll container fixes readability in CSS alone without altering ProseMirror/TipTap schema DOM wrappers.Linked Issue
Fixes #36412
Visual Proof
Rendered from the mobile web bundle with the repo's official render harness (
config/scripts/mobile-web-app/preview/mobile-web-app-render-harness.mjs) at 390×844 dark theme with a 7-column demo Markdown table (zero personal data, zero page errors or bridge faults).main, squished at 358px)1065pxinside 358px box)Testing
Why no unit test file is added: this is a pure CSS stylesheet change in
document-style.ts; asserting literal CSS strings in a unit test is an inventory/string-copy anti-pattern (docs/agents-md-refs/test-antipatterns.md) that does not prove browser layout behavior, so behavioral verification was performed via real Chromium layout geometry and scroll checks in the official mobile web render harness:390×844) viaconfig/scripts/mobile-web-app/preview/mobile-web-app-render-harness.mjs: beforewidth: 358/scrollWidth: 358; afterwidth: 358,scrollWidth: 1065,right: 374 <= 390,scrollLeftpan to200, zero page errors or bridge faults.pnpm -C mobile typecheckand full 39-steppnpm lint(all exit 0).AI Disclosure
gpt-6.1-sol) implemented the stylesheet change, rantypecheckand 39-steplint, and produced the 390×844 render-harness screenshots and geometry reports.gemini-4-argon) reviewed the diff and render geometry reports, removed the string-copy stylesheet test pertest-antipatterns.md, and prepared the issue and PR.Review
AI review summary (
gemini-4-argon):WKWebView, Android ChromiumWebView, and mobile web browsers.tableandth, tdinside the rich editor; zero runtime JS cost.overscroll-behavior-x: contain).Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)