← Back to Pull requests

docs(vue): bind form inputs through machine events #5940

Open
unknown opened this pull request with 168 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 21, 2026 00:51 UTC
Author

Refs #5186.

Show how a Vue input can send an event to the actor and update the machine context, so the submit guard is re-evaluated when the input changes.

Mounted the exact example with Vue 3.5.46 and the XState v6 beta packages. Verified input updates, whitespace rejection, and successful submission. The extracted TypeScript passed strict checking.
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/statelyai/xstate/pull/5940" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->

Summary by CodeRabbit

Documentation
Added guidance for binding Vue form inputs to state-machine context through writable computed properties and events.
Included an example showing how form updates and submission interact with context and validation guards.
Bug Fixes
* Improved snapshot handling in pure-transition actor lineages, preserving actor identity when only a later snapshot remains in use.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Diff: 168 lines (+126 / -42) across 2 files Reviewer: wozhenbang2004 Review duration: 9298m
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.40) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 168 lines diff across 2 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
42%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.307
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #5940"
general weight: 0.35
Assignees
Unassigned
Labels
risk: low confidence: 43.0% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 40.1% (MEDIUM) · Higher = larger blast radius
40.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 43.0% · Lower = rushed or shallow review
43.0%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 22.9% · Safe to merge
22.9%