Skip to content

[Decision] 记录问询:右上角助手作唯一通用入口、空白对话默认带上当前记录,「问 AI」动作改为作者预设问题的快捷按钮(ADR-0160 第七次修订) #37834

Done

Description

@objectstack-fleet

triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

Filing gate: ③ maintainer-directed. The maintainer, verbatim, in this session on 2026-11-27: 「有两个这样的按钮不会奇怪吗,其他系统是怎么设计的」「用 fable 重新评估我们如何按照主流系统的方向设计」「立决策卡」. The analysis below is an independent fable read of both repos' main (objectstack 9b50fedbfa, cloud c941873ce). Triage re-checked its two corrective facts on main.

维护者速读

  • 问题:用户想就一条记录问 AI,现在有两个入口。一个是右上角助手,要手动点「钉住」才算问这条记录;另一个是作者放在页面上的「问 AI」按钮,点了只是打开一个空白对话。同一页上两个通用入口让人困惑,按钮在记录页上还根本不显示(另一张缺陷卡记着)。
  • 选项:A 右上角作唯一通用入口,新对话自动带上当前记录、一键可去掉;按钮保留,作者可预设一句问题,点了把问题填好由用户发送,约一次文档修订加三个小到中等的 PR。B 撤掉按钮,只留右上角并默认带记录,是不兼容改动,必须在 19.0 正式版前完成,约 67 个文件。C 维持现状,只修按钮不显示的问题。
  • 推荐 A:和主流产品一致(一个会自己认出当前记录的入口,加带具体问题的快捷按钮),而且列表每一行上的快捷问答只有按钮做得到。
  • 不定会怎样:两个入口继续重复,普通用户不知道要先「钉住」,AI 第一轮拿不到这条记录的资料。

Background

ADR-0160 (docs/adr/0160-record-scoped-ai-inquiry.md) built record-scoped inquiry. A user reaches it two ways today:

  • The header assistant icon. The drawer's composer shows a page chip ("Viewing: "). It carries a pin control, drawn only when the active agent declares capabilities.focus (ui/packages/app-shell/src/console/ai/AiChatPage.tsx:1567-1568, ChatFocusRow.tsx:95,149-166). A pin makes the record the conversation focus (D6).
  • An author-placed type: 'ask_ai' action (D7), at record_header, record_more or list_item. It opens a fresh thread on a focus-capable agent and pins the record. It sends no message (ui/packages/app-shell/src/hooks/useAskAiHandler.ts:39-54).

Epic objectstack#36996 (maintainer topic, filed from the maintainer's session) carried the button inside a wholesale approval (「需要拍板的事项 都同意」). The button was never separately weighed against the header entry. Defect objectstack#37827 reports that an ask_ai action never renders on a record page: RecordDetailView's own ActionProvider (ui/packages/app-shell/src/views/RecordDetailView.tsx:6413) omits onAskAi, and ActionContext does not inherit it (ui/packages/react/src/context/ActionContext.tsx:173).

Premises (re-check)

  1. Page context already reaches the model without a pin. Every turn grounds "the record the user has open" from the page context, for any agent. The pin adds two things: the focus persists across navigation, and the context pack is pre-read on the first send. Evidence: cloud packages/service-ai/src/routes/agent-routes.ts:978-982 (turnFocus → pinned, else resolveRecordFocus(chatContext) → record) and turn-grounding.ts:398. Re-check: git -C cloud show origin/main:packages/service-ai/src/routes/agent-routes.ts | grep -n resolveRecordFocus.
  2. The maker/admin gap is gone on main. objectstack#37720 (merged 2026-11-27T03:35Z, 6e8f663710) retired the build chat frontend. The drawer no longer passes the maker flag to resolveSurfaceAgent (ui/packages/app-shell/src/layout/ChatDockConversation.tsx:124), so makers land on ask, which honours focus (cloud agent-runtime.ts:522-524 honoursFocus). A dead branch remains at hooks/surfaceAgent.ts:164-172. Build retirement continues in cloud#5024 and cloud#5046. Re-check: git show origin/main:ui/packages/app-shell/src/layout/ChatDockConversation.tsx | sed -n 118,126p.
  3. The pre-read happens on the first send, once per focus. It does not run on drawer open, and no tool is offered when no pack exists: cloud focus-pre-read.ts:9-14,33-36, app-material-tools.ts:8-27. The body bound is 8000 characters: packages/services/service-record-context/src/body-outline.ts:33.
  4. Release window. .changeset/pre.json is mode: pre, tag: next. ask_ai first shipped in 19.0.0-next.0 (packages/spec/CHANGELOG.md).

