Skip to content

fix(web): scroll wide markdown tables inside their own wrapper - #1575

Merged
wbxl2000 merged 1 commit into
mainfrom
fix/web-wide-table-scroll
Jul 12, 2026
Merged

fix(web): scroll wide markdown tables inside their own wrapper#1575
wbxl2000 merged 1 commit into
mainfrom
fix/web-wide-table-scroll

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — the problem is explained below.

Problem

In the web UI, markdown tables were pinned to the message width (width: 100% + table-layout: fixed from markstream-vue's defaults, with cells wrapping to fit). Tables with many columns or long unbreakable cells (URLs, paths, inline code) were crushed into narrow columns and became hard to read, and an unbreakable cell could still overflow the 760px reading column.

What changed

Scoped CSS only in apps/kimi-web/src/components/chat/Markdown.vue:

  • .table-node-wrapper is now a fixed-width local scroll container (width: 100%, min-width: 0, overflow-x: auto): wide tables scroll horizontally inside the table itself, never the chat pane or the page.
  • .table-node grows to its content width (width: max-content, max-width: none, table-layout: auto), so columns keep their natural layout.
  • min-width: 100% keeps narrow tables stretched to fill the reading column exactly as before.
  • Existing table colors, alignment, and hover rules are unchanged; no parser or dependency changes.

Verified: pnpm --filter @moonshot-ai/kimi-web typecheck, check:style, and build all pass.

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. (CSS-only behavior change; no internal tests for CSS behavior — verified via typecheck/check:style/build and manual browser checks.)
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update. (Minor rendering behavior tweak; nothing documented to update.)

@changeset-bot

changeset-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9841672

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 12, 2026

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

commit: 9841672

@wbxl2000
wbxl2000 merged commit 9d96b53 into main Jul 12, 2026
11 checks passed
@wbxl2000
wbxl2000 deleted the fix/web-wide-table-scroll branch July 12, 2026 10:52
@github-actions github-actions Bot mentioned this pull request Jul 12, 2026
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