# Support for node status list and duration

**URL:** <https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735>\
**Category:** Feature Requests\
**Created:** [22 June 2025 09:02 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735 "2025-06-22T09:02:24Z")\
**Posts on this page:** 14\
**Page:** 3

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [7 September 2025 20:03 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/42 "2025-09-07T20:03:32Z")

</div>

Honestly I don't know if the `error` status should trigger the status node.  
It's also the role of catch node (because `node.error` is called).

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [7 September 2025 20:08 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/43 "2025-09-07T20:08:01Z")

</div>

You already said that you thought ephemeral statuses should not trigger the status node and I think that is correct. In any case, an error should trigger an error, you should not rely on status for that I don't think.

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [7 September 2025 20:34 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/44 "2025-09-07T20:34:29Z")

</div>

I understood it now. I can see `ephemeral` and `duration` as independent variables.

- `ephemeral` when `true` it does not trigger status nodes/effects and and it also does not change `node._previousStatus`, which is managed by the core.
- `duration` when set the node goes back to its previous status using `node._previousStatus` when the configured time has elapsed

For your query example, I agree `ephemeral` makes sense because you just want a visual status change, but I don't see how the runtime would change the status back to `node._previousStatus` once the query promise is done. @GogoVega Could you explain in details how you plan to do it? I don’t think `duration` would work because the status must go back to the previous static status only after the promise is resolved. obs: try/catch and other node code details were ommited

```js
async onInput(){
     // suppose the db connection is already opened and status = Connected (static status)
    
    await this.query();

    ....
}

async query(){
      this.status({ text: "querying...", ephemeral: true }) // change status visually only

      await this.db.model.fetchMany(...)

      // how would the runtime change the status back to node._previousStatus only when the above promise is completed????
   
}

```

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [7 September 2025 20:52 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/45 "2025-09-07T20:52:43Z")

</div>

My side:

```js
async query(){
      this.status({ text: "querying...", ephemeral: true }) // let's say the default duration is 5s - the process took <1s

      await this.db.model.fetchMany(...)

      this.status({ text: "query done", ephemeral: true, duration: 200 })
}

```

The idea behind the runtime is to use the current variable `retained` which only keeps static statuses. When it is an ephemeral status, we add the static status into the ephemeral status and it is the editor which will visually handle the transition. Same principle with static status and duration except that `retained` will not change - so it can be restored.

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [7 September 2025 20:57 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/46 "2025-09-07T20:57:06Z")

</div>

