Skip to content

ai chat: update a record from chat — record pages send {objectName, recordId} to ask, and the edit form shows AI-proposed values as before/after #28106

Closed

Description

@objectstack-fleet

Filing gate ③: a task on the maintainer's word. Sam, on the objectstack#27286 re-evaluation (doc https://claude.ai/artifact/DLzVUSyDabAxTDuwAp7a97, §5 phase 1): 「同意开发 S1 粘贴即建单」 (2026-10-30 12:53Z), then 「其实不只是粘贴吧,任何内容我都可以让他创建和更新记录是吗?通过聊天的方式。」 (12:54Z), choosing to fold in update (phase 1b). Scope: AI drafts in chat, a person saves; no spec contract; no in-form button (phase 2), no S2, no S3. Filed by repo:cloud seat 2. ⛔ Not a claim.

维护者速读

要让用户在记录详情页对 AI 说「把电话改成……」「根据这封邮件更新一下」,界面需要做两件事。第一,告诉 AI 当前是哪条记录:现在只有 Studio 会把页面上下文传给 AI。第二,cloud 返回修改建议后(cloud#3383:open_record 带 proposedValues),编辑表单要显示改前和改后的对照,标「AI 建议」,由用户确认保存,绝不自动提交。

Facts (objectstack main)

  • Only ui/packages/app-shell/src/views/studio-design/StudioAiCopilot.tsx sends a surface context today.
  • The runtime already reads context.objectName / recordId (cloud service-ai/src/agent-runtime.ts:729).
  • plugin-chatbot already renders the open_record hand-off.

Work

  1. The record detail page (and the record drawer, if it hosts the assistant) sends {objectName, recordId} as the ask conversation's context while that record is open.
  2. plugin-chatbot: when an open_record result carries proposedValues, the card reads 「修改 X(N 个字段)→」. It navigates to the record's edit form with the values in router state, never the query string.
  3. The edit form shows each proposed field as before → after, marked 「AI 建议」, with per-field revert. It never auto-submits.
  4. Tests: the context is sent from the record page, the card variant, state navigation with no query string, the before/after display, revert, no auto-submit. Include an ablation.

Done when

On a record page, asking the AI to change fields opens the edit form with marked, unsaved proposed values.

Depends on: objectstack-ai/cloud#3383.

Activity

  1. added
    enhancementNew feature or request
    domain:cloudTouches cloud: the whole card is the cloud PM's (repo:cloud seat); no objectstack lane claims it
    status:parkedParked — exempt from the PM sweep and half-state patrol until its owner migrates it (e.g. cloud PM)
    on Oct 30, 2026
  2. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: moved to the cloud PM · domain:cloud · status:parked · 2026-10-30T14:03Z

    ⛔ Not a claim.

    • This card is the Console half of cloud#3383 (open_record with proposedValues), and it was filed by the cloud seat. Under 「一个issue只要涉及 cloud ,就归 cloud pm 处理」 it belongs to the cloud PM.
    • domain:cloud and status:parked. This repo does not dispatch it. It is not closed. The priority:p2 the filer set stays.

    Generated by Claude Code

  3. added
    pm:queueReady for the PM dispatch loop
    repo:cloudCard routed whole to the cloud PM: needs cloud code, a producer or a fact (cloud owns it to closure)
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    status:parkedParked — exempt from the PM sweep and half-state patrol until its owner migrates it (e.g. cloud PM)
    pm:queueReady for the PM dispatch loop
    on Nov 7, 2026
  4. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:cloud#3 · os-zhuang · session_01QUs3BvRcDHXqRU4TSVE4u6

    Claim: PM loop round 1
    Session: session_01QUs3BvRcDHXqRU4TSVE4u6
    Account: os-zhuang
    Branch: claude/project-thread-6hmii7
    Worktree: the card thread's own clone (mode:thread; the thread can push only its assigned branch, a measured platform exception to claude/issue-N-SLUG)
    Domain: domain:cloud (repo:cloud lane)
    Seat: repo:cloud#3
    File surface: ui/** record page ask context, plugin-chatbot open_record card variant, edit-form before/after display (and their tests), .changeset/** (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: opus (dispatch-gates --tier: no path-derived mandate, default tier; the maintainer's standing order pauses the ceiling tier), effort: high
    Clause-②: no (renders an existing tool result; no packages/spec path)
    Metadata-protocol: none
    Responsibility: implement + local gates; draft PR Closes #28106; seat reviews and lands
    Thread-read: 6524711306
    Premise: holds (pre-dispatch reading in the dispatch order; the dev re-measures first and stops on a falsified premise)
    Serial constraints cleared: serial behind objectstack#28104 (branch claude/project-thread-3l9gvy): reuse its router-state carrier; merge main after it lands, before the PR

  5. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:cloud#3 · os-zhuang · session_01QUs3BvstGvKpRZPWDGvLmz
    os-dev-report

    {
      "issue": 28106,
      "status": "done",
      "branch": "claude/project-thread-6hmii7",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/31477 (draft, Closes #28106, head 229de9fb)",
      "session": "session_01QUs3BvstGvKpRZPWDGvLmz",
      "premise_still_valid": false,
      "summary": "Premise re-measured on objectstack ae816c40 / cloud 9ca2765. Item 1 was already done for the record page by objectstack#30043 (console dock sends context.surface with selection kind record; cloud turn-grounding.ts reads it); the open gap was the list DRAWER (?recordId=), now read on the three list routes. Item 2 is false as written: cloud#3565 removed open_record's proposedValues arm (open-record.tool.ts header), so no 修改 X(N 个字段)card variant was built. What survives, accepted by seat 3: the update_record card's Open the full form now carries the proposed values to /record/:id/edit through #28104's router-state carrier (recordFormAiDraft, same key, bound to the recordId), and the edit form applies them once over the loaded record as dirty edits, marked with the same AI suggestion mark, with a Was: line and a per-field Revert; never auto-submits. New host slot SuggestedFieldChangesContext beside SuggestedFieldsContext; three i18n keys x11 locales. No spec path.",
      "tests": "Head 229de9fb after pnpm install --frozen-lockfile + turbo build of @object-ui/app-shell^... (66/66), under os-verify-lock. type-check components/i18n/app-shell: exit 0 x3. vitest packages/components/: 478 files passed, 1 skipped; 4584 tests passed, 24 skipped. packages/i18n/: 99 files; 1804 passed, 13 skipped. app-shell NARROWED (declared) to src/layout, src/utils, src/console/ai, src/views/RecordFormPage: 256 files passed, 1 skipped; 2134 passed, 8 skipped (full package = 2218 files, CI Test UI). Ablation via scripts/ablation-replace.mjs on the pre-merge head (same delta), source-aliased so no dist step, each restore proven blob == HEAD: A renderer apply loop skipped -> 4 red (lands-marked, revert, dirty/read-only, Save payload), #28104 cells + control green; B edit page reads no changes -> 2 red; C drawer param ignored -> 2 red (unit + dock wire); D update target drops state -> 2 red. Leg A's own-edit cell stayed green and was strengthened (asserts the mark first) in cb1a8535.",
      "gates": "dispatch-gates --commands on 229de9fb: 39 families, all run locally, each exit captured before any pipe, all exit 0 (check:type-check-debt under the lock: 0 entries above their number). --ran reconciliation: 39 derived, 39 run, 0 NOT-MEASURED (derived zero), 0 UNRUN. check:test-source-alias red once on the edited dock test (dynamic @objectstack/lint load), fixed in d6b726d7. objectstack has no check:all script (that is cloud's); the derived list is this repo's equivalent. PR check-runs: in_progress at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "6 — read-only: issue_read x4 (#28106 get/comments x2, #28104 comments), list_pull_requests x2; no write tool",
      "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/31477/assignees, run 42471113440), this report via post-stamped (POST issues/28106/comments); plus git push (not REST)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — the Was: line shows a bare lookup id when the edit read returns the lookup unexpanded (no lookup read is made for it); in Acceptance notes",
        "carrier: none · noted, not filed — a proposal reaches a field read-only only by a readonlyWhen predicate at open time (static config is what the apply step reads); the save-time write gate still decides; in Acceptance notes"
      ]
    }
  6. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:cloud#3 · os-zhuang · session_01QUs3BvRcDHXqRU4TSVE4u6

    Claim: #28106 · branch claude/project-thread-6hmii7 · PR objectstack#31477 · 2026-11-08T12:03Z

    The dispatched thread built it on this branch. The seat ACCEPT is on the PR at head 79a39a9c; readied and auto-merge armed.

  7. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:cloud#3 · os-zhuang · session_01QUs3BvRcDHXqRU4TSVE4u6

    Landed · 2026-11-08T12:34Z

    objectstack#31477 merged at 2026-11-08T12:33Z as 4211f50f4 and closed this card.

    • The AI chat update card's "Open the full form" now opens the edit form on the proposed values, before → after, marked 「AI 建议」, with a per-field revert. Nothing is saved until the person saves.
    • Wizard edit forms apply each proposal on the step that draws it. Rule-locked fields are skipped.
    • A record open in a list's drawer is now the chat's "this record".

    Owed after a cloud pin round carries 4211f50f4: a staging reading of one chat update opened in the full form (before/after shown, revert works, nothing saved until Save). That rides the pin round's checklist.

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

Metadata

Metadata

Assignees

Labels

domain:cloudTouches cloud: the whole card is the cloud PM's (repo:cloud seat); no objectstack lane claims itenhancementNew feature or requestpriority:p2Medium: important, M3repo:cloudCard routed whole to the cloud PM: needs cloud code, a producer or a fact (cloud owns it to closure)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions