Skip to content

Fix new-session entityNotFound error and sidebar badge alignment - #463

Merged
SergeSerb2 merged 2 commits into
mainfrom
surgecode/new-session-error-and-badge-alignment
Aug 3, 2026
Merged

Fix new-session entityNotFound error and sidebar badge alignment#463
SergeSerb2 merged 2 commits into
mainfrom
surgecode/new-session-error-and-badge-alignment

Conversation

@SergeSerb2

Copy link
Copy Markdown
Owner

Summary

Two AppKit-rewrite fixes:

1. "The requested item is no longer available." when opening a new session

The backend's threadUpserted for a freshly created thread rides the buffered event stream (up to one 33 ms batch flush behind), but every create flow selects the returned scope immediately. navigation.select validates the thread against AppModel.threads and threw entityNotFound when the select won the race. createThreadForRenderer / branchThreadForRenderer now flush the upsert through the normal event queue before returning; the stream's own copy lands later as a display-equivalent no-op. Covers the sidebar create flow, branch, and the settle-and-advance fallback create.

2. Misaligned digits in sidebar count bubbles

NSTextField draws text from the top of a taller-than-intrinsic frame, so the fixed 18 pt badge height left digits sitting high, and zero horizontal padding let multi-digit counts touch the rounded edges. The background now lives on a padded container view with the label centered inside it.

Testing

  • New regression test: created thread is selectable before the event-stream flush (RendererActionBoundaryTests).
  • sidebar-outline UI probe: badge digits render centered in the pill.
  • pnpm run verify --all green.

🤖 Generated with Claude Code

SergeSerb2 and others added 2 commits August 3, 2026 11:22
The backend's threadUpserted for a new thread rides the buffered event
stream (up to one 33 ms flush behind), but every create flow selects the
returned scope right away. navigation.select validates the thread against
AppModel.threads and threw entityNotFound ("The requested item <uuid> is
no longer available.") when the select won the race. Flush the upsert
through the normal event queue before createThreadForRenderer /
branchThreadForRenderer return; the stream's own copy lands later as a
display-equivalent no-op.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
NSTextField draws its text from the top of a taller-than-intrinsic frame,
so the fixed 18 pt badge height left the digits sitting high, and with no
horizontal padding multi-digit counts touched the rounded edges. Move the
background onto a padded container view and center the label within it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@SergeSerb2 SergeSerb2 added the size:XS Tiny internal, documentation, or narrowly scoped fix label Aug 3, 2026
@SergeSerb2
SergeSerb2 merged commit 961a378 into main Aug 3, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS Tiny internal, documentation, or narrowly scoped fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant