Skip to content

fix(app-shell): Studio pillar loads and the metadata item editor open no buffer over a draft the server refuses to read - #29380

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-jr58yz
Nov 2, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-jr58yz

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #29148 (PR 2 of 2, the split the claim amendment 6574316242 records; PR 1 #29275 landed the four editors at 192c15c).

Clause-②: no
Metadata-protocol: none

The two lines are copied from the claim (comment 6574269114) and its amendment (comment 6574316242).

维护者速读

  • 改了什么:Studio 的 Interfaces 应用导航、Data 对象及其在配对包里的扩展、Automations 流程,以及元数据项编辑页(加载与发布后的重读),读草稿遇到服务器 403(草稿带受众门 requiredPermissions,作者无权读)时,不再当成"没有草稿"去打开已发布版本:不装编辑缓冲,不发任何保存,显示同一条拒绝说明,服务器原话放在"详情"里。StudioRefusalStrip 移到独立模块,元数据项编辑页画的就是 Studio 那一条。
  • 为什么改:之前这些入口会把已发布版本当作编辑起点,下一次保存把它写成草稿,悄悄抹掉草稿里的权限门和其他未发布改动。PR 1 修了四个编辑器,本 PR 修剩下的加载点,完成 Studio editors still read a refused (403) draft as "no draft" and can save the published body over it: Interfaces app nav, ResourceEditPage, list view inspector, bundle item, permission matrix, hooks #29148。
  • 风险与回滚:只影响草稿读取返回 403 的项;无草稿、可读草稿、其他读取失败的路径不变。元数据项编辑页对这样的项不提供任何写操作(保存、发布、丢弃、重置、删除),直到草稿可读。回滚即撤销本 PR。
  • 先看:ResourceEditPage.tsx 的 draftRefused 状态、加载与 doPublish 两处 'refused' in draftRead 分支和提前返回;StudioDesignSurface.tsx 四处同样的分支;新模块 StudioRefusalStrip.tsx(内容原样搬移)。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/ResourceEditPage.draftUnreadable-29148.test.tsx,预期 3 个用例通过。
  • 需要你做的:无,席位落地。

What changes

