Repository navigation
feat(app-shell): Ask AI opens a new conversation after the user's own close, and the drawer header names the conversation - #37970
Conversation
… A5 (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzv3KSUSav5J2uw97s
…e approvals on the bus Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzv3KSUSav5J2uw97s
…, not during it Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzv3KSUSav5J2uw97s
…rite-approval pin Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzv3KSUSav5J2uw97s
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i L1-c, the seat's L1 thread · 2026-11-27T14:06Z 席位核对 — L1 @
|
…plan Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzv3KSUSav5J2uw97s
… pin Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzv3KSUSav5J2uw97s
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i L1-c, the seat's L1 thread · 2026-11-27T14:35Z 席位核对 — L1 delta @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Seat reading of the red
|
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i L1-c, the seat's L1 thread · 2026-11-27T14:51Z 席位核对 — L1 @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i L1-c, the seat's L1 thread · 2026-11-27T15:31Z 席位核对 — L1 delta @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Landing · 2026-11-27T15:33Z · zone
|
…-ctejy8 Brings in #37970 (C4), which also changes ui/packages/app-shell/src/console/ai/ChatPane.tsx; auto-merged with no conflict. Claude-Session: https://claude.ai/code/session_01L9qibyUpyff7pHe7vkFgA8 Co-authored-by: Claude <noreply@anthropic.com>
… place from the sidebar (objectstack-ai#38005) repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoHaCR5qtPgmwG5g4Vd9AhVn)_ Fixes objectstack-ai#37863 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:收藏过的 AI 对话出现在侧边栏「收藏」里,点一下就在当前页面右侧的助手抽屉里打开这段对话,页面不跳走;对话已被删除时,这一行会划掉、标「该对话已不可用」,仍可从菜单里移除。对话开始后(发出第一条消息后),抽屉顶部会出现 ☆ 收藏按钮,在侧栏、全屏和手机抽屉里都有;点一下收藏或取消。 - 为什么做:「问 AI」入口改造专题的收藏会话卡,让常回看的对话能一键找回,不用翻历史。 - 出错会怎样:最坏是点收藏没有在抽屉里打开,或误把可用的对话标成不可用;收藏数据本身不会丢,直接撤回这次改动即恢复原样。 - 要你做什么:无。 ## What changes Implements card objectstack-ai#37863 as claimed (claim 7221246375), including the drawer header's ☆. C4 (objectstack-ai#37970, the header row) merged at `4af32b99`; this branch merged `origin/main` with it as a real merge (`8aa37202`, no conflict, no rebase), then added the ☆ (`33463930`) and settled its test on the header (`3141f4db`). 1. **A conversation favourite** (`FavoriteItem.type: 'conversation'`, id `conversation:ID`, new optional fields `conversationId` and `agent`). `href` is the conversation's `/ai…` address (`aiAddressOf`). It is a content favourite, so it counts against the cap of 20 (`capByBucket` unchanged). `conversationFavoriteItem` (new `layout/conversationFavorites.ts`) builds the entry the ☆ will toggle; the agent is stored as its route name (`agentRouteName`). 2. **The sidebar row opens the drawer in place.** In `UnifiedSidebar`'s Favorites rows, a conversation favourite's link click calls `useChatDockControl().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, where `open` refuses a non-handoff target; seat ruling in the claim), and for a modified click (new tab). 3. **The label follows the conversation; a gone one is marked.** `useUnavailableConversationFavorites` reads each shown conversation favourite once per mount through the new `readConversationRow` (`useConversationList.ts`, the list's own `normalize`). A label that moved (server title, else latest user message, as the history row reads) is written back with `refreshLabel`. A 404 or 403 marks the row unavailable for that mount only (never stored): struck through, `aria-disabled`, a screen-reader suffix from the new `sidebar.conversationUnavailable` key, and a click opens nothing; its ⋯ menu still removes it. Any other failure (5xx, network) marks nothing. 4. **The drawer header's ☆** (`33463930`). `ChatDockConversationActions` gains `agent` (the route name, reported by `ChatDockConversation`). 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 toggles `conversationFavoriteItem` (label: the header title, or 「New conversation」 while it loads); while favourited it is `aria-pressed`, named by `common.addToFavorites` / `common.removeFromFavorites`. A header title that changes while favourited is written back with `refreshLabel` (through a ref, ui AGENTS objectstack-ai#10). 5. **Icon.** `CONTENT_KIND_ICON.conversation = 'message-circle'`. 6. **i18n.** `sidebar.conversationUnavailable` in all 11 packs (zh-Hant generated by `gen:zh-hant`). Not in this card (seat ruling in the claim): restoring the record focus chip from the conversation's `metadata` is C5's (objectstack-ai#37861); a favourite opens the same target a history row does. ## Tests - New `UnifiedSidebar.conversationFavorites-37863.test.tsx` (15 cases; real `FavoritesProvider`, `NavigationRenderer`, `SidebarItemMenu`; a stand-in drawer handle; stubbed `fetch`): 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. - Ablation, on disk with `scripts/ablation-replace.mjs`, restored to `HEAD` each time: the row's `onClick` removed → 6 of 15 red; `readConversationRow` reading 404/403 as a failure → 3 of 15 red; the label write-back removed → 2 of 15 red. <details><summary>Readings</summary> - New file at `f095b9bd`: 15/15 passed. - Related suite at `f095b9bd`: every app-shell test file naming UnifiedSidebar, FavoritesProvider, useFavorites, contentItemTile/ContentItemTile, useConversationList, SortableFavoriteRows or SidebarItemMenu (122 files) plus all of `ui/packages/i18n/src/__tests__` (110 files): 230 files passed, 2798 tests passed, 13 skipped. - `pnpm --filter @object-ui/app-shell run type-check` (src and `tsconfig.test.json`): exit 0, after `turbo build --filter='@object-ui/app-shell^...'`. - `overlap-check.mjs` at `f095b9bd`: clean against main and open PRs objectstack-ai#37989, objectstack-ai#37970 (auto-found) and objectstack-ai#37924, objectstack-ai#37970, objectstack-ai#37968 (named). - Derived local gates (`dispatch-gates.mjs --commands`): see the report comment; CI runs the full farm. - At `3141f4db`, after the main merge and the ☆: the new header ☆ test file 8/8, green on three runs in a row; ablation (restored to `HEAD`): 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 base `4af32b99`). Report delta: 7223592078. </details> ## Acceptance notes - **Unavailable is read once per mount.** A conversation deleted from history while the sidebar stays mounted is marked on the next mount, not at once. Clicking it before then opens the drawer on a conversation the chat cannot load. - **Reads.** Up to 8 conversation reads per sidebar mount (the shown rows), one per favourite, none repeated within the mount. - **README** (`ui/packages/app-shell/README.md`, user-scoped state section) gained one paragraph per ui `AGENTS.md` commandment objectstack-ai#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: 1. `ui/packages/app-shell/src/layout/UnifiedSidebar.tsx`: `openConversationFavorite` and the row's link props. 2. `ui/packages/app-shell/src/layout/conversationFavorites.ts`: `useUnavailableConversationFavorites`. 3. `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](https://claude.ai/code/session_01L9qibxdwshRvTk3qXc7A6A)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…en the AI ends its turn on a question (objectstack-ai#38004) <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoA8HBADNrd6onRU5XaeyY7T)_ Refs objectstack-ai#37874 (items 1-8) Clause-②: yes (widening) — widened: `parseAskQuestionEnvelope` accepts a legacy `ask_which` reading up to 60 characters and `ASK_QUESTION_LIMITS` gains `legacyReadingMaxLength`; `ChatbotEnhancedProps` gains the optional `conversationId`; plugin-chatbot exports `QUESTION_SKIP_STORAGE_PREFIX`; `QuestionCardQuestion` / `QuestionCardOption` keep their names and are now the spec envelope types. Metadata-protocol: none ## 维护者速读 - 控制台 AI 对话里,AI 以一个提问结束回合时,输入框的位置换成提问卡,点一个选项就作为下一条消息发出;以前用户只能看纯文字列表再自己打字。 - 属于「问 AI」专题:让 AI 的澄清提问能一键回答,也让现有的「你指的是哪个」提问(选项较长的那类)能用上卡片。 - 用户在对话里会碰到;出错时最坏是卡片不出现、回到原来的纯文字提问加输入框,草稿不会丢,回滚即恢复原样。 - 无。 ## What changes **Spec (`packages/spec/src/ai/ask-question.zod.ts`).** Per the E1 route on the card (carrier note 7219023636), a legacy `ask_which` reading has its own limit, `ASK_QUESTION_LIMITS.legacyReadingMaxLength = 60`, instead of the envelope's 24-character label, so most of today's `ask_which` questions read as a card. The option rules (no duplicate, no blank, at most one recommended) are now one `refineOptions` shared by the envelope and the legacy arm. A legacy result with an empty `reply` is refused, which makes the `reply` describe true for both arms (L2 N1 on Q1). The new `asked` envelope keeps its 24-character label. **Wiring (`ui/packages/plugin-chatbot`).** - `chat/pendingQuestion.ts`: `findQuestions` finds every question the conversation holds (one envelope per segment between user messages, and the segment's last shown text equals its `reply`), over both shapes a tool-ended turn arrives in: one streamed message, or the tool message plus the text message of a reloaded conversation. `findPendingQuestion` adds the conditions for the card: the stream has ended, nothing streams, not read-only, no queued typed message, the question is in the last segment, not skipped, and no undecided write approval in the same segment. - `chat/composerGate.tsx`: the composer's place, held by the card or the composer. The composer is never unmounted: it is `hidden` and `inert` while the card holds the place, so a draft, attachments and the uncontrolled textarea survive, and focus that was in it returns to it. - `ChatbotEnhanced.tsx`: one click sends the option label through `onSendMessage`. The card stays mounted while closed, so a refused send that rolls the bubble back reopens it with the choice still made. Skip writes the question's `toolCallId` under `objectstack:ai-chat-question-skip:` plus the new optional `conversationId` prop (`chat/questionSkip.ts`, every storage access in try/catch). The thread draws the question from its envelope (`chat/questionMessage.tsx`): pending shows the question alone, past shows a collapsed "AI asks: QUESTION" that expands to its options. Regenerate is hidden on a pending question; Copy still copies the full reply. - `QuestionCard.tsx`: per the Q2a alias note, `QuestionCardQuestion` and `QuestionCardOption` keep their exported names and are aliased to `AskQuestionParsed` / `AskQuestionOptionParsed`; long labels wrap. **Console (`ui/packages/app-shell`).** `ChatPane` passes its conversation id, and `purgeChatCaches` clears the skip prefix on sign-out with the rest of the chat cache. **Checklist and docs.** One platform-checklist item, `ai.chat-question-card`. The plugin-chatbot docs page and the package README gain a paragraph on the card. The README is outside the claimed file surface (reported to the seat). Regenerated: the `ask-question` spec reference and the strictness-ledger AI counts. Files to read first, by risk: 1. `ui/packages/plugin-chatbot/src/chat/pendingQuestion.ts`: the segment rule and the pending conditions decide when the card replaces the composer. 2. `ui/packages/plugin-chatbot/src/ChatbotEnhanced.tsx`: the `answeredQuestion` state that keeps the card after a send, and the gate around `PromptInput`. 3. `packages/spec/src/ai/ask-question.zod.ts`: the legacy arm and its 60-character limit. ## Tests - `packages/spec/src/ai/ask-question.test.ts`: the legacy limit at 60 and 61 characters, the envelope still at 24, trimmed duplicates, blank reading, long question, empty reply. - `ui/packages/plugin-chatbot/src/__tests__/pendingQuestion-37874.test.ts`: both turn shapes, the envelope and the legacy result, and every condition that holds the card back (streaming, other final text, a later message, two questions in one batch, a user or HITL message after it, a queued message, an undecided approval, a skip, read-only, a failed tool). - `ui/packages/plugin-chatbot/src/__tests__/ChatbotEnhanced.questionCard-37874.test.tsx`: through the rendered component, the gate (composer mounted, hidden, inert), a draft surviving the card and a skip, a one-click answer, a refused send reopening the card with the choice made, a queued message winning over the card, read-only, skip persistence per conversation, the pending and past message, Regenerate hidden and Copy kept. - `ui/packages/app-shell/src/hooks/__tests__/useChatConversation.test.tsx`: sign-out clears the skip key. ## Acceptance notes - Items 1-8 land here. Item 9 (the brightrule smoke after release) is the maintainer's, so this PR refers to the card and does not close it; the seat's `Release:` on landing names what is left. - `ui/packages/app-shell/src/console/ai/ChatPane.tsx` is also touched by objectstack-ai#37970 (one added prop here). Whichever lands second merges main before queueing. - No new i18n keys: the card reuses `chatbot.questionCard.*`, so no locale pack is touched. Two-minute check: `pnpm --dir ui exec vitest run packages/plugin-chatbot/src/__tests__/ChatbotEnhanced.questionCard-37874.test.tsx`, expect 16 passing tests. ## Verification Head `19d67fd4b3`, branched from `57ab08760c` (origin/main). - Derived gates: `dispatch-gates --ran` reports 113 derived, 113 run, 0 NOT-MEASURED, every line with its exit code, all exit 0. Two gates first answered exit 3 (prerequisite not built: `check:skill-examples` wanted `client-react` dist, `check:dual-build-cjs-loads` wanted built packages); after `pnpm --filter @objectstack/client-react build` and the battery's own package build, both re-ran under the verify lock and exited 0. - Unit: spec `ask-question.test.ts` 19/19; UI vitest over plugin-chatbot, the app-shell `useChatConversation` test and `console/ai`: 111 files, 1006 tests passed. - Type-check and build: plugin-chatbot type-check and build, app-shell type-check, exit 0. `check:generated` clean after `--fix` regenerated the two spec artifacts. - Overlap: `overlap-check --pr=37970` VERDICT clean; the one shared file is `ChatPane.tsx`. <details><summary>Ablations (one-off, restored; `git diff HEAD` empty after each)</summary> - `pendingQuestion.ts`: drop the `queued` condition. 2 tests turn red (the unit "typed message is queued" case and the component "message queued during the turn" case), 31 pass. - `composerGate.tsx`: `inert={held}` to `inert={false}`. 1 test turns red (the composer is no longer inert), 15 pass. - `ask-question.zod.ts`: a legacy reading held to the 24-character label instead of 60. 1 test turns red ("holds a reading to its own limit"), 18 pass. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibyUpyff7pHe7vkFgA8)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibyUpyff7pHe7vkFgA8 --------- Co-authored-by: Claude <noreply@anthropic.com>
…ull-window drawer and the narrow drawer (objectstack-ai#38011) repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoWX4NJPn7oNkuSXSSxPk75W)_ Fixes objectstack-ai#37862 Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:AI 首页、全屏的助手窗口和窄的助手抽屉,新会话发第一句话前都显示同一个空会话界面:按时段问候并叫出用户名字、一句可以问什么、推荐问题和「最近会话」(带标题)。记录页上的推荐问题点了是填进输入框,列表、仪表盘、报表页上的点了直接发送。 - 为什么做:「问 AI」入口改造专题的第七张卡,把三处各画各的空会话统一成一个组件。 - 出错会怎样:最坏是空会话界面排版或推荐问题不对,用户照常自己打字提问,已有会话和数据不受影响;直接撤回这次改动即恢复原样。 - 要你做什么:无。 ## What changes One component, `EmptyConversation` (`console/ai/EmptyConversation.tsx`), with its rules in `console/ai/emptyConversationModel.ts`. Seat rulings on the claim (7221234060): the AI home uses the entry's declared `title` when it has one, else the greeting; the drawer always greets. 1. **The layout.** Heading, a line under it, a composer slot, the suggestions, and 「最近会话」 with each conversation's title (the history row's label) and when it was last active. Two sizes: `large` on the AI home and in the full-window drawer, `compact` in the rail and the phone sheet (`ChatDockConversation` maps `presentation: 'full'` to large, `rail`/`sheet` to compact). 2. **The greeting.** Time of day and the user's name, with the keys Home already greets with (`home.greeting*`, `home.greetingSeparator`, `home.greetingEnd`): no new greeting strings. 3. **Suggestions carry a mode.** `send` sends the text as the first message; `fill` puts it in the composer, focused, caret at the end, and sends nothing. The AI home's own suggestions (from the entry's `params`) send, as before. In the drawer, the `ask` agent's suggestions follow the page in view, read off the surface the console already sends the agent (`ChatPane`'s `surfaceContext`): a record (its page, or the list's record drawer) gets "Summarize this record" and "What is related to this record?", which fill; an object list, a dashboard and a report get two questions each, which send. Any other page, and any other agent, keeps the agent's starter suggestions, which send. 4. **「最近会话」.** On the AI home: unchanged rule (this app's page conversations, five, opened on the page through `?c=`), now drawn by the shared `RecentConversationList`. In the drawer: the drawer agent's threads (alias-aware, as the history scopes them), not the AI home's own (`metadata.activePackageId`), three in compact and five in large, opened in the drawer through the history's own `openConversation`. A list that has not answered, or failed, draws nothing; an empty list draws no section in the drawer. 5. **`ChatbotEnhanced.renderEmptyState`** (`@object-ui/plugin-chatbot`): a host's empty conversation drawn in place of the built-in one while there is no message, given `{ send, fill }`. `fill` writes through the textarea prototype's value setter so React's `onChange` (the host's `onInputChange`) runs. Without the prop nothing changes. 6. **`ChatPane.emptyConversation`**: the drawer opts in; `AiChatPage` and the AI home's conversation state do not, so their pane keeps the built-in empty state. 7. **Strings**: `console.ai.suggestionsLabel` (the suggestions group's accessible name) and `console.ai.suggestions.page.{record,list,dashboard,report}.*` (eight), in the ten hand-written packs; `zh-Hant` regenerated. ## Tests - `emptyConversationModel-37862.test.ts`: greeting hour boundaries, the name fallback, the page kind off each surface shape, the drawer's suggestions and modes per page kind and agent, the AI home's suggestions. - `ChatDock.emptyConversation-37862.test.tsx` (real `ChatDockConversation`, `ChatPane`, `ChatbotEnhanced` and conversation hooks over a `fetch` stub): compact in rail and sheet, large in full; the greeting names the user; on a record a suggestion fills the composer and creates no conversation; on a list a suggestion sends and creates one; 「最近会话」 lists the ask threads only, newest three, and a click opens one in the drawer; no section when there are none. - `ChatbotEnhanced.renderEmptyState-37862.test.tsx`: the host state replaces the built-in one (control without it), is gone once there is a message, `send` sends, `fill` fills, focuses, places the caret, fires `onInputChange` and sends nothing, and replaces what the box held. - `AppAskPage-37788.test.tsx`: test ids moved to the shared component's; the fallback case now expects the greeting where it expected "Ask your data". Ablation (on disk, restored from the commit), each red exactly one case: fill mapped to send in `ChatPane` → the record case; size always compact → the size case; `fill` through the plain `.value` setter → the `onInputChange` case; the drawer recent without the `activePackageId` filter → the 「最近会话」 case. <details><summary>Readings</summary> - Related suite at `bf9d5b8f` (every ui test under `app-shell/src/console/ai/`, `app-shell/src/layout/`, `plugin-chatbot/src/`): 279 files / 2428 tests passed. After the last source change (`b41c6ea0`): the three C7 files plus `AppAskPage-37788`, 29 passed. - `packages/i18n/` tests: 108 files, 1869 passed, 13 skipped. `app-shell/src/__tests__/` (product-neutral ratchet among them) and the clickable-non-control census: 27 files / 480 passed. - `pnpm --filter @object-ui/app-shell run type-check` (src and `tsconfig.test.json`) and `pnpm --filter @object-ui/plugin-chatbot run type-check`: exit 0, after building `@object-ui/app-shell^...`. - eslint on the changed files: 0 errors; no new warning on the changed lines. - `dispatch-gates --commands` at `b41c6ea0`: 41 derived families run, each exit 0; `--ran` reconciliation: 41 derived, 41 run, 0 NOT-MEASURED. - `overlap-check.mjs --pr=37970,37924,37989,38004,38005` against `origin/main` `30a8047b`: all merge cleanly. - At `b25938f9`, after the main merge and the F2 change: `@object-ui/app-shell^...` rebuilt 72/72; spec `check:generated` 14 of 14 up to date; app-shell and plugin-chatbot type-check exit 0; vitest over `console/ai`, `layout`, app-shell `__tests__`, plugin-chatbot and i18n: 417 files, 4818 passed, 13 skipped; `dispatch-gates --commands` re-derived the same 41 families, each exit 0, `--ran` 41 run, 0 NOT-MEASURED; `overlap-check.mjs --pr=37924,37989,38004,38005` against `origin/main` `126acf6b`: all merge cleanly. </details> ## Acceptance notes - **The drawer's composer stays docked** under the conversation, not centred in the empty state: it carries the page chip, C5's focus row and queued sends. The maintainer accepted this on 11-27 (「感觉在底部也没问题,不用继续了」, recorded on objectstack-ai#37862 as 7222646032), so this PR closes objectstack-ai#37862 and no follow-up card is filed. The shared component takes the AI home's large question box in its `composer` slot and draws none in the drawer. - **File surface.** One file outside the claim: `plugin-chatbot/src/chat/types.ts`, where `ChatbotEnhancedProps` declares the new `renderEmptyState` prop. Reported to the seat with this PR. - **Greeting bucket rule** is a copy of Home's `pickGreetingKey` (`console/home/HomePage.tsx`), outside this card's surface; Home still uses its own; the two agree today. Noted, not filed (carrier: none): not one of the three filing classes. - **Browser check: NOT MEASURED.** The drawer is inert on an OSS backend (no agent catalog), so a local Console shows neither state; the layout is pinned by the DOM tests above. - **C4 (objectstack-ai#37970)** merged at `4af32b99` (15:55Z). This branch merged `origin/main` with it as a real merge (`775b0594`, no conflict, no rebase); `b25938f9` then takes L2's F2 nit (the drawer's recent-conversation fetch size is the named `DRAWER_RECENT_FETCH_LIMIT`, equal to the AI home's `ASK_RECENT_FETCH_LIMIT`, 50). ## Verification Read first, by risk: 1. `ui/packages/plugin-chatbot/src/ChatbotEnhanced.tsx`: `fillComposer` and the `renderEmptyState` branch. 2. `ui/packages/app-shell/src/console/ai/ChatPane.tsx`: `renderEmptyState` (the mode mapping) and `emptySuggestions`. 3. `ui/packages/app-shell/src/console/ai/emptyConversationModel.ts`: `pageKindOfSurface`, `drawerSuggestions`, `selectDrawerRecent`. Two-minute check: `pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/ChatDock.emptyConversation-37862.test.tsx`. Expected: 6 passed. --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibwARdVa47nQacLfco1)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…ut of step with main (week of 2026-11-25) (objectstack-ai#38289) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDypKu7B9nwbu5WuV7AEio8)_ Fixes objectstack-ai#37245 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;只在十份设计记录里补了带日期的说明,写明主线现在实际怎么做,原有的决定文字一个字没动。 - 为什么做:属于「每周设计记录修订」滚动清单(11 月 25 日这一周);清单每一行指出一处「记录写的和主线不一致」,这次一并补齐,免得照着记录干活的人被过时说法带偏。 - 出错会怎样:最坏是某条补充说明写得不准,读这些设计记录的人会碰到;纯文档、只增不删,可以直接撤回,不影响任何功能。 - 要你做什么:请审这些补充说明并亲手合并(设计记录须由你本人合)。 ## What changes Ten ADR files gain notes dated 2026-11-28. Every diff line is an addition: 239 lines added, 0 removed. No original decision text is rewritten, and no decision changes. Each note follows the note convention its own record already uses. Each row's "what is true now" was read against the code on `main` before it was written. Where a row was wrong or had gone stale, the note says what `main` does, and the table and the list under it say so. | Row (comment id on the card) | ADR and section | Result | |:---|:---|:---| | Card body row (from objectstack-ai#37238) | ADR-0146, the 2026-11-24 amendment, "32 registered types" | **Landed. Row stale.** The row asks for 33; the registry holds 35 entries on `main`. The note states no count and points at the registry and at ADR-0084's table. | | 7155511307, nit 1 | ADR-0160 D1, the door's page cap sentence | **Landed. Row stale.** The row says the door has no page cap. PR objectstack-ai#37354 added one. The note says what `main` does: the list is cut one row under the door's cap, not at it. | | 7155511307, nit 2 | ADR-0160 D1, "only contains braces" | **Landed** as the row asks. | | 7155511307, nit 3 | ADR-0160 D3, the link-field sentence | **Landed as a note that the sentence stands.** | | 7161785832 | ADR-0158, Open items 9 and 12 | **Landed.** | | 7178404228, anchor half | ADR-0066, line 146 | **No edit.** PR objectstack-ai#37621 already landed it (record 7198334624). | | 7178404228, end-state half, with 7201928772 | ADR-0066 D2 ⑧ | **Landed.** Its prerequisite, PR objectstack-ai#37371, is merged. The proposed text is tightened in two places, listed below. | | 7179515770 | ADR-0158 U3, U6, L4, Open item 10 | **Landed.** | | 7184833647 | ADR-0159, Context, "One name already taken" (line 109) | **Landed as a note. The anchor line is untouched.** This is not a no-edit row: the anchor resolves, onto the opposite meaning. See below. | | 7187445064 | ADR-0158 L1, L2, Open items 6, 8, 10 and 11, and a new Open item 13 | **Landed.** | | 7195437501 | ADR-0010, the amendment note of 2026-11-24 | **Landed**, with one arm `main` has gained since the row was written. See below. | | 7212321297, first row | ADR-0067 D3 | **Landed. Row wording wrong.** The note carries the revert rule that the `form` type brought. See below. | | 7212321297, second row | ADR-0160, implementation split, row 7's bullet | **Landed.** The row places the stale path near line 425; it is near line 491. | | 7213085888 | ADR-0048 §3.5 | **Landed.** The row's ready text, dated 2026-11-28, with symbol anchors where it had line numbers. | | 7215202653, corrected by 7215223685, with 7224476684 | ADR-0150 D3, the note of 2026-11-26 | **Landed.** Item 2 of the first row said the two doors were still open. The later row supersedes it: PR objectstack-ai#37948 merged, and both doors now refuse. | | 7217585102 | ui ADR-0057, A2 and A3 | **Landed. Row stale on one line.** The plan-marker line is written as `main` is today, after PR objectstack-ai#37970, and not only as it was after PR objectstack-ai#37720. | Comments that are not rows: 7186949648 (triage note), 7196224618 (a one-row claim), 7196910014 (its report), 7198334624 (its landing record) and 7237786310 (this claim). **No row is held.** Every prerequisite is merged on `main`: PRs objectstack-ai#37219, objectstack-ai#37240, objectstack-ai#37268, objectstack-ai#37354, objectstack-ai#37366 (which carried objectstack-ai#37422), objectstack-ai#37371, objectstack-ai#37389, objectstack-ai#37423, objectstack-ai#37449, objectstack-ai#37640, objectstack-ai#37720, objectstack-ai#37818, objectstack-ai#37931, objectstack-ai#37948, objectstack-ai#37970, objectstack-ai#37065, objectstack-ai#36138 and objectstack-ai#37021. The card has 19 comments as of this pull request; a row added after comment 7237786310 is not in it. ### Where a note differs from its row - **ADR-0146.** The row offers two forms, "give the count" or "point to ADR-0084's table". The note takes the second. A count written today would already be the third reading (32, then 33, now 35). - **ADR-0160 D1, the page cap.** The row's premise was true when it was written and is not now. `RecordContextDoor.pageCap` exists, and both doors answer it. The note records the one-row difference between the amendment's words and the code: a list whose cut plus its probe row would pass the cap is cut one row under the cap. - **ADR-0160 D3, the link field.** The note leaves the wording alone. - **ADR-0066 D2 ⑧.** Two changes to the proposed text. The note says in words that `viewAllFieldsReadVote` replaced `superuserFieldVote`, and anchors only the function that exists. And it does not say that nothing re-opens a lock across sets: another set's `viewAllFields` still makes a hidden field readable, and another set's field row with `editable: true` still grants the edit, because field grants union without deny. - **ADR-0159, line 109.** PR objectstack-ai#37422 was merged into PR objectstack-ai#37366's branch, so the anchor `view.zod.ts#defineForm` resolves and the gate is green on it. It now resolves onto the `form` type's factory, while the paragraph describes the Studio helper, which is `defineMetadataForm` today. The paragraph is Context and describes the tree before the ruling was carried out, so the note leaves it as written and states both names. - **ADR-0010.** The row covers the three restore doors of PR objectstack-ai#37423. The same rule has since gained a second refusal, from PR objectstack-ai#37640: a restore that would write a version the platform registered into a package's row. The note has one sentence on it. That sentence goes beyond the row; cut it if the note should carry the row alone. - **ADR-0067 D3.** The row asks for a note "naming `form` as a translated metadata type". D3 is about undo granularity and has no such notion. The contract reviews of PR objectstack-ai#37422 sent one fact to this record: a `form` item is reverted only after every `view` row its commit edited is put back, and it joins `failed[]` otherwise. The note records that. - **ADR-0048.** The row's text was dated 2026-11-24. The note is dated 2026-11-28, the day it was written into the record. - **ADR-0150.** Besides answering "Not judged yet", the note qualifies one sentence of the 2026-11-26 note that said too much: the draft discard is newly refused only over a stored package-less draft. Where it was already refused, only its sentence moved. - **ADR-0158.** Row 7179515770 points at a draft held by its seat, which this session could not read. The notes are written from the two rows and the code. Open item 13 is a new numbered item at the end of the list, carried from the display card; it is marked not built and not settled. - **ui ADR-0057.** The row asks for "what main does after objectstack-ai#37720". `main` has moved once more: since PR objectstack-ai#37970 the entry's marker stands for a write that waits for approval. The note says that, and that A5's "Not recorded yet" bullet held until that pull request merged. ## Tests Docs only. No package is touched, so no build closure and no package test is owed for the change. No tested behaviour changed, so there is no ablation. What was checked by hand, on the committed text: - Each phrase a note quotes from its ADR was compared with the base file. - Each verbatim maintainer quotation was compared, byte for byte, with its record on GitHub. - Each cited path and symbol exists on `main`. The one exception is deliberate: the ADR-0160 note names `packages/spec/src/ai/skill.form.ts` to say that no such file exists. - Upstream moved ten commits while this was written (`e42520c67b` to `e2a0e90025`). None touches an ADR file or a file a note cites. `overlap-check` answers `VERDICT clean exit 0` against `origin/main` at `e2a0e90025`, and no open pull request shares a file with this branch. The local gate set is the `dispatch-gates --commands` derivation for this change set, 27 commands, run on the final commit `c2c3345747`. Each exit code was captured before any pipe. Reconciliation: `Run reconciliation — 27 derived, 27 run, 0 NOT-MEASURED, 0 UNRUN`, all 27 with a recorded exit code. <details><summary>ADR gates on c2c3345 (all exit 0)</summary> | Command | Exit | Verdict line | |:---|:---|:---| | `pnpm check:adr-symbol-anchors` | 0 | `check-adr-symbol-anchors: 4525 anchors across 164 records resolve`, 0 line anchors survive. On the base commit the same gate reads 4478. | | `node scripts/check-adr-links.mjs` | 0 | `check-adr-links: 1268 relative link destination(s) under docs/adr/ resolve` | | `node scripts/check-adr-links.mjs --self-test` | 0 | | | `pnpm check:adr-anchors` | 0 | | | `pnpm check:adr-index` | 0 | `adr-index --report: OK — docs/adr/README.md is current, every record parsed` | | `pnpm check:doc-authoring` | 0 | | | `pnpm check:nul-bytes` | 0 | `check-nul-bytes: OK (scanned 28605 text file(s)`, no raw control bytes | | `pnpm check:closed-ceremony-text` | 0 | | | `pnpm --filter @objectstack/lint run check:doc-formula-expressions` | 0 | run after building `@objectstack/formula` and `@objectstack/lint` under the verify lock | | `pnpm --dir ui run check:new-line-citations` | 0 | `VERDICT new-cross-file-line-citations: 0 new citation(s)`. Not in the derived list; run because a ui ADR changed. | </details> <details><summary>The other derived families on c2c3345 (all exit 0)</summary> `node scripts/check-closing-keyword-parity.mjs` and its `--self-test`, `node scripts/check-comment-mask-corpus.mjs`, `node scripts/ci/plan-test-core-shards.mjs --self-test`, `pnpm check:ci-filter-parity`, `pnpm check:cross-package-test-inputs`, `pnpm check:driver-memory-census`, `pnpm check:gitlink-declared`, `pnpm check:pm-governed-merges`, `pnpm check:pm-prior-rulings`, `pnpm check:published-files`, `pnpm check:refd-timer-probe`, `pnpm check:registry-log-declared`, `pnpm check:rest-log-spy-declared`, `pnpm check:tier-file-adoption`, `pnpm check:undeclared-dep-imports`, `pnpm check:watch-hint-literal`. Before the push: `node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD` exit 0, one commit message, no card relation and no model identifier in the trailer pair. </details> <details><summary>The ui scripts test family: one prerequisite failure, then green</summary> Derived command: `pnpm --dir ui exec vitest run scripts/`, run under the verify lock with `--maxWorkers=2`. - First run: `VERDICT command-exit 1`. `Test Files 1 failed | 171 passed | 2 skipped (174)`, `Tests 1 failed | 5144 passed | 2 skipped (5147)`. The one failure was `scripts/__tests__/unit-registry-absence-collision.test.ts`, with `Failed to resolve entry for package "@objectstack/client"`. The package had no build output in the fresh worktree. That is a missing prerequisite, not a verdict on this change. - After building the `@objectstack/client` closure under the lock, the same command on the same commit: `VERDICT command-exit 0`. `Test Files 172 passed | 2 skipped (174)`, `Tests 5145 passed | 2 skipped (5147)`. </details> Not run locally: the repository test project behind `test:repo`, which CI runs on the pull request and on the merge group. Every other family CI runs is read from this pull request's check runs, not re-run here. ## Acceptance notes - **Changeset.** None, and the pull request carries `skip-changeset`. `docs/adr/**` and `ui/docs/adr/**` ship in no package: the ui tree's root is a private workspace root and `ui/docs` is under no package directory. - **Governed surface.** `docs/adr/**` lands by the maintainer's hand. This pull request stays a draft; the seat hands it over. - **The registry count.** The card row and the amendment both carry a number. The repository rule for a volatile count is to remove it and not to sync it, so the note adds none. - **Seen and left alone.** These are outside the card and are not changed here. - ADR-0084, near line 226, says `form` is not a registered type. It is about the working names of the 2026-07-01 table, and `form` is registered now. It is a candidate row for next week's card of this name. - One internal skill playbook and ui ADR-0056 still use the Studio form helper's old name. The review of PR objectstack-ai#37366 already recorded both. - Comments in the console's chat scope helper still describe the `app:PKG:build` dock key and the Studio copilot. ## Verification ### Read first 1. `docs/adr/0066-unified-authorization-model.md`, the note of 2026-11-28 under D2 ⑧. It is the highest-risk hunk: one long paragraph on authorization, and it supersedes parts of three earlier notes. Check the sentences on what another set can still re-open, and the sentence that stored sets are read with the new meaning and never rewritten. 2. `docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md`, the amendment note of 2026-11-28. Check the four cells and their remedies (enable, enable, name the package, name the package) against the ruling it quotes. 3. `docs/adr/0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md`, the notes under Open items 6 and 10 and the new Open item 13. Both notes quote the maintainer, and item 10's records the shape of a new system object. ### Two-minute check Run `git diff --numstat origin/main...HEAD` on this branch. Expect ten rows, nine under `docs/adr/` and one under `ui/docs/adr/`, each with `0` in the removed column, and 239 added lines in total. Then run `pnpm check:adr-symbol-anchors` and expect exit 0 with a line that contains `check-adr-symbol-anchors: 4525 anchors across 164 records resolve`. --- _Generated by [Claude Code](https://claude.ai/code/session_016WV4cxRDKprCtjpEdtiPFW)_ <!-- signed: repo:objectstack#1 · os-elon-musk · session_016WV4cxRDKprCtjpEdtiPFW --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…e until its first send, shown as a chip in the composer (objectstack-ai#38230) repo:objectstack#3 · os-tesla · session_01L9qibwivzADop4jGmFZ81y Fixes objectstack-ai#37861 Clause-②: yes (widening) — `@object-ui/plugin-chatbot` `ChatbotEnhanced` gains the optional `promptInputHeaderSlot`; `@object-ui/app-shell` `UseChatConversationReturn` gains `conversationMetadata` and `createdConversationId` Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:在记录页打开问 AI 时,输入框行首直接显示一个「正在问的记录」标签(图标、名称、×),换页会跟着换,第一次发送后固定下来;原来的图钉和「改为问另一条记录?」提示去掉了。 - 为什么做:「问 AI」入口改造专题的第五张卡,让一个会话问的是哪条记录一目了然,且不用用户手动钉。 - 出错会怎样:最坏是会话带错或没带上记录上下文,用户可点 × 去掉、或新开会话;不支持该能力的助手完全不变,直接撤回这次改动即恢复原样。 - 要你做什么:无。 ## What changes Framework ADR-0160 D6, seventh amendment ("The focus of a conversation"), on the client. Only where the agent declares `capabilities.focus: true`; without it nothing changes (no chip, no `focus` key, the page chip where it was). 1. **State `{ focus, dismissed }`** (`layout/chatFocus.ts`, rewritten). A conversation with no id yet is about the page's record (`surfaceRecord()`, moved here from the row), unless dismissed, and follows the page with no prompt. The first send fixes it: the id that send's own create mints (`useChatConversation`'s new `createdConversationId`) takes the focus it had at that moment, in the same render, so the first turn already carries `context.focus`. The mark keeps the `createdConversationId` the hook held when the send was made, and only a newer one takes it. No other arriving id takes it: a thread a send made during the resolve joins, and a history row opened while the create is on the wire, keep their own fixed or dismissed entry, including a thread this dock created at an earlier send. After that, navigation no longer moves it. A conversation sent without one never takes one. 2. **× removes it, and nothing adds it again** in that conversation, before or after the first send. Another dock target while unsent is another conversation, so × does not carry over. 3. **Restore.** A conversation opened again restores its own focus: this tab's `sessionStorage` copy first, else its row's `metadata.focus` (cloud#5113 shape: an array like `context.focus`, `raw[0]` under a string object/id guard, label trimmed; the client applies no length cap and the chip truncates in CSS; absent or malformed means none). `useChatConversation` now returns `conversationMetadata`, the `metadata` of the row it holds, and `createdConversationId`, the row its own create minted last. The request body stays the authority. 4. **The chip sits inside the composer's frame at the start of the line** (`ChatbotEnhanced.promptInputHeaderSlot`, new, drawn in place of the `surfaceContextLabel` chip when given): object icon, record name (else the metadata label, else `object · id`), and ×. × shows on hover, on focus-within, always on a coarse pointer, and has a 24px hit area. Logical margins, so it sits on the right in RTL. With no focus the page chip 「正在看:X」 shows, with no ×. 5. **Removed:** `setChatFocus` callers are already gone with C1 (objectstack-ai#37924); this removes the pin, the 「改为问《X》?」 offer, `declined`, and the four locale keys `console.ai.focus.pin/switchPrompt/switchAccept/switchDecline` from every pack (they shipped only in 19 prereleases; named on their own line in the changeset). `console.ai.focus.pinned` now names the chip for assistive technology, `.remove` labels ×. 6. **Spec:** the `ToolExecutionContext.focus` docblock and the `capabilities.focus` description no longer speak of a pin; no key, type or gate change (`protocol.mdx` regenerated). ## Tests - `layout/__tests__/chatFocus-36999.test.tsx`, rewritten (25 cases): `surfaceRecord`; `chatFocusFromMetadata` (array, absent, malformed); the dock before the first send following the page, × before and after the send, a list start, a target change resetting ×; restore from `sessionStorage`, from metadata in a new tab (with label), absent/malformed metadata, × in this tab beating metadata, a failed create; a send during the resolve joining a found thread that keeps its ×; a history row opened while the create is on the wire keeping its own focus; the same two paths on a thread this dock itself created earlier, keeping its ×; the × reachability classes; the full page (no record, metadata restore); no-capability agents; the no-flag frame chip. - `plugin-chatbot/__tests__/ChatbotEnhanced.promptInputHeaderSlot-37861.test.tsx` (3): the slot sits inside the input group before the textarea and replaces the surface chip. - `i18n/__tests__/de-quote-pairing-3876.test.ts`: count 129 to 128 for the removed key. Ablations (on disk, restored from the commit): metadata restore plus the unsent rule removed → 10 red; carry plus origin removed → 5 red; `markSending` a no-op → 5 red. At `2a9ab800`: the newer-than-at-send check removed → the two cases on a dock-created thread red (2 of 25); that check and the created-id match both removed → 4 of 25 red. The per-target epoch from the previous round is removed: the held send marks again after a target change, so no case could turn on it. <details><summary>Readings</summary> - Head `37dccd4c` (the second review fix `2a9ab800`, then main merged, 18 behind, no conflict): every test file under app-shell `layout`, `console/ai` and `hooks`, plus `plugin-chatbot` and `i18n`: 505 files, 5413 passed, 13 skipped, 2 failed in `designModeMenuSave-36363` under the shared box, as on every earlier head (it passed alone, 47/47, at `fdb5e405`). The diff does not touch design mode. - `pnpm run type-check` in `@object-ui/app-shell`, `@object-ui/plugin-chatbot` and `@object-ui/i18n`: exit 0 each, after building the dependency closure with declarations. - eslint on `chatFocus.ts` and `useChatConversation.ts`: 0 errors. `chatFocus.ts` has one `react-hooks/refs` warning, for the first-send mark read where an id arrives (main had two in this file). - `overlap-check.mjs` at `37dccd4c`: clean. - `dispatch-gates --ran` at `00f98e0c`: 116 accounted, 115 run, 1 NOT-MEASURED (exit 3, built-output prerequisite). - CI at `fdb5e405`: 74 check runs, 0 failure. </details> ## Acceptance notes - **Conflicts with C1 resolved in favour of this branch** in `chatFocus.ts`, its test and `ChatDockConversation.tsx` (C1 had trimmed the same setter and carry code this rewrite replaces). The second main merge (`00f98e0c`) had no conflict. The file surface is unchanged from the claim. - **Review fixes (L1 R1 = L2 S1, then R2).** The first-send mark goes only to an id the hook created after that send; the two paths the review named have a case each on a thread the dock never created and on one it created earlier, red without the fix. - **Metadata label.** The chip prefers the record's own title (read as before); the metadata label stands in only until that read answers, or when it cannot. - **A sent conversation in another tab** with no stored copy and no `metadata.focus` shows the page chip, not a focus: the server row is the only witness there. - Ships in the same release as C4 (objectstack-ai#37970), per the card. ## Verification Read first, by risk: 1. `ui/packages/app-shell/src/layout/chatFocus.ts`: `nextFocusState` (which arrival of an id takes the first send's mark) and `useConversationFocus`'s effective focus. 2. `ui/packages/app-shell/src/hooks/useChatConversation.ts`: `heldMetadata` and when it is set. 3. `ui/packages/app-shell/src/console/ai/ChatFocusRow.tsx`: the chip and the × classes. Two-minute check: `pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/chatFocus-36999.test.tsx`. Expected: 21 passed. In the Console, with an agent that declares `capabilities.focus`: open a record, open 问 AI, the composer line starts with the record's chip; open another record, the chip follows; send, then navigate away, the chip stays. --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibwivzADop4jGmFZ81y)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Requested by Tesla · project thread
Fixes #37860
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Implements every row of ui ADR-0057 Amendment A5's open-type table (as merged,
bc173343). Where the card's text and A5 differ, A5 wins (claim 7218853868).useConsoleChatDockwrites one per-tab record at each close (sessionStorage, module copy when storage throws):by: userfor ×, the entry or the keyboard toggle again, and dismissing the phone sheet;by: consolefor the phone sheet's PUSH/POP collapse (objectstack#37556) and the A4 ask-page collapse; plus the conversation the body showed then (onShownConversationChange, reported byChatDockConversation).openEntryon the dock handle; the top bar's 「Ask AI」 toggle, the keyboard toggle, Home's 「Ask AI」 throughuseAskAiEntry, and the record pane's button) reads that record through the pureentryOpening:{ agent?, fresh: true }, which reachesuseChatConversationasforceNewonly (neverresumeMode: 'fresh'), so no row exists until the first send;isApprovalPendingIn);buildor a package, orapp.defaultAgent: 'build'with no target agent) → as before;open(target), a reload, the bus'srequestAssistantOpen, filling the window.An entry that names an agent (Home's
ask) keeps the closed thread only when it is that agent's.ChatPanecounts the tool calls the framework parked as pending actions (approval-requestedwith apendingActionId) that have no decision, or a failed one, in the chat (countWritesAwaitingApproval), and publishes the count per conversation withpublishPlanApprovalPending. The reading outlives the pane, as the bus intends.useConversationLabel, the list's ownnormalizeon the detail read; the first message stands in until the server answers), "New conversation" (console.ai.newConversation, the history list's own fallback) before the first send, nothing while an existing label is read. Right: + (the body's new-conversation action), the history as an icon button witharia-pressedand both names (rail and sheet only; the full window keeps the column), ⋯ unchanged, × (the sheet keeps its own ✕ last). No ☆ (C8).record-pane-open-assistantbutton reads 「Ask AI」 (home.askAI) with the chat-bubble icon and opens as the entry does. The drawer is no longer titled "AI Assistant"; the objectstack#34827 pin now pins the new rule.No new i18n key: the title and + reuse
console.ai.newConversation, the history button keepsconsole.ai.dock.history/backToChat.Tests
useConsoleChatDock.phoneCollapseOnNavigate-37556.test.tsx, new top-level describe (the hook's shared harness): A5 rows 1 (first opening; ×; entry and keyboard closes; sheet dismissal), 2, 3 (and its control: another conversation, another user), 5, 6 (reload is no opening; the record survives a reload), 7, 8 (defaultAgent build; a build target with a package), Home's 「Ask AI」 after a build thread, and with the drawer open. The stand-ins now report the shown conversation and offer × and dismissal.ChatDock.test.tsx, new describe: the header row in rail / full / sheet, the label, "New conversation", nothing while pending, the history icon's pressed state and names, + calling the body's action and closing the history.ChatDock.titleMatchesTopBar-34827.test.tsxrewritten to "drawer title = the conversation's label, 「新对话」 / "New conversation" before the first send", real packs, every built-in pack.writeApprovalPending-37860.test.tsx: real hydration of stored rows and the realuseHitlInChatdecisions → pending, cleared by an approval, kept by a failed one; control with no parked write.AiChatPage.toolLabelsLocale-11667.test.tsx, new describe: the realChatPanepublishes the pending write for its conversation and clears it after the user's reject.recordDrawerAssistant-36998.test.tsx,ObjectDataPage.openRule-35875.test.tsx: the pane button's name is 「Ask AI」 and its click is an entry opening.Ablation (on disk, restored from the commit): every entry opening forced to
same→ 7 of 30 cases in the hook harness red (all row-1 cases, the row-3 control, row 6, Home's entry).ChatPanepublishingpending: false→ the pane pin red (1 of 3).Readings
db93e901+ tests (every ui test file naming ChatDock, useConsoleChatDock, AssistantTopBarButton, ChatPane/AiChatPage, Console/Home layout, HomePage, the conversation list or sidebar, recordDrawerStack, ObjectDataPage, assistantBus, chatDockControl, DocsPortalShell): 327 files / 3893 tests passed.5d407804): every ui test file naming ChatDock or useConsoleChatDock, 28 files / 305 tests passed.pnpm --filter @object-ui/app-shell run type-check(src andtsconfig.test.json): exit 0, after building the dependency closure.overlap-check.mjsbefore the first push: clean against main, feat(spec)!: retire the ask_ai action type (ADR-0160 D7) #37924 (sharesChatDockConversation.tsx) and feat(app-shell): the AI inquiry page lists this app's recent conversations #37940 (sharesuseConversationList.ts).Acceptance notes
console.ai.newConversation, which reads 「新对话」 in zh-Hans, so the header reads 「新对话」. No pack changed.console.ai.dock.planAwaitingApproval, now reads "An action is waiting for your approval" (「有一项操作等待确认」) in all eleven packs, with the key unchanged. That was L1-c's R1 (7220360349), fixed at12ae1bed.askagent as before.views/ObjectDataPage.tsx,views/recordDrawerStack.tsx,console/ai/ChatPane.tsx. Plusassistant/writeApprovalPending.ts(new, inside the glob).Verification
Read first, by risk:
ui/packages/app-shell/src/layout/useConsoleChatDock.tsx:entryOpening,openEntry,closeByand which close paths call it.ui/packages/app-shell/src/layout/ChatDockConversation.tsx: the shown-conversation report and the header actions.ui/packages/app-shell/src/console/ai/ChatPane.tsx: the bus publish effect.Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/useConsoleChatDock.phoneCollapseOnNavigate-37556.test.tsx. Expected: 30 passed. In the Console: open 「问 AI」, send a message, close with ×, click 「问 AI」 again: the header reads 「新对话」 and the old thread is in history.Generated by Claude Code