Skip to content

fix(website): wrap the comment action row so Delete stays visible on a phone - #31672

Merged
KiroCrewCaptain merged 2 commits into
mainfrom
fix/comment-thread-actions-wrap
Nov 7, 2026
Merged

KiroCrewCaptain merged 2 commits into
mainfrom
fix/comment-thread-actions-wrap

Conversation

@tim-finnigan

@tim-finnigan tim-finnigan commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Changing the popover's width, its position logic or its overflow-hidden.
  • Reworking the action set or turning actions into a menu on small screens.

What changed (motivation → approach → change)

The clipped row is the action row inside CommentRow in website/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-auto pushed 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.tsx renders 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 CommentThreadPopover in 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). eslint on 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".

before, dark, 390px

Previous revision of this PR, 390 px, dark: the wrapped root Delete floats at the right edge above the reply card.

previous revision, dark, 390px

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.

after, dark, 390px

after, light, 390px

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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@tim-finnigan
tim-finnigan requested review from a team and KiroCrewCaptain as code owners November 6, 2026 19:03
@tim-finnigan
tim-finnigan requested a review from Zedmor November 6, 2026 19:03
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 66b01117aef0eceb5d40158d6322a514fd1119c5 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 ships

Inventory (3 items) — 2 justified

Intent: on a phone, every action under a comment in the thread popover is visible and can be tapped. This is a FIX.

  1. On a narrow screen, comment actions wrap to a second line instead of being clipped ("Delet"). — justified
  2. When the row wraps, Delete starts the next line under Reply instead of floating at the right edge above the reply card. — justified
  3. On desktop, where the row fits on one line, Delete now sits right after the other actions instead of at the far right. — rides along: no desktop user reported trouble, but it comes from removing the same single class

[FIRST-PRINCIPLES-REVIEWED] 66b0111

Description read

[DESCRIPTION-READ] 1ebaa3ffabe657fd9abd57afe74fe9a45459b2965e6ad6786d05084addac892d

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 66b01117aef0eceb5d40158d6322a514fd1119c5 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

No design-level concerns. It is a small, reversible layout fix, backed by four rendered screenshots of this revision.

Notes

  • Removing ml-auto also moves Delete on desktop, so the destructive action now sits right next to Resolve/Edit on every surface. That could cause more mis-taps. The description says so, and no decision is recorded in docs/decisions/, so a revert is cheap if anyone objects.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 66b01117aef0eceb5d40158d6322a514fd1119c5 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Delete now sits right after Resolve and Edit in the same muted style, on desktop as well as on a phone. One root-level Delete deletes immediately with no confirmation, so a missed tap can no longer be stopped. Leave a little more space before Delete, or add undo, in a follow-up.
  • No screenshot shows the desktop CommentsSidebar, where Delete also moves off the far right. Attaching one would show the change on that surface too.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 66b01117aef0eceb5d40158d6322a514fd1119c5 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 66b0111

Verdict parsed from the review's SHA-scoped output markers for commit 66b01117aef0eceb5d40158d6322a514fd1119c5.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 66b01117aef0eceb5d40158d6322a514fd1119c5 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 66b01117aef0eceb5d40158d6322a514fd1119c5 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 66b0111

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 66b01117aef0eceb5d40158d6322a514fd1119c5 false-positive: <reason, 20 to 500 characters>

@tim-finnigan

Copy link
Copy Markdown
Contributor Author

Backend Tests (Windows) (2) is red on test/test_security_gate_liveness.py::test_the_package_stays_within_its_line_budget (34753 > 34733). That's inherited from main, not this diff: the security package is already 34,753 lines on main since #30774, and this PR touches nothing under src/kiro_crew/security/. Tracked in #31648, fixed by #31625. I'll rebase onto main once that lands.

@tim-finnigan

Copy link
Copy Markdown
Contributor Author

Rebased onto main at the commit carrying #31625 (the security line-budget fix), 9288ba2 -> 1da1c21. No change to the diff. The (3.12, 5) red was the known flake #30919 (recorded there); CI is re-running everything on the new head.

@tim-finnigan
tim-finnigan force-pushed the fix/comment-thread-actions-wrap branch from 9288ba2 to 1da1c21 Compare November 6, 2026 20:50
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 6, 2026
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
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 7, 2026 00:04

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@KiroCrewCaptain
KiroCrewCaptain merged commit 71c3f88 into main Nov 7, 2026
205 of 228 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/comment-thread-actions-wrap branch November 7, 2026 00:05
buluoray added a commit that referenced this pull request Nov 8, 2026
…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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On a phone, the comment thread's action row is cut off ("Delete" shows as "Delet")

2 participants