Skip to content

fix(flowchat): prevent pet session history from loading indefinitely - #3207

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-pet-session-history-loading
Sep 23, 2026
Merged

bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-pet-session-history-loading

Conversation

@bobleer

@bobleer bobleer commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix pet bubble navigation leaving an uncached historical session permanently loading. Programmatic opens restore history before selecting the session, but the active-only hydration guard discarded the returned records while the session was still inactive. Allow these restores to commit before activation and upgrade any weaker in-flight preload.

Type and Areas

Type: Bug fix

Areas: Web UI, desktop pet session navigation, historical session hydration

Motivation / Impact

Clicking a pet bubble for an inactive, uncached local session could select a metadata-only session after its history request had already settled, with no remaining request to populate the chat. The session now receives its restored messages before selection. Existing activate-first navigation retains its active-only hydration guard.

Verification

  • Added a regression at the real SessionModule/FlowChatStore boundary. Confirmed the original code fails with empty turns and metadata-only; the fix passes both direct-open and concurrent-preload cases.
  • Passed 268 tests with:
    pnpm --dir src/web-ui run test:run src/flow_chat/store/FlowChatStore.test.ts src/flow_chat/services/flow-chat-manager/SessionModule.test.ts src/app/services/openAgentCompanionSession.test.ts src/app/services/sessionSceneLifecycle.test.ts src/flow_chat/services/sessionActivation.test.ts src/flow_chat/services/storeSync.test.ts src/app/stores/sceneStore.test.ts
  • Passed pnpm run check:web and git diff --check.
  • No desktop manual click test or live remote end-to-end test was performed. Existing mocked coverage exercises remote workspace, Peer Device surface isolation, and Dispatch ownership; Remote Control was not exercised end to end.

Reviewer Notes

AI-assisted implementation and review. Validation consists of automated tests and frontend checks; desktop and remote manual validation remains outstanding. No persisted schema, protocol, user-facing copy, or styling changes.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable (not applicable).

@bobleer
bobleer merged commit 49d236c into GCWing:main Sep 23, 2026
9 checks passed
@bobleer
bobleer deleted the bob/fix-pet-session-history-loading branch September 24, 2026 08:19
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.

1 participant