Extract SessionViewer runtime controllers - #265
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🤖 OS review · approve · confidence 5/5Safe to merge. The preview rendering, subscription lifecycle, and model/workflow state are extracted without changing their observable behavior, and I found no correctness, authorization, XSS, or data-exposure regression.
|
| // streamed while backgrounded arrives moments after the visibilitychange. | ||
| const RESUME_GROWTH_WINDOW_MS = 8_000; | ||
|
|
||
| export function useSessionViewerSubscription( |
There was a problem hiding this comment.
⚪ P3 — Replace the positional controller API with an options object
This hook takes roughly fifty positional arguments, including multiple structurally identical setters such as setImages and setContextSessions (Setter<string[]>). TypeScript cannot detect those being transposed at the call site, and adding or moving a dependency requires keeping two long lists synchronized by position. Make the parameter a named options object and destructure it inside the hook so each binding is explicit. This is advisory and does not block the behavior-preserving extraction.
Summary
Verification
bun run checkStarted by Jaap Frolich in this OS session