Repository navigation
fix(app-shell): Studio's draft panel and build history address a bundle member (?member=) - #12400
Merged
Merged
Conversation
…le member The pending-changes sheet reads `member` off each `_drafts` row and passes it as `?member=` on every by-name `/meta` read (published, draft, and the member's own NEW/UPDATE probe); row identity is type + name + member. The commit timeline shows the member of each touched item that carries one. An entry without `member` sends no selector. Claude-Session: https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB 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
|
This was referenced Oct 15, 2026
This was referenced Oct 15, 2026
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 #12271
Clause-②: no
Studio's pending-changes sheet and build history stop conflating two members of one bundle. Since objectstack-ai/objectstack#23073 (PR objectstack-ai/objectstack#23099,
252a5821de) eachGET /meta/_draftsrow and each touched item ofGET /packages/:id/commitscarriesmemberfor a type whose identity is a pair (today onlyemail_template,(name, locale)), and the by-name/metadoors take it back as?member=(objectstack038d4c958). Key and presence rule read from the INSTALLED@objectstack/spec18.0.0-next.1:member: z.string().optional()onListDraftsResponseSchema.drafts[]and onListPackageCommitsResponseSchema.commits[].items[], "present on every draft of such a type ... absent for a type whose identity is its name alone".What changed (
packages/app-shell/src/preview/)usePendingDrafts.ts—fetchPendingDraftscopiesmemberonto the entry when served (a non-empty string), and adds nothing otherwise.DraftChangesPanel.tsxmember. Row identity (React key, expanded set, no-change set) is the JSON tuple of type, name and member (entryKey), so two members of one name are two rows.fetchItemBodysendsmember=only when the entry carries one. The drill-in's published read and draft read both pass the entry's member. An entry without one sends no selector, never an empty one.?member=. The published NAME list says the name is published, which foremail_templateis true as soon as any one language is. Name-only entries keep the one list read per type.commitHistory.ts/CommitTimeline.tsx—fetchCommitskeeps the touched items that carrymember(memberItems). The timeline lists them astype/name · memberunder the commit. A commit whose items carry none renders exactly as before.Premise measurements (dispatch assumptions A1 to A3)
objectdrafts only (lintDraftSecurityPosturefilterstype === 'object'), and an object never carriesmember, so that read is unchanged. Publishing belongs to the host:usePublishAllDraftsuses the package batch door, orclient.publishDraft(type, name)for a package-less draft. Neither is in this file surface. See Acceptance notes.metadata-client.ts. The panel uses its ownfetchhelpers inpreview/, so that file is untouched.Tests
DraftChangesPanel.bundleMember-12271.test.tsx(5 cases):email_templateare two rows, each showing its member;?member=read (zh-CN reads New although the name is in the published list);objectentry sends nomember=on any read.CommitTimeline.bundleMember-12271.test.tsx(2 cases): the member list for two languages; nothing extra for a member-less commit.vitest run packages/app-shell/src/preview/:Test Files 21 passed (21),Tests 153 passed (153)(under the verify lock, on the tree committed as8b5b0b49c).ablation-replace.mjs:member=push infetchItemBodyreplaced (anchor 1 to 0, blobcc71e34a1a44to5c7b08b83b38).Tests 3 failed | 4 passed (7). Red: the classification pin and both drill-in pins, the predicted direction. The row-identity pin and the timeline pins stay green, which they should.cc71e34a1a44,git diff HEADempty.Gates (recorded exit codes, tree
8b5b0b49c)check:phantom-deps,check:self-import,check:unreferenced-sources,check:doc-example-readers,check:handler-key-reads,check:side-effects-array,check:element-data-source-declaration,check:spec-symbols,check:action-forward-parity,check:designer-field-key-parity,check:icon-record-names,check:i18n-keys,check:i18n-drift,check:i18n-designer-parity,check:control-bytes,scripts/check-changeset-fixed.mjs,scripts/check-changeset-presence.mjs.eslintnarrowed to the 6 changed files: exit 0, 0 errors, 4 warnings.28fb2a001, read witheslint --stdinon the base blobs).eslint.config.js, so this diff cannot move the verdict on an untouched file.type-check(closure build) and the full app-shell vitest project. Reason: the shared verify lock was not acquired in three 9-minute waits. The holder ran a fullpackages/app-shell/run for over 30 minutes. Declared to CI.--maxWorkers=1. This is a declared narrowing.Acceptance notes
Package-less member publish.
usePublishAllDrafts(Home banner, draft-preview bar) still publishes a package-less draft byclient.publishDraft(type, name). The call chain isusePublishAllDrafts, thenuseMetadataClient, thenMetadataClient.publishDraftinpackages/data-objectstack/src/metadata-client.ts. That method takes no member, and the hook's ownlistDraftsmapping dropsmember. A package-lesszh-CNdraft would therefore publish the canonical member. Package-bound drafts go through the package batch door and are unaffected. Out of this card's file surface, andmetadata-client.tsis held by objectui#12335. Carrier: objectui#12335 (the PR that touchesmetadata-client.ts).The member is shown as served (
zh-CN), not as a language name, so no string was added.Adds no product-specific widget, dialog, hook or string (see AGENTS.md › Product-neutral renderer)
Session:
https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gBGenerated by Claude Code