A freshly created node has no values on its unconnected inputs. The inspector shows false, 0, "" or an empty list, but at runtime null arrives, even on a boolean input. The node body shows nothing at all.
Measured over all built-in nodes: 97 of 135 inputs that take a typed-in value delivered null (47 number, 22 text, 14 any, 7 boolean, 7 list).
Cause: two places disagree.
The inspector shows inlineInputDef(port).default.
The runtime used node.params[key] ?? port.default ?? null (inlineValue), and port.default is set on few ports only.
Most nodes turn null into the right zero themselves (Add, Not, Compare, Count, Branch). Wrong were the nodes that pass the value on or convert it on their own:
To text gave "0" instead of the empty text the inspector shows.
Select and First not empty passed null on instead of "".
Fill filled with 0 instead of "".
Decision (user)
One fix in inlineValue: an unconnected input falls back to the same default the inspector shows. That covers every node, future ones included, and existing projects. Nothing is written into project files.
The node body shows that value too, on every free input: false, 0, and "" for empty text. What is shown is what the node computes with.
Inputs with nothing to type in (object, struct, exec, inline: false) stay null.
## Problem
A freshly created node has no values on its unconnected inputs. The inspector shows `false`, `0`, `""` or an empty list, but at runtime `null` arrives, even on a boolean input. The node body shows nothing at all.
Measured over all built-in nodes: 97 of 135 inputs that take a typed-in value delivered `null` (47 number, 22 text, 14 `any`, 7 boolean, 7 list).
Cause: two places disagree.
- The inspector shows `inlineInputDef(port).default`.
- The runtime used `node.params[key] ?? port.default ?? null` (`inlineValue`), and `port.default` is set on few ports only.
Most nodes turn `null` into the right zero themselves (`Add`, `Not`, `Compare`, `Count`, `Branch`). Wrong were the nodes that pass the value on or convert it on their own:
- `To text` gave `"0"` instead of the empty text the inspector shows.
- `Select` and `First not empty` passed `null` on instead of `""`.
- `Fill` filled with `0` instead of `""`.
## Decision (user)
- One fix in `inlineValue`: an unconnected input falls back to the same default the inspector shows. That covers every node, future ones included, and existing projects. Nothing is written into project files.
- **The node body shows that value too**, on every free input: `false`, `0`, and `""` for empty text. What is shown is what the node computes with.
- Inputs with nothing to type in (object, struct, exec, `inline: false`) stay `null`.
An unconnected input now gets the same default at run time that the inspector shows: false, 0, "", []. Before, 97 of 135 typeable inputs of the built-in nodes delivered null.
The fix sits in one place (inlineValue in src/core/graph/NodeRegistry.ts), so it covers all nodes, including future ones, and existing projects. Nothing is written into project files.
The node itself now shows the value too: empty text and empty lists as (empty), object and struct inputs without a connection as (null). Live values while playing use the same words. A key input without a key keeps —, like the key field in the inspector.
Visible changes for existing projects: To text without input gives "" instead of "0", Select and First not empty give "" instead of null. A scan of the user's projects found no such spot.
Tests
./check.sh: 2434 tests, CHECK EXIT 0. 8 new unit tests, including one over all built-in nodes (none delivers null any more). The counter probe at inlineValue makes them fail.
e2e 6, 23, 24, 26, 43: 245 checks passed. The new check in module 6 reads the rows of an unconnected Name of node: a (empty), text (empty), start 0, count -1, object (null).
After Prettier touched NodeView.ts, the gate ran again (green); e2e 6 was not repeated after that.
Done in 1d18862 (wiki: 380fac7, *Behaviors*).
**Behavior**
- An unconnected input now gets the same default at run time that the inspector shows: `false`, `0`, `""`, `[]`. Before, 97 of 135 typeable inputs of the built-in nodes delivered `null`.
- The fix sits in one place (`inlineValue` in `src/core/graph/NodeRegistry.ts`), so it covers all nodes, including future ones, and existing projects. Nothing is written into project files.
- The node itself now shows the value too: empty text and empty lists as `(empty)`, object and struct inputs without a connection as `(null)`. Live values while playing use the same words. A key input without a key keeps `—`, like the key field in the inspector.
- Visible changes for existing projects: `To text` without input gives `""` instead of `"0"`, `Select` and `First not empty` give `""` instead of `null`. A scan of the user's projects found no such spot.
**Tests**
- `./check.sh`: 2434 tests, CHECK EXIT 0. 8 new unit tests, including one over all built-in nodes (none delivers `null` any more). The counter probe at `inlineValue` makes them fail.
- e2e 6, 23, 24, 26, 43: 245 checks passed. The new check in module 6 reads the rows of an unconnected `Name of` node: `a (empty)`, `text (empty)`, `start 0`, `count -1`, `object (null)`.
- After Prettier touched `NodeView.ts`, the gate ran again (green); e2e 6 was not repeated after that.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
A freshly created node has no values on its unconnected inputs. The inspector shows
false,0,""or an empty list, but at runtimenullarrives, even on a boolean input. The node body shows nothing at all.Measured over all built-in nodes: 97 of 135 inputs that take a typed-in value delivered
null(47 number, 22 text, 14any, 7 boolean, 7 list).Cause: two places disagree.
inlineInputDef(port).default.node.params[key] ?? port.default ?? null(inlineValue), andport.defaultis set on few ports only.Most nodes turn
nullinto the right zero themselves (Add,Not,Compare,Count,Branch). Wrong were the nodes that pass the value on or convert it on their own:To textgave"0"instead of the empty text the inspector shows.SelectandFirst not emptypassednullon instead of"".Fillfilled with0instead of"".Decision (user)
inlineValue: an unconnected input falls back to the same default the inspector shows. That covers every node, future ones included, and existing projects. Nothing is written into project files.false,0, and""for empty text. What is shown is what the node computes with.inline: false) staynull.Done in
1d18862(wiki: 380fac7, Behaviors).Behavior
false,0,"",[]. Before, 97 of 135 typeable inputs of the built-in nodes deliverednull.inlineValueinsrc/core/graph/NodeRegistry.ts), so it covers all nodes, including future ones, and existing projects. Nothing is written into project files.(empty), object and struct inputs without a connection as(null). Live values while playing use the same words. A key input without a key keeps—, like the key field in the inspector.To textwithout input gives""instead of"0",SelectandFirst not emptygive""instead ofnull. A scan of the user's projects found no such spot.Tests
./check.sh: 2434 tests, CHECK EXIT 0. 8 new unit tests, including one over all built-in nodes (none deliversnullany more). The counter probe atinlineValuemakes them fail.Name ofnode:a (empty),text (empty),start 0,count -1,object (null).NodeView.ts, the gate ran again (green); e2e 6 was not repeated after that.