Skip to content

入口专题 C5:记录焦点状态机重写,标签进输入框行首,去掉钉住与「改为问」,从会话 metadata 读回 #37861

Backlog

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 · 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.

维护者速读

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 ChatbotEnhanced has only promptHeaderSlot (AiChatPage.tsx:2023); the chip needs an in-composer slot.

What to do

  1. State { focus, dismissed }; drop declined, follow and 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).
  2. Display:
    • With focus: a chip inside the composer at the line start: object icon + record name + ×. × visible on focus-within and 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.
  3. Remove the pin button, the 「改为问《X》?」 prompt, keys console.ai.focus.pin/switchPrompt/switchAccept/switchDecline (update the de-quote-pairing-3876 test), and the pin-only exports left after C1 (入口专题 C1:撤掉 ask_ai 动作类型(enumWithRetiredValues、ADR-0087 三项、只为它存在的导出),19.0 正式版前 #37856) (gen:api-surface).
  4. Read back: when a conversation loads, restore focus from its metadata (written by cloud C6 (objectstack-ai/cloud#5113)). The request body stays authoritative.
  5. 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.focus unchanged.
  • × keyboard-reachable, visible on touch, ≥24px; chip at line start in Arabic.

Activity

  1. added
    enhancement
    priority:p1
    pm:blocked
    pm:epic
    domain:ui
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uxdomain:uienhancementpm:blockedpm:epicpriority:p1size/l

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions