fix(timeline): a quote repost was created and then shown nowhere - #822
Merged
Conversation
usePostRepost only hands the created post back if it was given somewhere
to put it — `if (result.event && onAddEvent)`. Nobody was giving it
one: usePostCardActions called usePostInteractions({ event, onUpdate })
and stopped there. So a quote repost was written to the database and
then existed nowhere on screen until a reload.
Verified in production 2026-08-28: quote-reposting through the UI
created event c09b9f0b, the modal closed correctly, and the feed did not
change.
The list already knew how to do this. useTimelineView keeps an
optimisticEvents array and prepends to it, which is how a new post from
the composer appears instantly. The repost path simply was not connected
to it. Connected now, through the prop chain that was missing:
TimelineView → TimelineComponent → PostCard → usePostCardActions.
Optional throughout, because the thread view has its own way of
inserting replies and should not be forced to adopt this one.
The bug was a missing ARGUMENT rather than broken logic, which is why it
survived: a unit test of usePostRepost passes with or without it. The
test asserts the forward itself. Proven by mutation — removing it again
fails both cases.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012dpTLxh5GJWeWTF1UEvcD5
The repost fix pushed TimelineComponent to 301 lines against a 300 limit, so CI was red on this PR. The gate is right and the exception list only shrinks, so this splits rather than raises the ceiling. The bulk-delete confirmation is a genuine seam, not the shortest 39 lines: TimelineComponent was doing feed state, selection, infinite scroll AND this modal. Deleting is the one irreversible thing the timeline offers, and its wording now lives in one place instead of inline among the scroll sentinel and the empty state. 269 lines, and check:sizes passes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012dpTLxh5GJWeWTF1UEvcD5
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.
usePostRepostonly hands the created post back if it was given somewhere to put it —if (result.event && onAddEvent). Nobody was giving it one:usePostCardActionscalledusePostInteractions({ event, onUpdate })and stopped there. So a quote repost was written to the database and then existed nowhere on screen until a reload.Verified in production: quote-reposting through the UI created event
c09b9f0b, the modal closed correctly, and the feed did not change.The list already knew how to do this
useTimelineViewkeeps anoptimisticEventsarray and prepends to it — that is how a new post from the composer appears instantly. The repost path simply was not connected to it. Connected now, through the prop chain that was missing:Optional throughout, because the thread view has its own way of inserting replies and should not be forced to adopt this one.
Why it survived
The bug was a missing argument, not broken logic — a unit test of
usePostRepostpasses with or without it. So the test asserts the forward itself. Proven by mutation: removing it again fails both cases.🤖 Generated with Claude Code
https://claude.ai/code/session_012dpTLxh5GJWeWTF1UEvcD5