# 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:** 20\
**Page:** 2

<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:** [23 June 2025 07:21 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/21 "2025-06-23T07:21:40Z")

</div>

Perhaps we should redefine what a node status is.

Based on your messages, there's a need to separate _static_ statuses from _ephemeral_ statuses.

I'll try to define them with an example:

- static: connection status with the broker, database, etc.
- ephemeral: related to message processing

If we separate them, we can consider that ephemeral statuses are purely debugging (visually see the process) and therefore do not trigger a change in the status node. This ephemeral status will restore the initial status at the end of duration.

---

<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:** [23 June 2025 07:41 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/22 "2025-06-23T07:41:22Z")

</div>

That’s a better version of what I was trying to say 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 August 2025 08:34 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/24 "2025-08-22T08:34:36Z")

</div>

Closed on 22 August 2025 08:34 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [7 September 2025 09:43 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/25 "2025-09-07T09:43:18Z")

</div>

Opened on 7 September 2025 09:43 UTC



---

<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 10:04 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/26 "2025-09-07T10:04:37Z")

</div>

Introduction of Ephemeral Status:

**Definition** :

An ephemeral status is a purely virtual; the runtime will only send the status to the editor if at least one editor is open. A user must therefore have their editor open to trigger these ephemeral statuses.  
These statuses are not saved/retained; closing and reopening the editor will not cause the previously present ephemeral status to appear.  
As its name suggests, the status has a limited lifespan. Once the duration defined or by default is expired, the status will clear or display the last static status if there.

**Design** :

I propose keeping the `node.status` method and setting the `ephemeral` property to true to make this status ephemeral.  
The type will therefore be:

```ts
type NodeStatusFill = "red" | "green" | "yellow" | "blue" | "grey";
type NodeStatusShape = "ring" | "dot";

// The static status
interface NodeStatus {
fill?: NodeStatusFill;
shape?: NodeStatusShape;
text?: string;
}

// The ephemeral status
interface EphemeralNodeStatus {
fill?: NodeStatusFill;
shape?: NodeStatusShape;
text?: string;
duration?: number;
ephemeral: true;
}

// Node object
status(status: string | NodeStatus | EphemeralNodeStatus): void;

```

**Outstanding questions** :

- What is the default duration of the ephemeral status if `duration` is not set?
- Allow `duration` for static status? At the end of duration the status is cleared.
- Handle a list of statuses; only for ephemerals?

```ts
status(status: string | NodeStatus | Array<NodeStatus | EphemeralNodeStatus>): void;

```

Do you have any other comments? I would like to move forward with this feature because it would simplify my nodes; I don't have to code this logic myself.

If the concept is validated, I can start looking at how to implement it.

---

<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 12:33 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/27 "2025-09-07T12:33:13Z")

</div>

