Repository navigation
fix(app-shell): Studio holds an incomplete field or step as an unsaved edit with a hint, and Publish refuses while one is held (objectui#11786) - #11876
Merged
objectstack-fleet[bot] merged 3 commits intoOct 8, 2026
Conversation
…d edit with a hint, and Publish refuses while one is held Switching a field to Picklist or Lookup, or adding a Notify step, drew a red refusal before the author could fill the field or step in. The Data and Automations pillars now ask the judge that would refuse the body before the autosave sends it: the object write guard for fields, and specRequiresField over each step's inspector inputs for flows. Such an edit stays dirty and unsent, the inspector hints the input it needs, a neutral line names it with "Show me", and Publish refuses naming it. A refused save of a finished body keeps the red strip. Claude-Session: https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8 Co-authored-by: Claude <noreply@anthropic.com>
ObjectFieldInspector.tsx: both sides edited the data-objectstack import; kept this branch's guard symbols beside main's new @object-ui/i18n import. Claude-Session: https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8 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 8, 2026
objectstack-fleet
Bot
deleted the
claude/issue-11786-autosave-incomplete-hold
branch
October 8, 2026 04:02
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 #11786
Clause-②: no
What this changes
On Studio's Data and Automations pages, the ordinary path through an incomplete field or step no longer passes through a red refusal. Such an edit is held: it stays on screen, unsaved, the inspector says what it needs, and Publish refuses while it is held. A save of a finished draft that is refused keeps objectui#11785's red strip.
assertObjectMetadataWritable, the predicate the door itself runs) on the body it would send. When the guard would refuse, the autosave is held (blocked): the edit stays dirty and nothing is sent. The field inspector shows "Add at least one option. Changes are saved once the field has one." under the options editor, or "Pick the object to link to. …" under the related-object picker. Where the strip goes, a neutral line names the field by its label: "Not saved yet: the field “Status” needs at least one option. Your changes are kept here and saved once it is filled in." It offers "Show me" when that field's inspector is not the one open. Adding the option or picking the target lets the next autosave go.specRequiresField(inspectors/flow-required-keys.ts, reused unchanged) about each top-level step, for every input its inspector shows that the step leaves out. When one is required, the autosave is held.FlowNodeInspectorshows "Required. Changes are saved once this has a value." under that input's required marker, and the same neutral line names the step and the input ("Title on the step “Notify” needs a value").onHeldEditChangeprop onDataPillarandAutomationsPillar, set at their three mounts in the surface. The pillar takes the report back on unmount. While an edit is held, the surface's publish shows "Not published: Title on the step “Notify” needs a value, so that change is not saved yet. Finish it, then publish." and publishes nothing.@object-ui/data-objectstackis untouched and still holds the option-less and target-less save on purpose (objectui#11253).Nothing is added to the package entry: no export, prop, type member or language-pack key. Only
StudioDesignSurfaceand its props reachindex.ts, and neither pillar does. The new strings are rows in the metadata-admin designer's own string table (en and zh), underengine.studio.held.*anddesigner.field.hint.*.Measured before acting (dispatch Zone 2)
useDraftAutoSave. The inspector's type switch and the canvas's "add node" each call the pillar'sonPatch, which raises the dirty flag the hook's timer reads.ResourceEditPage's own autosave is not on any of these paths. The pins hold each case at the hook, and the ablation below shows the hook sending without the hold.MetadataClient.savebefore any request: even with the predicate ablated, the transport double records no PUT. The red strip wasdoSave's catch. The not-verified part, naming a held edit whose field is not open: my choice is a neutral line in the strip's place (muted, not destructive), shown whenever an edit is held. It names the field or step, and "Show me" appears only when that input is not the one open. The reason: while an edit is held, the page's save status says nothing. There is no "Saving…", and "Saved HH:MM" is hidden while the buffer is dirty, so the line is the only statement that the change is kept but not sent.@objectstack/spec17.7.0 withFlowSchema.safeParse, on the exact draft Studio sends:buildFlowSkeleton, plus a Notify added on the edge with the canvas seedchannels: ['inbox'], recipients: []. The parse reports one issue, atnodes.2.config.title: "A notify node needs one content source: inlinetitle(+ optionalmessage), or atemplatereference … Neither was given, so there is nothing to deliver." An emptyrecipientslist is not refused. The key is required, but an empty list is a value, so the "recipients and title" part of the hypothesis holds only for the title. This is the spec parse, not a live 422: no booted showcase was reachable here, because the sibling objectstack checkout has no install or build. So the hold asks the spec for each input, never a list. A missingrecipientskey is held (pinned). An empty list is not held, a blanktitle: ''is not held (the judge accepts it), and atemplatein place oftitleis not held.publishPackageDraftswhile the Notify edit is held. In other words, it publishes the saved drafts without the edit. Now Publish refuses and names the step. The signal crosses from pillar to header through the new optional prop and the three mount lines. No file outside the claim is touched.AutomationsPillar.authorRefusal-11785.test.tsx(a save refused through the Enabled switch) is unchanged and green.Pins
metadataError.heldEdit-11786.test.ts(the two predicates): each "held" case is paired with the judge's own verdict on the same body (the door refuses it, orFlowSchemanames the key), and each "not held" control with a body that judge accepts. So the hold is never stricter than the contract. Covered: the measured Notify seed held for Title, a missingrecipientskey, an unlabelled step, the guard's order, an unnamed array field (not held, its refusal shows), and zh.DataPillar.heldIncomplete-11786.test.tsx(realMetadataClient, transport double): Picklist sends nothing and shows no red strip, shows the line and the options hint, and one option sends the save and clears both. Lookup does the same with the target hint, and a typed target sends the save. "Show me" reopens a held field after its inspector was closed. Controls: a complete edit autosaves with no line, and a server 422 on a complete body shows the red strip.AutomationsPillar.heldIncomplete-11786.test.tsx(realFlowPreview/FlowInspector): a Notify added on the edge sends no draft and shows no red strip. The line names "Title on the step “Notify”", and exactly one hint sits directly under Title. Filling Title sends the save and clears both. "Show me" reopens the step after deselecting it.StudioDesignSurface.heldPublish-11786.test.tsx(the real surface): with a Notify held, Publish refuses naming it and publishes nothing. Once the step is filled and saved, Publish goes. With nothing held, Publish goes as before.DataPillar.authorRefusal-11785.test.tsxand both cases ofDataPillar.choiceWithoutOptions-11253.test.tsxnow read the held line, not a refusal strip. objectui#11785's requirements (the field named by its label, no developer text, "Show me" reopens it) and objectui#11253's wire claim (no request carries a choice without options, and one option lets the save go) are asserted unchanged. The guard's sentence with Details is still pinned at the view model, inmetadataError.authorRefusal-11785.test.ts.Ablation (committed implementation, restore proven each leg)
Run on
4996e5athroughablation-replace(anchor hit once, landed on disk, restored), under the shared verify lock:blocked:DataPillar.heldIncomplete-117862 failed of 5 (Picklist and Lookup). First failure: "no red strip on the normal path: expected the refusal strip to be null". The guard's strip came back. The "Show me" pin stayed green: it reads the line, which the predicate still feeds, and the no-request half is the guard's own.blocked:AutomationsPillar.heldIncomplete-117862 failed of 2. "a step missing a required input is not sent: expected vi.fn() to not be called at all, but actually been called 1 times".StudioDesignSurface.heldPublish-117861 failed of 3. "Publish must not go around the held edit: … called 1 times". This is the H4 measurement.0d81d740590cequal to HEAD,git diff HEADempty. The final proof after all three legs gave the same result.Tests and gates
Final head
ed6cc52(this branch merged withmainatb0aa892, never rebased), from the worktree root:turbo run build --filter=@object-ui/app-shell^... --concurrency=2, 28 of 28 tasks, exit 0.pnpm --filter @object-ui/app-shell type-check(tsc --noEmit && tsc -p tsconfig.test.json) exits 0.tsc -p tsconfig.test.json --listFileslists all four new test files.pnpm exec vitest run --maxWorkers=2on the union below, run oned6cc52: 291 files passed, 3110 tests passed and 1 skipped (askipIfthat keys on the installed spec's version and was already there), exit 0.packages/app-shell/src/views/studio-design/in full, plus every app-shell and console test that importsStudioDesignSurface,metadataError,ObjectFieldInspector,FlowNodeInspector,FlowInspectoror the built-in inspector registration, plus the metadata-admin i18n, flow andResourceEditPagesuites. The set is derived bygit grepon this head.git blame). The fullpnpm lintis CI's.scripts/check-changeset-presence.mjs, andcheck-governed-queue-guard.mjs --test("An ordinary pull request").metadataError.ts(flow-required-keys.ts,flow-node-config.ts,@objectstack/spec/automation) are already in the package entry's eager closure, throughregister-builtins.ts→inspectors/index.ts→FlowInspector→FlowNodeInspector. So no module enters it.ObjectFieldInspectorimports nothing new beyond more names from a module it already imported.flowHeldEditmeasured about 4 ms per draft change on a flow of 40 complete Notify steps (a shared-box reading, so ratio-only). It runs only while the buffer is dirty. No cache was added.Acceptance notes
doReorderFields) and the Automations page's Enabled switch (toggleEnabled). Each saves the whole buffer at once. With a held field or step, it draws the guard's or the server's refusal as objectui#11785's red strip, naming it. Read from code; not reproduced in a browser. No one is carrying this.Generated by Claude Code