Wrap the update-log and job-output pre blocks the app shell was clipping - #5819
Merged
Conversation
…5675) Layout's root is `overflow-x-hidden`, so a <pre> whose content can exceed the viewport loses its tail off the right edge with no horizontal scrollbar to recover it. The update log and the read-only legacy script command were the last two single-line <pre> openers in the client tree carrying no wrap or overflow class at all; both now match the ProcessLogLines idiom (`whitespace-pre-wrap break-all`), with the update log additionally capped at `max-h-48 overflow-y-auto` so a long log doesn't push the rest of the tab off-screen. JobCard's two other output blocks had `whitespace-pre-wrap` but no break class, which only wraps at whitespace — a shell job's last output is full of unbroken paths and URLs that still ran past the clip edge, so it gets `break-all` too. The prompt template beside it gets `break-words` instead: it is human-authored prose, where breaking mid-word is worse than the rare long token.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Layout.jsx's root isoverflow-x-hidden, so a<pre>wider than the viewport is clipped, not scrollable — the tail is unreachable with no horizontal scrollbar to find. Two<pre>openers still had no wrap or overflow class at all: the self-update log (UpdateTab.jsx) and the read-only legacy script command (JobCard.jsx). Both now match theProcessLogLinesidiom (whitespace-pre-wrap break-all), with the update log additionally capped atmax-h-48 overflow-y-autoso a long log doesn't push the rest of the tab off-screen.JobCard's two other output blocks hadwhitespace-pre-wrapbut no break class, which only wraps at whitespace. A shell job's last output is full of unbroken paths and URLs that still ran past the clip edge, so it getsbreak-all. The prompt template beside it getsbreak-wordsinstead — it is human-authored prose, where breaking mid-word is worse than the rare long token.Layout.jsx'soverflow-x-hiddenis untouched, per the issue: it is deliberate, and the fix belongs in the leaf.<pre>blocks tree-wide carrywhitespace-pre-wrapwith no break class. Most render prose and are fine; a mechanical sweep of the machine-output ones is separate work.Test plan
client/src/components/cos/JobCard.test.jsx(new): renders a legacyscriptjob in edit mode and asserts the command<pre>carrieswhitespace-pre-wrap break-all; renders ashelljob with a long unbrokenlastOutputand assertsbreak-all.client/src/components/apps/tabs/UpdateTab.test.jsx: new case supplying a long space-freelastUpdateResult.logand assertingwhitespace-pre-wrap,break-all, andoverflow-y-auto.cd client && npx vitest run src/components/cos src/components/apps/tabs— 634 passed (52 files).cd client && npx biome lint --error-on-warnings src/components/cos src/components/apps/tabs— clean.Closes #5675