Repository navigation
fix(app-shell): the translation preview names a global action by its label (objectui#11755) - #11763
Merged
objectstack-fleet[bot] merged 1 commit intoOct 7, 2026
Conversation
…label (objectui#11755) TranslationDataSchema declares every globalActions entry as an action translation node, not a string. The preview marked the category flat and drew each value with String(v), so every spec-valid entry rendered as NAME[object Object]. The category is now nested, and its sample shows the node's label, quoted as a flat string is; a node without a label shows its key count, as the other nested categories do. Claude-Session: https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
objectstack-fleet
Bot
deleted the
claude/issue-11755-translation-preview-global-actions
branch
October 7, 2026 05:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11755
Clause-②: no
The translation designer's preview drew every spec-valid
globalActionsentry asNAME[object Object]. It now shows the action node'slabel, quoted as a flat string is, and the node's key count when the node has nolabel.What changed
TranslationPreview: theglobalActionscategory is nested now (flat: false) and carries a newnodeLabelflag on the file-localCategoryDef.renderSampleValuetakes the category. For anodeLabelcategory it returns the node'slabelwhen that is a string, and otherwise the existing key-count row.globalActions, and says how the category is drawn.messagesandobjects.CategoryDefis file-local. So the claim'sClause-②: noholds..changeset/11755-translation-preview-global-actions.md(patchon@object-ui/app-shell). All three are inside the claim's file surface.Measured before the change (objectui
77c12b9, installed@objectstack/spec17.7.0)A throwaway probe mounted the real component. It was deleted before the commit, and
git statuswas clean afterwards.TranslationDataSchema.safeParseglobalActions: { portfolio_snapshot: { label: 'Snapshot' } }portfolio_snapshot[object Object]objects: { sales_order: { label, _actions: { close_order: { label } } } }sales_order{2 keys}globalActions: { close_order: 'Close' }(legacy flat string)invalid_typeatglobalActions.close_orderclose_order"Close"After the change, the same probe read
portfolio_snapshot"Snapshot", thenclose_orderClose, thensales_order{2 keys}(unchanged). None of the three contains[object Object]."The same per-node rendering the object
_actionsentries get": that rendering does not existThe preview never renders an
objects.X._actions.Yentry by itself. The objects category lists only the top-level object names, each with its inner key count (sales_order{2 keys}above), and never descends into_actions. So the triage scope's phrase points at nothing, and the card's Done-when ("at leastlabel") decides. Named gap: object nodes keep their key count, and onlyglobalActionsreads a node'slabel. Other nested categories (apps,dashboards,metadataForms) also declarelabelin the spec. They are not changed here.The legacy flat-string value
globalActions.NAME: 'Close'is refused by the spec (invalid_type, expected object). The designer's own client validation refuses it too: the same probe ranvalidateMetadataDraft('translation', …)and gotglobalActions.close_order: Invalid input: expected object, received string. After this change the preview draws that value through the nested branch's existing scalar fallback,String(v). It readsClose, unquoted. That is readable, never[object Object]and never blank, and it does not look like a valid label. No branch was added for the refused shape (AGENTS.md #0.1, contract-first). The spec refuses the value at validation, and the preview shows what is stored. The behaviour is not pinned, because a pin would fix in place how the renderer treats input the spec refuses.Pins:
TranslationPreview.globalActions-11755.test.tsx(4 tests)Each test first parses its fixture with the installed spec's
TranslationDataSchemaand asserts success. The fixture is this file's own, because objectui#11439 moves the preview sample's onlyglobalActionsentry out.{ label: 'Snapshot' }renders"Snapshot", and the preview text has no[object Object].confirmTextandsuccessMessagebesidelabelstill renders the label.labelrenders its key count. The expected row is read back throughtFormat.messagesrenders"Bienvenue"as before, andobjectskeeps its key count.Ablations
Both ablations were run on the committed fix
29bff9ethrough objectstack'sscripts/ablation-replace.mjs. The tool asserts that the anchor count fell and the blob hash changed, then restores the file and proves its blob equals HEAD with an emptygit diff HEAD.flat: trueon theglobalActionsdef (anchor hit x1 to x0, blobca2d00a4bc7bto682296fde42c):Tests 3 failed | 1 passed (4). The failures wereexpected '[object Object]' to be '"Snapshot"'twice andexpected '[object Object]' to be '{2 keys}'. The control stayed green. Restored: blob equals HEAD (ca2d00a4bc7b), andgit diff HEADis empty.nodeLabel: true, keepingflat: false(blobca2d00a4bc7bto2b964160a448):Tests 2 failed | 2 passed (4). The failures wereexpected '{1 keys}' to be '"Snapshot"'andexpected '{3 keys}' to be '"Snapshot"', so the label branch carries the fix, not theflatflip alone. Restored the same way.Gates (all on HEAD
29bff9e, run from the worktree root)pnpm exec vitest run packages/app-shell/Test Files 1053 passed, 1 skipped (1054),Tests 10306 passed, 9 skipped (10315)pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' buildpnpm --filter @object-ui/app-shell type-checktsc --noEmit && tsc -p tsconfig.test.json;--listFilesOnlyon the test project lists the new pin filepnpm exec eslinton the two touched.tsxfilespnpm check:control-bytescheck-control-bytes: OKpnpm check:test-path-rootscheck-test-path-roots: OKpnpm check:changeset-claimsNo pending changeset names a file this change touches.pnpm check:pending-changeset-literalsNo test source names a pending changeset.pnpm check:new-line-citations0 new citation(s)node scripts/check-changeset-presence.mjs2 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s)node scripts/check-changeset-no-major.mjs,check-changeset-overwrite.mjs,check-changeset-fixed.mjspnpm check:spec-symbols,pnpm check:i18n-keys,node scripts/check-type-check-coverage.mjs,node scripts/check-lint-coverage.mjsNot run locally because the diff does not reach them: the i18n parity and drift gates (no locale pack changed) and
check:readme-exports(no export changed). The full farm is CI's.Acceptance notes
CATEGORIEStable is reported to the seat as a finding and is not fixed here. Fixing it needs new category heading rows, which is aClause-②question. The table listsvalidationMessages, which@objectstack/spec17.0.0 removed (TranslationDataSchemarefuses it withunrecognized_keys), andsettings, a platform-only group that the application bundle schema refuses. It omitspicklists,datasets,pages,flowsandsettingsCommon. Measured on the real component at77c12b9: a bundle whose only entries arepages(orpicklists) passesTranslationDataSchemaand the designer's client validation, yet the preview reads "This bundle is empty — add at least one translated string to see the coverage report."keyCountrow reads{1 keys}for a single key (seen in the second ablation). This is polish and is not filed.globalActions.close_orderout. This PR does not touchapps/console/src/preview-samples.ts.Session:
https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8Generated by Claude Code