Repository navigation
feat(app-shell): favourite conversations open the assistant drawer in place from the sidebar - #38005
Conversation
… place from the sidebar A favourite of type `conversation` stores the conversation id and agent; its sidebar row opens the drawer on it, follows its server label, and is drawn unavailable when the server answers it is gone or not this user's. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibxdwshRvTk3qXc7A6A
…bar row Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibxdwshRvTk3qXc7A6A
… in view Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibxdwshRvTk3qXc7A6A
… draws Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibxdwshRvTk3qXc7A6A
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i L1-c, the seat's L1 thread · 2026-11-27T16:47Z 席位核对 — L1 @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Landing · 2026-11-27T16:49Z · zone
|
Main's UnifiedSidebar (#38005) imports resolveAiApiBase from hooks/aiApiBase.js, the module this PR had folded back into useAiSurface.ts. The module stays, for the reason it was split out: a reader that needs only the URL must not import the surface hook's module, which the layout tests mock without resolveAiApiBase. useAiSurface.ts imports and re-exports it as main does; only the module's doc comment changes (its first reader, useAskAiHandler, leaves with ask_ai). Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Requested by Tesla · project thread
Fixes #37863
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Implements card #37863 as claimed (claim 7221246375), including the drawer header's ☆. C4 (#37970, the header row) merged at
4af32b99; this branch mergedorigin/mainwith it as a real merge (8aa37202, no conflict, no rebase), then added the ☆ (33463930) and settled its test on the header (3141f4db).FavoriteItem.type: 'conversation', idconversation:ID, new optional fieldsconversationIdandagent).hrefis the conversation's/ai…address (aiAddressOf). It is a content favourite, so it counts against the cap of 20 (capByBucketunchanged).conversationFavoriteItem(newlayout/conversationFavorites.ts) builds the entry the ☆ will toggle; the agent is stored as its route name (agentRouteName).UnifiedSidebar's Favorites rows, a conversation favourite's link click callsuseChatDockControl().open({ agent, conversationId }), the target a history row opens (ui ADR-0057 A5, row 5), and closes the phone sidebar. The row stays a link: the address is followed with no drawer host, on the app's AI inquiry page (askPageActive, A4, whereopenrefuses a non-handoff target; seat ruling in the claim), and for a modified click (new tab).useUnavailableConversationFavoritesreads each shown conversation favourite once per mount through the newreadConversationRow(useConversationList.ts, the list's ownnormalize). A label that moved (server title, else latest user message, as the history row reads) is written back withrefreshLabel. A 404 or 403 marks the row unavailable for that mount only (never stored): struck through,aria-disabled, a screen-reader suffix from the newsidebar.conversationUnavailablekey, and a click opens nothing; its ⋯ menu still removes it. Any other failure (5xx, network) marks nothing.33463930).ChatDockConversationActionsgainsagent(the route name, reported byChatDockConversation). Once a thread exists (after the first send) the ☆ sits before + in the rail, the full window and the phone sheet; nothing is drawn before the first send. A click togglesconversationFavoriteItem(label: the header title, or 「New conversation」 while it loads); while favourited it isaria-pressed, named bycommon.addToFavorites/common.removeFromFavorites. A header title that changes while favourited is written back withrefreshLabel(through a ref, ui AGENTS chore: version packages #10).CONTENT_KIND_ICON.conversation = 'message-circle'.sidebar.conversationUnavailablein all 11 packs (zh-Hant generated bygen:zh-hant).Not in this card (seat ruling in the claim): restoring the record focus chip from the conversation's
metadatais C5's (#37861); a favourite opens the same target a history row does.Tests
UnifiedSidebar.conversationFavorites-37863.test.tsx(15 cases; realFavoritesProvider,NavigationRenderer,SidebarItemMenu; a stand-in drawer handle; stubbedfetch): row and glyph; click opens the drawer in place and the address does not move; a backend agent name stores the route name; modified clicks are left to the link; no host and the A4 page follow the address; other favourites keep their link; server title and latest-message labels written back; 404 and 403 drawn unavailable and inert, store untouched; removal from ⋯; 500 and network failure mark nothing; the cap of 20 rolls the oldest content favourite off when a conversation is added.scripts/ablation-replace.mjs, restored toHEADeach time: the row'sonClickremoved → 6 of 15 red;readConversationRowreading 404/403 as a failure → 3 of 15 red; the label write-back removed → 2 of 15 red.Readings
f095b9bd: 15/15 passed.f095b9bd: every app-shell test file naming UnifiedSidebar, FavoritesProvider, useFavorites, contentItemTile/ContentItemTile, useConversationList, SortableFavoriteRows or SidebarItemMenu (122 files) plus all ofui/packages/i18n/src/__tests__(110 files): 230 files passed, 2798 tests passed, 13 skipped.pnpm --filter @object-ui/app-shell run type-check(src andtsconfig.test.json): exit 0, afterturbo build --filter='@object-ui/app-shell^...'.overlap-check.mjsatf095b9bd: clean against main and open PRs fix(spec,i18n): list the cloud ask_which tool and label it in every locale #37989, feat(app-shell): Ask AI opens a new conversation after the user's own close, and the drawer header names the conversation #37970 (auto-found) and feat(spec)!: retire the ask_ai action type (ADR-0160 D7) #37924, feat(app-shell): Ask AI opens a new conversation after the user's own close, and the drawer header names the conversation #37970, feat(runtime): createInProcessAuthoringRegistry, the light authoring door in process as the signed-in user #37968 (named).dispatch-gates.mjs --commands): see the report comment; CI runs the full farm.3141f4db, after the main merge and the ☆: the new header ☆ test file 8/8, green on three runs in a row; ablation (restored toHEAD): the ☆ removed → 6 of 8 red, the label follow removed → 2 of 8 red; the related 256 test files green; app-shell type-check exit 0; derived local gates 41/41 exit 0 (merge base4af32b99). Report delta: 7223592078.Acceptance notes
ui/packages/app-shell/README.md, user-scoped state section) gained one paragraph per uiAGENTS.mdcommandment ✨ Set up Copilot instructions #2; outside the claim's first file list, reported to the seat.content/docs/frontend/**has no page on favourites; nothing to update there.Verification
Read first, by risk:
ui/packages/app-shell/src/layout/UnifiedSidebar.tsx:openConversationFavoriteand the row's link props.ui/packages/app-shell/src/layout/conversationFavorites.ts:useUnavailableConversationFavorites.ui/packages/app-shell/src/hooks/useConversationList.ts:readConversationRow.Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/UnifiedSidebar.conversationFavorites-37863.test.tsx. Expected: 15 passed.Generated by Claude Code