readDraftForSave hands a draft read refused 403 back as refused (#29132). The remaining loads that installed a buffer from that answer now act on it the way the Interfaces leaf load (#29015) and PR 1's four editors do: no buffer and no pin are installed, the engine.studio.refusal.draftUnreadable sentence shows with the server's own sentence (formatMetadataError) behind Details, and nothing is sent. No new i18n key.

  • studio-design/StudioDesignSurface.tsx, Interfaces pillar, app nav load: a refused app draft installs no nav buffer (appDraftFor stays unloaded, so the nav autosave's target is never loaded), the pillar reads it as a failed load with the strip, and Edit nav is not offered. No leaf opens under the unread navigation.
  • Data pillar, object load: a refused object draft leaves objDraftFor unloaded, so the designer shows the strip in place of the object and its autosave has nothing to send. On the draft-only path the published layers are not read to stand in for it.
  • Data pillar, object-extension load (a base's pair, Studio: add a field to a read-only base object — written as an extension in <base>.custom named xxx__c, base fields editable only within the display-property whitelist #28575): a refused extension draft installs no extension buffer, so neither Add field door (the Form toolbar's, the Records grid's "+") is offered and no extension save is sent over the draft.
  • Automations pillar, flow load: a refused flow draft leaves draftFor unloaded; the strip shows in place of the canvas and the enable switch.
  • metadata-admin/ResourceEditPage.tsx, load (:1344) and the re-read after a publish (:2250): a refused read sets the new draftRefused state instead of installing a buffer or recording a pin. canWrite is false while it is set, so every write the page offers is withheld, and the page renders the strip in its shell in place of the editor (the same early return the loading state uses).
  • studio-design/StudioRefusalStrip.tsx: StudioRefusalStrip moved out of StudioDesignSurface.tsx unchanged, so ResourceEditPage draws the same strip. StudioDesignSurface re-exports it for its pins (refusalAnnounced-29139); index.ts still does not.

Unchanged on purpose: the verdict-only re-reads in StudioDesignSurface.tsx (they install nothing), and PR 1's four editors, which keep their own refusal hosts.

Tests

Three new files; each refused case has a control (no pending draft: the published body opens, and where the harness saves, the first save is pinned If-None-Match: *).

Ablation, one per site (scripts/ablation-replace.mjs, guard turned into false && …, restore proven blob == HEAD): each site's refused case goes red, every other case stays green.

Acceptance notes

  • PR 1's four editors were not switched to the shared strip: each already renders the same message and Details in its own host with its own test id, and switching them is a churn-only change outside this PR's sites.
  • ResourceEditPage withholds every write for an item whose draft read is refused, discard and publish included: the page cannot show what those would act on.
  • Changed lines 972 (+907/-65): 239 in source (StudioDesignSurface.tsx 118, most of its removed lines being the strip that moved; StudioRefusalStrip.tsx 72, the moved strip; ResourceEditPage.tsx 49), 721 in the three new test files, 12 in the changeset.

Verification

Head 816939aa (main 239e3a8b merged in), branched from 192c15cf (PR 1). The sweep ran on bb4c4af9; main ee8cf851's merge was then checked with the app-shell type-check, the new and related tests, the 34 derived gates and the ui scripts suite. The last merge brings 11 main commits that touch none of the changed files; the three new files were re-run on it.

New tests and ablations
vitest run (3 new files) at 816939aa: Test Files 3 passed (3), Tests 11 passed (11)
ablation app-nav          : 1 failed | 5 passed (its refused case red), restored blob == HEAD
ablation object           : 1 failed | 5 passed, restored
ablation object-extension : 1 failed | 1 passed, restored
ablation flow             : 1 failed | 5 passed, restored
ablation rep-load         : 1 failed | 2 passed, restored
ablation rep-publish      : 1 failed | 2 passed, restored
Type-check and nearby suites
turbo run type-check --filter=@object-ui/app-shell: 65/65 tasks, exit 0, at bb4c4af9 and at ee8cf851
vitest at ee8cf851, 3 new files plus draftUnreadable-29015, refusalAnnounced-29139, servedDraftTakenAsIs-10765: 6 passed, 20 tests
vitest, the 331 app-shell test files naming StudioDesignSurface, ResourceEditPage, StudioRefusalStrip or a pillar (9 locked batches): 331/331 files, 2533 tests passed
pnpm --dir ui exec vitest run scripts/ at ee8cf851: 169 passed | 2 skipped files, 4903 passed | 2 skipped tests
eslint on the new files: clean
Derived gates

34 derived families run on ee8cf85, every one exit 0. dispatch-gates --ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.

node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-sdui-manifest.mjs :: exit 0
node scripts/check-sdui-manifest.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-changeset-deadline-census :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
pnpm --dir ui exec vitest run scripts/ :: exit 0

Generated by Claude Code

… no buffer over a draft the server refuses to read

The Interfaces app nav, the Data object and its pair extension, the
Automations flow, and ResourceEditPage's load and post-publish re-read
take a refused (403) draft read as a held draft, not as "no draft":
no buffer, no pin, no save, and the shared refusal strip says why.
StudioRefusalStrip moves to its own module so ResourceEditPage draws it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTCMoEXh1SQzWaNp2v
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 2, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#5 · zhuangjianguo · session_01QsR2jQjvWkZ7is6GXbC6DB

席位核对 — ACCEPT · domain:ui#5 · head 816939aa · 2026-11-02T13:44Z

  • 形态: draft PR on main, PR 2 of the split that amendment 6574316242 records. The body has Fixes #29148 and no other card number next to a closing keyword. PR 1 (fix(app-shell): four Studio editors open no buffer over a draft the server refuses to read #29275, 192c15cf) landed with Part of. 7 files, +907/−65, Tier S: check-governed-merges --pr 29380 finds no governed path and 972 lines, under the 3000 limit. The body carries 维护者速读 and both declaration lines (Clause-②: no, Metadata-protocol: none), copied from the claim and the amendment.
  • 前提实测: at base, the Interfaces nav, Data object, object-extension and Automations flow loads, plus ResourceEditPage :1344 and :2250, took readDraftForSave's refused for "no draft" and installed the published body (seat read, claim and amendment). Each of the six ablations reds only its own case.
  • diff read: every site branches on 'refused' in read before installing anything. Nav: appDraftFor stays unloaded, Edit nav is off, and the pillar reads the item as missing, with the strip. Object: objDraftFor stays unloaded, and on the draft-only path the published layers are not read to stand in for it. Extension and flow: an error strip and no install. ResourceEditPage: a draftRefused state turns canWrite false and swaps the editor for the strip, on load and on the post-publish re-read. StudioRefusalStrip moves unchanged into StudioRefusalStrip.tsx and is re-exported from StudioDesignSurface for existing importers. No new key.
  • 门禁 check-runs (pinned to head 816939aa11b3bef9746e0de1a5765df6d5392237): 44 success, 11 skipped, 0 failed, 0 pending. mergeable_state clean. Dev local gates: 34 derived, all exit 0; --ran 0 NOT-MEASURED. 3 new files with 11 tests; a 331-file nearby sweep with 2533 tests green; app-shell type-check 65/65; ui scripts 4903 passed.
  • 接受的偏差: PR 1's four editors keep their own refusal hosts and do not draw the moved strip. The split proposal allowed this ("may"), and the body declares it.
  • 范围外去向: none reported.
  • 落地条款: no contract review owed (Clause-②: no). Seat 5's Studio form designer: show a form view's _diagnostics.warnings (a section naming a field its object lacks) #29311 will also edit StudioDesignSurface.tsx, in the InterfacesPillar leaf load and on the Preview element, which this PR does not touch. Studio form designer: show a form view's _diagnostics.warnings (a section naming a field its object lacks) #29311 merges main before it opens. Land by pr_ready + automerge_enable.

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/l tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant