Skip to content

feat(chat): match the conversation screen to its Figma - #368

Open
alexxg20 wants to merge 8 commits into
mainfrom
feature/conversation-figma
Open

alexxg20 wants to merge 8 commits into
mainfrom
feature/conversation-figma

Conversation

@alexxg20

@alexxg20 alexxg20 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #305. The conversation screen now matches the rest of its Figma: the other person's avatar and role, a listing summary card, icons on the notices, day dividers, and the empty and error states' icon and tagline.

Stacked on #367 (the ViewModel side). Merge that one first; this PR then retargets main.

What

  • Header: the other person's photo (the default one while missing), and "@james · Lender" or "@james · Renter".
  • Listing card: photo, lender, "CHF 8 / day · Renens VD", and a Rental / Service / Paused / Deleted pill.
    • The lender line shows "You" when I'm the lender, and the username otherwise, because User has no display name.
    • Services show the price without "/ day".
    • TalkBack hears "Listing by james" or "Your listing".
  • Notices: a pause-circle icon on paused and an archive icon on deleted. The paused text is unchanged; it never says that messaging still works.
  • Day dividers: "Today", "Yesterday" or a date above the first message of each day. They never go back a day, so a message with a wrong device time can't repeat one. Their keys can't collide with a message ID.
  • Empty and error states: the icon in a tinted circle, plus the "Good tools. Great neighbours." tagline when the screen invites a first message.
  • Shared code: the inbox's photo helpers and badge colours moved to chat/ui/ChatComponents.kt. The inbox doesn't change.

Why

#273 built only what its issue and the ViewModel supported. This is the rest of the Figma, now that the ViewModel provides the listing and photos, and listings store a location (#345).

Left out on purpose:

  • The reserved photo button and the "Photos aren't available yet" line: Send photos from the conversation screen #281 adds the real button to this composer.
  • The Figma's paused line "You and James can still send messages here": it's false for a first message, which the rules refuse.

Validation

  • ./gradlew ktfmtCheck check assemble lint: passed (1419 unit tests, 0 failures; no lint issue in the changed files).
  • New ConversationScreenTest cases:
    • the card for an item, a service, a listing without a location, a paused listing, a deleted listing and one that was never read;
    • "You" for the lender, and what TalkBack reads;
    • the avatar and role;
    • the dividers' labels and positions, including a message whose ID looks like a divider key;
    • the tagline and the icons.
  • ConversationDaysTest: midnight in a non-UTC zone, the year format, and dates out of order.
  • Not run: connectedCheck (no emulator) and TalkBack on a device.

AI use

Claude Code (Claude Opus 5.5) planned the change from the issue and the Figma. It implemented it and wrote the tests, then ran two adversarial reviews and applied their fixes. I reviewed and approved the plan and the split.

🤖 Generated with Claude Code

@alexxg20
alexxg20 marked this pull request as ready for review November 18, 2026 09:51
@alexxg20 alexxg20 linked an issue Nov 18, 2026 that may be closed by this pull request
2 tasks
Keeps both sides in ConversationViewModel and its test: the listing,
role and photos of this branch, and main's photo messages.

The stale-download test now builds its ViewModel through the viewModel()
helper, which takes an optional listing repository, instead of calling
the constructor by hand.
Brings in main's photo messages. The message list keeps its day dividers
and now shows photo bubbles in them, with the photos being sent below
the newest messages.
peng-0110
peng-0110 previously approved these changes Nov 19, 2026

@peng-0110 peng-0110 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found no issues with the changes only a few nitpicks (none block the merge)

  • A photo still being sent shows under yesterday's divider. Pending photos sit at the very bottom of the list, below every day divider. If the last message was yesterday and you send a photo today, its bubble sits under "Yesterday" until the upload finishes. A failed photo stays there until it's retried or removed. Putting a "Today" divider above pending photos when the newest day isn't today would fix it.
  • "Today" can go stale overnight. now defaults to Instant.now() and is only re-read when the screen recomposes. If the screen sits idle past midnight, yesterday's messages keep the "Today" label until the next update.
  • A code comment was wrapped badly by ktfmt in ListingSummary: "...TalkBack says whose listing it / is, / then its details...". Rejoin the lines.
  • The PR description is out of date: its Validation says 1419 unit tests, and the count has grown since.

Approving since none of these are blocking.

Base automatically changed from feature/conversation-figma-state to main November 19, 2026 22:30
@alexxg20
alexxg20 dismissed peng-0110’s stale review November 19, 2026 22:30

The base branch was changed.

@sonarqubecloud

Copy link
Copy Markdown

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.

Match the conversation screen to the rest of its Figma

2 participants