Repository navigation
fix(studio): pin the object extension, hook, action and flow Saves' publish (#36726) - #36958
Conversation
…Saves (WIP) Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ Co-authored-by: Claude <noreply@anthropic.com>
…s' publish (WIP) Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ Co-authored-by: Claude <noreply@anthropic.com>
…udio-pinned-publish
…nesses; fixtures expect the create's If-None-Match Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ Co-authored-by: Claude <noreply@anthropic.com>
…f-None-Match Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W Sequencing note from seat 3 · 2026-11-24T16:06Z. PR #37026 (#36902, generic detail save-on-save) and this PR share no files, and either can land first. However, this PR's new rule 9 needs Generated by Claude Code |
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH 席位核对 — ACCEPT · head ab5ccacL1 reviewer for #36726, read at 2026-11-24T16:32Z against GitHub at this head. I did not rely on the report's own account. Checklist (
Reads against the card
Landing owed (patch round, not REWORK)
Governed: no. Narrowing: no. Dogfood battery: not owed. |
Resolves the StudioDesignSurface.tsx conflict with the pillar split (6902acb): this branch's DataPillar and AutomationsPillar hunks are moved unchanged into DataPillar.tsx and AutomationsPillar.tsx, and the three studioSaveBar imports they use (readPublishedPin, publishCreated, publishedPinOfLayers) plus isPublishConflictKeptEditing move with them into the new modules' import lines. StudioDesignSurface.tsx is main's. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As5bdhV5T4N9vpjmZzH
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH 席位核对 — ACCEPT · head 3c642c7This is a delta over the ACCEPT record 7137844915 at
|
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH Landing — seat arms #36958
|
Fixes #36726
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Each Studio editor that saves by "write the draft, then publish that one item" now pins its publish to the published row it was loaded at, the way the object page does since #36720. The server half (If-Match / If-None-Match on publish,
overlayVersionon/layers) is already on main.Per-site verdicts (line numbers at the dispatch base 844218f):
StudioDesignSurface.tsx:6884object extension Save/layersat the pair BEFORE the draft and body reads (version first, the server's own order), records it withrecordPublished, and the Save passes the guard'spublish. A buffer read at another package recordsIf-None-Match: *at the pair.:8913new flow createIf-None-Match: *through a newpublishCreatedhelper: a same-named flow another writer published first is refused, never replaced. No dialog: the refusal is the create's own.:9095flow Save/layersread is shared with the baseline read when they hit the same address. Customize-into-pair branch records*at the pair.:9240flow on/off switchobjectHooksBuffer.ts:365hook Save/layersat the package; a published hook with no pending draft is buffered from that same answer when it pins, so pin and body are one read. A new hook records*.pairObjectActions.ts:404pair action Save/layersanswer the buffer is already built from. A new row records*.Every editor handles the
reloadedoutcome the way the object page does (ruling 4): the Save is declined, the editor re-reads, its edits are dropped. Keep editing leaves the edits unsaved with the refusal shown. Dialog wording and locale keys from #36601 are reused unchanged; no new keys.The
hadDraftreload residual (scope addition 7104420437)Fix shape chosen: keep the published pin the conflict was raised on until the author re-confirms, in the guard (
DraftConflictDialog.tsx, header rule 9). Why this one rather than "install the live row and leave the pending draft under Changes":Mechanics:
beforeReloadnow answerskeptwhen the Save wrote into a draft that was pending before it (discardedotherwise). Onkept, the reload's freshrecordPublishedis parked instead of applied, and the next publish still carries the version the conflict was raised on, so the next Save is asked again. The hold ends on an overwrite, a publish that lands, a load that reads no pending draft (recordReadwith*), orforget.Tests
New files, each named for this card (keep editing, reload, overwrite, one editor's pins chain, create asserts
*, unpinned control, plus the residual pin):ObjectHooksPanel.publishPinned-36726.test.tsx(7)DataPillar.pairActionsPublishPinned-36726.test.tsx(7)AutomationsPillar.publishPinned-36726.test.tsx(incl. the switch)DataPillar.extensionPublishPinned-36726.test.tsxAppended: the guard's rule 9 unit tests in
DraftConflictDialog.test.tsx; the object page's residual pin inStudioDesignSurface.draftVersionConflict-11773.test.tsx(AGENTS.md puts a new pin in the existing harness that already models that surface; the dispatch asked for new files; I followed AGENTS.md for those two and say so here).Stale fixtures updated (the create/pair publish now asserts
*):DataPillar.pairActions-30088,AutomationsPillar.saveCancel-36511,AutomationsPillar.customizeFlow-28570;StudioDesignSurface.expectedMisses-11799(an unsaved flow now reads/layersonce, for its pin).Ablation (implementation files restored to origin/main d9c799c, tests kept; restored by
git checkout HEAD,git diff HEADempty, all five blob hashes re-matched): 31 of 78 tests red across all 6 files, every red is a race or residual pin, no control among them; 47 green including each file's control.Acceptance notes
/layersanswer when it pins (exact pairing), from the list otherwise.PackageOwdOverviewPanel.tsx:487), object create (StudioDesignSurface.tsx~6697), permission Save (~10962), new app door (newAppDoor.ts:72).Verification
Two minutes:
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/views/studio-design/ObjectHooksPanel.publishPinned-36726.test.tsxexpect 7 passed.Read first, by risk:
DraftConflictDialog.tsx(rule 9 hold and release),objectHooksBuffer.ts(per-hook/layersread and the buffer source),StudioDesignSurface.tsxflow load (shared/layersread and baseline).Local readings at head 0b5e8f2: app-shell
type-checkexit 0 (both tsconfigs); 6 card files 78/78 (per-file reruns after the last harness fix);studio-design/+ guard tests 374 files, 1 stale fixture red (28570) then fixed and rerun 14/14; deriveddispatch-gates --commandsfamilies exit 0 (two long scans rerun with a longer timeout, exit 0);check:nul-bytesOK.test:repoand the full farm are CI's.Generated by Claude Code