Uh oh!
There was an error while loading. Please reload this page.
fix(app-shell)!: a modal action is client-side only — drop the server fallthrough (objectstack#3959) - #2973
Merged
Merged
Conversation
… fallthrough (objectstack#3959) modalActionHandler fell through to serverActionHandler when the target resolved to neither a page nor an object, documented as 'how a modal action bound to engine.registerAction(...) still runs'. It never ran: the framework's headlessActionTypeError rejects type:'modal' over REST with a 400, since a modal action has no server dispatch. The fallthrough only converted an authoring mistake — a target naming no page — into a confusing round-trip, and it let apps ship handlers no declaration could address. An unresolvable target is now reported as such, naming the action, the dud target and the way out. To collect input and run server-side, declare type:'script' with params. The superseded test asserted the fallthrough POSTed /actions; it now asserts the refusal. 35/35 in the file. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DTTKgYriDB6RVrkYjxxnG1
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
The client half of objectstack-ai/objectstack#3959, resolved by option 2:
type: 'modal'is client-side only.Ships with objectstack-ai/objectstack#3974 (which rewrites app-todo's two mistyped actions). Order does not matter — neither half depends on the other, because the path being removed never worked.
What was removed, and why it was never real
modalActionHandlerfell through toserverActionHandlerwhen the action's target resolved to neither a page nor an object:Its docblock described that as "how a modal action bound to
engine.registerAction(...)(or an inlinebody) still runs". It never ran. The framework'sheadlessActionTypeErrorrejectstype: 'modal'over REST with a 400 — a modal action has no server dispatch, by design — so every trip down that branch ended in a confusing round-trip that could only fail.Worse, it made a broken shape look supported: an app could register a handler for a
modalaction and see no complaint, shipping business logic that nothing could reach.app-todo'sdeferTaskandsetRemindersat dead for exactly this reason and are fixed in the framework PR.What replaces it
An unresolvable target is reported as what it is — an authoring mistake — naming the action, the dud target, and the way out:
type: 'script'withparamsis the supported way to collect input and then run server-side: the runner collects the same dialog, then the handler runs with those values. The framework docs' action-type table has been corrected to say so (it previously describedmodalas "collect input, then submit to a handler", contradicting its own REST table).Superseded test
One case asserted the old fallthrough POSTed to
/actions. It now asserts the refusal — including that the message names the action and points atscript+params. Thedescribeblock's title carried the old contract too and is updated. 35/35 in the file.🤖 Generated with Claude Code
https://claude.ai/code/session_01DTTKgYriDB6RVrkYjxxnG1
Generated by Claude Code