Skip to content

fix(app-shell): the full-page record form save toast names the saved record - #26528

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-26461-record-form-page-toast
Oct 27, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-26461-record-form-page-toast

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #26461

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:整页记录表单(/new、/edit 路由)保存成功提示改为点名记录标题,如 Task "Quarterly review" updated;复用弹窗路径同一解析器、同一无名兜底、同两个文案键,不新增文案。
  • 为什么改:弹窗路径(fix(app-shell): record create/update toasts name the saved record #26202)已按裁决 C 点名记录,整页路由仍只显示「Task updated successfully」,本单补齐这一半。
  • 风险与代价(含回滚):只改一个视图的提示文字,无标题记录仍显示原对象名提示;新测试先红后绿,10 个相关测试文件 62/62 通过;回滚即还原本 PR。
  • 席位意见:
  • 你要做的:无需决策;CI 绿后按常规评审落地。

What

The full-page record form (RecordFormPage, the /new and /record/ID/edit routes used by objects whose form opens as a page) now names the saved record in its success toast. It works the same way as the dialog paths that PR #26202 changed in ui/packages/app-shell/src/console/AppContent.tsx (recordSaveMessage):

  • The name is getRecordDisplayName from @object-ui/core (ADR-0079), read through this page's object, so it follows the object's declared nameField.
  • The floor is the same. The resolver's Record #ID answer, or an empty answer for a row with no id, is not a name, so the page falls back to form.createSuccess / form.updateSuccess (Task created successfully). The page also falls back when onSuccess receives no record.
  • The keys are the same: form.createdNamed / form.updatedNamed. They are already in all ten packs, so no locale file changes and no wording is added. As with every other t() in this file, the keys are passed without an inline defaultValue.
  • ObjectForm already hands the write's result to schema.onSuccess(result) in every layout (simple, tabbed, wizard, split), the same contract ModalForm serves to the dialog path. handleSuccess now reads that argument.

Files:

  • ui/packages/app-shell/src/views/RecordFormPage.tsx: handleSuccess(saved) builds the named or fallback toast.
  • ui/packages/app-shell/src/views/RecordFormPage.saveToastNamesRecord-26461.test.tsx (new): six cells. Create and update with a name, create and update at the Record #ID floor, update with no record handed back, and one zh cell.
  • ui/packages/app-shell/src/views/RecordFormPage.i18n.test.tsx: the two named keys join the page's bare-keys list, which is pinned present in all ten packs.
  • .changeset/26461-record-form-page-toast.md: patch, @object-ui/app-shell.

Tests

All runs are at head 4a0094b9, under scripts/pm/os-verify-lock.sh.

  • Red first: the test commit's page (RecordFormPage.tsx restored tree-only to the base 00a4593a, with getRecordDisplayName count 0) gave 3 failed / 3 passed. The three "names the record" cells failed (expected 'Task created successfully' to be 'Task "Quarterly review" created', the update cell the same, and zh expected 'Task更新成功' ...). The three no-name cells passed. This matches the direction written in the test header before the run. Restore: git checkout HEAD -- RecordFormPage.tsx, then the blob equals HEAD (4442d066) and git status is clean.
  • Green: the ten app-shell test files that import RecordFormPage (the nine that exist plus the new one) gave Test Files 10 passed (10), Tests 62 passed (62).
  • pnpm --filter @object-ui/app-shell type-check: exit 0. Its tsconfig.test.json includes src/**/*.test.tsx, so the new file is compiled.
  • The dependency closure was built first: pnpm --filter '@object-ui/app-shell^...' build, VERDICT command-exit 0.

Narrowed on purpose: the whole app-shell suite is left to CI Build & E2E UI / Test Core.

Gates

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 34 families. All 34 were run locally after the last commit, and --ran accounted for 34 of 34.

  • 33 exited 0, including node scripts/check-sdui-manifest.mjs (present and intact, 106 components) and its --self-test, and pnpm --dir ui exec vitest run scripts/ (178 files passed, 2 skipped; 5097 tests passed).
  • pnpm check:type-check-debt exited 3 (PREREQUISITE NOT MET). This is NOT MEASURED, not a pass and not a finding. It is a repo-wide --re-measure that needs a full package build behind the shared lock. CI's Lint & Repo Gates run is the reading of record.
  • No registry component contract changed, so sdui.manifest.json was not regenerated.

Acceptance notes

  • On an edit, the name is read off what the save returned. This is the same caveat PR fix(app-shell): record create/update toasts name the saved record #26202 recorded for the dialog path: the toast can name the record only if the write's response carries the name field. A live server was not booted for this PR.
  • recordSaveMessage in AppContent.tsx and handleSuccess here now repeat the same resolver-and-floor steps (about six lines). Extracting one shared builder would change AppContent.tsx, which is outside this card's file surface, so it is not done here.

Generated by Claude Code

…record

Red-first pin for create and update on the /new and /edit routes.

Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup
Co-authored-by: Claude <noreply@anthropic.com>
…record

RecordFormPage (/new and /edit) now toasts form.createdNamed /
form.updatedNamed with the record's ADR-0079 display name, the same resolver,
floor and keys the dialog paths in AppContent use; a record with nothing
nameable keeps the object-label toast.

Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling labels Oct 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

维护者速读

改了什么:整页记录表单(/new、/record/ID/edit 路由)保存成功的提示,现在点名保存的记录,如 Task "Quarterly review" updated;与弹窗路径用同一个显示名解析器、同一条无名兜底、同两个已有文案键,不新增文案。
为什么改:弹窗路径(#26172 / #26202)已点名记录,整页路由仍只显示「Task updated successfully」,同一动作两种反馈(#26461)。
风险与回滚:只改 RecordFormPage.tsx 的 handleSuccess;记录无可用名称(解析器只给出 Record #ID)或保存结果没传回时,仍显示原来的对象名提示。回滚 = revert 本 PR。
先看:ui/packages/app-shell/src/views/RecordFormPage.tsx 的 handleSuccess → 新钉子 RecordFormPage.saveToastNamesRecord-26461.test.tsx(6 个用例)→ RecordFormPage.i18n.test.tsx 新增的两个键。
两分钟验证:在 ui/ 下运行 pnpm exec vitest run packages/app-shell/src/views/RecordFormPage.saveToastNamesRecord-26461.test.tsx,预期 1 个文件 6 个用例全过。
需要你做的:无,席位落地。
席位意见:ACCEPT。PR 正文的速读块标签不全(写成「席位意见 / 你要做的」),以本记录为准;正文在 pr_create 之后不再改。

席位核对

seat 2 · 2026-10-27T06:49Z · head 4a0094b9 (#26461)

item reading
form 4 files, +198/−7: RecordFormPage.tsx handleSuccess(saved) builds the named or fallback toast; new pin RecordFormPage.saveToastNamesRecord-26461 (create/update named, create/update at the Record #ID floor, update with no record handed back, one zh cell); RecordFormPage.i18n.test.tsx adds the two named keys to the bare-keys list pinned in all ten packs; root .changeset/ patch on @object-ui/app-shell
premise measured ObjectForm already passes the write's result to onSuccess in every layout; form.createdNamed / form.updatedNamed already in all ten packs; the page's handleSuccess ignored the argument
gates (check-runs on 4a0094b9) 45 success, 9 skipped, 0 failing (Test UI 16/16, Build & E2E UI, Type Check UI, Lint UI, governed guard all green). Local: red 3/6 before the fix (the three named cells), green after; 10 app-shell files / 62 tests; app-shell type-check exit 0; 33 of 34 derived gates exit 0, check:type-check-debt exit 3 (prerequisite, not measured locally) and green in CI as Type Check · debt ledger
accepted deviations the dialog's recordSaveMessage lives inside AppContent.tsx as a hook-scoped callback and is not exported, so the ~6-line name/floor rule is repeated here, read line by line against AppContent.tsx:834–851 and identical; the page passes keys bare (no inline defaultValue) like every other t() in this file
out of scope lifting the name/floor rule into one shared helper for both call sites (two sites, both pinned; no card filed)
landing not governed (check-governed-merges: 205 changed lines, no hit paths); git merge-tree against origin/main d2ca707 clean; no other seat-2 card on RecordFormPage.tsx

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 27, 2026 06:51
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 185512c Oct 27, 2026
55 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-26461-record-form-page-toast branch October 27, 2026 07:10
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

Projects

None yet

1 participant