Repository navigation
fix(playground): improve default argument inputs - #4270
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe change adds exact unevaluated parameter default expressions to Rust, WASM, and TypeScript schemas, then uses them in the playground argument form as placeholders for omitted defaults with disabled-field and tooltip behavior. ChangesDefault argument UI
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant BAMLFunction
participant ParamSchema
participant WASMBridge
participant WorkerProtocol
participant ArgsForm
BAMLFunction->>ParamSchema: provide function source and default span
ParamSchema->>WASMBridge: serialize defaultExpression
WASMBridge->>WorkerProtocol: transport parameter schema
WorkerProtocol->>ArgsForm: provide defaultExpression
ArgsForm->>ArgsForm: render placeholder and disabled omitted field
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
⏭️ Performance benchmarks were skippedPerf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to To run them on this PR, do any of the following, then push a commit (or re-run CI):
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d50920668
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Binary size checks passed✅ 7 passed
Generated by |
Summary
SquarePenicon beside the inputRoot cause
The typed args form represented a default only as
hasDefault. When the argument was omitted, the form replaced its control with explanatory text, and no source expression was available for a useful placeholder.Playground UI
Before
After
Validation
cargo test -p baml_project param_schema --lib(22 passed)cargo test -p bridge_wasm schema_twins_serialize_identically_to_source_types --libpnpm --dir typescript2 format:ci --since=origin/canarypnpm --dir typescript2 --filter @b/pkg-playground typecheckpnpm --dir typescript2 --filter @b/pkg-playground test(137 passed)Linear: B-1054
Summary by CodeRabbit
New Features
Bug Fixes