Repository navigation
Web Direct messages: newest first, last lines, New message (#3774, 2 of 3) - #4445
Merged
Merged
Conversation
…of 3) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D7R7NNPw2Kpjnca1FFPvfH
- Hidden DMs get no last line (the server keeps none), Hidden conversations rows stay one line, and an open hidden DM leads the list. - The list waits behind its skeleton for the first latest-messages read, and keeps the last good order and lines when a later read fails. - One newest-first rule for both clients: compareLatestFirst in @repo/hooks, now used by mobile's Messages screen too; typed rows, no cast. - New message shows only once the list has loaded. - Specs and the ChannelList docblock say what the code does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D7R7NNPw2Kpjnca1FFPvfH
2 of 3 tasks
Owner
Author
|
The fix is in its own PR rather than widening this one: #4446. Once that merges, I'll merge Generated by Claude Code |
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3774
Asked by: Shawn (
shawnatomklein-eng), 2026-11-12 (coordinator chat on Paul's second account; person at the keyboard unconfirmed). He picked "match the phone" for the list on #3774: #3774 (comment)Summary
Step 2 of 3. #4370 gave direct messages their own nav row and list on web. This makes that list read like the phone's Messages screen:
channelPreviewLine): "You: sounds good" for your own message, no name in a one-to-one DM, the sender's first name in a group, and "No messages yet" when there are none. Rows are two lines and 48px tall.Comparable apps: Slack's DMs view, Discord's Direct Messages home, iMessage and Instagram all list conversations newest first, each with its last line.
Design page with the built screen: https://claude.ai/artifact/9v85GbNiLSpBErGoLmhjWg. It is private to the account that ran this chat; Shawn can share it. Its substance is above.
Behavior details
GET /v1/channels/latest) runs only while the Direct messages list shows. The channels rail still draws no previews ([suggestion] Channel rows can't show s04's message preview and timestamp — no last-message projection exists #1191).compareLatestFirstin@repo/hooks, and mobile's Messages screen uses it too. Mobile behaves as before.Recorded decisions this changes
spec/behavior/chat/README.md§ Sidebar arrangement said Direct messages sort A to Z, and that mobile's Messages screen was the only list ordered by recent activity. Web's Direct messages list now sorts newest first too. Dated lines are added under both.Changes
apps/web/components/chat/chat-shell.tsx: the latest read, the previews map, the placeholder wait, and the New message button.apps/web/components/chat/channel-list.tsx: newest-first order, two-line rows, hidden rows, and the docblock.packages/hooks/src/channel-sidebar.ts:compareLatestFirst, with a test.apps/mobile/app/(app)/messages.tsx: usescompareLatestFirst(same order as before).spec/behavior/chat/README.md(§ Channel list previews, § Sidebar arrangement),spec/ui/web-dashboard/README.md(§ Chat).packages/validation/release-notes/claude-dm-list-previews-3774.md.Docs / Spec impact
Test plan
npx vitest runinapps/web, 299 files and 5174 tests passing. New tests cover:@repo/hookschannel-sidebar.spec.tspasses (the new comparator test).tsc --noEmitclean onapps/webandapps/mobile; eslint clean on the touched files.Review
/diff-reviewran a full workflow round: 5 finders, then 2 checkers, reviewed at c983863. Every confirmed finding was fixed in that commit:One confirmed finding predates this PR and is filed as #4442: an edited or deleted last message keeps showing until the next refresh. Mobile already has the same gap; this PR makes it visible on web too.
Release label
release:minorDebt spotted
Generated by Claude Code