Skip to content

Dashboard data store - Adding the store [1/3] - #2229

Open
n-lark wants to merge 5 commits into
mainfrom
249-data-store
Open

n-lark wants to merge 5 commits into
mainfrom
249-data-store

Conversation

@n-lark

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

Copy link
Copy Markdown
Contributor

Description

Important

This is part of a multi stage epic and should NOT be merged to main as is.

Plumbing only: the store exists in global context but nothing reads from it yet, so dashboards behave exactly as before.

The store

nodes/store/reactive.js is a proxy-backed store where writing a value is the change event, so there is no separate "store it, then emit it" step. Each key holds an entry with the value plus room for quality, timestamp and history. Reads return the value by default, and a $ prefix returns the full record:

global.get('dashboardStore.myKey')    // the value
global.get('dashboardStore.$myKey')   // { value, quality, timestamp, history }

Nested objects and arrays are watched too, so a deep change still fires the event. The backing object has a null prototype with prototype-pollution guards, clones on write so a flow cannot corrupt stored state, and flattens to plain { key: value } for serialisation.

Injection

ui-base injects the store into global context at global.dashboardStore on startup. It is idempotent across multiple base nodes and redeploys, so the same store is reused, and it rehydrates existing data after a restart.

Related Issue(s)

Closes #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 [249] Dashboard data store - Adding the store [1/3] Sep 15, 2026
@colinl

colinl commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Is there information publicly available on what this is about? The Flowfuse/engineering issue is not accessible.

@n-lark
n-lark added this pull request to stack #2231 September 15, 2026 20:05
@n-lark n-lark self-assigned this Sep 16, 2026
@n-lark

n-lark commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Hey @colinl I'll get the issues moved to this repo before I move this out of draft. Will report back.

@n-lark

n-lark commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Hey @colinl I moved the parent epic Epic: Dashboard data store #2234 and the subtasks into this repo.

@n-lark
n-lark marked this pull request as ready for review September 17, 2026 20:26
@colinl

colinl commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

So I see, thanks. This will keep you busy for a while :)

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.

Adding a data store

2 participants