feat: Set timeout flag when wait-until timeouted - #1804
Conversation
## Walkthrough
A new property, `timeout: true`, is added to the context object passed to the `setCustomOutputs` method within the timeout callback of the wait-until node. This change explicitly signals that the output was triggered by a timeout event, without altering any other logic or control flow.
## Changes
| File(s) | Change Summary |
|-------------------------------------------|-----------------------------------------------------------------------------------------------|
| src/nodes/wait-until/WaitUntilController.ts | Adds `timeout: true` to the context object in the timeout callback for `setCustomOutputs`. |
| docs/node/wait-until.md | Updates documentation to describe the new `timeout` output property and modifies `config` description. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant WaitUntilNode
participant Entity
participant Controller
WaitUntilNode->>Entity: Wait for state change
alt State changes before timeout
Entity-->>WaitUntilNode: State changed
WaitUntilNode->>Controller: setCustomOutputs(context)
else Timeout occurs
WaitUntilNode->>Controller: setCustomOutputs({..., timeout: true})
end |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/node/wait-until.md (1)
101-101: Clarify wording oftimeoutoutput property
The newtimeoutbullet is correct, but you might rephrase for consistency and clarity. For example:
`timeout`: set to `true` when the node’s output is triggered by a timeout event.
This mirrors the style used elsewhere in the documentation.🧰 Tools
🪛 LanguageTool
[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...nfig properties of the node. -timeout: set totrueif node output was from t...(UNLIKELY_OPENING_PUNCTUATION)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/node/wait-until.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/node/wait-until.md
[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...ected and the timeout occurs. - config: config properties of the node. - `timeo...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...nfig properties of the node. - timeout: set to true if node output was from t...
(UNLIKELY_OPENING_PUNCTUATION)
🔇 Additional comments (1)
docs/node/wait-until.md (1)
100-100: Consistent punctuation forconfigbullet
Great update adding the trailing period to theconfigdescription—this aligns it with the other list items.🧰 Tools
🪛 LanguageTool
[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...ected and the timeout occurs. -config: config properties of the node. - `timeo...(UNLIKELY_OPENING_PUNCTUATION)
Very simple, yet helpful addition to
wait-untilnode's timeout output.Sometimes this node is a beginning to a big flow that may run some portion if state timeout'd. Both outputs may connect to the same next node, but it may be a
switchthat performs slightly different actions on state reached or timeout.I'm not sure if I made the addition in a correct place and, true – I haven't tested this locally – but that effort would be much bigger than just creating this PR. Therefore I ask for your understanding. :)
Summary by CodeRabbit