Skip to content

fix(ui): make copy actions accessible and consistent across surfaces - #117430

Closed
steipete wants to merge 1 commit into
mainfrom
codex/qa400-ui-clipboard-feedback-accessibility
Closed

steipete wants to merge 1 commit into
mainfrom
codex/qa400-ui-clipboard-feedback-accessibility

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Control UI copy surfaces can retain an old failure state after a successful retry or let an earlier timer erase newer copied feedback. The Gateway connection command also nests its copy affordance inside another interactive target, so Enter/Space activation can be swallowed.

Why This Change Was Made

Give each clipboard element one cancellable feedback owner, share that owner across icon and Markdown copy controls, and express the connection command and copy affordance as independent native buttons. Preserve existing full-card background clicks, focus treatment, RTL layout, and HTTP clipboard fallback. This is one conservatively counted UI copy-action ownership repair; production code changes by +77/-48 lines, net +29.

User Impact

  • Retrying a failed copy clears the old error and announces the successful copy correctly.
  • Repeated copies keep their latest copied state visible for the full feedback interval.
  • Connection commands and their copy icons both work as separate accessible keyboard controls, while clicking the card background continues to copy.

Evidence

  • Original frozen baseline: five authentic new regressions failed with 140 existing tests passing; the separately mounted connection-card whitespace-click regression also failed before its owner fix.
  • Exact immutable commit 3303099b3c5c685f90765829133f19ae7ce8114d: all 146 focused file-preview, Markdown, and login-gate tests passed.
  • Configured UI type-aware/type-check oxlint, targeted TypeScript oxlint, exact-scope formatting, configured CSS stylelint, and git diff --check passed.
  • Four independent fresh whole-owner hostile reviews found no P0–P3 issues.
  • One genuine gpt-5.6-sol high-reasoning autoreview through P3 found zero issues, rated the patch correct with 0.94 confidence, and passed genuine TruffleHog 3.96 secret scanning.
  • Current canonical main preserves all touched paths, scoped instructions, and directly inspected callers relative to the reviewed parent.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 1, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed October 2, 2026, 6:01 AM ET / 10:01 UTC (Revision 17).

ClawSweeper review

What this changes

The branch shares clipboard feedback timers across copy controls and separates the Gateway connection command and copy icon into native buttons.

Merge readiness

⛔ Needs changes before merge - 3 items remain

Keep open: the separate native connection buttons remain useful, and the maintainer label prevents automated cleanup. Both previously reported correctness findings remain on the pinned head; related merged fixes do not supersede the accessibility change.

Priority: P2
Reviewed head: 3303099b3c5c685f90765829133f19ae7ce8114d

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful accessibility work remains, but two established correctness gaps prevent a merge-ready rating.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from ordinary contributor proof. Its body reports focused tests, while inspected media demonstrates adjacent merged fixes rather than this branch's native-button and completion-order behavior. No stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from ordinary contributor proof. Its body reports focused tests, while inspected media demonstrates adjacent merged fixes rather than this branch's native-button and completion-order behavior. No stored-data contract changes.
Evidence reviewed 11 items Pinned introduction: Reviewed the complete merge-base-to-head patch. The new native command button and card-background handler call the clipboard transport directly, while the adjacent icon uses the feedback owner.
Failure contract and caller: The clipboard helper returns false when both transports fail; clipboard tests explicitly cover that result. Login-gate help renders the affected commands, but the new command handlers consume neither the result nor the icon's feedback.
Completion ownership gap: Markdown copying permits concurrent attempts and invokes the new feedback replacement after every successful settlement. That replacement cancels whichever timer currently belongs to the element, without checking which activation produced the completion. The changed regression uses immediately resolving writes, so it does not cover inverse settlement.
Findings 2 actionable findings [P1] Route native command activation through copy feedback
[P2] Fence stale completions before replacing Markdown feedback
Security None None.

How this fits together

Control UI copy controls receive command, file, and rendered chat text and send it to the browser clipboard. Their feedback tells users whether copying succeeded and supports another attempt after failure.

