feat(spec): add ActionSchema.openIn for declarative url new-tab (objectui #2043)#2413
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 90 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
…ctui #2043) @objectstack/spec's ActionSchema was a plain z.object() that stripped unknown keys, so the openIn field authored via defineAction({...}) was silently dropped at build and never reached objectui's ActionRunner. Add openIn?: 'self' | 'new-tab' next to target. objectui (issue #2043) already honors it in ActionRunner.executeUrl with priority over the legacy params.newTab/external-URL heuristic; renderers forward it. Kept distinct from opensInNewTab/newTabUrl (async SSO pre-open). It is a static execution option and must stay out of params. - packages/spec/src/ui/action.zod.ts: add openIn enum field - action.test.ts: 5 cases incl. not-stripped-at-build regression guard - liveness/action.json: classify openIn live (objectui consumer) - skills/objectstack-ui/SKILL.md: document openIn vs opensInNewTab split + warn against expressing new-tab via params - changeset: @objectstack/spec minor
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.
Why
Counterpart to objectui issue #2043. objectui added a first-class declarative field for url actions —
openIn?: 'self' | 'new-tab'— in its publicActionSchema, honored byActionRunner.executeUrl(read with priority over the legacyparams.newTab/ external-URL heuristic) and forwarded by all renderers (action-button/icon/menu/group, basic/elements).But
@objectstack/spec'sActionSchemawas a plainz.object(...)that strips unknown keys, soopenInwritten viadefineAction({...})was silently dropped at build and never reached objectui's runtime. Downstream authors (e.g. plan-management) therefore still couldn't use it.What
packages/spec/src/ui/action.zod.ts— addopenIn: z.enum(['self', 'new-tab']).optional()next totarget. Kept distinct from the existingopensInNewTab/newTabUrl(those pre-open anabout:blanktab synchronously for async SSO-redirect handlers — not merged).openInis the simple, static case.action.test.ts— 5 cases, including a regression guard thatopenInsurvivesparse()(the whole point: it used to be stripped).liveness/action.json— classifyopenInaslive(objectui is the consumer). The liveness gate passes (exit 0).skills/objectstack-ui/SKILL.md— document theopenInvsopensInNewTab/newTabUrlsplit, plus a warning that new-tab behavior must not be expressed viaparams(object form fails the zod build; array form mis-renders as a user-facing checkbox).@objectstack/specminor.openInsemantics'new-tab'— open a statictargetURL in a new tab. No handler, no pre-open.'self'— navigate in place.Publish coordination
The objectui side is already merged (issue #2043). Consuming projects need a
@objectstack/specversion that includes this field for the declarative path to work end-to-end — hence theminorchangeset.Verification
vitest run src/ui/action.test.ts→ 77 passedtsx scripts/liveness/check-liveness.mts→ exit 0 (✓ all governed-type properties are classified)tsc --noEmit→ clean