Governing text

  • ADR-0160 D6: focus is user-pinned, advisory, never an access decision; kept across navigation; one record in phase 1; capability-gated.
  • ADR-0160 D7: ask_ai sends no message, takes no target, is never an AI tool, and is absent without an in-app assistant.
  • ADR-0049: a key lands with its reader in the same PR.
  • docs/adr/** is Tier H: an amendment needs the maintainer's approval or merge.

Protocol change: A adds one optional key (additive, non-breaking) and changes D6's default rule (console behaviour, no protocol change). B removes an ActionType member, which is breaking. C changes nothing.

Mainstream reference

  • Dynamics 365 Sales. One Copilot side pane, record-aware: prompt suggestions come from the open record, and the account summary shows by default.
  • Atlassian Rovo. One chat entry with an automatic, removable "Context: " line. Users report that page-following is flaky.
  • HubSpot Breeze. One top-nav assistant that lists the records it used, with @-reference.
  • Salesforce Agentforce. The assistant knows the current record. Record pages carry agent shortcuts, each bound to a preset utterance, never a blank chat.

The pattern is one context-aware entry (opt-out context), plus task-specific in-place buttons that carry a preset question.

Options

A. One entry with default context; ask_ai becomes a preset-question shortcut (recommended).

Rulings carried, as the seventh amendment of ADR-0160:

  1. D6 default. On a record page, a fresh thread, or a thread that has not sent yet, attaches the current record as focus by default. The chip reads "正在问: ×" and one click removes it. A thread with content is not changed automatically: the existing "改为问 ?" prompt applies, and a decline is remembered. A focus the user removed is not re-attached in that thread. Mid-conversation navigation keeps the pinned record; it does not follow the page, unlike Rovo, and D6's "kept across navigation" stands. The focus stays advisory: the server re-reads the record as the caller.
  2. Build does not honour focus. Build is being retired, and cloud forbids binding ask skills to build (service-ai-studio/src/agents/metadata-assistant-agent.ts:27-28).
  3. ask_ai stays and gains an optional preset question. A list_item action is the one placement the header cannot serve, because a list page has no current record. A header ask_ai with no question duplicates the header entry: validation advises and does not refuse.
  4. The preset question is filled into the composer, not auto-sent. D7's "sends no message" stands, and a misclick never sends a record to the model.
  5. The preset question is fixed text only. No record-field interpolation, because record content must never speak as the user. It is length-bounded and translated through the action translation channel (packages/spec/src/system/translation.zod.ts:448).

Cost: 1 ADR amendment, plus 3 PRs: the console default attach (S–M, UI-only plus one cloud prompt line), the preset-question key (M, spec + console reader + translation slot + docs + showcase in one PR per ADR-0049), and BrightRule's adoption (XS). No breaking change. Workload: ui + spec lanes; no measured precedent.

B. Retire ask_ai; the header is the only entry, with default context. This removes the ActionType member, its executor, the gating in about a dozen action surfaces, tests, docs, skills, eval and baselines (about 67 files measured by grep), the showcase use and BrightRule's declaration. BrightRule must change in step or fail at parse. Cloud references it only in comments and changelog. The breaking change must land before 19.0.0 final. It loses per-row inquiry on lists. Workload: spec + ui · 2–3 PRs; no precedent.

C. Status quo; fix objectstack#37827 only. About 3 lines plus a test. Two generic entries remain, the pin stays opt-in, and the first answer lacks the pack unless the user pins.

Business meaning: A is a single front desk that already knows which file you are holding, plus a few labelled speed-dial buttons. B is the front desk only. C keeps two identical front desks.

Four axes

os-decision-facets

  • ① Long-term soundness: A matches the mainstream end state (one context-aware entry plus task shortcuts) and adds one optional key; B narrows the contract, but loses the per-row placement the mainstream keeps as shortcuts; C keeps a duplicate generic entry.
  • ② Business pull: BrightRule declares ask_ai at record_header and list_item today; in its measured run, 164 of 168 calls answered "no pack", because nothing pinned and its pack was not reached (cloud app-material-tools.ts:8-27 reading).
  • ③ AI-error guard: A keeps fixed-text questions (no interpolation), keeps no auto-send and keeps focus advisory; a forged focus reads nothing the caller cannot read. The failure is visible (a chip the user sees), never silent.
  • ④ Don't sprawl: B removes the most; A adds one optional key with a real reader; C adds nothing but leaves the duplicate.

Only on ①, choose A. Do ②③④ flip it? No. ④ favours B, but ② (list-row pull) and ① keep A.

Recommendation and confidence gaps

A. In two years, the platform has one assistant entry that knows the current record and author-defined record shortcuts with preset questions, as Agentforce shortcuts and the Dynamics side pane do.

  • Not B: it loses list-row inquiry, and it forces a breaking change into the 19.0 final window.
  • Not C: it keeps the confusion the maintainer named.

Gaps:

  • The token cost of default attach on pack-heavy apps is unmeasured; measure after landing.
  • An unrelated question asked on a record page may be pulled toward the attached record; the visible chip and one-click removal mitigate this.
  • BrightRule's repo was not read directly; its declaration is quoted from objectstack#37827.
  • ADR-0160 has been amended six times in three days.

After the ruling

On A, in order:

  1. objectstack#37827 lands first, independent of this ruling: p1, area:ai, required before 19.0.0 final.
  2. Spec lane: the ADR-0160 seventh amendment PR (Tier H, maintainer merge).
  3. UI card: default attach on fresh threads (p2; 19.0 if it fits, else 19.1), plus a cloud card for the one prompt line that today says "the user pinned".
  4. Spec + UI card: the preset-question key (p2, 19.1).
  5. BrightRule adoption (XS) after 4.
  6. Remove the dead maker-upgrade branch inside the build retirement topic; no new card.

On B: one breaking-change card, p1, before 19.0.0 final, with BrightRule coordinated in step. On C: close this card; only objectstack#37827 proceeds.

Related

Epic objectstack#36996 (parent). objectstack#37827 (record page hides ask_ai). objectstack#37142 (the ask_ai row, verified by tests only). objectstack#36999 (focus). objectstack#37720 (build chat frontend retired). cloud#5024 and cloud#5046 (build retirement).

Dedupe (is:issue): ask_ai → #37827, #37142, epic #36996 children; "default context" assistant record → 0 open.

Activity

  1. added
    priority:p1
    needs-user-decision
    domain:ui
    area:ai
    on Nov 27, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#5027#1 · hotlong · session_01Q4EjjMUfmNYTem26rXLFUf

    Ruling recorded 2026-11-27T07:25Z. The maintainer (Jack) ruled in the cloud project seat thread on 2026-11-27, verbatim:

    Follow-through is topic #37853 (owner of the objectstack children: repo:objectstack#3). The amendment is #37854 (ADR-0160 seventh amendment); the retirement is #37856, which also closes #37827. This card can close as decided once triage records it.

  3. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Decided · #37834 · closed 2026-11-27T07:30Z. The maintainer ruled option B (retire ask_ai before 19.0 GA, with no compatibility shim). Seat epic:#5027#1 recorded the ruling verbatim above, in comment 7212523041's thread. Option A's preset-question buttons are void (「"页面里加按钮"的需求 作废」). The root cause the maintainer named is that the header entry is too small to notice, so the follow-through also restyles it as a labelled 「问 AI」 button that opens a fresh thread carrying the current record.

    Follow-through: topic #37853, owned by repo:objectstack#3. #37854 is the ADR-0160 seventh amendment. #37856 is the retirement, which also closes #37827.

  4. removed
    needs-user-decision
    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:aidomain:uipriority:p1

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions