Repository navigation
fix(app-shell): four Studio editors open no buffer over a draft the server refuses to read - #29275
Merged
Merged
Conversation
…erver refuses to read The list-view inspector, the bundle item editor, the permission matrix's package door and the hooks panel took readDraftForSave's refused (403) answer for "no draft" and seeded the published body, which their next save wrote over the pending draft. Each now installs no buffer, shows the draftUnreadable sentence with the server's own behind Details, and its autosave has nothing to send. The hooks panel holds only the refused hook. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTCMoEXh1SQzWaNp2v
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTCMoEXh1SQzWaNp2v
Contributor
Author
|
domain:ui#5 · zhuangjianguo · session_01QsR2jQjvWkZ7is6GXbC6DB 席位核对 — ACCEPT ·
|
This was referenced Nov 3, 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.
Requested by Steedos · project thread
Part of #29148 (PR 1 of 2, the split the claim amendment 6574316242 records; PR 2 takes the Interfaces app nav, object, object-extension and flow loads in
StudioDesignSurface.tsxandResourceEditPage.tsx, and is the one that completes the card).Clause-②: no
Metadata-protocol: none
The two lines are copied from the claim (comment 6574269114) and its amendment (comment 6574316242).
维护者速读
requiredPermissions,作者无权读)时,不再当成"没有草稿"去打开已发布版本,而是显示同一条拒绝说明,服务器原话放在"详情"里,自动保存没有内容可发。ObjectHooksPanel.tsx(部分拒绝的处理);PermissionMatrixEditor.tsx加载处的'refused' in pendingRead分支与两处渲染;StudioBundleItemEditor.tsx错误条新增的"详情"。pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/ObjectHooksPanel.draftUnreadable-29148.test.tsx,预期 3 个用例通过。What changes
readDraftForSavehas handed a draft read refused403back asrefusedsince #29132. These four editors now act on it the way the Interfaces leaf load does: no buffer is installed, theengine.studio.refusal.draftUnreadablesentence shows with the server's own sentence (formatMetadataError) behind Details, and the autosave has nothing to send. No new i18n key.studio-design/ObjectListViewInspector.tsx(useObjectListViewDraft): a refused view draft read leaves the buffer unloaded (for: '',row: null) and setsfailureto the newdraftUnreadablearm, which the panel's existing refusal host renders. The published layer is not read.studio-design/StudioBundleItemEditor.tsx: a refused read installs no draft, clears the guard's pins (forget), and shows neither the form nor the preview. The editor's error host now renders a Details disclosure when a refusal carries one (only this refusal does today).metadata-admin/PermissionMatrixEditor.tsx(package door, load only): a refused read installs no matrix; the strip replaces it in both presentations (routed page and the Studio Access pillar), and the autosave is blocked. The pre-save re-read (it already refuses the save when the draft read answers nothing) and the post-save verdict re-read (installs nothing) are unchanged, per the claim amendment.studio-design/ObjectHooksPanel.tsx: the list load keeps the refused hooks by name. A refused hook stays listed by its published row, pins nothing, and opens no buffer: selecting it shows the strip in the detail pane. A partial refusal holds only that hook; the other hooks load, edit and save as before. A hook known only by its refused draft is not listed, as today: nothing says it fires on this object.Tests
One new file per editor, each with a refused case, a control (no pending draft: the published body opens and the first save is pinned
If-None-Match: *), and for the hooks panel a partial-refusal case.ObjectListViewInspector.draftUnreadable-29148.test.tsx(2): the real hook and panel over a realMetadataClientand an in-memory server whose?state=draftread answers 403.StudioBundleItemEditor.draftUnreadable-29148.test.tsx(2)PermissionMatrixEditor.draftUnreadable-29148.test.tsx(3): routed page, Studio presentation, control.ObjectHooksPanel.draftUnreadable-29148.test.tsx(3): refused, partial refusal, control.Ablation, one per editor (
scripts/ablation-replace.mjs, guard turned intofalse && …, restore proven blob == HEAD): each refused case goes red and each control stays green.Acceptance notes
StudioRefusalStripinto a shared module, so every editor draws the one component, is PR 2's (it editsStudioDesignSurface.tsx, which open PR fix(studio): a refusal in a Studio strip is announced to screen readers #29224 also edits).Verification
Head
fc165c69(main47ee57femerged in), branched from10bfd70e. The new tests and app-shell type-check were re-run on the merged head; the sweep, the ui scripts suite and the gates ran onb944048d, before the merge.New tests and ablations
Type-check and nearby suites
Derived gates
34 derived families run on b944048 (before the merge of main; main's incoming commits touch none of the four editors), every one exit 0. dispatch-gates --ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.
Generated by Claude Code