feat(desktop): show thread replies inline - #7036
Conversation
Signed-off-by: Howard Shaw <asymetryk@outlook.com>
🔐 Codex Security Review
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a5d8b89dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a5d8b89dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Howard Shaw <asymetryk@outlook.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d09a9ba13
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Howard Shaw <asymetryk@outlook.com>
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e73064c7b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Howard Shaw <asymetryk@outlook.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5115275982
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Howard Shaw <asymetryk@outlook.com>
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 782384f031
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Howard Shaw <asymetryk@outlook.com>
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c75ca0decc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const handleEdit = React.useCallback( | ||
| (message: { id: string }) => { | ||
| (message: { id: string; rootId?: string | null }) => { | ||
| const threadHeadId = message.rootId ?? null; |
There was a problem hiding this comment.
Keep broadcast edits in the main composer
When the user edits a broadcast reply, isThreadReply deliberately classifies it as a top-level message, but it still carries a rootId; treating every such message as a thread child opens the containing thread before setting the non-thread edit target. In a single-panel or focus-drawer layout, that panel covers the main composer while the thread composer receives no edit target, leaving no visible editor. Only route genuine non-broadcast thread replies through this panel-opening path.
Useful? React with 👍 / 👎.
| messageIds.push(rootId, ...(replyIdsByRoot.get(rootId) ?? [])); | ||
| if (!errorRootIds.has(rootId)) activeRevealedRootIds.add(rootId); |
There was a problem hiding this comment.
Freeze failed-refresh snapshots before live updates
When an expanded thread's refresh fails with cached rows, this deliberately leaves the root out of activeRevealedRootIds; if a reply then arrives through the live subscription while the root is offscreen, the cache update reruns this helper and the new reply is included in messageIds, so it is marked read without being seen. Fresh evidence after the prior fix is the new error branch here: it repeatedly processes the entire cache until a retry succeeds, recreating the future-reply unread regression specifically after refresh failures. Track the already-rendered error snapshot separately so later live additions stay unread while preserving retry eligibility.
Useful? React with 👍 / 👎.
| inlineRepliesPending={inlineThreadController?.pendingRootIds.has( | ||
| item.entry.message.id, | ||
| )} |
There was a problem hiding this comment.
Show loading during stale empty-cache refreshes
When this thread query has a cached empty array, expanding it starts a stale background refresh with isPending === false and isFetching === true; because the row only receives pendingRootIds, it displays “No replies available” while replies are actively loading, even though the summary says the thread has replies. Use the already-collected fetchingRootIds state when the rendered row list is empty so this refresh path shows the loading status instead of a false empty result.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c75ca0decc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const rootIds = | ||
| state.channelId === activeChannelId ? state.rootIds : EMPTY_THREAD_ROOT_IDS; |
There was a problem hiding this comment.
Clear inline expansions when leaving the channel
When a root is expanded in channel A, navigating to channel B substitutes the empty set but preserves A's state, so returning to A silently restores the expansion. Meanwhile, useMarkInlineRepliesRead has filtered its revealed-root snapshot to empty while B was active; after A's stale-cache refresh completes, every reply that arrived while the user was away is treated as newly revealed and marked read even if the restored root is offscreen. Fresh evidence after the earlier future-reply fix is this channel-mismatch branch retaining A's Set rather than resetting it; clear expansions on channel change or retain read snapshots per channel.
Useful? React with 👍 / 👎.
| if (nextRootIds.has(message.id)) { | ||
| nextRootIds.delete(message.id); | ||
| } else { | ||
| nextRootIds.add(message.id); |
There was a problem hiding this comment.
Fetch broadcast descendants from their actual thread root
When a broadcast reply has descendants, it can receive a thread summary as a top-level timeline row, but toggling it stores message.id as the query root. Broadcast replies still carry their containing root in message.rootId, and the relay's subtree query matches thread_metadata.root_event_id, so descendants rooted at the original message are not returned for the broadcast ID; after the containing root's cached data is removed, this expansion incorrectly shows “No replies available.” Track the display subtree separately while fetching through the containing root.
Useful? React with 👍 / 👎.












What
Validation
CHECK_FILE_SIZES_BASE=upstream/main just ci