Fix new-session entityNotFound error and sidebar badge alignment - #463
Merged
Merged
Conversation
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>
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two AppKit-rewrite fixes:
1. "The requested item is no longer available." when opening a new session
The backend's
threadUpsertedfor 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.selectvalidates the thread againstAppModel.threadsand threwentityNotFoundwhen the select won the race.createThreadForRenderer/branchThreadForRenderernow 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
NSTextFielddraws 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
RendererActionBoundaryTests).sidebar-outlineUI probe: badge digits render centered in the pill.pnpm run verify --allgreen.🤖 Generated with Claude Code