refactor(onboard): introduce explicit state result types#4375
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds typed result contracts and factory helpers for the onboarding state machine (transition, complete, failed) and a Vitest suite validating runtime shapes and TypeScript-level constraints for those helpers. ChangesOnboarding Machine Result Model and Builders
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: None Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
E2E Scenario Advisor RecommendationRequired scenario E2E: None Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 0 worth checking, 0 nice ideas This is an automated advisory review. A human maintainer must make the final merge decision. |
|
✨ Thanks for submitting this detailed PR that refactors the onboard state handlers to introduce explicit result types and helpers, which proposes a way to improve the onboarding experience by preparing handlers to return transition, completion, and failure decisions. This refactor adds result helper shapes and metadata/update preservation tests to ensure the new behavior works as expected. |
…te-results # Conflicts: # src/lib/onboard.ts # src/lib/onboard/machine/definition.test.ts # src/lib/onboard/machine/definition.ts # src/lib/onboard/machine/progress.ts # src/lib/onboard/machine/runtime.test.ts # src/lib/onboard/machine/runtime.ts # src/lib/onboard/runtime-boundary.ts
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Summary
Introduce explicit result types and helpers for future onboarding state handlers. This prepares handlers to return transition, completion, and failure decisions without changing live orchestration yet.
Changes
src/lib/onboard/machine/result.tswith transition, complete, and failed state-result types.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
New Features
Tests