When a user sends a particle while viewing the end of a stream, automatically navigate to the newly created particle so they stay caught up. This mirrors the desktop behavior and prevents the stream from appearing unseen after sending a message.
Changes
StreamView.tsx:
Extract goToParticle from useStreamPlayback hook
Add handleParticleCreated callback that navigates to a new particle if the user was viewing the last particle in the stream
Pass callback to ComposeDock component
ComposeDock.tsx:
Add onParticleCreated optional prop to the component interface with documentation
Capture particle IDs returned from uploadMediaParticle and createTextParticle calls
Invoke onParticleCreated callback after successful particle creation (only when using default send paths, not custom overrides)
Implementation Details
The auto-follow logic only triggers when:
The user is currently viewing a valid particle (currentIndex !== -1)
The user is viewing the last particle in the stream (currentIndex === children.length - 1)
This ensures users browsing earlier particles aren't interrupted, while users at the end stay caught up with new content they just sent.
## Summary
When a user sends a particle while viewing the end of a stream, automatically navigate to the newly created particle so they stay caught up. This mirrors the desktop behavior and prevents the stream from appearing unseen after sending a message.
## Changes
- **StreamView.tsx**:
- Extract `goToParticle` from `useStreamPlayback` hook
- Add `handleParticleCreated` callback that navigates to a new particle if the user was viewing the last particle in the stream
- Pass callback to `ComposeDock` component
- **ComposeDock.tsx**:
- Add `onParticleCreated` optional prop to the component interface with documentation
- Capture particle IDs returned from `uploadMediaParticle` and `createTextParticle` calls
- Invoke `onParticleCreated` callback after successful particle creation (only when using default send paths, not custom overrides)
## Implementation Details
The auto-follow logic only triggers when:
1. The user is currently viewing a valid particle (`currentIndex !== -1`)
2. The user is viewing the last particle in the stream (`currentIndex === children.length - 1`)
This ensures users browsing earlier particles aren't interrupted, while users at the end stay caught up with new content they just sent.
https://claude.ai/code/session_01DVUwNMicXV6CzzDtNpNYFz
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
When a user sends a particle while viewing the end of a stream, automatically navigate to the newly created particle so they stay caught up. This mirrors the desktop behavior and prevents the stream from appearing unseen after sending a message.
Changes
StreamView.tsx:
goToParticlefromuseStreamPlaybackhookhandleParticleCreatedcallback that navigates to a new particle if the user was viewing the last particle in the streamComposeDockcomponentComposeDock.tsx:
onParticleCreatedoptional prop to the component interface with documentationuploadMediaParticleandcreateTextParticlecallsonParticleCreatedcallback after successful particle creation (only when using default send paths, not custom overrides)Implementation Details
The auto-follow logic only triggers when:
currentIndex !== -1)currentIndex === children.length - 1)This ensures users browsing earlier particles aren't interrupted, while users at the end stay caught up with new content they just sent.
https://claude.ai/code/session_01DVUwNMicXV6CzzDtNpNYFz