Repository navigation
feat(app-shell): New automation opens on starting points, the trigger form under Advanced (objectui#11861) - #12018
Merged
Conversation
… form under Advanced (objectui#11861) The New automation dialog now asks "When it runs" with four plain-language presets from a module-private table (flowPresets.ts): when a record is created, updated or deleted, and when a button or another automation starts it. Each preset is one of the Start node's own trigger choices, written by the same create path, so it writes exactly the flow the trigger form writes for that trigger. A record preset waits for its object: Create sends nothing until one is named. The objectui#11788 trigger form is the Advanced choice, unchanged. Claude-Session: https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8 Co-authored-by: Claude <noreply@anthropic.com>
…ow-presets objectui#11795 edits StudioDesignSurface.tsx's fold decision and properties aside and adds rows to metadata-admin/i18n.ts; this branch edits the New automation dialog and adds automations rows. Auto-merged, no conflict. 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 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 #11861
Clause-②: no
The automations entry, the last of the three entries triage named on the card (comment 6051947408). The validation-rule entry landed through objectui#11931 / objectui#11967 and the actions entry through objectui#11977, so this PR closes the card. Claim: comment 6071664220 (seat
domain:ui#3).What changes
New automation used to ask for a name and then offer the Start node's whole trigger list, with "Choose later on the Start node" first (objectui#11788). It now asks When it runs, with four plain-language starting points from a module-private table,
flowPresets.ts, the first one chosen:triggerType: 'record-after-create'+objectNametriggerType: 'record-after-update'+objectNametriggerType: 'record-after-delete'+objectNametriggerType: 'manual'doCreateFlowandwithStartTrigger. A preset flow is therefore byte for byte the flow Advanced writes for the same trigger: a Start node and an End node,type: 'autolaunched', bornstatus: 'obsolete'(objectui#11779).showWhen, the same reading the Advanced form uses.Files:
StudioDesignSurface.tsx(the dialog'sextraandonSubmit, its two new state values, the New button's reset, one import), the newflowPresets.ts, 6 new rows en + zh underengine.studio.auto.*inmetadata-admin/i18n.ts(the Advanced word reusesengine.studio.rules.advanced, as the Actions menu does), the new pin, a helper-only change to two existing pins (the objectui#11788 pin and the objectui#11779 create case now choose Advanced first; no assertion changed), and.changeset/11861-flow-presets.md(@object-ui/app-shell: patch). All inside the claim's file surface.CreateItemDialog.tsxis not touched, so the hold is a refusal insideonSubmitshown through the dialog's existingerrorslot, not a disabled Create button.Measured before choosing (dispatch zone 2, hypothesis 2)
FlowSchemafrom the installed@objectstack/spec17.7.0 accepts every candidate start-to-end flow, including the ones that cannot work as created: a record trigger with no object,triggerType: 'schedule'with a cron,triggerType: 'api'with no secret. So the schema is not the hold criterion here; the runtime is. Read in objectstack source (not run against a live backend):object: binding.object; ObjectQL'sregisterHooktreats an absentobjectas a global hook, run for every object's records. So a record preset waits for its object.resolveScheduledWorkEnabledanswersfalseunless the deployment switchesOS_AUTOMATION_SCHEDULED_WORK_ENABLEDon, and both schedule triggers refuse to bind while it is off. Under theisolatedposture a bound one also needsconfig.organization. Such a flow is "Not running here" on a default deployment, so it is not a working preset.apiflow whose Start node carries no secret, and this dialog does not ask for one.All of these stay one choice away, under Advanced.
Pins
New:
StudioDesignSurface.flowPresets-11861.test.tsx, 8 tests, driven through the realAutomationsPillarandCreateItemDialogwith a recording metadata client:showWhen(the pureflowPresetTriggerread both ways);FlowSchema,resolveFlowTriggerKindanswersrecord_changeor none (never a schedule, sweep or hook), the nodes are exactly start and end, and the flow equals the one Advanced writes for the same trigger and object;Reverse verification, through objectstack
scripts/ablation-replace.mjsWRAP mode on650b0d03b(each anchor x1 to x0, blob changed; each restore proven: blob equal to HEAD andgit diff HEADempty). Control: 8 of 8 pass.doCreateFlow(label, name, trigger)tonull): 5 failed, 3 passed (the four preset cases and the hold).flowPresetTriggerreturns the trigger without an object): 2 failed, 6 passed (the pure read and the hold).Evidence, at HEAD
658db0b82(after mergingmainat70f1b2755, objectui#11795)pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' build, thenpnpm --filter @object-ui/app-shell type-check(it echoestsc --noEmit && tsc -p tsconfig.test.json; the test project includessrc/**/*.test.tsx): exit 0.studio-designdirectory, in two locked runs: 156 files, 1108 tests, all passed.AutomationsPillarorflowPresets, in two locked runs: 95 files, 1421 tests, all passed.eslint.config.js,files: ['**/*.{ts,tsx}'], no type-aware linting, so this diff cannot move a verdict on an untouched file) on the 6 touched TS files: 0 errors, 13 warnings, all inStudioDesignSurface.tsx. That file carries the same 13 onmain70f1b2755.check:i18n-keys,check:i18n-drift("No en value changed in this range."; designer table: 6 keys added, 0 en values changed),check:i18n-dead-keys,check:i18n-designer-parity,check:control-bytes,check:test-path-roots,check:changeset-claims,check:pending-changeset-literals,check:new-line-citations,check:unreferenced-sources,check:esm-specifiers,check:vi-mock-*(3),check:spec-symbols,check:handler-key-reads,check:metadata-write-doors, andscripts/check-changeset-{presence,no-major,fixed,overwrite}.mjs: all exit 0.check-governed-queue-guard --teston the 7 paths: NOT GOVERNED.check:readme-exports(prerequisite not met: app-shelldist/index.d.tsnot built here; no export changed). A real-browser pass (no objectstack backend serving Studio in this container; behaviour pinned in happy-dom). The console build and first-load bytes, which belong to CI's Bundle Analysis; its reading goes in the os-dev report on the card.Acceptance notes
content/docs/guide/console.mdnorpackages/app-shell/README.mddescribes the New automation dialog, so nothing there is stale and both are outside the claim. A sentence the seat may add to the console guide: "New automation asks when it runs: when a record is created, updated or deleted (on the object named right under the choice), or when a button or another automation starts it. The full trigger list is under Advanced."packages/app-shell/README.md's flow designer section says astartnode "deliberately stores notriggerType" and lists Entry condition ascriteria. The Start node's trigger select writesconfig.triggerType(objectui#11788 relies on it), and the inspector writescondition. Docs drift, untouched here.Generated by Claude Code