Skip to content

Extract SessionViewer runtime controllers - #265

Open
tella-butler wants to merge 4 commits into
mainfrom
loc-sessionviewer-runtime-opus
Open

Extract SessionViewer runtime controllers#265
tella-butler wants to merge 4 commits into
mainfrom
loc-sessionviewer-runtime-opus

Conversation

@tella-butler

Copy link
Copy Markdown
Contributor

Summary

  • extract session preview and portal rendering into a dedicated component
  • move transcript WebSocket subscription and history settlement into a focused hook
  • move model, account, goal, and workflow-run state into a controller hook
  • add focused regression tests around the extracted boundaries

Verification

  • bun run check

Started by Jaap Frolich in this OS session

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
opensession Ready Ready Preview Sep 1, 2026 12:58pm UTC

@open-session-os-tella-dev

open-session-os-tella-dev Bot commented Sep 1, 2026

Copy link
Copy Markdown

🤖 OS review · approve · confidence 5/5

Safe 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.
1 inline comment below.

💡 Labels: os-auto-fix — I fix these and push until CI passes · os-adversarial — deeper two-pass review · os-simplify — quality cleanup pass.
Reviewed 9154a9c · GPT-5.6 Sol · earlier reviews collapse above · open session

@open-session-os-tella-dev open-session-os-tella-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OS review · 9154a9c

// streamed while backgrounded arrives moments after the visibilitychange.
const RESUME_GROWTH_WINDOW_MS = 8_000;

export function useSessionViewerSubscription(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

2 participants