> [@GogoVega](#):
>
> ephemeral

Looks good.

> [@GogoVega](#):
>
> What is the default duration of the ephemeral status if `duration` is not set?

5 Seconds? Or what is the default for the notification display? Set it the same as that?

> [@GogoVega](#):
>
> Allow `duration` for static status? At the end of duration the status is cleared.

To be honest, you don't really need the ephemeral flag do you? Just use the duration. If it is set to a number, the status is ephemeral. Otherwise, it is not.

> [@GogoVega](#):
>
> Handle a list of statuses; only for ephemerals?

What problem does that address?

> [@GogoVega](#):
>
> it would simplify my nodes; I don't have to code this logic myself.

I agree, I can think of some uses for this.

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [7 September 2025 12:44 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/28 "2025-09-07T12:44:57Z")

</div>

Just my 2 cents;

1. 2 or 3 seconds. Steve's gif gives enough time to read the ephemeral staus and it should not hold up the progress of the node
2. Keep the current status as is. If it were to be cleared, for example the 'connected' status of an MQTT node, would disappear
3. Current status handling as is. Why would a list of ephemeral statuses be required. Most would revert to current status. If a 2nd ephemeral status is required to revert to a previous ephemeral status reissue or update to previous.

I also like the way Steve displayed the ephemeral status in italics so it can be distinguished from the current status

---

<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 12:50 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/29 "2025-09-07T12:50:40Z")

</div>

> [@TotallyInformation](#):
>
> > [@GogoVega](#):
> >
> > Allow `duration` for static status? At the end of duration the status is cleared.
> 
> To be honest, you don't really need the ephemeral flag do you? Just use the duration. If it is set to a number, the status is ephemeral. Otherwise, it is not.

For this point, I want to simplify the following:

```js
// From
node.status({ text: "custom" })
setTimeout(function() { node.status({}) }, 500)

// To
node.status({ text: "custom", duration: 500 })

```

> [@TotallyInformation](#):
>
> > [@GogoVega](#):
> >
> > Handle a list of statuses; only for ephemerals?
> 
> What problem does that address?

If statuses are static, it is rare to have a predefined list of statuses; it would rather be ephemeral.

> [@Buckskin](#):
>
> - Keep the current status as is. If it were to be cleared, for example the 'connected' status of an MQTT node, would disappear
> - Current status handling as is. Why would a list of ephemeral statuses be required. Most would revert to current status. If a 2nd ephemeral status is required to revert to a previous ephemeral status reissue or update to previous.

The duration principle for static and ephemeral statuses is different:

- Static: The end of the duration clears the status
- Ephemeral: The end of the duration displays the last static status

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [7 September 2025 13:52 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/30 "2025-09-07T13:52:45Z")

</div>

> [@GogoVega](#):
>
> Static: The end of the duration clears the status

Yes, but for some nodes the duration is indefinite (while the flow is running) so what would change?

> [@GogoVega](#):
>
> Ephemeral: The end of the duration displays the last static status

Exactly, so why would a list be required?

---

<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 14:15 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/31 "2025-09-07T14:15:24Z")

</div>

> [@Buckskin](#):
>
> Yes, but for some nodes the duration is indefinite (while the flow is running) so what would change?

If the duration is not set, the status remains indefinitely. If the duration is set, the status is cleared at the end of the duration.

> [@Buckskin](#):
>
> Exactly, so why would a list be required?

This is the reason for my question, for me, the list should be used only for ephemeral statuses.

So, let's take an example: I have the status "connected" and a message arrives and I want to display "Querying" then "Querying." then "Querying.." then "Querying..." and then the ephemeral status changes to the static status, which gives:

```js
node.status([
  { text: "Querying", ephemeral: true, duration: 250 },
  { text: "Querying.", ephemeral: true, duration: 250 },
  { text: "Querying..", ephemeral: true, duration: 250 },
  { text: "Querying...", ephemeral: true, duration: 250 },
])

```

---

<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:** [7 September 2025 14:59 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/32 "2025-09-07T14:59:58Z")

</div>

> [@GogoVega](#):
>
> If the duration is set, the status is cleared at the end of the duration.

… I think it should revert to whatever the static status was previously.

Also what is the maximum time for ephemeral ? If someone sets it to (say) 5 minutes by mistake - does an incoming static status remove it ? If you had a list stacked up is the new static status added to the end - or just clear them all ?

imho I think a list is overthinking it. This is supposed to be a debug aid - what is the benefit of animating things like Waiting. .. …

---

<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 15:28 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/33 "2025-09-07T15:28:41Z")

</div>

> [@dceejay](#):
>
> … I think it should revert to whatever the static status was previously.

There is no point in a static status returning to what it was because in that case it becomes ephemeral. I'm trying to find an example that might need it but I can't find one.

> [@dceejay](#):
>
> does an incoming static status remove it ?

I would say yes, regardless of whether it is a static or ephemeral status, the incoming will replace the current status.

> [@dceejay](#):
>
> imho I think a list is overthinking it.

We can keep things simple; start without a list and see if there is a need in the future 🙂

---

<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 18:38 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/34 "2025-09-07T18:38:35Z")

</div>

> [@GogoVega](#):
>
> > [@dceejay](#):
> >
> > … I think it should revert to whatever the static status was previously.
> 
> There is no point in a static status returning to what it was because in that case it becomes ephemeral. I'm trying to find an example that might need it but I can't find one.

I agree with Dave here.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/87d1d31ff63c1413184059aa8e3de572560d627e.png)

If I have a status like the above, I may well want a short duration override to that but I would certainly want it to go back to the non-ephemeral status afterwards. Perhaps a flag could be used to override that default but it certainly should be the default.

> [@GogoVega](#):
>
> > [@dceejay](#):
> >
> > does an incoming static status remove it ?
> 
> I would say yes, regardless of whether it is a static or ephemeral status, the incoming will replace the current status.

I agree.

> [@GogoVega](#):
>
> > [@dceejay](#):
> >
> > imho I think a list is overthinking it.
> 
> We can keep things simple; start without a list and see if there is a need in the future

👍

---

<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 19:12 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/35 "2025-09-07T19:12:27Z")

</div>

> [@TotallyInformation](#):
>
> If I have a status like the above, I may well want a short duration override to that but I would certainly want it to go back to the non-ephemeral status afterwards.

Thinking back to my nodes, the query can fail and the status returns an error. It's worth creating a temporary status that reverts to the previous one. Here, what matters is triggering the `status` node (because this is not the case for ephemeral status).

The question now is how to create a duration that reverts and another that clears?

---

<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 19:15 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/36 "2025-09-07T19:15:24Z")

</div>

@GogoVega I don't like the `ephemeral` flag because I will have to simulate the code to determine the previous status, when:

- I haven't touched the code for a while
- new maintainers that didn't write the code
- the status transitions are dynamic

Therefore, my proposal is:

A callback can be provided when duration is set.

```js
node.status({ text: 'foo', duration: 3000, ()=> 'bar'})

```

When reading the above line, I don't need to spend time interpreting previous lines of code determine that `foo` transitions to `bar` after 3000 milliseconds.

If a callback is not provided, the status is cleared.

```js
node.status({ text: 'foo', duration: 3000})

```

When reading the avove line, it is clear that the status is cleared after 3000 miliseconds.

---

<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 19:21 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/37 "2025-09-07T19:21:44Z")

</div>

Very briefly put: an ephemeral status is purely visual, it does not trigger the `status` node and is only sent to connected editors (no retain mechanism). Of course ephemeral = limited in time.

The point to clarify is regarding the static status (the current one); if duration is defined two behaviors are desired when the duration end:

- clear the status
- restore the previous

---

<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 19:30 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/38 "2025-09-07T19:30:03Z")

</div>

> [@AllanOricil](#):
>
> A callback can be provided when duration is set.
> 
> ```auto
> node.status({ text: 'foo', duration: 3000, ()=> 'bar'})
> 
> ```

That's the idea behind the list, but as Dave pointed out, it complicates things, and in practice, statuses aren't predefined.

Now, if you have other ideas/comments, I'm open to them 😉

---

<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 19:32 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/39 "2025-09-07T19:32:26Z")

</div>

> [@GogoVega](#):
>
> statuses aren't predefined.

Could you write a code example to let me better understand this statement, please?

---

<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 19:50 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/40 "2025-09-07T19:50:37Z")

</div>

If I take my nodes as an example:

When the database connects, the node's status is `connected`. This status is static.

Now a message arrives and a query is made. I'd like to create a visual status that indicates `querying...`. When the query is finished, I'd like to create a visual status `query done` lasting 200 ms, which then returns to `connected`.

```js
// db connected
node.status({ text: "connected" })
// incoming message
node.status({ text: "querying...", ephemeral: true }) // default duration - don't matter
// finally
node.status({ text: "query done", ephemeral: true, duration: 200 })
// for error
// here I would like to revert to `connected` after 5s - trigger the status node is maybe the best practice
node.status({ text: "error", duration: 5000 })

```

As I said, it's rare to have predefined statuses because you don't know the result of your process. The silly example I took is the following:

```js
node.status([
  { text: "Querying", ephemeral: true, duration: 250 },
  { text: "Querying.", ephemeral: true, duration: 250 },
  { text: "Querying..", ephemeral: true, duration: 250 },
  { text: "Querying...", ephemeral: true, duration: 250 },
])

```

Or your process is _dumb_ and comes back to saying I receive a message... you will never have the example above. `wait 5s` then `wait 4s`... is... an exception 😈

---

<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:00 UTC](https://discourse.nodered.org/t/support-for-node-status-list-and-duration/97735/41 "2025-09-07T20:00:01Z")

</div>

> [@GogoVega](#):
>
> ```auto
> rigger the status node is maybe the best practice
> node.status({ text: "error", duration: 5000 })
> 
> ```

I don't think that would be right to be honest. I doubt I would want a status node to be triggered just because I am reverting back to a previous status, only if I send a new status (even if it is the same as the previous one).

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

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