Repository navigation
fix(mobile): return collapsed step rows to the right rail, targets to their own line - #671
Merged
Merged
Conversation
… their own line Two things had to be true at once, and the last change bought the second by giving up the first: a revealed file name needs the row's leftover width, and a row that shrinks to a right-rail badge has no leftover width to claim. Inline, the target's `flex: 1` therefore resolved to zero inside the badge — the file name was invisible — so #668 parked every row in the left reading column and left the revealed target inline. Put the target on its own line below the header and the conflict disappears. The header goes back to a one-liner with nothing to wrap, so the row can shrink-wrap again, and the target gets the full width at its own indent: names wrap instead of being clipped, and the chevron stops landing mid-sentence between the label and the path. Shell commands already worked this way; file targets now use the same line, which also removes the separate `inlineToolTarget` style. With the geometry free again, the rails from #659/#660 come back: a row is a badge on the right rail while nothing of it is revealed, and falls into the reading column once it — or the run around it — is open. The run summary keeps its rail when it opens, so the line under the user's finger does not move while the rows it revealed appear below it on the left. `opened` is a required prop again, so no call site can pick a rail by accident. Tests: the rail assertions from #660 are restored (folded summary and lone rows on the rail; opened rows and their detail off it), together with #668's no-truncation assertions, plus a check that the revealed target is a line of its own rather than a cell beside the label.
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
Device feedback on the folded step rows: the summary line and the lone tool rows read better as apparatus on the right rail, next to the live timer and the settled footer — the left column is for what the agent said.
#668 moved them left because of a real conflict: a revealed target inline beside the label claims the row's leftover width with
flex: 1, which resolves to zero once the row shrink-wraps into a right-rail badge — the file name rendered at zero width — so folding and inline targets could not coexist. This takes the other way out.toolDetailTextline below the header (shell already did), so the header is a one-liner with nothing to wrap, and the row can shrink-wrap again. Names wrap at full width instead of being clipped, and the chevron stops landing mid-sentence between the label and the path. The separateinlineToolTargetstyle goes away, along with itsflex: 1/maxHeight/overflow.openedis required again, so no call site can silently pick a rail.Not changed: the live timer and the settled footer were already on the right rail (#659/#662) and stay there.
What it looks like
Rendered side-by-side (same transcript, same tokens): collapsed state —
已运行and🔧×6 · 🧠×1sit on the rail with the timer; expanded run — the tapped line stays put, its revealed rows and their targets read on the left; expanded file tool — the long name wraps on its own line, indented under the label.Validation
npm run typecheck— cleannpx eslint src/components/TimelineCard.tsx src/components/__tests__/TimelineCard.test.ts— cleannpx jest— 105 suites / 1469 tests passRegression coverage: the rail assertions from #660 are restored (folded summary and lone rows on the rail; opened rows and their detail off it) alongside #668's no-truncation assertions, plus a new check that a revealed target is a line of its own rather than a cell beside the label. Physical-device visual verification not performed.