await-ui-element announces "UI element appeared" for a wait that timed out: completedMsg ignores success:false
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start in packages/tool-server/src/tools/await-ui-element/index.ts around lines 159-164 and 350, then compare the result-aware completedMsg in packages/tool-server/src/tools/keyboard/index.ts. Trigger a selector that never matches and let it time out; the interaction message should no longer claim success when result.success is false, while successful waits should retain their existing messages.
Written by the indexing model from the issue text.
Description
[Diplomat, Opus 5]: Found while reviewing #592, which fixes the same class in keyboard. Out of scope there, so filing it here.
await-ui-element reports an unmet wait in its RESULT (success: false) rather than by throwing, so the interaction line the user sees comes from completedMsg — which never looks at the result:
packages/tool-server/src/tools/await-ui-element/index.ts:350
completedMsg: ({ params }) => conditionCompleted[params.condition],
with (:159-164)
const conditionCompleted = {
exists: "UI element appeared",
visible: "UI element became visible",
hidden: "UI element became hidden",
text: "UI element matched expected text",
} as const;
So a condition: exists wait that ran its full timeout and came back { success: false, elapsed: 10000, note: … } is announced as "UI element appeared". The line states the opposite of what happened, on the one tool whose whole purpose is to report whether the state arrived.
Trigger: call await-ui-element with a selector that never matches (any condition) and let it time out. The result is correct; the message beside it is not.
The twin that does it right is keyboard, whose verdict has the same shape (reported, not thrown) — packages/tool-server/src/tools/keyboard/index.ts:
completedMsg: ({ params, result }) =>
params.text === undefined
? "Pressed a key"
: `Entered text${result.verified === false ? " (text did not land)" : ""}`,
completedMsg already receives result, so the fix is local: qualify the string when success is false (and the note says why).
Why it matters beyond cosmetics: the same "reported, not thrown" shape is what the recorder's UNMET_WAIT_WARNING and flow-run's gate exist to catch, because a green-looking wait becomes a flow step that fails at replay. The interaction line is the one place that still reads as success.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 118
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 93
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from software-mansion/argent
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
software-mansion/argent#1143 ·
-
b:minor bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
software-mansion/argent#1135 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
software-mansion/argent#1078 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
software-mansion/argent#1073 ·
-
b:nitpick bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
software-mansion/argent#1067 ·
All issues in software-mansion/argent
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100