Skip to content

fix(app): show session shell while loading - #44303

Closed
Brendonovich wants to merge 4 commits into
v2from
show-session-title
Closed

fix(app): show session shell while loading#44303
Brendonovich wants to merge 4 commits into
v2from
show-session-title

Conversation

@Brendonovich

@Brendonovich Brendonovich commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • keep an isolated session background layer mounted while session metadata resolves
  • hide that layer atomically when the resolved session screen mounts, preventing nested or double-painted panels
  • mount the timeline from session metadata without waiting for message history so the title appears early
  • surface message-resource errors without suspending already-loaded session UI

Testing

  • bun typecheck (packages/app)
  • bun run test:unit (packages/app): 514 passed
  • pre-push workspace typecheck

Performance

The required production first-navigation benchmark was run before and after on isolated port 4317. The fixture fails during setup before session content mounts in both cases, so it reports no comparable metrics. The final focused candidate run fails on the same missing-heading assertion.

@Brendonovich
Brendonovich requested a review from Hona as a code owner August 23, 2026 03:37
@Brendonovich Brendonovich changed the title fix(app): show session title while loading fix(app): show session shell while loading Aug 23, 2026
@Enough1122

Copy link
Copy Markdown

AI code review — automated review for reference, author can ignore or act on any point.

Nice restructuring. Reading timeline.resource.error (property access) instead of calling the resource is exactly the right Solid idiom for propagating errors without triggering suspension, and the atomic invisible swap in the route shell cleanly prevents the nested/double-painted panels called out in the summary. Keeping the placeholder layer mounted rather than conditionally rendered also avoids mount flicker on transitions.

Points to double-check:

  1. packages/app/src/session/screen.tsx (~line 63): <Show when={timeline.resource.error}>{(error) => { throw error() }}</Show> relies on an ErrorBoundary ancestor to catch the render-time throw. If any embedding of SessionScreen lacks one (desktop vs web shells, modal previews), a failed messages query now crashes the whole route instead of degrading gracefully. Worth verifying all mount points have a boundary, or rendering an inline error card as a fallback.

  2. Removing the messagesReady gate: MessageTimeline now mounts from session metadata while message history may still be empty/pending. Scroll initialization logic (anchor, pin, scroll-to-end) previously only ran against loaded history — please confirm those behaviors don't fire early and produce a wrong resting scroll position on slow networks (the 514-test unit suite is reassuring, but this is inherently timing-dependent, so a slow-network e2e pass would seal it).

  3. packages/app/src/session/route.tsx (~line 91): the shell layer remains mounted (visibility-hidden) forever after directory() resolves. Cost is trivial, so keeping it is defensible for flicker-free transitions — just flagging that <Show when={!directory()}>…</Show> around the placeholder is equivalent if you ever want the DOM gone post-load.

Otherwise looks good — the split between "metadata-driven shell" and "history-driven content" is clearer after this change than before.

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