Repository navigation
fix(app-shell): "Discard draft" names the item by its label, not its machine id (objectui#12690) - #12830
Merged
objectstack-fleet[bot] merged 3 commits intoOct 17, 2026
Conversation
…machine id
The metadata editor's discard confirm and success toast formatted
`{type}/{name}`, so a labelled item read `Draft discarded: object/NAME`.
Both strings now take one `{item}`: the label the item's loaded body
carries, or `type/name` when it carries none. The runtime draft bar,
which shares the confirm string and holds no label, passes `type/name`
and keeps its text.
Claude-Session: https://claude.ai/code/session_01HzBjXBLGY32mEXYqz8zbUv
Co-authored-by: Claude <noreply@anthropic.com>
…out a cast Claude-Session: https://claude.ai/code/session_01HzBjXBLGY32mEXYqz8zbUv Co-authored-by: Claude <noreply@anthropic.com>
…scard-draft-label
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
|
Contributor
Author
席位核对 · ACCEPT ·
|
objectstack-fleet
Bot
deleted the
claude/issue-12690-discard-draft-label
branch
October 17, 2026 00:25
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 #12690
Clause-②: no
What
Discarding a metadata draft in the Setup metadata editor named the item by its machine id, even when the item has a label. The confirm asked "Discard the pending draft for object/uxscratch_widget?" and the toast said "Draft discarded: object/uxscratch_widget". Both now name the label the item's loaded body carries ("QA Widget"), in English and Chinese. An item with no label still reads type/name, and the discard request is unchanged.
How
ResourceEditPage.tsx(doDiscardDraft) reads the subject once, before the discard: the trimmeddraft.labelwhen it is a non-empty string, otherwisetype/name. That is the same body field the AI-chat editor context already reads, so there is no second label resolution. The page header was checked first: its breadcrumb shows the machine name, not the label.metadata-admin/i18n.ts:engine.edit.discardDraftConfirmandengine.edit.draftDiscardedtake one{item}placeholder instead of{type}/{name}, in en and zh. This dictionary is module-local: the package exports only., and the root barrel never re-exports it. So this is not a published key change, hence Clause-② no.RuntimeDraftBar.tsx(the view and report config panels) formats the same confirm key. It holds no label, so it now passesitemas type/name. Its text is byte-identical, and a new test pins it. This file is outside the claim's surface (see the report).Tests
ResourceEditPage.discardDraftLabel-12690.test.tsx(the real page over a real MetadataClient with an in-memory server): en and zh-CN, the confirm and the toast name the label and not doc/NAME. CONTROL: an item with no label still reads doc/plain_note, and exactly one DELETE goes to the same package-less draft address.ResourceEditPage.discardFeedback-12303.test.tsx: the objectui#12303 pin is updated, not deleted. Its fixture's label equals its name, so it now expects the label form, and its header explains the change.RuntimeDraftBar.test.tsx: the discard confirm reads "Discard the pending draft for view/my_view?" with every placeholder filled.Live reading
Backend from e2e/live/ci/start-backend.sh (published @objectstack/*@18.0.0-next.2), console dev server proxied to it, an env-wide draft of object/uxscratch_widget labelled "QA Widget", discarded through the page:
Screenshots and readings are on branch claude/issue-12690-evidence, under evidence/12690/.
Acceptance notes
Provenance: built by the cloud session
session_01HzBjXBLGY32mEXYqz8zbUv(claim6226200185, corrected6226264912) and opened by thedomain:uiseat 1 PM (session_011K9g23W67dy2zwnyzaoB6o) from that session's final message, because a cloud session cannot open a PR from its container. The seat replaced the dev's footer line with this paragraph and changed nothing else.Generated by Claude Code