Skip to content

fix(chat): one seen popover for every stack: always titled, anchored to the faces, flips below - #676

Merged
rafavalls merged 1 commit into
mainfrom
fix/seen-popover-unify
Nov 30, 2026
Merged

rafavalls merged 1 commit into
mainfrom
fix/seen-popover-unify

Conversation

@rafavalls

@rafavalls rafavalls commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

What

Every faces stack under a message opens the same seen popover:

  • It always has the "Visto por" title, with Pessoas/Agents groups and each row's status (leu, leu em parte, recebeu, parou, terminou).
  • It's anchored to the faces: right edge on the stack's, as wide as its rows (240–320px, never wider than the screen), 8px off.
  • It opens above the faces, and below them when there's no room above.

Why

Valls, in production ("isso aqui tá zoadasso"): one agent's face opened a popover with only "Rafael Valls's claude · delivered", no title, sitting on the message text and stretched left across it.

What was wrong in web/features/chat/MessageFooter.svelte. It's the same component as the seen popover; there's no second popover. MessageActions only hides the toolbar while the popover is open.

  • No title: the title showed only when someone had read the message ({#if seenBy}). An agent that only received it got a bare row, and so did agents that finished or stopped (fix(chat): the seen popover opens alone, and no "✓ agent did it" line under a message #674).
  • Too wide: a fixed w-72 (288px) from the stack's right edge, so a one-row popover ran far left across the message.
  • Always above: it opened above, onto the text, even when there was no room there.

Fix:

  • The title is always there.
  • w-max min-w-60 max-w-[min(20rem,calc(100vw-2rem))], anchored right-0 on the faces' group.
  • On open it measures the room above (the scrolling list's top, or the window's) against its own height, and sets top-full pt-2 instead of bottom-full pb-2 when that room is shorter. The 8px padding stays the hover bridge.

This builds on the faces under the message (#675), which merged first; this branch is rebased on it.

Checks run

  • bun run check: pass (on main with fix(chat): seen faces back under the message, inside the 24px gap; full-width text #675)
  • bun test --conditions=browser scripts/ui-panels.test.ts: 181 pass. New test: the one-agent delivered case (title, row, "recebeu"), the 240–320px bounds and the right anchor, above by default, and the flip below with no room above.
  • bun test scripts/chat.test.ts scripts/read-receipts.test.ts: pass
  • bun run test:design-system: pass (gallery and inbox)
  • bun run screens -- --receipts: pass. New: an agent-only stack that only received the message, agents that finished and stopped, and a tap on the faces at 390px; the run fails if a popover has no "Visto por". Faces are now counted only when visible, because the phone and desktop stacks are both in the DOM. "Before" ran the same steps on fix(chat): seen faces back under the message, inside the 24px gap; full-width text #675's footer; its log notes the missing titles.

Router bench

not touched

Deliberate decisions

none

Screens

One agent that only received it, the production case. Before:
before
After:
after

Agents that finished and stopped (#674). Before:
before
After: no room above in this short room, so it opens below.
after

A person and an agent. Before:
before
After:
after

Many (6 people + 6 agents). Before:
before
After:
after

Only people (after):
after

Phone, one agent. Before:
before
After:
after

Phone, many. Before:
before
After:
after

On a phone, the busy stack's "+11" doesn't fit #675's 16px circle and reads "+1". That's from the faces-below design, not this change; I left it for a follow-up.

🤖 Generated with Claude Code


Summary by cubic

Fixes the seen popover under a message so that a single agent's face opens the same titled, anchored popover as any other stack.

The title "Visto por" now shows even when nobody has read the message; the popover is sized to its rows (240–320px, never wider than the screen) and anchored to the faces' right edge; and it opens above the faces, flipping below when there's not enough room above. Previously the title only appeared when someone had read the message, the popover was a fixed 288px wide, and it always opened above onto the message text.

Written for commit f26b9bc. Summary will update on new commits.

View guided diff Turn on auto-fix

…to the faces, flips below

The popover a single agent's face opened (Valls, in production) had no "Visto por": the title showed
only when someone had read it, so an agent that only received the message (or agents that finished or
stopped, #674) got a bare row. It was also a fixed 288px wide from the stack's right edge, so it ran
left across the message, and it always opened above, onto the text.

- The title is always there; rows keep their status (leu, leu em parte, recebeu, parou, terminou).
- Anchored to the faces: its right edge on the stack's, as wide as its rows (240-320px, never wider
  than the screen), 8px off (the hover bridge).
- Opens above; below when the room above (the scrolling list's top, or the window's) is shorter
  than the popover, measured each time it opens.
- Tests: the one-agent delivered case (title, row, status), the width bounds, above and the flip
  below. screens --receipts: an agent-only stack that only received it, agents that finished and
  stopped, and a tap on the faces at 390 px (busy and one-face); it counts only visible faces (the
  phone and desktop stacks are both in the DOM).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rafavalls
rafavalls enabled auto-merge (squash) November 30, 2026 16:03
@rafavalls
rafavalls merged commit d0d7e38 into main Nov 30, 2026
6 checks passed
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.

1 participant