Repository navigation
docs(session-forms): document the standard input fields (Session Forms V2) - #62
Draft
AndrewKirkovski wants to merge 20 commits into
Draft
AndrewKirkovski wants to merge 20 commits into
AndrewKirkovski wants to merge 20 commits into
Conversation
… the server contract Adds the per-type keys, defaults and limits, the pattern syntax, the text budget, answer values and rules, form versions 1 and 2 and what older readers do with a version 2 form, the V2 answer record, definition error codes, rollback consequences and the extended limits table.
…validation errors for frontends Adds the fields form controls and checks, the version 2 GET and POST shapes, the 422 shape and answer codes, the styling API additions, the accessibility of the new controls, the older Web Host behavior for version 2 forms and the known gaps.
Keep the version 2 sections and apply the version 1 fixes to the shared text: Web Host 1.0.61 requirement, behavior statements instead of test history, the late flag, the trait prompt summary, and the plain-writing pass. The error-message statement now separates answer errors from definition errors.
…on and component
Pattern rules: a literal {, } or ] needs a backslash, a repeat count has no
leading zero, the escapable characters are listed as the tool schema lists
them, and the claim about JavaScript is gone. The text budget says what it
covers. Limits show that step is above 0. A stale cached bundle is the only
way an older component meets a current Session.
Component: the field-calendar part and the overlay layer with the forced
theme class, the date width token, the number keypad rules, the touch tap,
the loose date held in full, placeholder on text and textarea only, email
autofill off, the announced submit failure and the form-level summary, and
the ARIA of a choice.
Brings in Docs main (the session steering pages, merged without conflict) and the V1 Session Forms page edits. Both Session Forms pages conflicted. Each was resolved by keeping the V2 text, which documents the fields form and the six standard field types, and applying every V1 change made since 1c0bd77 on top of it. en/framework/session-forms.md: - Intro, enabling, prompt, tool table, tool result, too_many_forms, the agent message, record shape, read_form results, form index and security notes take the V1 wording, extended to the form of fields and the standard field values where V2 covers them. - How answers are admitted takes the V1 table. - Disabling and rolling back takes the V1 wording and keeps the V2 rollback-before-version-2 bullet. - Compatibility and Limits at a glance are removed, as in V1. Every V2 limit in the table is still stated in its field type section. - Inline code from backticks is stated for the question card only, because the fields form renders all text as plain text. en/frontend/micro-frontends/session-forms.md: - Kept LF line endings, as on every other en/ page and on the V1 side. The V2 side was CRLF, so the merge parent diff for this page is a line-ending change as well; against the V1 side only content differs. - No density prop, host attribute or comfortable spacing; the field gap default is 16px, as in the component's styles.css. - Events lists only the base load, unload, error and invalid events, and a submission is observed through card-state="answered". - isArtifactStateError replaces the instanceof advice. - Host requirement takes the V1 condition table and drops the separate older-Host section, with the V2 version and unknown-type condition kept. - HTTP API, artifactState client, wippy-form-answers, styling, known gaps and diagnostics take the V1 wording around the V2 additions. - Question card accessibility matches the component: the polite region announces navigation, ticking and a saved note, and errors and a failed send are announced by their own alerts. - The proxy types known gap matches @wippy-fe/proxy 0.0.61: form_version is a number, while fields and answers are still typed as choices.
wippy.session.forms:ask_user adds the ask_user tool, which asks choice questions only. wippy.session.forms:ask_user_fields adds the ask_user_fields tool, which also asks text, textarea, number, email, date and checkbox fields. Both add read_form. The framework page now covers which trait to attach, the server refusal of a standard field sent to ask_user (unsupported_type, "Supported types: choice."), why the two tools have different names, that a module upgrade does not give an existing ask_user agent the standard fields, which form version each tool creates, the unsupported_type messages, how to stop or roll back each trait, and a verification step for each trait. The frontend page says which tools ask the forms it renders.
The unsupported_type message names the types the calling tool takes, for an unknown type name too.
Keeps the V2 pages for the ask_user and ask_user_fields traits next to the V1 text. The Host minimum is 1.0.65 and the @wippy-fe types for version 2 forms are marked as a TODO until they are published.
…disabled view and card-state active
The list named two changes that are not part of 0.7.0: UTC dates shipped in 0.6.17, and reader:list_pending_inputs still exists. It missed that sessions now finish 10 seconds after the last client leaves.
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.
What changes
Documents Session Forms V2: six standard input fields (
text,textarea,number,email,date,checkbox) next to the V1 choice question, offered to agents through a second trait,wippy.session.forms:ask_user_fields.en/framework/session-forms.md: the field types and their options, the server contract and validation codes, rule order, the pattern size limit, the request size limit, both traits (ask_userstays choice-only), form versions and rollback.en/frontend/micro-frontends/session-forms.md: the fields form, version 2 answers (numberandbooleanvalues), validation errors, the date box and its calendar range (years 100 to 9999; earlier years are typed), keyboard behavior, accessibility and styling parts.reader:list_pending_inputsstill exists) and missed that sessions finish 10 seconds after the last client leaves.The Session code is in wippyai/session#113. This PR merges after that one is released.
How it was verified
5a0342c.node scripts/check-markdown-links.mjs: 6966 local links in 1474 pages pass.node scripts/check-frontend-docs.mjsandnode scripts/check-attention-context-docs.mjspass.mainup to the Web Host 1.0.70 docs (docs(frontend): document Web Host 1.0.70 #61).Not done yet