Repository navigation
Description
epic:#5027#1 · hotlong · session_01Q4EjjMUfmNYTem26rXLFUf
Filing gate: ④ topic child. Source: topic #37853 (Jack: 「"页面里加按钮"的需求 作废」 06:28Z; card 「撤掉 ask_ai」 06:30Z; 「问 AI」 06:33Z; 「同意,立专题卡,非 cloud 的任务,让 objectstack #3 座位接手」 07:12Z, all 2026-11-27). Business reason: carried by the parent.
Parent: #37853 (rulings, target experience, card table, topic acceptance). Evidence: an independent Fable review of objectstack and cloud main (2026-11-27) checked every file:line below.
Owner: repo:objectstack#3 (Jack 07:12Z 「非 cloud 的任务,让 objectstack #3 座位接手」). Reserved under topic #37853 (pm:epic), not pm:queue: other seats leave it.
Grading: area:ux · Task · p1 · size M–L · target: before 19.0 GA (the pin control and 「改为问」 have only shipped in prereleases).
Blocked-by: C0a (#37854); C1 (#37856) (removes setChatFocus and the ask_ai focus handler); #37799 and #37803 (splits of ChatbotEnhanced / AiChatPage, >3000 lines each, wait for the maintainer's merge). Ships in the same release as C4 (#37860).
Dedupe: searched chatFocus, record chip: #36999 and #37276 (closed) built today's version.
维护者速读
- 是什么:重写记录焦点:未发送的新会话默认带当前页面记录,标签放进输入框行首,× 去掉后退回「正在看:X」;去掉钉住按钮和「改为问《X》?」;从会话里读回焦点,换标签页或从历史重开不丢。
- 要你做什么:先合 refactor(plugin-chatbot): move ChatbotEnhanced types, subcomponents and helpers into chat/ #37799、refactor(app-shell): split AiChatPage into ChatPane and helper modules, move-only #37803。
Background (verified)
- Today: unpinned shows a page chip (also on lists and dashboards) with a pin button when the page has one record; pinned shows 「正在问:X」 with remove; switching records asks 「改为问《X》?」. State is only
focus,declined, kept in sessionStorage only, so a new tab or reopening from history loses it (console/ai/ChatFocusRow.tsx:91-168;layout/chatFocus.ts:10-16,37-41,234-253). - The composer area of
ChatbotEnhancedhas onlypromptHeaderSlot(AiChatPage.tsx:2023); the chip needs an in-composer slot.
What to do
- State
{ focus, dismissed }; dropdeclined,followand the host registry.- Unsent conversation: effective focus = current page record (
surfaceRecord()) unless dismissed. - First send fixes focus and carries
dismissed. - After that, focus persists across navigation (ADR-0160 D6).
- Unsent conversation: effective focus = current page record (
- Display:
- With focus: a chip inside the composer at the line start: object icon + record name + ×. × visible on
focus-withinand always on touch, hit area ≥24px; unknown name →object · id; RTL (ar) puts it on the right automatically. - Without focus: today's page chip 「正在看:X」 (no ×), lists and dashboards included.
- Agents without
capabilities.focus: UI and request exactly as today.
- With focus: a chip inside the composer at the line start: object icon + record name + ×. × visible on
- Remove the pin button, the 「改为问《X》?」 prompt, keys
console.ai.focus.pin/switchPrompt/switchAccept/switchDecline(update thede-quote-pairing-3876test), and the pin-only exports left after C1 (入口专题 C1:撤掉 ask_ai 动作类型(enumWithRetiredValues、ADR-0087 三项、只为它存在的导出),19.0 正式版前 #37856) (gen:api-surface). - Read back: when a conversation loads, restore focus from its
metadata(written by cloud C6 (objectstack-ai/cloud#5113)). The request body stays authoritative. - Rewrite
chatFocus-36999.test.tsx.
Acceptance
- Unsent new conversation follows record changes; after the first send it does not.
- × → page chip, never re-added in that conversation, kept after the first send.
- Reopening from history in a new tab restores the chip; follow-ups send
context.focus. - Lists / dashboards keep the page chip; agents without
capabilities.focusunchanged. - × keyboard-reachable, visible on touch, ≥24px; chip at line start in Arabic.
Activity
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim: PM loop round 1
Session:
session_01L9qibyUSf2nKJWW6qBemSUThread session:
session_01L9qibwivzADop4jGmFZ81yAccount:
os-teslaBranch:
claude/project-thread-qgv6xlWorktree:
objectstack-issue-37861Domain:
uiArea:
o3-askai(topic #37853, C5)Seat:
repo:objectstack#3File surface:
ui/packages/app-shell/src/layout/{chatFocus.ts,ChatDockConversation.tsx}andlayout/__tests__/**ui/packages/app-shell/src/console/ai/{ChatFocusRow.tsx,ChatPane.tsx,AiChatPage.tsx}ui/packages/app-shell/src/hooks/{useChatConversation.ts,surfaceAgent.ts}ui/packages/app-shell/src/index.tsand its api-surface baselineui/packages/plugin-chatbot/src/{ChatbotEnhanced.tsx,chat/types.ts}(a new in-composer slot)ui/packages/i18n/src/locales/**(11 packs drop 4 keys) andde-quote-pairing-3876.test.tspackages/spec/src/contracts/ai-service.ts: the docblock only, rewording "pinned" at :1266-1271, which ADR-0160 D6 assigns to this card.changeset/**Stop on breach; explain in the report.
Container & model:
L,mode:thread,model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate",effort: highClause-②: no (the ai-service.ts change is a docblock only)
Metadata-protocol: none
Responsibility: as the card says. The record focus state machine is rewritten, the chip moves into the start of the input row, pinning and 「改为问」 are removed, and focus is read back from the conversation metadata (cloud C6, cloud#5113). It follows ADR-0057 A5 as merged (bc17334) and ADR-0160 D6.
Thread-read: none
Premise: holds on origin/main 4de4e3e, with locations corrected. The slot is passed at ChatPane.tsx:773 (
promptHeaderSlot) and drawn above PromptInput (ChatbotEnhanced :954). The only in-frame row is the text-only page chip (~:997), so a new in-composer slot is needed. ChatFocusRow :91-168 and chatFocus{focus, declined}/sessionStorage hold.ServerConversation.metadatais typed (useChatConversation.ts:482) but not returned to callers. Jack's ruling 7221127130 (「这些现在都启动开发」) starts it now.Serial constraints cleared:
C1 PR #37924 rewrites chatFocus.ts, its test, ChatDockConversation.tsx, index.ts and surfaceAgent.ts; C4 PR #37970 touches ChatPane.tsx, ChatDockConversation.tsx and the 11 locale packs; Q2b #37874 adds ChatPane.tsx (one prop). The thread merges main after each one lands and runs overlap-check against #37924 and #37970 before its first push. Open question to epic:#5027#1: the shape stored under metadata.focus (an array or one {object,id}); until it is answered, the reader accepts and pins both shapes.objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment 1 to 7221210743.
Clause-②: yes (widening). The diff adds two optional public surfaces on published ui packages:
@object-ui/plugin-chatbotChatbotEnhancedpromptInputHeaderSlot?: ReactNode, and@object-ui/app-shellUseChatConversationReturn.conversationMetadata. The precedent is.changeset/34171-managed-password-refusal-copy.md. The thread also removes four@object-ui/i18nkeys (console.ai.focus.pin,switchPrompt,switchAccept,switchDecline) that shipped only in 19 prereleases. The contract review rules on whether that removal is a narrowing; if it is, the PR follows the narrowing path (BREAKING section and hand-off).Premise adds: epic:#5027#1 answered (mailbox 7221293049, cloud main d8912a0).
metadata.focusis always an array[{ object, id, label? }]with one entry, and the key is absent after the user's ×. The reader takesraw[0]under stringobject/idguards. The single-object branch is dropped.Everything else in the claim is unchanged (Metadata-protocol none, patch).
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibwivzADop4jGmFZ81y
os-dev-report
{ "issue": 37861, "status": "done", "branch": "claude/project-thread-qgv6xl", "pr": "https://github.com/objectstack-ai/objectstack/pull/38230", "session": "session_01L9qibwivzADop4jGmFZ81y", "premise_still_valid": true, "summary": "Conversation focus is { focus, dismissed } (ui/packages/app-shell/src/layout/chatFocus.ts rewritten): before the first send it is the page's surfaceRecord() unless dismissed and follows the page with no prompt; the first send fixes it onto the id it mints in the same render; x removes it for good; a conversation opened again restores it from this tab's sessionStorage, else its row's metadata.focus (cloud#5113 array shape, raw[0]). The chip sits inside the composer frame at line start via the new ChatbotEnhanced promptInputHeaderSlot (icon, name or object · id, x with 24px hit area, shown on hover/focus-within/coarse pointer, logical margins for RTL); useChatConversation returns conversationMetadata. The pin, the switch offer, declined and the four keys console.ai.focus.pin/switchPrompt/switchAccept/switchDecline are removed from all 11 packs; spec docblock and capabilities.focus description reworded. Head c7e32f01 = main 9609c137 (C1 #37924 and C4 #37970 in) merged at f6b2ea4e, conflicts in chatFocus.ts, its test and ChatDockConversation.tsx taken from this branch, protocol.mdx regenerated; file surface unchanged from the claim.", "tests": "chatFocus-36999.test.tsx rewritten (21 cases), ChatbotEnhanced.promptInputHeaderSlot-37861.test.tsx new (3), de-quote-pairing-3876 count 129 to 128. Merged head, under the verify lock: vitest over app-shell layout, console/ai and hooks plus plugin-chatbot and i18n: Test Files 1 failed | 501 passed (502), Tests 2 failed | 5392 passed | 13 skipped; the 2 were designModeMenuSave-36363 (no shared file), which alone then passed Tests 47 passed (47). Before the merge (bd1e582d): layout + console/ai Test Files 206 passed (206), Tests 1741 passed (1741), including ChatDock.requestContext-30043 7/7 (a state-held first-send mark had dropped its record-page send; reverted to a ref). Ablations on disk, restored from the commit: metadata restore + unsent rule removed -> 10 red; carry + origin removed -> 5 red; markSending a no-op -> 5 red. type-check in @object-ui/app-shell, @object-ui/plugin-chatbot, @object-ui/i18n: exit 0 each.", "gates": "dispatch-gates --commands on c7e32f01: 116 families, each recorded with its exit; --ran: 116 accounted, 113 run, 3 NOT-MEASURED (exit 3, built-output prerequisite: check-plugin-teardown-shape --self-test, spec check:skill-examples, check:dual-build-cjs-loads); one run red outside the diff: pnpm --dir ui exec vitest run scripts/ SIGKILLed while its closure-budget case read a partial local build (no ui-components chunk). overlap-check: VERDICT clean exit 0 (main, #38201, #38168). PR check-runs at c7e32f01: 70 completed, 61 success, 9 skipped, 0 failure (incl. Test UI 16/16 shards, Test Core 10/10, Type Check UI, Type Check workspace, Lint UI, Lint & Repo Gates, Build & E2E UI, Live E2E UI, Check Changeset, PR-body guards, Spec property liveness).", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "reads only — mcp__github__pull_request_read (get #37924, get #37970, get_check_runs #38230) and mcp__github__issue_read (card #37861); no write tool", "api_writes": "2 relay — fleet-write pr_create #38230 (assignee os-tesla), post-stamped comment on #37861 (this report); plus git push", "open_questions": [], "security_findings": "none", "out_of_scope_findings": ["designModeMenuSave-36363 failed 2 cases once under a shared box (47/47 alone) · noted, not filed"] }Generated by Claude Code
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
2026-11-28T13:16Z · 收口:PR #38230 经合并队列合入,本卡随 Fixes 关闭;去掉 pm:dispatched。