Commit 1d85f0c
Waleed Latif
test(github): evaluate subblock visibility with the block's own evaluator
The reachability guard hand-rolled its condition match and only looked at the
top-level `operation` field, so it silently ignored `and:`. A compound-gated
subBlock — `github_comment`'s `path` and `line`, which also need
`commentType: 'file_comment'` — was therefore counted as visible under states
where the editor does not render it, and the cast's type omitted `and`, so
TypeScript could not flag the gap.
That defect only ever over-reports available inputs, which is exactly the false
confidence this file exists to remove: the guard could pass while a required
param had no reachable field.
Uses `evaluateSubBlockCondition` instead, satisfying the secondary gate before
evaluating. "Can be rendered" is the right question for a reachability guard —
whether an operation has any way to supply a required param, not whether one
particular editor state happens to show it — and the helper now says so.1 parent 5040596 commit 1d85f0c
1 file changed
Lines changed: 26 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
29 | 42 | | |
30 | 43 | | |
31 | | - | |
| 44 | + | |
32 | 45 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
36 | 57 | | |
37 | 58 | | |
38 | 59 | | |
| |||
0 commit comments