fix: repair first-run onboarding path - #2465
Conversation
📝 WalkthroughWalkthroughThe PR adds runtime-expression support for ChangesState expression validation
DAG status prop wiring
Workflow documentation updates
Profile keyboard event typing
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/runtime/builtin/state/state.go`:
- Around line 117-127: Align expected_version handling between validateStep in
state.go and the config decoding logic in config.go: do not defer literal string
versions unless they are runtime expressions, or otherwise add consistent
parsing into config.ExpectedVersion as *int64. Ensure valid non-zero expected
versions remain available to runtime validation, and apply the corresponding
change at both referenced sites.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: dca792ae-16a9-448a-a903-edc91fedd648
📒 Files selected for processing (8)
README.mdinternal/cmd/validate_test.gointernal/runtime/builtin/state/config.gointernal/runtime/builtin/state/state.gointernal/runtime/builtin/state/state_test.goui/src/features/dags/components/DAGStatus.tsxui/src/features/dags/components/__tests__/DAGStatus.test.tsxui/src/pages/profiles/index.tsx
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
state.expected_versionwhile preserving validation for integer, numeric-string, and invalid literal valuesRelated onboarding updates were published directly to the companion repositories:
Root causes
The binary quickstart created
hello.yamlin the current directory but started Dagu against its default DAG directory, so the workflow did not appear in the Web UI. Several copied examples also had schema or output mismatches. Separately, the status view spread the default DAG context over its explicit props, producing log URLs with an empty DAG filename.Testing
make fmtmake bingo test ./internal/cmd ./internal/runtime/builtin/state -count=1make conformance CONFORMANCE_TEST_TARGET=./conformance/spec002_schemacd ui && pnpm typecheckcd ui && pnpm test -- src/features/dags/components/__tests__/DAGStatus.test.tsx(115 files / 490 tests passed)example-01-basic-sequentialsuccessfully, verified step log URLs include the DAG filename, and opened the stdout log drawer