Repository navigation
fix(decision): forward an element's selected state to the model - #910
Merged
okwasniewski merged 4 commits intoOct 12, 2026
Merged
Conversation
checked and expanded already reach the decision model through the element table and target criteria; selected did not, even though the engine already reports it in SemanticNode.states. On a tab bar every tab therefore looked identical, so the completion check for a tab switch landed near 50/50: a step that worked could still be blocked, and a step could be marked done before anything was tapped. Forward selected the same way checked already is, in actionSpace's element table and in targetCriterion.
Member
|
Thanks! I merged main into this branch and renamed |
Member
|
Thanks for this. #965 just landed and restructured the decision package, so this conflicts now. The change is still wanted: elements carry In the new layout:
|
…d-selected-state # Conflicts: # packages/decision/src/elements.ts # packages/decision/src/questions.ts
Contributor
Author
|
Merged main and ported the change as you described:
Decision package typecheck, oxlint, and vitest all green; full |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #884.
checkedandexpandedalready reach the decision model through the element table (actionSpace) and target criteria (targetCriterion), butselecteddid not, even though the engine already reports it inSemanticNode.states. On a tab bar every tab therefore looked identical to the model, so:holds/inconclusive), sometimes blocking a step that actually workeddonebefore anything was tapped, because the model couldn't tell the already-active tab from the one it needed to reachChange
Forward
selectedthe same waycheckedalready is:packages/decision/src/elements.ts: addselected?: booleantoElement, copyrow.node.states?.selectedinto the element tablepackages/decision/src/questions.ts: includeselectedin bothelementRecordsandtargetCriterionNo operation logic changes —
tabwas already tappable; this only forwards state that was already being read by the engine but dropped before it reached the model.Test plan
elements.test.ts: new test asserting a tab'sselectedstate appears in the element tableexecutor.test.ts: new test assertingselectedappears intap_targetcriteria, covering the same pathcheckedalready has a test for incheck_targetcriteriapnpm --filter @e2e-dev/decision test: 75 passed (the 4 pre-existingcli.test.tsskips are unrelated — that suite needs Node ≥22.22.3, and this sandbox has 22.22.0)pnpm --filter @e2e-dev/decision typecheck: cleanoxlinton the changed files: cleanAdded a patch changeset.