Skip to content

fix(timeline): a quote repost was created and then shown nowhere - #822

Merged
github-actions[bot] merged 2 commits into
mainfrom
fix/repost-appears
Aug 28, 2026
Merged

fix(timeline): a quote repost was created and then shown nowhere#822
github-actions[bot] merged 2 commits into
mainfrom
fix/repost-appears

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

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: 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 — 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:

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.

Why it survived

The bug was a missing argument, not broken logic — a unit test of usePostRepost passes 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

catomean and others added 2 commits August 28, 2026 22:32
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
@github-actions
github-actions Bot merged commit afce24f into main Aug 28, 2026
6 checks passed
@github-actions
github-actions Bot deleted the fix/repost-appears branch August 28, 2026 21:15
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.

1 participant