Repository navigation
Conversation
Buttons with actionType="modal" received through HTTP interactions can open a modal with event.openModal(). The adapter waits up to 2.5 seconds for the handler, then defers. MODAL_SUBMIT interactions reach onModalSubmit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0118w5k7eppSuJdxxj4Fa5hB Signed-off-by: codynog <yoneyoneyone99@gmail.com>
Contributor
|
@codyNog is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Summary
Closes #1210.
Adds modals to
@chat-adapter/discord. A button withactionType="modal"received through HTTP interactions can open a modal withevent.openModal(), and submissions reachonModalSubmit. Other buttons keep the immediate deferred response.onOpenModaltoprocessActionand waits up to 2.5 seconds from receiving the request, because Discord requires a modal as the initial response within 3 seconds. If no modal opens, it responds withDeferredMessageUpdate. The button'scustom_idstarts with a__mmarker, so an action ID of exactly__mwith a value is now rejected.TextInputandSelecteach render in a Label. Other children, more than 5 children, and values over Discord's limits throw aValidationError.MODAL_SUBMITis routed toprocessModalSubmitunder the same deadline.action: "errors"becomes an ephemeral message, sent as a followup after the deadline. Discord can't respond to a submission with a modal, soupdateandpushlog a warning and close the modal.custom_idholds the context ID and callback ID, which limitscallbackIdto 63 characters.privateMetadatais kept in the state adapter.There are no changes to
chat. The fetch inopenModaldoesn't run on Discord because the adapter has nofetchMessage, soevent.relatedMessageisundefinedon submit. File uploads and modals opened from slash commands or Gateway interactions are out of scope.In #678, DeanMauro mentioned planning modal support. If that work is in progress, I'm happy to coordinate.
Test plan
pnpm validateandpnpm konsistentpass.openModal()calls, error messages, andprivateMetadata.Chat.DeferredMessageUpdateis covered only with a mocked API.sample-messages.mdis unchanged because no captured payload was available.Checklist
git commit -s)pnpm validatepasses🤖 Generated with Claude Code
https://claude.ai/code/session_0118w5k7eppSuJdxxj4Fa5hB