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