Repository navigation
fix(website): wrap the comment action row so Delete stays visible on a phone - #31672
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fix removes the clipping from issue #30348 at its source: the action row had no way to wrap. Moving Delete into the row's normal flow is a side effect of that fix and is stated in the description. What this change shipsInventory (3 items) — 2 justifiedIntent: on a phone, every action under a comment in the thread popover is visible and can be tapped. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 66b0111 Description read[DESCRIPTION-READ] 1ebaa3ffabe657fd9abd57afe74fe9a45459b2965e6ad6786d05084addac892d That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns. It is a small, reversible layout fix, backed by four rendered screenshots of this revision. Notes
[DESIGN-REVIEWED] 66b0111 Description read[DESCRIPTION-READ] c504bb01e9dab32ba95bc89d0e2d295b59d72ebc355906699e7d320c88a80142 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. In the after shots (shot-03, shot-04), the blind reader saw the wrapped root Delete "clearly reads as one more button in that comment's row" and said they would use it. Notes
[UX-REVIEWED] 66b0111 Description read[DESCRIPTION-READ] a05f54cd71d68568976f90fda2a1ba77d2bd3020e9f6d1d3df0b0a6ee0c1783a That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
Backend Tests (Windows) (2) is red on |
9288ba2 to
1da1c21
Compare
With the action row allowed to wrap, Delete's ml-auto pushed it to the right edge of the second line, alone and directly above the reply card, so on a phone it read as the reply's Delete. The root Delete deletes at once with no confirm, so a user meaning to remove the reply could lose the root comment. Delete now continues the row left to right: when it wraps it starts the next line under Reply, inside the root's actions. Refs #30348
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (2 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: the comment action row now wraps and Delete loses its ml-auto, so the last action is not clipped in the narrow thread popover; one component class change plus a regression test.
…a phone (#31672) * fix(website): wrap the comment action row so Delete stays visible on a phone * fix(website): keep a wrapped Delete on its own comment's action row With the action row allowed to wrap, Delete's ml-auto pushed it to the right edge of the second line, alone and directly above the reply card, so on a phone it read as the reply's Delete. The root Delete deletes at once with no confirm, so a user meaning to remove the reply could lose the root comment. Delete now continues the row left to right: when it wraps it starts the next line under Reply, inside the root's actions. Refs #30348 --------- Co-authored-by: sim <a@b.c> (cherry picked from commit 71c3f88) Original author: Tim Finnigan (#31672).
Problem / Motivation
Goal: On a phone, every action under a comment in the thread popover is visible and tappable.
On a 390 px screen the thread popover shows Reply, Edit, Review, Resolve and Delete on one row under the root comment. The row is wider than the card, and the card clips its content, so Delete is cut off and reads "Delet".
Why it matters
Anyone reviewing an artifact's comments on a phone loses the Delete action on every root comment: it is half hidden and its tap target is partly outside the card.
Not a goal
overflow-hidden.What changed (motivation → approach → change)
The clipped row is the action row inside
CommentRowinwebsite/src/components/CommentsSidebar.tsx, which the thread popover renders for the root and each reply. It was a single-line flex row, so its buttons could only run past the edge. It may now wrap: when the actions do not fit, the last ones move to a second line inside the card.Delete also loses its
ml-auto. With wrapping alone,ml-autopushed a wrapped Delete to the right edge of the second line, by itself and directly above the reply card, so it read as the reply's Delete; the root's Delete deletes at once with no confirm. Delete now continues the row left to right, so when it wraps it starts the next line under Reply, inside the root's own actions. The same applies where the row does not wrap, such as the comments sidebar on a desktop: Delete now sits right after the other actions instead of at the far right.Backwards compatibility
Compatible: one layout class added and one removed; no prop, event or contract changes.
Removes nothing: the diff lets an existing row wrap and moves Delete into its flow; every action is still there.
Tests
website/src/test/CommentThreadPopover.narrowActions.test.tsxrenders the popover with a root and a reply and checks that each comment's action row (the row holding its Reply and Delete) is allowed to wrap and that Delete is not pushed to the row's right edge (ml-auto). jsdom does no layout, so it asserts the wrapping class; the real layout is measured in the screenshots below. With the fix reverted the test fails:expected 'flex items-center gap-1 mt-1.5 px-0.5' to contain 'flex-wrap'.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Mounted the real
CommentThreadPopoverin Chromium at 320, 375 and 390 px, on a thread with a reply and without one, with the root open (five actions, the row wraps) and resolved (four actions, wraps at 320 and fits on one line at 375 and 390). In every case, for the root row and the reply row, I measured each visible action against the card's right edge and where Delete lands. No button crosses the card edge. Delete is either on the same line right after the previous action (4 px gap) or starts the wrapped line at the row's left edge under Reply, never alone at the right edge. On the previous revision of this PR, at 375 and 390 px, the root Delete sat alone at the right edge of the second line (260 px in from the row's left edge).eslinton both files and the comment popover and sidebar vitest suites (7 files, 28 tests) pass.Screenshots / video
Before (main), 390 px, dark: Delete is clipped to "Delet".
Previous revision of this PR, 390 px, dark: the wrapped root Delete floats at the right edge above the reply card.
After, 390 px, dark and light: the root Delete starts its own action row's second line under Reply, and the reply's row (Reply, Edit, Delete) is visible below the reply.
Related Issues
Fixes #30348
Sibling sweep
Swept: git grep -n 'className="flex items-center' -- website/src/components/CommentsSidebar.tsx website/src/components/CommentThreadPopover.tsx
Sibling: website/src/components/CommentsSidebar.tsx:102 -- not affected -- the edit and reply box rows (:102, :147) hold only Cancel and Save, which fit at 360 px
Sibling: website/src/components/CommentThreadPopover.tsx:252 -- not affected -- composer row holds only the mic and Reply buttons
Pattern harvest
Not generalizable: a row of fixed actions sized for desktop inside a narrow clipped card; whether a row should wrap depends on how many actions it holds, which no lint rule can see.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)