> [@GogoVega](#):
>
> `this.status({ text: "querying...", ephemeral: true }) // let's say the default duration is 5s - the process took <1s`

[removed initial interpretation to avoid emotional damage due to impulsiveness]  
Sorry. I interpreted it wrongly. I understood it now.

It will be

1. Connected
2. querying...
3. query done
4. Connected

Because it took \<1s for the process to finish.

Now lets suppose the process takes \>5s and there is a default `duration` of 5s when using ephemeral without setting duration. Then

1. Connected
2. querying...
3. Connected
4. query done
5. Connected

And this would be wrong. That is why I think ephemeral shouldnt have a default duration. Unless you have a plan to fix this possible issue

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [7 September 2025 21:01 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/47 "2025-09-07T21:01:28Z")

</div>

Yes and no, as I said in my scenario, the process should take \< 1s, so "querying..." (which normally takes 5s) will be replaced by "query done":

1. Connected
2. querying...
3. query done
4. Connected

No worries 😉

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [7 September 2025 21:04 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/48 "2025-09-07T21:04:50Z")

</div>

> [@AllanOricil](#):
>
> Now lets suppose the process takes \>5s and there is a default `duration` of 5s when using ephemeral without setting duration. Then
> 
> 1. Connected
> 2. querying...
> 3. Connected
> 4. query done
> 5. Connected
> 
> And this would be wrong. That is why I think ephemeral shouldnt have a default duration. Unless you have a plan to fix this possible issue

I added the right interpretation i was thinking. How would this be avoided?

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [7 September 2025 21:09 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/49 "2025-09-07T21:09:02Z")

</div>

Yep, a possibility is a `null` value.

The subtlety is that this status is infinite but only in the editor that received it; an editor refresh makes this status disappear 🤪

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [7 September 2025 21:13 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/50 "2025-09-07T21:13:57Z")

</div>

So can we agree that there is no default duration when ephemeral = true?

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [7 September 2025 21:15 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/51 "2025-09-07T21:15:41Z")

</div>

Both possibilities are good. It's up to our gurus to decide 🙂

It will depend on the use that is most likely to be used.

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [7 September 2025 21:34 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/53 "2025-09-07T21:34:05Z")

</div>

That is fine. I support both attributes, as long as they are independent. Good idea. 👍

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [8 September 2025 06:35 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/54 "2025-09-08T06:35:42Z")

</div>

This is understandable for a query that always takes a long time. Eg AI 🙂 but most situations they are much quicker and can handle multiple queries per second if not hundreds. You don’t really want to send something to status for every passing message unless you want to kill the editor performance.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [27 October 2025 12:57 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/55 "2025-10-27T12:57:35Z")

</div>

Draft PR coming soon, just enough time to properly write the concept for this v1 🙂

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [27 October 2025 15:00 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/56 "2025-10-27T15:00:19Z")

</div>

> <https://github.com/node-red/node-red/pull/5331>
>
> \## Types of changes
> 
> \- \[\] Bugfix (non-breaking change which fixes an issue)
> …- \[x\] New feature (non-breaking change which adds functionality)
> 
> \## Proposed changes
> 
> Introduces the \`ephemeral\` status and \`duration\` option.
> 
> \### Ephemeral Concept
> 
> An \*ephemeral\* status is a purely visual status; it has no role in the runtime (it does not trigger a \`Status\` node).
> 
> This status is defined by adding the \`ephemeral=true\` property. Optionally, the \`duration\` property allows to override the default duration of \`5s\`.
> 
> At the end of the duration, the old retained status will be restored or cleared if no status is available.
> 
> \#### Editor
> 
> \- The minimum duration is set to \`100 ms\`
> \- If an ephemeral status is in progress and another status arrives (ephemeral or not) it will replace the status with its associated behavior.
> \- The displayed text is in italics to recognize an ephemeral status
> 
> \#### Runtime
> 
> \- When an ephemeral status arrives at \`handleStatus\`, this status will only trigger the \`node-status\` event.
> \- \`Status\` nodes will not be triggered.
> \- Duration is not handled in the runtime when it is an ephemeral status.
> 
> \### Duration Concept
> 
> Duration on \*default\* status allows it to be cleared at the end of the duration.
> 
> \#### Editor
> 
> \- The minimum duration is set to \`100 ms\`
> \- If a status is in progress and another status arrives (ephemeral or not) it will replace the status with its associated behavior.
> 
> \### Runtime
> 
> \- The duration must be greater than \`0\`.
> \- When duration is set, it will call \`handleStatus\` back at the end of duration. The \`node-status\` event will not be triggered this second time.
> \- Clearing status is handled in the editor.
> 
> \## Typing
> 
> \`\`\`ts
> interface NodeStatus {
> fill?: NodeStatusFill;
> shape?: NodeStatusShape;
> text?: string;
> duration?: number;
> ephemeral: boolean;
> }
> \`\`\`
> 
> \## Related Issue(s)
> 
> \- https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735
> 
> \## Todo list
> 
> \- \[\] Italic text
> \- \[\] Update docs
> \- \[\] Update Monaco/ACE editors
> \- \[\] Add unit tests
> 
> \## Checklist
> 
> \- \[x\] I have read the \[contribution guidelines\](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
> \- \[x\] For non-bugfix PRs, I have discussed this change on the forum/slack team.
> \- \[x\] I have run \`npm run test\` to verify the unit tests pass
> \- \[\] I have added suitable unit tests to cover the new/changed functionality

[Previous page](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735.md?page=2)
