Repository navigation
fix(threading): the image path skipped the thread, and a comment was false - #1153
Merged
Merged
Conversation
…false @sprint-review's three follow-ups on #1150, all real. 1. THE IMAGE PATH SENT NO THREAD TARGET. The text send passed the root and the upload send did not, so posting a picture while the composer read "Replying in thread" put it in the channel instead. Two send sites, one updated — and there was no test on the upload path at all, which is why it was missed. Fixed, with a test that fails when the fix is reverted (probed). 2. "The resolver 400s a message carrying both" IS FALSE, and it was in FOUR places, not the three reported. resolveThreadRoot rejects the pair only when they DISAGREE (thread_root_mismatch); a reply edge and an explicit root that point at the same thread are accepted happily. That inverts what the composer's exclusivity is for. It is not a client nicety in front of a backend that would refuse the pair — it is the only thing enforcing it. An in-thread post must carry no addressing edge because a reply edge pings the root's author (@ux-lead 56879), and if the client stops keeping them exclusive, nothing downstream notices. All four comments now say that, and the test comment says the client is the only guard rather than implying the server is a backstop. 3. buildThreadView was O(n²) AND unmemoized, which are two problems. Memoized on (messages, byRoot) so a keystroke no longer re-folds the list, and the `messages.some(...)` inside the loop is now a Set built once — fine at 20 messages, not at 2,000. Counted the false claim rather than trusting the number in the report: four copies. Same lesson as this morning, pointed the other way for once. 77 suites, 416 tests green — the whole frontend suite, not a subset. Co-Authored-By: Claude Opus 5 <[email protected]>
lilyshen0722
added a commit
that referenced
this pull request
Aug 23, 2026
…r; the resolver refuses only disagreement (#1154) * docs(design): the composer's target exclusivity is the enforcing layer — the resolver refuses only disagreement #1153 found resolveThreadRoot rejects a reply edge + explicit root only when they disagree; an agreeing pair passes. So 'an in-thread post addresses nobody' is enforced by the composer's one-target-two-kinds rule, on every send path (text and upload), each pinned — not by a server refusal. Co-Authored-By: Claude Fable 5 <[email protected]> * docs(design): a send consumes the composer target on every path — text and image clear alike Co-Authored-By: Claude Fable 5 <[email protected]> * docs(design): the rail is the context — no quote block for a reply whose quoted message is the visible thread parent (Sam, 57487) Co-Authored-By: Claude Fable 5 <[email protected]> * docs(design): quote-and-thread independence is full both ways — any quote renders; only the root's redundant quote under its own rail is hidden (Sam, 57491) Co-Authored-By: Claude Fable 5 <[email protected]> * docs(design): mention-follows-you is agent-only today; a mentioned human who never posts follows nothing (pod-architect, 57535) Co-Authored-By: Claude Fable 5 <[email protected]> * docs(design): a delivered @-mention follows the mentioned participant, agent or human — #1157 landed, the bullet widens back Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
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.
@sprint-review's three non-blocking follow-ups on #1150 (57467). All three were real; one was worse than reported.
1. The image path sent no thread target
The text send passed the root; the upload send didn't. So posting a picture while the composer read "Replying in thread" put it in the channel instead. Two send sites, one updated — and there was no test on the upload path at all, which is why it was missed.
Fixed, with a test that fails when the fix is reverted (probed both ways).
2. "The resolver 400s a message carrying both" is false — in four places, not three
resolveThreadRootrejects the pair only when they disagree (thread_root_mismatch). A reply edge and an explicit root pointing at the same thread are accepted happily.That inverts what the composer's exclusivity is for. It isn't a client nicety in front of a backend that would refuse the pair — it's the only thing enforcing it. An in-thread post must carry no addressing edge because a reply edge pings the root's author (@ux-lead 56879), and if the client stops keeping them exclusive, nothing downstream notices.
All four comments now say that, and the test comment says the client is the sole guard rather than implying the server is a backstop.
I counted the copies rather than trusting the number in the report — four, not three. Same lesson as this morning, pointed the other way for once.
3.
buildThreadViewwas O(n²) and unmemoizedTwo problems, both fixed. Memoized on
(messages, byRoot)so a composer keystroke no longer re-folds the whole list, and themessages.some(...)inside the loop is now aSetbuilt once — fine at 20 messages, not at 2,000.77 suites, 416 tests green — the whole frontend suite, no path filter. That habit is three days old and one PR old; running a subset is what put two of today's failures into CI.
🤖 Generated with Claude Code