RFC: Input Modality - #634
Open
johnthecat wants to merge 1 commit into
Open
Conversation
This was referenced Sep 8, 2026
johnthecat
force-pushed
the
rfc/input-modality
branch
from
September 8, 2026 10:14
e607312 to
c322a27
Compare
johnthecat
force-pushed
the
rfc/input-modality
branch
from
September 8, 2026 10:21
c322a27 to
8e73863
Compare
Collaborator
|
I find it a bit hard to parse without ascii or figma mockups. Also same comment as for the other. We should move to the one/two pager rfc format, and focus on high-level approach |
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.
RFC:
docs/rfcs/input-modality.md, with the matching amendment todocs/rfcs/product-manifest.md.Last of a four-PR stack: Subscription Typed Interrupt Payload (#631) → Worker Lifecycle (#632) → Unified Renderer (#633) → Input Modality (#634). Based on the unified-renderer branch and uses all three:
Input::requestends with a typed interrupt, an open input surface is a worker reference, and aCustomcandidate is drawn throughRendererunder anInputWidgetcontext.Why this RFC exists
A view offers the interactions its product designed into it. A product cannot be handed anything: the only way to reach one is to open it, so every input is an entry point. A product cannot answer: it holds state the host cannot see, so a string may mean something to it and to nothing else, and the set of such strings is open. Making input contextual closes both gaps: the screen names its products, and those are the products asked.
What it defines
includes.inputis an object,{ supports: [...] }, listing the input shapes the worker accepts. The Product Manifest Format is amended soincludes.inputis that object and a boolean is malformed.RoutedInput(App,Chat,Pocketnavigations, or aQuery),Query(TextorAttachment),Attachmentcategorised from the MIME type. OnlyQuerycrosses the wire, andTextcrosses unmodified.Input::request, host-initiated: the product streamsInputResponseitems (Candidatesor the terminalNotHandled) and ends withResult<(), CallError<GenericError>>. Candidates areText,Attachment, orCustom; every candidate renders under the answering product's identity.Customcandidate on the product drawing it.Implementation
Part of this PR. The context set has no producer in the core, so the host passes it in per round.
truapi:api/input.rs,v01/input.rstypes, versioned envelopes,latestre-exports;RenderContext::InputWidgetgainscontent_typetruapi-codegengoldens and generated outputstruapi-server:RoutedInputclassification alongsideparse_navigate, a round manager that fansInput::requestout to a context set and merges candidates, supersession and deadline@parity/truapi:input.onRequestincludes.inputobject shape where executable manifests are typed