fix(dashboard): show an error state instead of a confident zero - #918
Merged
Conversation
The four KPI tiles already caught their fetch failures and stored them in `this.error` — the shared `dashboardRefreshMixin` has declared `error: null` alongside `loading` all along. Nothing ever rendered it. So a failed load left `count` at 0 and the tile displayed "0 decisions", "0 votes", "0 meetings" — indistinguishable from a genuinely empty collection. Zero is a number a reader believes, which makes it worse than showing nothing: a dashboard with a dead backend looked like a dashboard reporting calm. One line per tile. `CnStatsBlock`'s `error` prop (nextcloud-vue 2.19.0) renders a dash and "Unavailable" in place of the number, tints the tile, and takes precedence over `count`, `loading` and `emptyLabel` — a stale count during a failure is exactly what must not survive. Checked rather than assumed: - `error` is reactive here. It is declared in the mixin's `data()`, not in the SFCs, so `grep 'error:' *KpiWidget.vue` finds nothing and the binding looks broken. It is not — all four assign `this.error` in their `catch`. - The prop EXISTS in the version this app resolves. `package.json` ranges `^2.19.0`, `node_modules` holds 2.19.0, and that copy contains `hasError()`. Without that check this would have been an inert HTML attribute: Vue drops an unknown prop silently, the page renders, the feature does nothing, and CI stays green. eslint, prettier and the webpack build all pass.
Contributor
Quality Report — ConductionNL/decidiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-nav-ceiling | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| check-l10n-js | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 104/104 | |||
| npm | ✅ | ✅ 557/557 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-27 06:36 UTC
Download the full PDF report from the workflow artifacts.
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.
The four KPI tiles already caught their fetch failures into
this.error— the shareddashboardRefreshMixinhas declarederror: nullalongsideloadingall along. Nothing ever rendered it.A failed load therefore left
countat 0 and the tile showed "0 decisions", "0 votes", "0 meetings" — indistinguishable from a genuinely empty collection. Zero is a number a reader believes, which makes it worse than showing nothing.One line per tile.
CnStatsBlock'serrorprop (nextcloud-vue 2.19.0) renders a dash and "Unavailable", tints the tile, and takes precedence overcount,loadingandemptyLabel— a stale count during a failure is exactly what must not survive.Checked rather than assumed:
erroris reactive here. It lives in the mixin'sdata(), not the SFCs, sogrep 'error:' *KpiWidget.vuefinds nothing and the binding looks broken. It isn't — all four assignthis.errorin theircatch.package.jsonranges^2.19.0,node_modulesholds 2.19.0, and that copy containshasError(). Without that check this would have been an inert attribute — Vue drops an unknown prop silently, the page renders, the feature does nothing, and CI stays green.eslint, prettier and the webpack build pass.