Fix silent startup crash when the saved session contains navigation pins#90
Merged
Conversation
… pins The session deserializer's _load_pins still called the LEGACY PinOverlay's clear_pins()/add_pin_button() - methods that do not exist on PinOverlayHost (window.pin_overlay since Phase 5). The AttributeError aborted the entire chat restore at launch; _handle_load_error's recovery path then crashed on the same missing method, and the app exited with no window - presenting as "sits spinning and never opens." Purely data-dependent: nothing surfaced until a session actually contained pins (created via the Pins UI earlier today), which is why every empty-session test drive passed. All five stale legacy call sites removed (deserializers._load_pins x2, deserializers._handle_load_error, ChatWindow.new_chat, and a remnant clear() in graphlink_connections.py): with the store-based Phase 5 design they are unnecessary - scene.clear() empties scene.pin_store (the overlay's reactive source of truth) and scene.add_navigation_pin() registers restored pins in it. Regression tests use a pin_overlay object with NO methods at all (a MagicMock would absorb the legacy calls and hide the bug): pins restore lands in the store without touching the overlay, and the load-error recovery path no longer raises. Verified against the real crashing session: the app now launches, restores the pinned chat, and stays up. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Root cause of "the app sits spinning and never opens": the session deserializer's
_load_pinsstill called the legacyPinOverlay.clear_pins()/add_pin_button()- methods that don't exist onPinOverlayHost(whatwindow.pin_overlayhas been since Phase 5). TheAttributeErroraborted the entire chat restore at launch, the_handle_load_errorrecovery path then crashed on the same missing method, and the app exited with no window and exit code 0.Purely data-dependent: it only fires when the saved session actually contains pins - which happened for the first time today when pins were created via the toolbar. Every empty-session test drive passed, which is how it survived Phase 5/6/7 verification.
All five stale legacy call sites removed (
_load_pinsx2,_handle_load_error,new_chat, and a remnantclear()ingraphlink_connections.py). With the store-based design they're unnecessary:scene.clear()emptiesscene.pin_store(the overlay's reactive source of truth) andadd_navigation_pin()registers restored pins in it.Test plan
pin_overlaywith NO methods at all (a MagicMock would absorb the legacy calls and hide the bug): pins restore lands in the store, zero-pins is a no-op, and the load-error recovery path no longer raises