Repository navigation
feat(launchpad): build widget-calculated-fields - #1246
Merged
rubenvdlinde merged 4 commits intoNov 16, 2026
Merged
Conversation
Dashboard-wide evaluation of calculated fields in topological order with cross-widget references (tasks 13, 17, 18): evaluateDashboard(), a calculated-fields Pinia store and the useCalculatedFields() composable. Format options applied at display time only (tasks 34, 36; 35 in part). Assisted-by: ClaudeCode
Server-side cycle detection mirroring the client detector (task 23 in part, task 40 in part), changelog entry (51), SPDX check (50). Assisted-by: ClaudeCode
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
November 16, 2026 21:39
…units [skip ci] Restores the unit-complexity rating: every new function now has a cyclomatic complexity of 5 or less. Behaviour is unchanged. Assisted-by: ClaudeCode:claude-opus-5-5
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continues
widget-calculated-fieldsafter #1233 (merged): the dashboard-side evaluation, display formatting and server-side cycle detection.Tasks done
evaluateDashboard()(src/utils/calculatedFields/dashboardValues.js) evaluates every calculated field of a dashboard in the cycle detector's topological order and gives each field the other widgets' current data and calculated values. A failing field yieldsnullplus an inline error{error, expression, inputs}, and the rest of the dashboard still evaluates. Widgets in a cycle get the cycle error on each of their fields.dependentWidgets()names the widgets a data change reaches. The new Pinia storesrc/stores/calculatedFields.js(setWidgets,setWidgetData,setFilters,valuesOf,errorsOf) re-evaluates on every change.useCalculatedFields()watches a widget's data and the filters and returns{values: Map, errors: Map}. The app has nouseDashboardsStore.js, so this is its own store.formatOptions.jscovers number/currency (Intl.NumberFormat), dates (Intl.DateTimeFormat, UTC by default) and duration patterns (d,h,m,s, with literals in quotes). It returns display strings only, so values stay native for alerting and export.CalculatedFieldCycleDetector.phpandCalculatedFieldCycleError.phpport the client cycle detector node for node: same order, samecycleDetectedenvelope.Tasks left and why
calculatedFieldsstorage on the placement. 23-25, 37: a PHP AST type check,validateAndCompile, and the 400 envelopes on save. Each needs the storage first.parser.spec.js; the Playwright tasks need a live instance and are left for that.Tests added
dashboardValues.spec.js(11),formatOptions.spec.js(14),useCalculatedFields.spec.js(5). Each was checked to fail with its subject line broken.CalculatedFieldCycleDetectorTest(7).Suite before/after
Generated by Claude Code