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.
Blocked-by: C0b (#37855) (A5 table); #37803 (split of AiChatPage, >3000 lines, waits for the maintainer's merge). Ships in the same release as C5.
Dedupe: searched forceNew, drawer new conversation: none open.
维护者速读
- 是什么:用户主动关掉抽屉再点「问 AI」就开新会话(手机自动收起、待确认计划等例外);抽屉顶部改成会话标题 + ☆ + + + 历史图标 + ⋯ + ×。
- 要你做什么:先合 refactor(app-shell): split AiChatPage into ChatPane and helper modules, move-only #37803。
Background (verified)
- The drawer reopens the last conversation; only
target.freshpassesforceNew(no row until the first send) (layout/ChatDockConversation.tsx:172-187;hooks/useChatConversation.ts:918-926,984-1042). resumeMode:'fresh'reuses a conversation with zero server messages; a turn persists only when it ends, so a generating conversation looks empty. Do not use it.- Mobile auto-collapses on answer-link taps and keeps the conversation (37487 跟进:手机上点 AI 引用后,对话面板仍盖住被引用的段落 #37556,
layout/useConsoleChatDock.tsx:187-236). - Pending-approval marks are keyed by conversation id on the bus (
assistant/assistantBus.ts:171-249). - Header today: 「AI 助手」, a text 「历史」 button, ⋯, × (
layout/ChatDock.tsx:465-512,602-638); the mobile sheet has its own header. - Titles are auto-generated server-side from the first turn (cloud
service-ai/src/ai-service.ts:1263-1455, can be off).
What to do
- In
useConsoleChatDock, remember how the drawer last closed: user paths (toggle, collapse, ×) set a flag; the auto-collapse (:229-233) does not. On the next open with the flag set, target{agent, fresh: true}→forceNew. Implement every row of C0b (入口专题 C0b:ui ADR-0057 A5(哪些打开方式开新会话、build 例外、抽屉页头) #37855)'s table (pending approval → that conversation; named targets, refresh, StudiorequestOpen(), build/packageId, narrow↔full unchanged). - Header: title (「新会话」 before the first send; first-message summary when title generation is off, as the history list does); right side + new conversation (current page record per C5), history as a clock icon button (keep
aria-pressedand both names), ⋯ unchanged, ×. ☆ is added by C8. Same row on the mobile sheet, leaving room for its built-in ✕. - No new-chat shortcut in this phase (⌘⇧O is the browser's bookmark manager).
- Update the AI 助手抽屉:标题写「助手」,与顶栏按钮「AI 助手」不一致 #34827 title test to the new rule.
Acceptance
- × then reopen → new; closed mid-generation then reopen → new, the old answer complete in history, no blank conversation; mobile auto-collapse then reopen → same; pending plan → that conversation.
- Refresh,
/ai/ask/<id>, history → the named conversation; Home 「Ask AI」 → new; Studio copilot unchanged;app.defaultAgent:'build'apps follow A5's exception.
Activity