Skip to content

Studio 里的 AI 面板:与应用里的 AI 助手统一名字、入口、宽度和标题栏,放大改为原地铺满 #34725

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #34571(控制台核心业务操作体验专题,维护者直派,「都是p1」)。⛔ 不是认领。
维护者 2026-11-17 原话:「刚才设计 ai 的时候,漏掉了 studio」;看过图 20 后:「可以,立卡」。

与 #34608(应用里的 AI 助手右侧抽屉)是同一个方向的两半:#34608 改 ChatDock 一侧,没有覆盖 Studio 自己的那套组件。两张卡落地后,两处应是同一个名字、同一个入口位置、同一套标题栏。

现状(读码,objectstack origin/main a34eb07;界面实测在本地 cloud 环境,窗口宽 1163,zh-CN)

  • Studio 的 AI 面板是另一套组件:ui/packages/app-shell/src/views/studio-design/StudioAiCopilot.tsx,放在右栏 StudioRightSlot.tsx 里,与「属性」二选一(objectui#12725)。
  • 名字:zh-CN 是「AI 副驾」(ui/packages/i18n/src/namespaces/studio/zh.ts:2931 engine.studio.aiCopilot);应用里叫「AI 助手」。
  • 放大是跳页:StudioAiCopilot.tsx:229–231 的 openFullPage 导航到 /ai/build?package=…,按钮提示「在完整页面中打开」(engine.studio.slot.openFullPage,test id studio-copilot-maximize)。
  • 宽度:实测面板 299px(STUDIO_SLOT_WIDTH,studioRightSlotState.ts;窄屏浮层是 w-[min(360px,100vw)],StudioRightSlot.tsx:113)。上一轮问数的表格和结果卡在这个宽度里很挤。
  • 标题区实测有三行:「AI 副驾」一行、用量与放大图标一行、「构建 · 会议纪要」与分享一行。
  • 上下文提示实测写的是内部名:「正在讨论:object · ti8v_meeting」。
  • 入口:Studio 工作台顶栏没有机器人图标,用的是一个面板开关图标;应用顶栏是机器人。
  • 已有的支撑:AI 改动的草稿标记已经存在,但只画在属性面板上(StudioDraftMark.tsx,读草稿的 draftChanges,by: 'copilot');放弃草稿是整包的(packages.discardDrafts,AiChatPage.tsx:2135–2139),没有按一轮对话撤销的能力。

要做的

  1. 名字统一为「AI 助手」(各语言同步;草稿来源句里的「AI 副驾」一并改)。
  2. Studio 工作台顶栏用与应用顶栏相同的机器人按钮、相同位置,只开关右侧面板;⌘. 保留。
  3. 标题栏收成一行:左边「属性 | AI 助手」切换,右边「历史 / 铺满 / 关闭」。用量指示与分享收进菜单或历史里。
  4. 「铺满」改为原地展开并可收回,不再导航到 /ai/build;与 AI 助手:右侧抽屉作为唯一的聊天容器,顶栏机器人打开它,放大是原地铺满并可收回 #34608 用同一个图标和同一套行为。
  5. 默认宽度提到 420(与应用里一致),可拖宽;窗口放不下时照现有规则转浮层。
  6. 上下文提示用标签:「正在看:会议 · 记录」,不出现 object · ti8v_meeting 这类内部名。
  7. AI 改动在画布上可见:记录表格的列头、表单画布里的字段,凡是草稿里 by: 'copilot' 的,带草稿标记(数据来源与属性面板现有的标记相同,不新增服务端读取)。画布上方一条提示「AI 刚改了 N 处」,带「查看」。
  8. 面板里的结果卡不放发布按钮,发布只在 Studio 顶栏(与 AI 搭建:在右侧抽屉里搭建,主区域直接显示应用草稿本身;去掉嵌套预览,整屏一个发布按钮、一个改动数 #34610 的「整屏一个发布按钮」一致)。

不做的

  • 不做「按一轮对话撤销」:现有能力只有整包放弃草稿。图 20 里的「撤销这次改动」在本卡里落为现有的整包放弃,并如实写成「放弃全部未发布改动」;按轮撤销需要服务端支持,另议。
  • 不改对话与上下文的绑定逻辑,不改 AI 的工具与提示词。

验收

  1. 在 Studio 里打开面板,标题是「AI 助手」,标题栏一行;点铺满,地址不变、对话与输入中的草稿都在,再点收回。
  2. 默认宽度 420;1163 宽的窗口里问数的 3 列表格不出现横向裁切。
  3. 打开「会议」对象时提示是「正在看:会议 · 记录」。
  4. 让 AI 给会议加一个字段:记录表格的新列带草稿标记,画布上方出现「AI 刚改了 1 处」。
  5. 结果卡上没有发布按钮;Studio 顶栏的「发布」可用。

设计图(静态示意稿,标「新」的是改动;示例数据是虚构的)

图 20 Studio 里的 AI 助手

图 20 Studio 里的 AI 助手

Reader: domain:ui 车道,改 StudioAiCopilot.tsx、StudioRightSlot.tsx、studioRightSlotState.ts、Studio 顶栏与 ui/packages/i18n/src/namespaces/studio/;与 #34608 的实现者对齐铺满的行为。

Dedupe: repo:objectstack-ai/objectstack StudioAiCopilot maximize in place AI 副驾 copilot slot width rename → 0(含已关)。

Activity

  1. added
    enhancement
    priority:p1
    domain:ui
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: pm:queue · 2026-11-17T08:49Z

    ⛔ Not a claim.

  3. added
    pm:queue
    on Nov 17, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzfd562n5Rccarjf31X

    Claim: PM loop · seat 3 card thread · 2026-11-17T08:53Z
    Session: session_01WGufzgh1zkZzDXL36ckWAG (seat)
    Thread session: session_01WGufzfd562n5Rccarjf31X
    Account: os-support-ai
    Branch: claude/project-thread-oclfj4 (card-thread pinned branch)
    Worktree: objectstack (card-thread container)
    Domain: domain:ui
    Seat: repo:objectstack#3
    File surface: ui/packages/app-shell/src/views/studio-design/** files the items need (StudioAiCopilot, StudioRightSlot, studioRightSlotState, the Studio top bar in StudioDesignSurface, canvas draft-mark sites, StudioDraftMark) plus their tests, ui/packages/i18n/src/namespaces/studio/**, root .changeset/
    Container & model: L, mode:thread (large card; hands its head back to area o3-D), model: TIER_DEFAULT, effort: high
    Clause-②: yes (widening — locale keys only)
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6943276975
    Premise: holds on origin/main dc66d33 merged with #34713's head a33148b: the Studio slot names the panel engine.studio.aiCopilot (「AI 副驾」), its width is the fixed STUDIO_SLOT_WIDTH, the top bar's slot toggle is a panel icon, and the panel draws three header rows. Items 4 (in-place widen, same Maximize2/Minimize2 control) and 8 (publishFromShellBar, no Publish on result cards) are already done on #34713's head and are not redone here.
    Serial constraints cleared: built on PR #34713 (claude/issue-34610-drawer-build, Tier H) merged into this branch; this PR opens only after #34713 merges (no stacked PR). Neighbours #34724, #34715/#34714 and PR #34677: overlap-check before every push.

    Lease o3-D (seat post #34584); child of epic #34571.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 17, 2026
  6. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

    Claim amendment · 2026-11-17T08:55Z

    Claim 6943341819 (branch claude/project-thread-oclfj4, built on PR #34713's head): file surface widens for three items the card thread measured:

    1. Item 3 (one-row title bar): ui/packages/app-shell/src/console/ai/AiChatPage.tsx, one optional ChatPane prop so a host that draws its own title bar omits ChatPane's header row (workspace-private).
    2. Item 6 (「正在看:会议 · 记录」): the VALUE of the existing eager key console.ai.discussing changes in all 11 ui/packages/i18n/src/locales/*.ts, so the app drawer and Studio read the same words (the card's aim is one wording on both surfaces). No new eager key.
    3. Item 7 (draft mark on records-grid column headers): ui/packages/components/src/context/gridFieldAuthoring.tsx gains one optional member (field name → node drawn after the header label), read by ui/packages/components/src/renderers/complex/data-table.tsx. Form-canvas marks stay in studio-design.

    Clause-②: yes (widening: studio-namespace locale keys, and one optional member on the published @object-ui/components GridFieldAuthoring interface). Seat ruling: the published package face gets a seat L2 at TIER_DEFAULT; L1-b is the review of record for the rest.
    Metadata-protocol: none
    Serial: AiChatPage.tsx and the locale packs are also in PR #34713; this branch builds on it and opens its PR only after #34713 merges.

  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

    Claim amendment · 2026-11-17T09:41Z

    Claim 6943341819 (branch claude/project-thread-oclfj4): file surface adds four consequences of the approved locale value changes and the GridFieldAuthoring member:

    • ui/packages/app-shell/src/preview/DraftChangesPanel.tsx (one inline defaultValue now copies the en value; check:i18n-keys default-value drift)
    • ui/packages/app-shell/src/preview/DraftChangesPanel.agentSource-27176.test.tsx and ui/packages/app-shell/src/console/ai/__tests__/AiChatPage.surfaceChipLabel-8219.test.tsx (strings, plus a hideHeader pin)
    • ui/scripts/i18n-en-drift-baseline.json (one waiver: preview.changes.draftedByCopilot in ar, whose sentence already says "AI assistant")
    • ui/packages/components/src/renderers/complex/__tests__/data-table-columnMarks-34725.test.tsx (new pin)

    Clause-②: unchanged. Metadata-protocol: unchanged.

  8. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

    Claim amendment · 2026-11-17T10:22Z

    Claim 6943341819 (branch claude/project-thread-oclfj4): file surface adds ui/scripts/__tests__/check-i18n-en-drift.test.ts (WAIVER_CEILING 6 → 7 with its history line), which is the ratchet's documented route for the ar preview.changes.draftedByCopilot waiver accepted in the previous amendment. The module-top import '@objectstack/lint' added to four existing studio/drafts test files (check:test-source-alias) stays inside the surface already named.

    Clause-②: unchanged. Metadata-protocol: unchanged.

  9. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzfd562n5Rccarjf31X
    os-dev-report

    {
      "issue": 34725,
      "status": "done",
      "branch": "claude/project-thread-oclfj4",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34851",
      "session": "session_01WGufzfd562n5Rccarjf31X",
      "premise_still_valid": true,
      "summary": "Studio's AI panel now matches the console's AI assistant: named AI Assistant / AI 助手 everywhere (incl. the draft-source sentence), the console's top-bar robot toggles the right slot and opens it on the assistant (⌘. kept), one header row (switch | History, widen, Close) with Share and usage moved into a History view, 420 px default width resizable from the left edge under its own storage key, a context chip reading the object label and view (正在看:任务 · 记录), and draft marks on the Data canvas (grid column header via an optional GridFieldAuthoring.columnMarks, Form field card, and a 「AI 刚改了 N 处」 line with 查看 and 放弃全部未发布改动 via packages.discardDrafts). Items 4 and 8 were done by #34713 and not redone. Deviation accepted by the seat: a field the assistant adds has no grid column before publish (cloud#1652), so it is marked on its Form card and counted in the line. The en live reading found the top bar overflowing under a wide slot; pillar names now answer a container query on the bar.",
      "tests": "After merging main dfbc316d: pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design packages/app-shell/src/preview packages/app-shell/src/console/ai/__tests__/AiChatPage.surfaceChipLabel-8219.test.tsx packages/components/src/renderers/complex/__tests__/data-table-columnMarks-34725.test.tsx scripts/__tests__/check-i18n-en-drift.test.ts -> Test Files 385 passed (385), Tests 2997 passed (2997). Narrow-header pin re-run after its lint import: 3 passed. Live readings at 1163x820, zh-CN and en, showcase boot with only /api/v1/ai/** stubbed: acceptance 1-5 met; logs and shots in /mnt/project-files/objectstack-seat3/34725-live/.",
      "gates": "app-shell tsc + tsc -p tsconfig.test.json exit 0; components tsc -p tsconfig.test.json exit 0; eslint changed files 0 errors; check:i18n-keys 0, check:i18n-drift 0; check-eager-closure-budget exit 0 with i18n-locale-en 61,823 B gzip of 62,000 (headroom 177 B) on the merged tree; dispatch-gates --ran: 40 derived, 40 run, 0 NOT-MEASURED (first-run red check:test-source-alias on narrowHeader-12509 fixed by a module-top lint import, re-run exit 0); overlap-check VERDICT clean vs main, #34677, #34799, #34825. CI check-runs on #34851 pending at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "reads only: mcp__github__issue_read, mcp__github__pull_request_read; no write tools",
      "api_writes": "relay only: label-write.mjs claim (1), fleet-write pr_create #34851 (1), this post-stamped comment (1)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: PR #34851 · engine.studio.slot.openFullPage is no longer read; retiring it is a separate change · noted, not filed"
      ]
    }

    Generated by Claude Code

  10. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

    Seat note: accepted deviation · 2026-11-17T14:08Z

    This records on the card the deviation the seat accepted at 09:03Z (epic note 10 on #34571), which PR #34851 relies on.

    Acceptance 4 (item 7): a field the assistant adds has no grid column until it is published (cloud#1652). Its draft mark therefore goes on its Form card and on the count line, not on a new grid column. The marked grid column of acceptance 4 applies once a published field's column exists, and GridFieldAuthoring.columnMarks carries it there. Accepted by the seat; it does not block landing.

  11. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz

    Closed by merge · 2026-11-17T16:35Z

    PR #34851 merged at 2026-11-17T16:09Z (Fixes #34725). Delivered in the Studio AI panel: AI draft changes show in place (the AI-changes line, draft chips on the form card and column headers, 查看, discard-all), with discard failures labelled and the server text under Details. L1 REWORK 6950061229 → ACCEPT 6950960042 → delta ACCEPT 6952319807 (area merge-forward); seat L2 PASS at TIER_DEFAULT on the @object-ui/components columnMarks face (nits carried in the record; N1 as epic note 18 on #34571). The acceptance-4 deviation is recorded as a seat note on this card. New keys live in namespaces/studio. pm:dispatched and lease:o3-D removed.

  12. removed
    pm:dispatched
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:uienhancementpriority:p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions