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

fix(desktop): keep pending messages grouped so sends don't shift the timeline - #8195

Open
brucesantos wants to merge 3 commits into
block:mainfrom
brucesantos:fix/desktop-pending-message-grouping
Open

brucesantos wants to merge 3 commits into
block:mainfrom
brucesantos:fix/desktop-pending-message-grouping

Conversation

@brucesantos

@brucesantos brucesantos commented Oct 8, 2026 •

Copy link
Copy Markdown

Summary

Every send rendered the pending message with its own avatar, author, and "Sending…" header, then collapsed it into the author group on acknowledgement. The timeline shifted on every message, and a message sent within the same second as the previous one rendered above it first.

  • Grouping (timelineItems.ts, MessageRow.tsx): pending rows group exactly like acknowledged ones. A grouped pending row dims its body (60% opacity) and keeps "Sending…" for screen readers only, so the acknowledgement changes opacity, never height. The first message of a group keeps the inline "Sending…" beside its timestamp, as Fix pending message feedback #3543 intended, since nothing shifts there. This also applies to the thread panel.
  • Ordering (channelWindowStore.ts): compareRelayOrder treats a pending send as the newest event in its second. Before this, the optimistic id sorted against hex ids and put the send above an earlier same-second message.

Not covered:

Related issue

Fixes #8194. Related: #3543, #8192, #8193.

Testing

  • Unit: updated buildTimelineItems: pending messages group like acknowledged ones. Added test_live_pending_send_projects_after_same_second_window_events, which follows the same live-overlay path as the send mutation. Both fail without the fix.
  • E2E: message-feedback-snapshots.spec.ts asserts that a pending continuation has no author header, announces "Sending…", and keeps the same row height through acknowledgement. It fails on main.
  • Ran: desktop unit suite (6,975 passed), tsc --noEmit, and messaging.spec.ts plus the feedback spec (93/94; the one failure, "editing a thread root in single-panel view", is unrelated and passed 5/5 when run alone).
  • Manual: rapid sends in a DM on the desktop app.

Before / after, ⅓ speed:

before-after-pr.mp4

buzz-review-completed

🤖 Generated with Claude Code

brucesantos and others added 2 commits October 8, 2026 18:19
…timeline

A pending message always rendered with its own avatar, author, and
"Sending…" header, then collapsed into its author group once the relay
acknowledged it. Every send therefore flashed a header and shifted the
timeline by one header height.

Group pending rows exactly like acknowledged ones. A grouped pending row
dims its body and keeps the send status for screen readers only, so the
acknowledgement changes opacity but never the row's height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: brucesantos <brucesantos@users.noreply.github.com>
Relay order breaks created_at ties by event id. An optimistic id sorts
after every hex event id, so a message sent within the same second as the
previous one rendered above it, took over the author header, and dropped
back into place on acknowledgement.

Treat a pending send as the newest event in its second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: brucesantos <brucesantos@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 8f66f7051c68560feb27dbc74b069c851bc018bd...8f17308b4ece78ecb5f6594ba189c8b5e2f418ba.
A new review must complete for this exact range. When manual authorization
is required, a user with write access must comment exactly
@buzz-security-review 8f17308b4ece78ecb5f6594ba189c8b5e2f418ba to authorize a new review.
Any previous review applies only to its recorded range.

The live-overlay test binds the send mutation's path. Keep only the
pageless projection case from the earlier test, which it does not cover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: brucesantos <brucesantos@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

Desktop: every send flashes an avatar/name/"Sending…" header and shifts the timeline

1 participant