Pull requests / #2667

#2667 serve/web: keep wide content (long URLs, code lines, wide tables) inside the viewport on narrow screens

open · @jkir4n · 0 コメント · GitHub で見る

Server & API

本文

## Summary
On narrow screens (phones), an assistant reply that contains a long unbroken string (URL, code line) or a wide table stretches the whole chat view past the viewport: the right side is clipped and unreachable, and the page (heading, composer) shifts with it. Three CSS changes keep the content inside the viewport.

## What changed
`serve/web/app.css` only, 3 rules:
- `.st-msg--assistant .st-bubble { overflow-wrap: anywhere; }` — assistant text now breaks long unbroken strings, the same way the user bubble already does.
- `.view { … min-width: 0; }` — `.view` is a flex item of `main`; with the default `min-width: auto` one wide message can push the whole view past the viewport (the file already pins `min-height: 0` for the column axis — same guard, inline axis).
- `.st-bubble table { … display: block; max-width: 100%; overflow-x: auto; }` — wide tables scroll inside their bubble instead of overflowing it.

## Extra Notes
Verified against 0.1.44.1 at 390×844 with three messages (long URL / long code line / wide table):
- before: the chat column measures 752 px wide, bubbles 718 px, right edge 346 px off-screen
- after: column 390 px, bubbles 356 px, everything on screen — the URL wraps, the code block scrolls inside itself, the table scrolls inside the bubble
- desktop (1280 px) unchanged, no overflow; normal prose unaffected

Before → after (390 px):

![before](https://files.catbox.moe/ggwnmz.png)
![after](https://files.catbox.moe/268mmg.png)

関連リンク

インストール・モデル・リリースへの站内リンク。