Skip to content

feat(chat): label a chat with no messages "Nothing yet" - #1518

Merged
bmc08gt merged 1 commit into
code/cashfrom
feat/chat-empty-preview-placeholder
Sep 21, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
feat/chat-empty-preview-placeholder

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

A chat created but never spoken in left the row's subtitle blank, so it read as a preview that failed to load rather than as an empty chat. The row now renders an italic "Nothing yet" where the preview goes, in the same secondary colour, so it keeps its height against its neighbours.

The placeholder is keyed on the chat having no last message (hasMessages, mapped from metadata.lastMessage != null), not on lastMessagePreview coming back null. Those are not the same thing: media and system messages both preview as null today, per the TODO in ChatSummaryMapping, so keying on the preview would tell you a chat full of photos has nothing in it. Those rows keep the blank line.

It is not group-only either. hasMessages defaults to true, so the contact rows that pass their own fallback (a phone number, a "joined" line) are untouched, but a DM with no messages gets the same placeholder, since a blank line is no more useful there.

ChatRowSubtitle gains the new rung between the preview and the caller's fallback, which keeps the whole ladder in one place; SubtitleText gains a fontStyle to carry the italic.

Two cases added to ChatSummaryPreviewTest: an empty group reports hasMessages = false, and a group whose newest message is media still reports true. TipChatRowScreenshotTest renders the empty row next to a normal one at build/screenshots/tip_chat_row_empty.png.

A chat created but never spoken in left the row's subtitle blank, which reads
as a preview that failed to load rather than as an empty chat. It now renders
an italic "Nothing yet" where the preview goes.

The placeholder is keyed on the chat having no last message, not on the preview
coming back null. Media and system messages both preview as null today, so
keying on the preview would call a chat full of photos empty; those rows keep
the blank line.
@bmc08gt bmc08gt self-assigned this Sep 21, 2026
@github-actions github-actions Bot added the type: feature New functionality label Sep 21, 2026
@bmc08gt
bmc08gt merged commit 45e28ee into code/cash Sep 21, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the feat/chat-empty-preview-placeholder branch September 23, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant