Commit 8973f61
fix(workspace-forking): keep an unset custom-block boolean unset
Boolean handling collapsed a tri-state. `''` is a flag the user never touched, and
it is not `false`.
On apply, any non-`'true'` string became `false` — so an untouched optional flag
was written as one. `assembleCustomBlockInputMapping` skips `''` but keeps
`false`, so that value reached the child's `inputMapping` and overrode whatever
default the Start field declares. Only an explicit `'true'`/`'false'` is applied
now; anything else leaves the field unset, and the child's own default stands.
In the modal the switch mapped `''` to the False segment, so a required flag
rendered as configured while the Sync gate still read it as empty — the same
display-versus-gate split the previous commit moved into `effectiveDependentValue`
to close, reintroduced one layer up. The value is passed through unmapped instead:
`''` matches neither segment, so the switch renders with nothing selected, which
is what it is.
Reported by Greptile and Cursor Bugbot on #6871.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 7b2fa42 commit 8973f61
3 files changed
Lines changed: 43 additions & 11 deletions
File tree
- apps/sim/ee/workspace-forking
- components/fork-sync
- lib
- copy
- remap
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | | - | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
| |||
236 | 234 | | |
237 | 235 | | |
238 | 236 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
244 | 242 | | |
245 | 243 | | |
246 | 244 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
690 | 717 | | |
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
317 | 326 | | |
318 | 327 | | |
319 | | - | |
320 | | - | |
321 | | - | |
| 328 | + | |
322 | 329 | | |
323 | 330 | | |
324 | 331 | | |
| |||
0 commit comments