flowchart TD
  A[Connection commands] --> D[Copy activation]
  B[File and chat text] --> D
  D --> E[Browser clipboard]
  E --> F[Legacy copy fallback]
  E --> G[Feedback owner]
  F --> G
  G --> H[Success or failure feedback]
Loading

Before merge

  • Route native command activation through copy feedback (P1) - The newly introduced command button calls the transport directly and discards its boolean result; the card-background handler does the same. If Clipboard API access rejects and the legacy copy also fails, keyboard or command-area activation produces no visible or announced outcome, while the adjacent icon reports failure. Route these activations through the same feedback-owning action. This prior finding remains unchanged.
  • Fence stale completions before replacing Markdown feedback (P2) - The new replacement call runs for every successful completion, but Markdown buttons allow overlapping writes. If newer attempt B succeeds before older attempt A, A later cancels B's reset timer and starts its own lease; if B's feedback already expired, A restores a stale success indicator. Capture an attempt at activation and reject stale settlements before replacing feedback, or retain current main's attempt-aware owner. The changed test only covers immediately resolving writes, and this prior finding remains unchanged.
  • Complete next step (P2) - Address both retained findings and integrate the separate native connection controls with current main's feedback and clipboard ownership contracts.

Findings

  • [P1] Route native command activation through copy feedback — ui/src/components/connect-command.ts:25
  • [P2] Fence stale completions before replacing Markdown feedback — ui/src/components/markdown-code-blocks.ts:81-85
Agent review details

Security

None.

PR surface

Source +29, Tests +139. Total +168 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 5 77 48 +29
Tests 3 157 18 +139
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 234 66 +168

Review metrics

Metric Value Why it matters
Production versus test growth Production +77/-48, net +29; tests +157/-18, net +139 The stated growth supports shared feedback ownership and native controls, but current main already supplies much of the feedback behavior.

Technical review

Best possible solution:

Keep current main's attempt-aware clipboard owners and integrate separate native connection buttons whose command, icon, and background activations share visible feedback.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes two pinned-branch paths: fail both clipboard transports for command activation, or settle two Markdown writes in reverse order. Neither scenario was executed in this read-only review.

Is this the best way to solve the issue?

No, the timer-only owner is incomplete and command activation bypasses feedback. Current main's attempt-aware owners are the better foundation for the distinct native-button repair.

Full review comments:

  • [P1] Route native command activation through copy feedback — ui/src/components/connect-command.ts:25
    The newly introduced command button calls the transport directly and discards its boolean result; the card-background handler does the same. If Clipboard API access rejects and the legacy copy also fails, keyboard or command-area activation produces no visible or announced outcome, while the adjacent icon reports failure. Route these activations through the same feedback-owning action. This prior finding remains unchanged.
    Confidence: 0.98
  • [P2] Fence stale completions before replacing Markdown feedback — ui/src/components/markdown-code-blocks.ts:81-85
    The new replacement call runs for every successful completion, but Markdown buttons allow overlapping writes. If newer attempt B succeeds before older attempt A, A later cancels B's reset timer and starts its own lease; if B's feedback already expired, A restores a stale success indicator. Capture an attempt at activation and reject stale settlements before replacing feedback, or retain current main's attempt-aware owner. The changed test only covers immediately resolving writes, and this prior finding remains unchanged.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f4f6e35d276b.

Labels

Label changes:

  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: Copy feedback and keyboard accessibility are bounded Control UI defects without evidence of an unusable core workflow.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The maintainer-authored PR is exempt from ordinary contributor proof. Its body reports focused tests, while inspected media demonstrates adjacent merged fixes rather than this branch's native-button and completion-order behavior. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduction: Reviewed the complete merge-base-to-head patch. The new native command button and card-background handler call the clipboard transport directly, while the adjacent icon uses the feedback owner. (ui/src/components/connect-command.ts:25, 3303099b3c5c)
  • Failure contract and caller: The clipboard helper returns false when both transports fail; clipboard tests explicitly cover that result. Login-gate help renders the affected commands, but the new command handlers consume neither the result nor the icon's feedback. (ui/src/lib/clipboard.test.ts:58, 3303099b3c5c)
  • Completion ownership gap: Markdown copying permits concurrent attempts and invokes the new feedback replacement after every successful settlement. That replacement cancels whichever timer currently belongs to the element, without checking which activation produced the completion. The changed regression uses immediately resolving writes, so it does not cover inverse settlement. (ui/src/components/markdown-code-blocks.ts:81, 3303099b3c5c)
  • Current-main owner boundary: Current main routes connection-card activation through the copy icon and already provides attempt-aware icon feedback, caller retirement, and stale-fallback prevention. Markdown now delegates to an attempt-aware shared owner. The connection card still contains a role-button parent around its native copy button, leaving the separate-native-button improvement distinct. (ui/src/components/connect-command.ts:1, f4f6e35d276b)
  • Shipped feedback behavior: The latest release already has keyed copy controls, visible status feedback, and attempt-checked reset timers. This supports retaining the established owner when integrating the accessibility change; it does not establish that this PR is wholly implemented. (ui/src/components/copy-button.ts:1, c074824a27c9)
  • Merged area history: GitHub verifies fix(ui): report failed copies and retire stale clipboard actions #130612 merged at this SHA. Current-main history also records subsequent clipboard, visible-feedback, and connection-card work by Peter Steinberger, plus payload-retirement work by Vincent Koc. (ui/src/components/copy-button.ts, 4152b26afe4d)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Route command-button and background activation through visible success and failure feedback, covering total transport failure.
  • Cover inverse settlement so an older Markdown completion cannot replace newer feedback.
  • Integrate the native-button improvement with current main's existing attempt, payload-retirement, and fallback contracts.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (16 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-07T21:15:07.396Z sha 3303099 :: found issues before merge. :: [P1] Route command activation through the feedback owner | [P2] Ignore stale Markdown clipboard completions
  • reviewed 2026-08-15T16:28:07.854Z sha 3303099 :: found issues before merge. :: [P1] Route every command activation through visible feedback | [P2] Ignore stale Markdown clipboard completions
  • reviewed August 19, 2026, 1:58 AM ET / 05:58 UTC sha unknown :: found issues before merge. :: [P1] Route every command activation through visible feedback | [P2] Ignore stale Markdown clipboard completions
  • reviewed 2026-08-19T05:58:14.716Z sha 3303099 :: found issues before merge. :: [P1] Route every command activation through visible feedback | [P2] Ignore stale Markdown clipboard completions
  • reviewed 2026-08-25T06:11:28.118Z sha 3303099 :: needs changes before merge. :: [P1] Route command activation through visible feedback | [P2] Ignore stale Markdown clipboard completions
  • reviewed 2026-08-25T06:30:30.038Z sha 3303099 :: found issues before merge. :: [P1] Route command activation through visible feedback | [P2] Ignore stale Markdown clipboard completions
  • reviewed 2026-09-02T02:09:11.233Z sha 3303099 :: found issues before merge. :: [P1] Route command activation through visible feedback | [P2] Fence stale Markdown copy completions
  • reviewed September 25, 2026, 8:48 AM ET / 12:48 UTC (Revision 16) sha unknown :: blocked before merge. :: [P1] Route command activation through visible copy feedback | [P2] Fence stale Markdown copy completions

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 1, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 12, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 25, 2026
@VACInc

VACInc commented Sep 7, 2026

Copy link
Copy Markdown
Member

Related merged fix: #141574 fixes code-block copying when HTML comments, closing tags, or similar delimiters cause sanitization to remove the stored copy payload. It preserves the existing decoder and clipboard behavior.

That merge does not implement the separate feedback-timer ownership or connection-command keyboard/accessibility changes proposed here. This PR should not be closed as superseded by #141574.

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Oct 2, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Closing the obsolete Lit implementation after the Solid migration (#172376, #171558). Current copy controls already guard feedback ownership and route connection-command activation through the shared copy button; any remaining markup accessibility issue should be handled directly in the Solid component.

Closed in a sweep of stale maintainer PRs (no activity for 7+ days). Reopen with a current reproduction if this still matters.

@steipete steipete closed this Oct 21, 2026
@RomneyDa
RomneyDa deleted the codex/qa400-ui-clipboard-feedback-accessibility branch October 22, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants