Fix pending message feedback (#3543)

## Summary

- Keep `Sending…` beside message timestamps, including grouped pending
messages.
- Match the profile-card hover surface to inactive channel rows.

## Snapshots

### Pending message

![Pending message
status](https://raw.githubusercontent.com/block/buzz/655189aec0904677a68651f8aabf0e17d69734cd/pr-3543--pending-message-inline.png)

### Profile hover

![Profile
hover](https://raw.githubusercontent.com/block/buzz/655189aec0904677a68651f8aabf0e17d69734cd/pr-3543--profile-hover.png)

## Validation

- `pnpm -C desktop typecheck`
- `pnpm -C desktop check:file-sizes`
- `pnpm -C desktop build:e2e`
- `pnpm -C desktop exec playwright test
tests/e2e/message-feedback-snapshots.spec.ts --project=smoke`

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
This commit is contained in:
klopez4212
2026-07-30 15:46:56 +01:00
committed by GitHub
parent c55e421a06
commit 4672ee55c4
8 changed files with 181 additions and 7 deletions

View File

@@ -1018,6 +1018,8 @@ declare global {
mentionPubkeys?: string[];
extraTags?: string[][];
createdAt?: number;
/** Marks this test-only message as locally pending. */
pending?: boolean;
/** 64-hex id required for the event to be a valid reaction target. */
id?: string;
}) => RelayEvent;
@@ -4014,6 +4016,7 @@ function emitMockChannelMessage(
mentionPubkeys?: string[],
extraTags?: string[][],
createdAt?: number,
pending?: boolean,
id?: string,
) {
const eventKind = kind ?? 9;
@@ -4032,6 +4035,7 @@ function emitMockChannelMessage(
createdAt,
id,
);
if (pending) event.pending = true;
recordMockMessage(channelId, event);
emitMockLiveEvent(channelId, event);
return event;
@@ -4064,6 +4068,7 @@ function emitMockChannelMessage(
createdAt,
id,
);
if (pending) event.pending = true;
recordMockMessage(channelId, event);
emitMockLiveEvent(channelId, event);
return event;
@@ -9416,6 +9421,7 @@ export function maybeInstallE2eTauriMocks() {
mentionPubkeys,
extraTags,
createdAt,
pending,
id,
}) => {
const channel = mockChannels.find(
@@ -9434,6 +9440,7 @@ export function maybeInstallE2eTauriMocks() {
mentionPubkeys,
extraTags,
createdAt,
pending,
id,
);
};