Skip to content

feat(app-shell): Connect an AI Assistant opens with what a connected assistant can do, in plain words - #31052

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-rrq77k
Nov 6, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-rrq77k

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Part of #30898

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:「连接 AI 助手」页最上方新增一张卡片,用两句白话说明连接后 AI 助手能做什么(以你的身份查找、新建、修改、删除你有权操作的记录,并运行系统操作),再给三条可一键复制的示例请求,并提示先试第一条来确认连接成功。地址卡片和 Claude Code 步骤不再出现 MCP、OAuth 等协议词,只有客户端自己的菜单或表单里用到的地方保留。各客户端里「改用 API 密钥」的提示现在指向「高级:脚本与 CI」区域。
  • 为什么改:这个页面的读者不懂 MCP;连接前要先知道助手能为自己做什么,连接后要知道先问什么来确认连上了。
  • 风险与回滚:只改页面文案和一张展示卡片,不改服务端行为和连接步骤本身。回滚即 revert 本 PR。
  • 先看:ConnectAgentWidget.tsx 顶部新卡片,ui/packages/i18n/src/locales/zh-Hans.ts 和 en.ts 的 connectAgent.capabilities,测试文件末尾新增的 describe。
  • 两分钟验证:本地部署打开 设置 → 连接 AI 助手,第一张卡片是「连接后,AI 助手能做什么」,下面是三条示例请求和复制按钮;往下的地址卡片标题是「本系统的连接地址」,不再提 OAuth 2.1。
  • 需要你做的:无,席位落地。
  • 席位意见:ui 席 2 对照 head bcbc29ec 的 diff 复核:15 个文件、+342 / −102,无受治理路径。「连接 AI 助手」页顶部新增一张卡:用两句白话说明连接后助手能查找、新建、修改、删除你有权操作的记录并运行操作,始终以你的身份;附三条可复制的示例请求和「先试第一条」的提示(页面尚不能判断是否已连接,所以对所有人显示)。地址卡、Claude Code 步骤和关闭状态不再出现 MCP / OAuth,协议词只留在客户端自己的菜单和表单里;API 密钥提示指向「高级:脚本与 CI」。十个语言包同步,繁体由简体生成。阿语一条旧文案断言改为 toContain,因标题已改写。遗留:Expected 2(已连接的助手与最近调用,等 The OAuth consent page promises you can revoke access from your account settings, but no page lists the AI assistants you authorized #30894)和页头副标题。CI 全绿,Clause-② no,不欠契约复审。同意落地。

What changes

  • ConnectAgentWidget.tsx: a new first card, "What your AI assistant can do here". It holds two plain sentences (look up, create, change and delete the records you may, run actions, always as you), three example requests each with a copy button, and a line saying to try the first one, because an answer listing your objects shows the connection works. The address card follows, then the client picker, as before.
  • Copy without protocol words (Expected 3): the address card title and body, the Claude Code step, and the turned-off empty state now say "connection address", "sign in in the browser" and "AI assistant connections". MCP, OAuth and Streamable HTTP remain only where a client's own menu or form uses them: Codex's "MCP servers" menu, WorkBuddy's "Configure MCP" button, QwenWork's Streamable HTTP transport choice, the Transport field values, and the operator setting OS_MCP_SERVER_ENABLED named in the turned-off state.
  • The four hints that fall back to an API key (Codex, WorkBuddy, Doubao Work, QwenWork) said "create a key below". The key form now sits in the collapsed Advanced section, so they name it: "(create one under Advanced: scripts and CI below)".
  • i18n: seven new keys under connectAgent.capabilities and the reworded strings, in all ten packs; zh-Hant.ts regenerated with gen:zh-hant.
  • Root changeset .changeset/30898-connect-agent-what-it-can-do.md (@object-ui/app-shell, @object-ui/i18n: patch).

Tests

ConnectAgentWidget.keyName-13355.test.tsx gets a new describe:

  • §1: the capabilities card comes before the address, with body, three example requests each beside a copy button, and the try-first line.
  • §2: every pack carries the seven capability strings, and none is an English copy.
  • §3: no connectAgent.* string in any pack contains MCP, OAuth or Streamable HTTP, outside the four client-form keys.
  • §4: each fallback hint contains that pack's advanced.title.

Ablation: putting en.ts back to its state before this change fails §2, §3 and §4 (§3 lists en disabled.title, url.title, url.body and claudeCode.body).

Two existing i18n pins moved with the copy:

  • residue-namespaces-3546.test.tsx pinned the old Arabic turned-off title verbatim. It now checks that the title keeps the pack's deployment word, في هذا النشر, which is what that case claims.
  • The German hints name Advanced without „…“ quotes, so de-quote-pairing-3876's pinned pair count stays 107.

Leftovers

  • Expected 2, the "connected: which assistant, last call" line, reads the same per-person records as The OAuth consent page promises you can revoke access from your account settings, but no page lists the AI assistants you authorized #30894, which is blocked. This PR ships only the nothing-connected-yet part: the try-first line, shown to everyone and never derived from a click.
  • Expected 3, outside this PR's surface: the page header subtitle is page metadata in packages/mcp/src/connect-ui.ts ("Give any MCP-capable AI client governed access … row-level security."). Its translations live in packages/platform-objects/src/apps/translations (pages.connect_agent.subtitle, source-hashed). It still uses protocol words and goes with Expected 2.

Verification

Head bcbc29ec. The branch was restarted on main 115a43ad, after PR #30973 merged as d9d3eb70, and the change was cherry-picked cleanly. A full pnpm build on that base ran 119/119.

Live check on a local deployment (showcase with the fresh flag, console Vite dev, admin and member)
  • Before (main with Connect an Agent offers the claude.ai and cloud-task steps on a deployment those clients cannot reach, with only a line of small print #30897): the page opens with "This system's MCP endpoint" and a paragraph on OAuth 2.1 and row-level security, and no sentence says what an assistant can do. As admin and as member alike, the widget plus header carried 7 protocol-word hits on the Claude tab and 8 on Codex.
  • After: the first card is "What your AI assistant can do here", with the two sentences, then "List the objects I can see." / "Count how many records each of those objects has." / "What actions can I run here, and what does each one do?" with copy buttons, then the try-first line. Below it comes "This system's connection address".
  • Protocol-word hits after: 2 on Claude, Cursor and Doubao Work, both from the page header subtitle (a leftover, see above). Codex has 4: the header plus its "MCP servers" menu and Streamable HTTP field. WorkBuddy has 3 (its "Configure MCP" button) and QwenWork 3 (its transport choice). Admin and member read the same.
Local tests and gates
  • pnpm --dir ui exec vitest run packages/app-shell/src/console/connect/ packages/i18n/ packages/app-shell/src/__tests__/product-neutral-renderer.ratchet.test.ts → 100 files, 1693 passed, 13 skipped (widget file 16/16)
  • app-shell tsc --noEmit and tsc -p tsconfig.test.json → exit 0. eslint on packages/app-shell/src/console/connect/ → 0 errors (3 pre-existing no-explicit-any warnings).
  • pnpm --filter @object-ui/i18n gen:zh-hant → zh-Hant.ts current. pnpm check:test-source-alias → OK.
  • dispatch-gates --commands derived 38 commands on bcbc29e, and all 38 exit 0. That includes node scripts/check-sdui-manifest.mjs and pnpm --dir ui exec vitest run scripts/ (170 files passed). --ran with exit codes: 38 run, 0 NOT-MEASURED (derived zero), 0 UNRUN.

…assistant can do

The page opens with two plain sentences on what a connected assistant can
do (look up, create, change and delete the records you may, run actions,
always as you), three example requests with copy buttons, and which one to
try first to see the connection work. The address card, the Claude Code
step and the turned-off state drop protocol words; MCP, OAuth and
Streamable HTTP stay only where a client's own menu or form uses them. The
API key fallback hints name the Advanced section where the key form now
lives. New and reworded strings in all ten console packs, zh-Hant
regenerated.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibzWZSWpaweunqGyeA9
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 6, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#2 · os-tesla · session_01L9qibw7DekEe3wx5f3zphf

席位核对 · ACCEPT · 2026-11-06T21:56Z · head bcbc29ec94f60c78a6a242a902faffb4b61e95a1

Seat domain:ui#2 reviewed the diff of its own dispatch (claim 6694925714 on #30898, card thread session_01L9qibzWZSWpaweunqGyeA9, report 6696350854). The same seat dispatched and reviews; the code is the thread's.

  1. Shape: 15 files, +342 / -102.
    • New card (Expected 1). A capabilities card sits above the address card. Its body says, in plain words, that the assistant looks up, creates, changes and deletes the records you may, runs actions, and always works as you. It lists three example requests with copy buttons, plus a "start with the first one" line. That line is shown to everyone, since the page cannot yet tell whether a client is connected.
    • Copy (Expected 3). The url, disabled and claudeCode copy drops MCP / OAuth / Streamable HTTP. Protocol words remain only where a client's own menu or form names them.
    • Key hints. The four API-key fallback hints point to the existing "Advanced: scripts and CI" section; the title was checked in en.ts and zh-Hans.ts.
    • Packs. All ten packs are updated, with zh-Hant regenerated.
    • Layout. The step list is not restructured, so ui seat 3's The OAuth consent page promises you can revoke access from your account settings, but no page lists the AI assistants you authorized #30894 list can sit beside it.
    • Link. Part of #30898.
  2. Premise measured: on main@115a43ad, the page opens with the endpoint and an OAuth 2.1 paragraph, as the card says. Widget, i18n and ratchet tests pass: 100 files, 1693 tests. With en.ts ablated, §2–§4 go red.
  3. Gates / check-runs:
    • 55 check runs on this head: 44 success, 11 skipped, 0 red. These include Test UI 16/16, Type Check UI, Lint UI and both E2E UI legs.
    • 38 derived gates exit 0, with --ran reconciled.
    • check:test-source-alias OK.
    • mergeable_state clean.
  4. Accepted deviation: residue-namespaces-3546 changes the Arabic connectAgent.disabled.title pin from toBe to toContain('في هذا النشر'). The title was reworded on purpose, the pin's subject (the pack's deployment word) still holds, and the neighbouring rows already use toContain.
  5. Out of scope / Skills-docs: the remainder stays on the card.
  6. Landing: check-governed-merges --pr 31052 on the final list says not governed, 444 changed lines, so Tier S, with no human approval owed. Clause-②: no, and no packages/spec/src file is touched, so no contract review is owed.
    • Landing on the maintainer's standing words 「按 pm-dispatch 审过的pr你可以自主落地」 (2026-10-30T14:20Z) and 「你应该是使用 pm-dispatch 技能自主审核和落地 pr」 (2026-11-06T14:09Z).
    • Relay pr_ready, then automerge_enable.
    • On merge the card goes back to pm:queue for the remainder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant