You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 76eadf8
Browse filesBrowse the repository at this point in the historyBrowse files
* feat(console-ai): bind-on-create — unbound build conversation re-keys to app:X:build when it mints X (ADR-0057 A1.b)
The magic flow (bare /ai/build) keys its conversation product-only, while
Edit-with-AI keys app:X:build — so the thread that BUILT app X and the
thread Edit-with-AI later opens for X were different conversations and the
build history was stranded (Amendment A1 defect 3, reproduced live).
- useChatConversation.rekeyScope(newScope): re-keys the CURRENT conversation
(cache write + synchronous conversationScope flip) so the #2450 scope gate
holds through the host's ?package= navigate — no pane remount mid-stream.
- Legacy-scope fallback read (legacyScope/adoptLegacy): an app-scoped visit
whose key was never cached adopts the product-only thread iff the host's
predicate confirms the thread is bound to that app (pre-A1.b migration).
Failing fetch degrades to a plain miss; the legacy key is never cleared
(dock/FAB keep resolving through it).
- AiChatPage: ChatPane reports the binding (post-URL-mirror only — single-
navigator rule); the page re-keys and puts ?package= on the URL. Reload
without ?package= self-heals from hydrated history.
- A1.a chip is now a switcher: apps (by package) → their Edit-with-AI
thread; New app → ?new=1 fresh unbound draft.
Client-side only: conversation scope keying is a per-(user,scope)
localStorage cache; the server needs no change.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* docs(adr-0057): mark A1.b shipped (#2466) with the two keying decisions
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(console-ai): defer bind-on-create to turn-idle; never wipe hydrated history on a same-conversation empty re-read
Live verification caught a race the design review missed: re-keying the
moment the binding draft lands MID-STREAM lets the scope-change re-resolve
read the conversation before the server persists the turn (persistence is
at turn COMPLETION), and a reconcile can then replace the live thread with
that empty not-yet-persisted history — the pane blanked until reload.
- ChatPane's bind effect now also waits for isLoading to drop: the re-key
runs against a fully persisted turn (and 'bind at build completion' is
truer to the named-on-first-save idiom anyway). Re-verified live: the
thread stays visible through the bind, URL gains ?package=, and the
Edit-with-AI entry resumes the same conversation with history.
- useChatConversation's activeId branch no longer overwrites non-empty
hydrated messages with an EMPTY read of the SAME conversation (a later
remount would hydrate from that and render a blank thread); an empty
read of a DIFFERENT conversation still replaces as before. Unit-tested.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments