Skip to content

feat(web): cap markdown table column width at 700px#1587

Merged
wbxl2000 merged 2 commits into
mainfrom
feat/web-table-cell-max
Jul 13, 2026
Merged

feat(web): cap markdown table column width at 700px#1587
wbxl2000 merged 2 commits into
mainfrom
feat/web-table-cell-max

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Related Issue

None — the problem is explained below. Follow-up to #1577.

Problem

After #1577, a wide markdown table grows with its content up to 1040px. But a table does not need many columns to become wide: a single cell holding long prose (a description column, a pasted log line, a long URL list) stretches its column without bound, dragging the whole table past the reading column and forcing horizontal scrolling where simple wrapping would read better.

What changed

  • New layout token --p-table-cell-max: 700px in src/style.css, next to --p-table-max.
  • .table-node th/td in Markdown.vue get max-width: var(--p-table-cell-max): under the stage-1 table-layout: auto, the column stops growing at 700px and the cell content wraps. markstream's cells already use white-space: normal + overflow-wrap: break-word, so wrapping — including long unbroken strings — is native and no wrap override is needed.
  • Narrow tables are unaffected (their columns never reach 700px), and many-column tables still grow to --p-table-max and scroll inside their wrapper beyond it.
  • Design-system view updated: token row for --p-table-cell-max and the §04 wide-table paragraph. Changeset included.

Verification: pnpm --filter @moonshot-ai/kimi-web typecheck, check:style, build, and git diff --check all pass. Runtime acceptance (long single-cell table wraps at 700px; 20-column table unchanged; mobile unchanged) is manual in the browser; this package has no component-test harness.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 567b578

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 13, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@567b578
npx https://pkg.pr.new/@moonshot-ai/kimi-code@567b578

commit: 567b578

@wbxl2000 wbxl2000 merged commit 49a8c84 into main Jul 13, 2026
10 checks passed
@wbxl2000 wbxl2000 deleted the feat/web-table-cell-max branch July 13, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant