镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat(messages): trim the workflow message card to a hover heads-up - #2385

Merged
matt2e merged 3 commits into
mainfrom
clean-up-workflow-hover-content
Nov 4, 2026
Merged

matt2e merged 3 commits into
mainfrom
clean-up-workflow-hover-content

Conversation

@matt2e

@matt2e matt2e commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Problem

A workflow kick-off message has the byline Workflow · owned by Priya Shah and an ⓘ button. The ⓘ card opened only on click. It repeated the owner's name from the byline beside it and printed the owner and relay npubs in full. At 224 × 438 CSS px it covered the message it described and reached down over the composer.

Change

The card now shows its title and one sentence:

Workflow message
Sent automatically by a workflow. Its owner set it up but didn't send this message personally.

  • Removed: the owner row, the owner and relay npubs, and the "Workflow and run details are not included in this message" footer. The card is now 224 × 138 CSS px and shows no keys.
  • Opens on pointer rest: the trigger uses the shared PopoverTrigger openOnHover="preview" bucket, so the card opens after a 0.3 s rest on ⓘ. Click and Enter still open it, and Escape closes it and returns focus to ⓘ. A hover open doesn't move focus. The IconButton has no title, so no tooltip competes with the card.
  • WorkflowByline no longer takes a signer prop, and the unused .workflowDetails CSS is deleted.
  • docs/workflows.md describes the new card. It also says the row keeps the signing key for row identity only and doesn't display it.
  • The message-gallery specimen description (tests/fixtures/message-gallery/examples.ts) matches the new card.

The owner's npub is still available: the owner's name in the byline opens their profile, which offers Copy npub. signerId stays on ChannelMessage because sameRow in row-identity.ts still reads it. Removing it is a separate cleanup.

Decisions to confirm

  1. The relay signing key is no longer shown anywhere in the UI. This card was the only place it appeared, and fix(messages): show verified workflow ownership separately from signer #663 added it there on purpose, so this PR reverses that disclosure. The card still says the owner didn't send the message personally. If the relay key is still needed, the smallest addition is a Copy relay key action in the card.
  2. Hover-open through openOnHover="preview". The card used to open only on click. It now uses the same hover bucket as the app's other preview popovers. One behaviour comes from Base UI: a click within 500 ms of a hover open keeps the card open, and a later click toggles it closed. Every other openOnHover="preview" popover does the same, so the card keeps the library behaviour rather than overriding it, and a test pins it. Touch input never triggers the hover. Moving keyboard focus onto ⓘ doesn't open the card; Enter does, as with the other hover popovers.

Before / after

The open workflow ⓘ card before and after, side by side in #Alpha. Before, 224 × 438 CSS px: a relay-attribution paragraph, a Workflow owner row repeating Priya Shah, the full owner public key, the full relay npub and a run-details footer, with the card reaching down over the composer. After, 224 × 138 CSS px: the title Workflow message and one sentence saying a workflow sent it and its owner didn't send it personally.

Side-by-side video, 13 s, with the same scripted pointer path in both panes. The pointer glides onto the message, then onto ⓘ at about 3.5 s. After opens the card at about 4.8 s from the pointer rest alone. Before opens only on the click at 5.5 s. From 7 s the pointer moves down the card, and Escape closes it at 11.5 s. The panes are labelled BEFORE and AFTER and carry no other annotations.

side-by-side.mp4

Individual screenshots of the open card:

Before: the ⓘ card opened by click, 224 × 438 CSS px, showing the attribution paragraph, the Workflow owner row, the owner public key, the relay npub and the run-details footer, covering the reply and the composer.

After: the ⓘ card opened by resting the pointer on ⓘ, 224 × 138 CSS px, showing only the title Workflow message and one sentence; the composer stays clear.

These were recorded in Chromium on the browser-journey fixture app (production frontend, dev broker and modeled relay), light theme, 1024 × 640 CSS px at 2×, pointer only. The npubs are fixture keys. The before take is from the tree before a06c9808a. The after take is from 2627d5d70; the only later commit, f5672282e, changes docs and a test constant.

Tests

src/features/messages/MessageRow.test.tsx:

  • Keyboard and click: Enter opens the card, which has the new description and no npub or owner name. Escape closes it and returns focus to ⓘ. A click opens it again. The click uses fireEvent.click, which moves no pointer, so the hover timer can't open the card in its place.
  • Hover: nothing opens at 299 ms. At 300 ms the card opens, no tooltip appears and focus stays on the element that had it before the hover. A click inside Base UI's patient-click window keeps the card open, and Escape closes it. After a fresh hover open, a click once the 500 ms window has passed closes it.

Each new assertion was checked to fail when its behaviour breaks: removing openOnHover, blocking Base UI's click handler, moving focus during hover, and clicking at 499 ms.

Validation

  • MessageRow.test.tsx: 161/161 passed.
  • Typecheck, lint and design:check passed.
  • The push used --no-verify, so the pre-push hook didn't run.

Not tested yet: dark theme, narrow widths, enlarged text, keyboard-only use, WebKit, and a manual check in the app. One case worth checking by hand: rest on ⓘ until the card opens, wait more than half a second, then click. The card should close.

Checklist

  • Agent review ran on a06c9808a and 2627d5d70. Its findings (two loose test assertions, a stale docs passage, a bare 500 in a test) are fixed in 2627d5d70 and f5672282e.
  • An agent exercised the change in the browser fixture app (Chromium, pointer, light theme). See the recordings above.
  • A human has tested it in the app.

🤖 Generated with Claude Code

matt2e and others added 3 commits November 4, 2026 14:41
The ⓘ card on a workflow kick-off message repeated the owner's name from
the byline beside it and printed the owner and relay npubs in full. At
about 224 × 438 px it covered the message it described.

The card now shows its title and one plain description: "Sent
automatically by a workflow. Its owner set it up but didn't send this
message personally." The owner and relay keys, the owner row and the
"run details not included" footer are gone. The relay signing key is no
longer shown anywhere in the UI, which changes the disclosure agreed in
#663; docs/workflows.md now describes the card instead. The owner's npub
is still reachable from the byline's profile link, which offers Copy
npub.

The trigger uses the shared PopoverTrigger openOnHover="preview" bucket,
so the card opens after a 0.3 s pointer rest. Enter and click still open
it, and Escape closes it and returns focus to ⓘ. Base UI does not move
focus for a hover open, and a click right after a hover open keeps the
card open. The IconButton has no title, so no hint tooltip competes with
the card.

WorkflowByline no longer takes a signer prop, and the unused
.workflowDetails rules are deleted. The signerId field on ChannelMessage
stays; removing it is a separate cleanup. The gallery specimen
description is updated.

Tests: the MessageRow tests now cover the Enter/Escape/click path, the
card's description with no npub or owner name, and a hover test showing
that nothing opens at 299 ms, the card opens at 300 ms with no tooltip
and no focus move, a click keeps it open and Escape closes it. The hover
test fails without openOnHover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
…k paths

Addresses review of a06c980 on the workflow ⓘ card tests.

The click-open check used user.click and findByRole. user.click moves
the pointer onto the trigger, which starts the 300 ms preview rest timer,
and findByRole polls for a second, so the hover could open the card even
if the click did nothing. With user.hover in place of the click, the old
check still passed. The test now opens the card with fireEvent.click,
which moves no pointer, and finds the card synchronously.

The hover test checked that focus was outside the card, which would also
pass if a hover open moved focus to the trigger. It now records the
focused element before the hover and asserts it is unchanged.

The hover test also pins Base UI's patient-click window. A click within
500 ms of a hover open keeps the card open. A click after that toggles
it closed. This matches every other openOnHover="preview" popover, so
the card keeps the library behaviour rather than overriding it.

Each new assertion fails when its behaviour breaks: a blocked Base UI
click handler, a focus move during hover, and a click at 499 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Addresses review of 2627d5d.

docs/workflows.md still said a workflow row keeps a separate signing key
"so the disclosure still identifies the actual relay". The card no longer
shows any key, and the paragraph on message attribution says so. The
passage now says the row keeps the signing key for row identity only and
does not display it. signerId is read only by sameRow in row-identity.ts.

The workflow hover test advanced the clock by a bare 500 ms to pass Base
UI's patient-click window. That number is a Base UI internal, not a Buzz
hover-timing token, so a library change would fail the test with no hint
why. It is now a local BASE_UI_PATIENT_CLICK_MS named after Base UI's
PATIENT_CLICK_THRESHOLD. The behaviour under test is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e
matt2e marked this pull request as ready for review November 4, 2026 04:20
@matt2e
matt2e requested a review from a team as a code owner November 4, 2026 04:20
@matt2e
matt2e merged commit 7d0a965 into main Nov 4, 2026
41 checks passed
@matt2e
matt2e deleted the clean-up-workflow-hover-content branch November 4, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants