Skip to content

fix(app-shell): record create/update toasts name the saved record - #26202

Merged
objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/project-thread-db3k9m
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/project-thread-db3k9m

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #26172

Clause-②: no (adds or rewords message keys; no key is removed, so TranslationKeys only widens; no exported runtime contract changes)
Metadata-protocol: none

What

The Console's record create and update success toasts now name the saved record by its display name (ADR-0079), as the ruled ux-conventions.write-feedback clause asks: Task "Quarterly review" created, Task "Quarterly review" updated. A record with nothing nameable keeps today's object-label toast (Task created successfully).

  • ui/packages/app-shell/src/console/AppContent.tsx: one message builder, recordSaveMessage(saved), now serves both toast sites, the main path (handleCrudSuccess, which hands the message to the runner's crud_success) and the child-form task path (a subtable child opened over its parent's record page, which toasts directly). handleRecordFormSuccess passes the saved record it already receives to both. The name comes from getRecordDisplayName in @object-ui/core, read through the object being saved (formObjectDef), so it follows the object's declared nameField. The resolver's floor (Record #ID, or the empty fallback for a row with no id) is not a name, and falls back to the object-label string. This is the same floor test recordToOption in LookupField and renderLookupColumnValue already use.
  • ui/packages/i18n/src/locales/*.ts (all ten packs): two new keys, form.createdNamed and form.updatedNamed, each with {{object}} (object label) and {{title}} (record name), quoted the way each pack already quotes a name (deleteConfirmTitle is the model: curly quotes in zh, corner brackets in ja, low-high quotes in de, straight quotes elsewhere). form.createSuccess / form.updateSuccess are unchanged and stay the no-name toast.
  • scripts/sdui-manifest.sources/i18n.json: re-recorded by node scripts/gen-sdui-manifest-node.mjs (1 of 27 package records moved: i18n). sdui.manifest.json itself is unchanged.
  • Two count pins in ui/packages/i18n move with the diff: de-quote-pairing-3876 (94 to 96 matched pairs, the two new de values) and residue-namespaces-3546 (the common.record fallback in AppContent is written once now, 2 to 1).
  • Root changeset .changeset/26172-record-save-toast-names-record.md (patch, @object-ui/app-shell, @object-ui/i18n).

Out of scope, per the ruling: settings saves and flow-completion toasts.

Tests

New: ui/packages/app-shell/src/console/__tests__/AppContent.recordSaveToastNamesRecord-26172.test.tsx, a real AppContent mount in a real i18next instance (the harness of AppContent.createLandingOriginPlural-11733). Nine cells: main path and child-form path, each for create and update, each with a name and with none, plus one zh-CN cell (任务“季度复盘”已创建).

  • New file: 9/9 passed.
  • Ablation (committed fix, node scripts/ablation-replace.mjs, anchor const title = resolved && !(id replaced by const title = false && resolved && !(id; anchor 1 to 0, blob 66183e3229a8 to a12d7507a89f): 5 failed / 4 passed. All five "names the record" cells went red (expected 'Task created successfully' to be 'Task "Quarterly review" created'), and the four no-name cells stayed green, the direction written in the test's header before the run. Restore: blob back to 66183e3229a8 equals HEAD, git diff HEAD empty.
  • vitest run packages/i18n/ packages/app-shell/src/console/__tests__/: first run 3 failed (the two count pins above), 1694 passed. After re-pinning, the two files: 52/52 passed.
  • Every other test file under ui/ that names AppContent.tsx or form.createSuccess / form.updateSuccess (14 files): 89/89 passed.
  • Test runs were at 3c5713b5. The one later commit (e9bd0d06) only re-records scripts/sdui-manifest.sources/i18n.json.

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

Acceptance notes

  • On an edit, the name is read off what the save returned (dataSource.update's record). The toast can only name the record if that response carries the name field. The ObjectStack adapter returns the server's record. A live server was not booted for this PR.
  • Serial: ui/packages/i18n is held by the batch PR chore(i18n): delete 92 message keys nothing reads from all ten locale packs #26158. This PR stays draft. Merging main, re-recording i18n.json and enqueuing wait until that batch has merged and the ui seat says go. The two count pins above may need a re-pin at that merge if the batch moves the same counts.

Generated by Claude Code

The console's create and update success toasts (the main crud_success
path and the child-form task path) now carry the saved record's ADR-0079
display name, e.g. `Task "Quarterly review" created`. A record with
nothing nameable keeps the object-label toast. Two new form.* keys,
createdNamed and updatedNamed, in all ten locale packs.

Claude-Session: https://claude.ai/code/session_01DiQzqGc2iCV6ZSmHBw4mwe
Co-authored-by: Claude <noreply@anthropic.com>
Two new de values add one matched pair each, and AppContent's two
record-save toast sites now share one fallback label.

Claude-Session: https://claude.ai/code/session_01DiQzqGc2iCV6ZSmHBw4mwe
Co-authored-by: Claude <noreply@anthropic.com>
claude and others added 3 commits October 26, 2026 16:48
…-db3k9m

# Conflicts:
#	scripts/sdui-manifest.sources/i18n.json
#	ui/packages/i18n/src/locales/ar.ts
#	ui/packages/i18n/src/locales/de.ts
#	ui/packages/i18n/src/locales/en.ts
#	ui/packages/i18n/src/locales/es.ts
#	ui/packages/i18n/src/locales/fr.ts
#	ui/packages/i18n/src/locales/ja.ts
#	ui/packages/i18n/src/locales/ko.ts
#	ui/packages/i18n/src/locales/pt.ts
#	ui/packages/i18n/src/locales/ru.ts
#	ui/packages/i18n/src/locales/zh.ts
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · seat domain:ui#1 · 2026-10-26T17:31Z

Head 15539259 (read from the PR object). It is the dev's 08ff39d0 plus a seat-side "update branch" merge of main past a1477dec (#26231). Nothing that landed on main since 6862ef62 touches ui/packages/i18n or any sdui record, so the dev's i18n re-record stands.

Landing: ready + auto-merge through the relay.

…-db3k9m

# Conflicts:
#	scripts/sdui-manifest.sources/i18n.json
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT (re-armed after a queue removal) · seat domain:ui#1 · 2026-10-26T19:01Z

Head 19ef0384 (read from the PR object). It carries over the ACCEPT on 15539259.

Landing: auto-merge re-enabled through the relay.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit b3ed6c8 Oct 26, 2026
61 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-db3k9m branch October 26, 2026 19:54
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 tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record create/update success toasts name the record by its title, not only the object (ruling C on #25849)

2 participants