Skip to content

Dashboard data store - Populating the store [3/3] - #2233

Open
n-lark wants to merge 8 commits into
249-data-store-cache-offfrom
249-data-store-populate
Open

n-lark wants to merge 8 commits into
249-data-store-cache-offfrom
249-data-store-populate

Conversation

@n-lark

@n-lark n-lark commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Description

Value-shaped widgets now write their current clean value into global context at global.dashboardStore[nodeId], and clear the key when the widget is removed. Nothing reads from it yet, so dashboards behave as before.

global.get('dashboardStore.<nodeId>')   // a flow can now read a widget's value
widget global.dashboardStore[id]
scalar (text, gauge, slider, …) the value (42, "b", true)
form field object { name, age }
table the rows array
chart not stored — see Charts in the data store #2238
button, control, event, spacer nothing

Client-scoped messages (msg._client.socketId on a client-configurable node) are excluded, as they already are from the internal datastore.

The internal datastore still drives page loads, and is unchanged from main apart from the one mirror call at the end of save.

Worth knowing

  • A message with no payload key leaves the mirrored value alone; payload: undefined clears it. This matches the merge semantics of the legacy save.
  • ui-base registers its injection options at module scope, so a re-injection after a replacement keeps its onReplaced.
  • An enabled flag gates the write path, so a cache-off context store doesn't throw on every message.

Related Issue(s)

Relates to #2236

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@n-lark n-lark changed the title Dashboard data store - Populating the store Dashboard data store - Populating the store [3/3] Sep 16, 2026
@n-lark
n-lark added this pull request to stack #2231 September 16, 2026 17:03
@n-lark n-lark self-assigned this Sep 16, 2026
@n-lark
n-lark marked this pull request as ready for review September 17, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant