Skip to content

入口专题 C4:主动关掉再点「问 AI」即开新会话(按 A5 分类表,只用 forceNew)+ 抽屉顶部改为标题、+、历史图标 #37860

Done

Description

@objectstack-fleet

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.

维护者速读

Background (verified)

  • The drawer reopens the last conversation; only target.fresh passes forceNew (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

  1. 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, Studio requestOpen(), build/packageId, narrow↔full unchanged).
  2. 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-pressed and both names), ⋯ unchanged, ×. ☆ is added by C8. Same row on the mobile sheet, leaving room for its built-in ✕.
  3. No new-chat shortcut in this phase (⌘⇧O is the browser's bookmark manager).
  4. 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

  1. added
    enhancement
    priority:p1
    pm:blocked
    pm:epic
    domain:ui
    on Nov 27, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Claim: PM loop round 1
    Session: session_01L9qibyUSf2nKJWW6qBemSU
    Thread session: session_01L9qibzv3KSUSav5J2uw97s
    Account: os-tesla
    Branch: claude/project-thread-15z21n
    Worktree: objectstack-issue-37860
    Domain: ui
    Area: o3-askai (topic #37853, C4; big card kept with the seat)
    Seat: repo:objectstack#3
    File surface: ui/packages/app-shell/src/{layout,hooks,assistant}/** (useConsoleChatDock, ChatDock and the mobile sheet header, ChatDockConversation, useChatConversation, assistantBus) and their tests, the app-shell i18n strings the header needs in ui/packages/i18n/src/locales/**, .changeset/**; NOT ui/docs/adr/** (A5 is merged), NOT the ☆ (C8 #37863), NOT the record-focus default (C5 #37861) (stop on breach; explain in the report)
    Container & model: L, mode:thread, model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate", effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: an opening from the 「问 AI」 entry follows ADR-0057 A5's open-type table as merged (bc17334): new after the user's own close or the first opening in a tab, the same conversation after the console's PUSH/POP phone collapse, the conversation shown at the close when it holds a write awaiting approval; forceNew only, never resumeMode: 'fresh'; the drawer header row per A5 (history row's label, +, history icon button, ⋯, ×); C3 #37885's hand-over items (record panel button, drawer title); the #34827 title test follows the new rule. Ships in the same release as C5.
    Thread-read: none
    Premise: Blocked-by cleared: C0b #37855 closed by PR #37931 (merged 2026-11-27T12:48Z, bc17334), #37803 merged 2026-11-27T11:53Z. Where the card's text and A5 differ, A5 as merged wins.
    Serial constraints cleared: overlap-check.mjs runs on the thread's first push (branch not yet pushed); C1 PR #37924 and Q2b #37874 also touch ui chat files: the thread runs overlap-check against #37924 before its first push and names any shared file in its report

    Ask-AI own cap (Tesla 「问数AI 并发可以8」 2026-11-27T11:25Z).

  3. added
    pm:dispatched
    and removed
    pm:blocked
    on Nov 27, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Claim: PM loop round 1 (amendment: three files named before code)
    Session: session_01L9qibyUSf2nKJWW6qBemSU
    Thread session: session_01L9qibzv3KSUSav5J2uw97s
    Account: os-tesla
    Branch: claude/project-thread-15z21n
    Worktree: objectstack-issue-37860
    Domain: ui
    Area: o3-askai (topic #37853, C4; big card kept with the seat)
    Seat: repo:objectstack#3
    File surface: ui/packages/app-shell/src/{layout,hooks,assistant}/** (useConsoleChatDock, ChatDock and the mobile sheet header, ChatDockConversation, useChatConversation, assistantBus) and their tests, the app-shell i18n strings the header needs in ui/packages/i18n/src/locales/**, .changeset/**; plus ui/packages/app-shell/src/views/ObjectDataPage.tsx and ui/packages/app-shell/src/views/recordDrawerStack.tsx (the record panel's record-pane-open-assistant button, C3 #37885's hand-over: 「问 AI」 words and icon, the click becomes an entry opening) and ui/packages/app-shell/src/console/ai/ChatPane.tsx (one effect publishing a write awaiting approval per conversation id to the assistant bus, A5's "Not recorded yet" item); NOT ui/docs/adr/** (A5 is merged), NOT the ☆ (C8 #37863), NOT the record-focus default (C5 #37861) (stop on breach; explain in the report)
    Container & model: L, mode:thread, model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate", effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: an opening from the 「问 AI」 entry follows ADR-0057 A5's open-type table as merged (bc17334): new after the user's own close or the first opening in a tab, the same conversation after the console's PUSH/POP phone collapse, the conversation shown at the close when it holds a write awaiting approval; forceNew only, never resumeMode: 'fresh'; the drawer header row per A5 (history row's label, +, history icon button, ⋯, ×); C3 #37885's hand-over items (record panel button, drawer title); the #34827 title test follows the new rule. Ships in the same release as C5.
    Thread-read: 7218853868
    Premise: Blocked-by cleared: C0b #37855 closed by PR #37931 (merged 2026-11-27T12:48Z, bc17334), #37803 merged 2026-11-27T11:53Z. Where the card's text and A5 differ, A5 as merged wins.
    Serial constraints cleared: overlap-check.mjs runs on the thread's first push (branch not yet pushed); C1 PR #37924 and Q2b #37874 also touch ui chat files: the thread runs overlap-check against #37924 before its first push and names any shared file in its report

    Ask-AI own cap (Tesla 「问数AI 并发可以8」 2026-11-27T11:25Z).

  5. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibzv3KSUSav5J2uw97s
    os-dev-report

    {
      "issue": 37860,
      "status": "done",
      "branch": "claude/project-thread-15z21n",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37970",
      "session": "session_01L9qibzv3KSUSav5J2uw97s",
      "premise_still_valid": true,
      "summary": "Implements every row of ui ADR-0057 Amendment A5's open-type table: useConsoleChatDock records who closed the drawer (user: x, entry, keyboard toggle, sheet dismissal; console: the phone PUSH/POP collapse and the A4 ask-page collapse) and the conversation shown then; an opening from the entry (top bar, keyboard, Home's Ask AI, the record pane's button) reads it through the pure entryOpening and opens a new conversation with forceNew only (target {agent?, fresh:true}, never resumeMode 'fresh'), keeps the same one after a console close, keeps the shown one when a write awaits this user's approval there, and leaves build threads, named targets, reloads, the bus and full-window as before. ChatPane now publishes undecided or failed pending-action writes per conversation to the assistant bus. The header row in rail, full window and sheet is the history row's label ('New conversation' before the first send), +, a history icon (rail and sheet), the menu and x; no star (C8). C3 hand-over: the record pane button reads Ask AI with the chat-bubble icon and opens as the entry does; the #34827 title pin now pins the new title rule.",
      "tests": "pnpm --dir ui exec vitest run on every ui test file naming ChatDock, useConsoleChatDock, AssistantTopBarButton, ChatPane/AiChatPage, Console/Home layout, HomePage, conversation list/sidebar, recordDrawerStack, ObjectDataPage, assistantBus, chatDockControl, DocsPortalShell: 327 files / 3893 tests passed at db93e901+tests; after 5d407804 the ChatDock/useConsoleChatDock set 28 files / 305 passed; after f738217a writeApprovalPending-37860 3/3 passed. useConsoleChatDock.phoneCollapseOnNavigate-37556: 30 passed. Ablation on disk, restored from the commit: entryOpening forced to 'same' -> 7 of 30 red (row-1 cases, row-3 control, row 6, Home's entry); ChatPane publishing pending:false -> 1 of 3 red in the pane pin.",
      "gates": "Local: 38 derived families, each recorded as '<command> :: exit <code>' with $? captured before any pipe, all exit 0; dispatch-gates --ran: 38 derived, 38 run, 0 NOT-MEASURED (a DERIVED zero). app-shell type-check (src + tsconfig.test.json) exit 0; eslint on changed files 0 errors. CI at 5d407804: 'Lint · CI, release & engine gates' red on the Test-source alias gate (writeApprovalPending-37860 reached ChatPane's dynamic import('@object-ui/plugin-grid') with no module-top import); fixed in f738217a (module-top side-effect import), check:test-source-alias OK locally. CI at f738217a: every check-run success or skipped (51); aggregators Lint & Repo Gates, TypeScript Type Check, Test UI success; Test UI 9/9 shards, Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Check Changeset, PR-body guards, Governed Surface Queue Guard success.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "read-only: pull_request_read (get, get_check_runs x2), get_job_logs x4; no write tool",
      "api_writes": "0 — writes via the fleet-write relay only: pr_create (dispatch.mjs), this comment (post-stamped.mjs); git push x2",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: c · reach: exception: release-text · the entry's amber marker description still reads 'a proposed plan' in eleven packs while it now also lights for a pending write · carrier: the seat · noted, not filed"
      ]
    }
  6. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibzv3KSUSav5J2uw97s

    Close-out · #37970 merged as 4af32b99db078cef6b9cbda8f2f4a77632b75f49 on main (head 3e3d81a9bb2c31b8e29c785484c3099030075e35); this card closed by its Fixes.

  7. removed
    pm:dispatched
    on Nov 27, 2026
  8. added a commit that references this issue on Dec 1, 2026
    4af32b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:uienhancementpm:epicpriority:p1size/l

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions