Skip to content

fix(plugin-view): Studio Records grid create names the record in a toast - #39954

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-39743-studio-create-feedback
Dec 6, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-39743-studio-create-feedback

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #39743

Clause-②: no
Metadata-protocol: none

维护者速读

  • 管理员在 Studio 的记录表格里新建或编辑一条记录后,会看到一条点名该记录的提示(例如「任务“季度复盘”已创建」),此前保存成功却毫无反馈。
  • 属于界面体验一致性:让 Studio 与控制台列表的保存提示保持同一条消息。
  • 出错时最坏是提示不出现或文案不对,不影响数据保存;改动可直接撤回。
  • 无

What changes

  • Landing point: ui/packages/plugin-view/src/ObjectView.tsx, not DataPillar.tsx. Measured on b9be251: Studio's Records grid Add record calls the plugin ObjectView's handleCreate (forwarded through the renderListView slot as onAddRecord), and the drawer form it opens reports success to plugin-view's handleFormSuccess, which closed the form and refreshed the rows with no feedback. DataPillar.tsx never sees that save, so the fix sits at the producer, where the save is answered.
  • New sibling module ui/packages/plugin-view/src/formSaveFeedback.ts (useFormSaveFeedback): toasts the shared record-save message (recordSaveMessage from @object-ui/i18n, the builder the console's record dialogs and the object-form containers use), through toastRecordSave, and claims the write's answer warnings while the form is open so the save stays ONE toast. ObjectView.tsx (over 1,000 lines) only gains the call.
  • The same handler answers the view's own edit form, so an edit there now says Task "X" updated too (same defect class, same line).
  • Console list: no double toast. Its renderListView (objectViewListRenderer.tsx) hands ListView the console's own createRecord, and its edits go through the onEdit override, so it never opens the plugin ObjectView's form; AppContent keeps its single toast. The new test pins a host-owned create through the same ObjectView raising no toast.

Tests

  • ui/packages/app-shell/src/views/studio-design/DataPillar.createFeedback-39743.test.tsx drives the real Studio slot (plugin ObjectView + renderStudioGridList, the node DataPillar mounts): Add record, fill, submit.
    • en: Task "Quarterly review" created, exactly once; zh-CN: Task“Quarterly review”已创建, exactly once.
    • A host-owned create (console shape): no internal form, no write, no toast.
  • Red on main: with ObjectView.tsx restored to b9be251, the en and zh-CN rows fail (create called once, toast never), the host row passes. Green on 0ccbc99: 3/3.

Acceptance notes

  • The SDUI object-view block on authored pages uses the same internal form, so its saves gain the same toast.

Verification

Local runs on 0ccbc99
  • vitest run packages/app-shell/src/views/studio-design/DataPillar.createFeedback-39743.test.tsx (+ StudioDesignSurface.gridRefresh, ObjectView.addRecordOpensCreate-13089): 9/9 passed.
  • vitest run packages/plugin-view/ on 9aa7515: 68 files, 735 tests passed (later commits drop an unreachable comparison and add a test import only).
  • pnpm --filter @object-ui/plugin-view run type-check: exit 0; pnpm --filter @object-ui/app-shell run type-check: exit 0.
  • dispatch-gates --ran: 39 derived families, 39 run, 0 NOT-MEASURED, all exit 0.

Read first: ui/packages/plugin-view/src/formSaveFeedback.ts (the toast and the warning claim), then the handleFormSuccess hunk in ObjectView.tsx.
Two-minute check: Studio, open an object, Records, Add record, Create; expect a toast OBJECT "NAME" created.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmPC9UyxNHfB2SRvzsr

@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 Dec 6, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-steve · os-steve · session_01ADHkmRM92nyNXbcm2LJn1N

席位核对

ACCEPT · head 0ccbc997 · read 2026-12-06T18:44Z

L1 of PR #39954 (Fixes #39743), read on the full diff at 0ccbc9970af219db069150e119552da870c23bf1.

  • Shape: the fix sits where the save is answered. Studio's Records grid opens plugin-view ObjectView's own drawer form, whose handleFormSuccess closed the form with no feedback; the new useFormSaveFeedback (formSaveFeedback.ts) toasts the shared recordSaveMessage through toastRecordSave and claims the write's answer warnings while the form is open, so one save is one toast. ObjectView.tsx gains only the hook call. Console list: its renderListView passes the console's own createRecord and onEdit, so the internal form is never opened there and AppContent keeps its single toast; the host-owned row pins that.
  • Premise measured: new test 3/3 green on this head (built @object-ui/app-shell^..., run from ui/). Own ablation: toastFormSave(saved) removed ⇒ the en and zh-CN rows go red (2 failed | 1 passed); restored, tree clean.
  • Gates: check-runs at this head 39 success · 15 expected skip · 0 failed · 0 pending; mergeable clean.
  • Accepted deviation: the edit form of the same view now toasts updated too (same handler, same defect class), stated in the changeset; the SDUI object-view block gains the same toast (Acceptance notes). Both are the producer-side reading of the card, not new scope.
  • Out of scope / Skills-docs: Clause-②: no, Metadata-protocol: none; no Skills-docs line owed. Changeset @object-ui/plugin-view patch present.
  • Landing condition: the claim's File surface (7460434485) names DataPillar.tsx; the diff lands in ui/packages/plugin-view/src/ObjectView.tsx + new ui/packages/plugin-view/src/formSaveFeedback.ts and leaves DataPillar.tsx untouched. The zone amends the claim surface to those two files before landing. In-flight check on those two paths: clear (no other claim meets them).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-steve · os-steve · session_01ADHkmPC9UyxNHfB2SRvzsr

Landing · 2026-12-06T18:53Z · zone ost-T · L1-a ACCEPT 7462758300 at 0ccbc997

Reading Result
check-governed-merges.mjs --pr 39954 NOT governed; 268 changed lines, under 3000
landing-k.mjs --pr 39954 can't answer: ui-only diff, no Test Core shard ran on the last green run, so no Affected-set diff base; the merge queue builds on current main
check runs at 0ccbc997 all success or skipped; mergeable_state clean

Ready + auto-merge in this stroke. On MERGED: #39743 closes by Fixes; the zone drops its pm:dispatched.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 6, 2026 18:54
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge December 6, 2026 18:54
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 6, 2026
Merged via the queue into main with commit b01fcae Dec 6, 2026
55 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-39743-studio-create-feedback branch December 6, 2026 19:15
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.

studio: creating a record from the Records grid gives no feedback — no toast and no status text, unlike the console list's Task "X" created

2 participants