Repository navigation
fix(app-shell): a draft-only object's nav entry opens its drafted default list view in Studio Interfaces - #30315
Draft
objectstack-fleet[bot] wants to merge 3 commits into
Draft
objectstack-fleet[bot] wants to merge 3 commits into
objectstack-fleet[bot] wants to merge 3 commits into
Conversation
…ault list view in Studio Interfaces The entry of an object with no viewName resolved its default list view from the shell's merged listViews only. A draft-only object is absent there, so the entry opened a non-existent `<object>.default`, the view switcher listed a phantom "Default view" beside the drafted one, and the first edit created a second default list view. The entry's default is now resolved against the merged views and this package's drafted list views (the draft-overlaid list the switcher already reads). Until that read answers, a default no merged view flags is held: no view is loaded or listed for it. Claude-Session: https://claude.ai/code/session_01WGufzigMc8dMgZMjwQtjCq Co-authored-by: Claude <noreply@anthropic.com>
…et for the draft-only default list view fix Claude-Session: https://claude.ai/code/session_01WGufzigMc8dMgZMjwQtjCq Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#4 · os-support-ai · session_01WGufzinedUGSXteN45poyo 维护者速读
席位意见:ACCEPT。 席位核对ACCEPT → PR #30315 @
|
This was referenced Nov 5, 2026
This branch has not been deployed
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.
Requested by Yibo Wang · project thread
Fixes #30177
Clause-②: no
Metadata-protocol: none
维护者速读
OBJECT.default;作者一编辑,包里就多出第二个默认列表视图,而且它的列是空的。ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx里useObjectListViewDraft的entryTarget/holding两段,以及新函数draftedListViewsOf。pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/ObjectListViewInspector.draftOnlyObject-12508.test.tsx,预期 8 个测试全部通过,其中 objectstack#30177 一组断言入口打开acmetrial_deal.all、切换器只列这一项、第一次编辑只写这一个视图。What changes
In Studio › Interfaces, the list-view panel of an
objectnav entry with noviewNameedits the object's default list view.useObjectListViewDraftresolved that view (listViewTargetOf) from the shell's mergedlistViewsonly. A draft-only object is absent from the shell's metadata, so the entry openedOBJECT.default, which does not exist; the header's view switcher listed that "Default view" beside the view the author had drafted withisDefault: true; and the first edit createdOBJECT.defaultwithisDefault: true, a second default list view in the package (seeded with no columns).draftedListViewsOf, over the draft-overlaid view list the switcher already reads; no new request). A flagged merged view still wins; a flagged drafted view comes next;OBJECT.defaultstays the fallback.holding): no buffer is loaded and nothing is listed, so no edit can be made against the fallback name before the drafted default is known. A failed or refused draft read lists nothing drafted, and the entry falls back toOBJECT.defaultas before.draftOnlyObjects) is itself read asynchronously and can be stale across a publish, and a published object whose package drafts its first default view had the same phantom; resolving against the drafted views avoids both without depending on that set.Changeset:
@object-ui/app-shellpatch.Tests
New top-level
describein the existing hook harnessObjectListViewInspector.draftOnlyObject-12508.test.tsx(real hook, realMetadataClientover an in-memory server; the server now also serves the drafts ledger, the draft-overlaid view list,?state=draftreads and records PUTs):acmetrial_deal.all(isDefault: true) + entry with noviewName→ the panel targets and loadsacmetrial_deal.all; the switcher lists only it; the first edit (made as the panel makes it) PUTsview/acmetrial_deal.alland no other view carriesisDefault;acmetrial_deal.defaultrequest is sent; once it answers, the entry isacmetrial_deal.all;OBJECT.default;OBJECT.default, and the first edit creates it flagged default.Ablation (fix committed first; scripts/ablation-replace.mjs, restored to the HEAD blob, git diff HEAD empty)
{ ...publishedViews, ...draftedListViewsOf(objectName, draftViewRows) }→publishedViews): 2 failed, 6 passed. The first pin readsviewIdacmetrial_deal.defaultwhereacmetrial_deal.allis expected; the hold pin's settled target isacmetrial_deal.default.holdingforcedfalse): 1 failed, 7 passed.loadedForreadslistView:acmetrial_deal.defaultwhile the drafts are unread.Test runs
d0d0f1e6(before mergingmain): every app-shell test file importingObjectListViewInspectororStudioDesignSurface, 210 files,--maxWorkers=2, under the verify lock:Test Files 210 passed (210),Tests 1344 passed (1344), VERDICT command-exit 0.bfd2fbff(after mergingmain959c26be, rebuilt): the 33 list-view, Interfaces-pillar and draft-only files of that set:Test Files 33 passed (33),Tests 183 passed (183), VERDICT 0.pnpm --filter @object-ui/app-shell run type-check: VERDICT 0.Gates at bfd2fbf
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(3 paths vs merge base959c26be1): 35 commands, run serially under one verify lock (VERDICT command-exit 0), every one exit 0, includingnode scripts/check-sdui-manifest.mjsandpnpm --dir ui exec vitest run scripts/(Test Files 170 passed | 2 skipped (172),Tests 4985 passed | 2 skipped).--ranwith the recorded exit codes: 35 derived, 35 run, 0 NOT-MEASURED (a derived zero). The record is the project'sui-orders/30177-gates-ran.list.Not run locally: the full ui suite (CI's Test UI shards run it).
origin/mainmoved after the merge; its only overlap with this PR's area is four added lines inStudioDesignSurface.tsx, a file this PR does not edit.Verification
Dev boot of
examples/app-crm(objectstack dev --seed-admin --fresh) after a full build, console Vite pointed at it, Playwright Chromium, signed in as the dev admin. Seeded over the REST door as the card describes: writable packagecom.acme.trial, then with?mode=draftthe objectacmetrial_deal, the list viewacmetrial_deal.all(label: All deals,isDefault: true) and the appacmetrial_appwhose one nav entry is the object with noviewName. Opened the entry in Studio › Interfaces.ObjectListViewInspector.tsx, Vite restarted with--force, served module checked)acmetrial_deal.default, "There is no list view "Default view" yet", 0 columnsacmetrial_deal.all, "Unpublished draft", columns Name, Stageview/acmetrial_deal.default,isDefault: true, columns[amount]view/acmetrial_deal.all,isDefault: true, columns[name, stage, amount]acmetrial_deal.allandacmetrial_deal.default, bothisDefault: trueacmetrial_deal.allShots (2x, 1440 wide) and the request readings are in the project's
ui-orders/30177-shots/folder (before-switcher.png,before-edited.png,after-switcher.png,after-edited.png); this repository has no place to commit them, perui/AGENTS.mdHousekeeping.Acceptance notes
seedColumnsisdefaultListColumnsFromObject(objectDef, 5)andobjectDefcomes from the shell's merged objects, which do not hold a draft-only object, so the seed is empty: the before leg's first edit wrotecolumns: [amount]only, and New view's fallback columns are empty the same way. Seeding from the object's draft fields is a different read (the object's draft definition, not the view drafts this PR reuses), so it stays out of this PR per the dispatch and is reported to the seat for its own card.Generated by Claude Code