This repository was archived by the owner on May 29, 2026. It is now read-only.
feat(dashboards): per-group default dashboard#52
Merged
Conversation
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 103/103 | |||
| npm | ✅ | ✅ 342/342 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-04-30 12:29 UTC
Download the full PDF report from the workflow artifacts.
rubenvdlinde
force-pushed
the
feature/impl-default-dashboard-flag
branch
from
April 30, 2026 12:35
000a613 to
217c15c
Compare
Add a transactional single-default-per-group invariant for
`group_shared` dashboards by reusing the existing `isDefault SMALLINT`
column (no schema migration required).
Changes
- `DashboardMapper::clearGroupDefaults()` and `setGroupDefaultUuid()`:
the two halves of the transactional flip.
- `DashboardService::setGroupDefault()`: admin-only, wraps both writes
in a single `IDBConnection::beginTransaction()` / `commit()` /
`rollBack()` block. Order is SET-target first so the 0-row count
triggers a 404 with the previous default preserved.
- `DashboardService::createGroupShared()`: explicitly forces
`isDefault = 0` on insert (REQ-DASH-016 — defense-in-depth against
payload smuggling).
- `DashboardService::updateGroupShared()`: drops `isDefault` from the
patch before applying (REQ-DASH-017 — PUT can never flip the flag).
- `DashboardApiController::setGroupDefault()` mapped to
`POST /api/dashboards/group/{groupId}/default`. Admin guard is in
the body (matches existing `updateGroup`/`deleteGroup` pattern).
Tests
- 7 service tests cover the transactional invariant (commit on
happy path, rollBack on cross-group 404, rollBack on mid-flip
exception), the non-admin guard, and the create/update field
hardening.
- 6 controller tests cover the route surface — non-admin 403,
anonymous 401, missing-uuid 400, happy path 200, cross-group 404,
and reflection-level checks that `createGroup`/`updateGroup`
signatures do not expose `isDefault` as a parameter.
- `tests/Stubs/DoctrineStubs.php` defines minimal Doctrine DBAL
placeholder classes so PHPUnit's automatic mock generator can
introspect `IDBConnection` outside the Nextcloud container; no-op
inside the container.
Spec source: PR #42 (`feature/replica-spec-proposals`,
`openspec/changes/default-dashboard-flag/`). Builds on PR #47
(`multi-scope-dashboards`, already in `development`).
rubenvdlinde
force-pushed
the
feature/impl-default-dashboard-flag
branch
from
April 30, 2026 12:36
217c15c to
34ae9bb
Compare
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ❌ | ||||
| phpcs | ⏭️ | ||||
| phpmd | ⏭️ | ||||
| psalm | ⏭️ | ||||
| phpstan | ❌ | ||||
| phpmetrics | ⏭️ | ||||
| eslint | ⏭️ | ||||
| stylelint | ⏭️ | ||||
| composer | ⏭️ | ⏭️ | |||
| npm | ❌ | ❌ | |||
| PHPUnit | ❌ | ||||
| Newman | ❌ | ||||
| Playwright | ❌ |
Quality workflow — 2026-04-30 12:37 UTC
Download the full PDF report from the workflow artifacts.
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 103/103 | |||
| npm | ✅ | ✅ 342/342 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-04-30 12:39 UTC
Download the full PDF report from the workflow artifacts.
8 tasks
rubenvdlinde
added a commit
that referenced
this pull request
May 1, 2026
Lockfile-only update via `npm audit fix` (no --force, no package.json changes, no major bumps). Resolves every high-severity npm vulnerability flagged on the development branch: - fast-xml-parser CVE chain (incl. Dependabot alerts #52, #70): 4.5.4 → 4.5.6 (entity-expansion bypass + comment/CDATA injection) - lodash prototype pollution - node-forge prototype pollution - path-to-regexp ReDoS - picomatch ReDoS As a side effect npm chose @conduction/nextcloud-vue 0.1.0-beta.15 (was beta.3), picking up the 12 intervening upstream releases including all the recent CnAppNav/CnAppRoot work. The Nc* re-export issue blocking eslint is unaffected — that lands when nextcloud-vue PR #102 ships and a new beta is published. Remaining: 12 moderate + 32 low. All require major-version bumps (@nextcloud/webpack-vue-config v7, vue-loader v17, @vue/test-utils v2 which is Vue-3-only and would break the app, etc.) — out of scope for an audit-fix sweep, deserve dedicated PRs with build/test verification. Verified locally: - `npm run build` succeeds (35 webpack warnings, same baseline as dev) - `npm run lint` no new errors (the 32 Nc* `import/named` errors are pre-existing, fixed by nextcloud-vue PR #102) - `npm audit` reports 0 high-severity vulnerabilities (was 6)
rubenvdlinde
added a commit
that referenced
this pull request
May 1, 2026
#81) Lockfile-only update via `npm audit fix` (no --force, no package.json changes, no major bumps). Resolves every high-severity npm vulnerability flagged on the development branch: - fast-xml-parser CVE chain (incl. Dependabot alerts #52, #70): 4.5.4 → 4.5.6 (entity-expansion bypass + comment/CDATA injection) - lodash prototype pollution - node-forge prototype pollution - path-to-regexp ReDoS - picomatch ReDoS As a side effect npm chose @conduction/nextcloud-vue 0.1.0-beta.15 (was beta.3), picking up the 12 intervening upstream releases including all the recent CnAppNav/CnAppRoot work. The Nc* re-export issue blocking eslint is unaffected — that lands when nextcloud-vue PR #102 ships and a new beta is published. Remaining: 12 moderate + 32 low. All require major-version bumps (@nextcloud/webpack-vue-config v7, vue-loader v17, @vue/test-utils v2 which is Vue-3-only and would break the app, etc.) — out of scope for an audit-fix sweep, deserve dedicated PRs with build/test verification. Verified locally: - `npm run build` succeeds (35 webpack warnings, same baseline as dev) - `npm run lint` no new errors (the 32 Nc* `import/named` errors are pre-existing, fixed by nextcloud-vue PR #102) - `npm audit` reports 0 high-severity vulnerabilities (was 6)
This was referenced May 1, 2026
rubenvdlinde
added a commit
that referenced
this pull request
May 3, 2026
#52) Add a transactional single-default-per-group invariant for `group_shared` dashboards by reusing the existing `isDefault SMALLINT` column (no schema migration required). Changes - `DashboardMapper::clearGroupDefaults()` and `setGroupDefaultUuid()`: the two halves of the transactional flip. - `DashboardService::setGroupDefault()`: admin-only, wraps both writes in a single `IDBConnection::beginTransaction()` / `commit()` / `rollBack()` block. Order is SET-target first so the 0-row count triggers a 404 with the previous default preserved. - `DashboardService::createGroupShared()`: explicitly forces `isDefault = 0` on insert (REQ-DASH-016 — defense-in-depth against payload smuggling). - `DashboardService::updateGroupShared()`: drops `isDefault` from the patch before applying (REQ-DASH-017 — PUT can never flip the flag). - `DashboardApiController::setGroupDefault()` mapped to `POST /api/dashboards/group/{groupId}/default`. Admin guard is in the body (matches existing `updateGroup`/`deleteGroup` pattern). Tests - 7 service tests cover the transactional invariant (commit on happy path, rollBack on cross-group 404, rollBack on mid-flip exception), the non-admin guard, and the create/update field hardening. - 6 controller tests cover the route surface — non-admin 403, anonymous 401, missing-uuid 400, happy path 200, cross-group 404, and reflection-level checks that `createGroup`/`updateGroup` signatures do not expose `isDefault` as a parameter. - `tests/Stubs/DoctrineStubs.php` defines minimal Doctrine DBAL placeholder classes so PHPUnit's automatic mock generator can introspect `IDBConnection` outside the Nextcloud container; no-op inside the container. Spec source: PR #42 (`feature/replica-spec-proposals`, `openspec/changes/default-dashboard-flag/`). Builds on PR #47 (`multi-scope-dashboards`, already in `development`).
rubenvdlinde
added a commit
that referenced
this pull request
May 3, 2026
#81) Lockfile-only update via `npm audit fix` (no --force, no package.json changes, no major bumps). Resolves every high-severity npm vulnerability flagged on the development branch: - fast-xml-parser CVE chain (incl. Dependabot alerts #52, #70): 4.5.4 → 4.5.6 (entity-expansion bypass + comment/CDATA injection) - lodash prototype pollution - node-forge prototype pollution - path-to-regexp ReDoS - picomatch ReDoS As a side effect npm chose @conduction/nextcloud-vue 0.1.0-beta.15 (was beta.3), picking up the 12 intervening upstream releases including all the recent CnAppNav/CnAppRoot work. The Nc* re-export issue blocking eslint is unaffected — that lands when nextcloud-vue PR #102 ships and a new beta is published. Remaining: 12 moderate + 32 low. All require major-version bumps (@nextcloud/webpack-vue-config v7, vue-loader v17, @vue/test-utils v2 which is Vue-3-only and would break the app, etc.) — out of scope for an audit-fix sweep, deserve dedicated PRs with build/test verification. Verified locally: - `npm run build` succeeds (35 webpack warnings, same baseline as dev) - `npm run lint` no new errors (the 32 Nc* `import/named` errors are pre-existing, fixed by nextcloud-vue PR #102) - `npm audit` reports 0 high-severity vulnerabilities (was 6)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Implements REQ-DASH-015..017 from spec change
default-dashboard-flag: a single canonical default pergroup_shareddashboard group, flipped via a dedicated transactional endpoint, with create/update paths hardened againstisDefaultmutation.POST /api/dashboards/group/{groupId}/default(admin-only, body{"uuid": "..."}).DashboardService::setGroupDefault()runs the SET-target + CLEAR-others writes inside a singleIDBConnection::beginTransaction()/commit()/rollBack()block. Cross-group uuids return 404 with the existing default preserved.createGroupShared()always inserts withisDefault = 0;updateGroupShared()stripsisDefaultfrom the patch — the only mutation path for the flag is the dedicated endpoint.isDefault SMALLINTcolumn from theadmin-templateschange — no schema migration required.Spec sources
feature/replica-spec-proposals,openspec/changes/default-dashboard-flag/).multi-scope-dashboards, already merged todevelopment).Transactional invariant
The service writes in this order:
setGroupDefaultUuidfirst → if 0 rows affected, throwDoesNotExistExceptionand roll back so the previous default in any other group is untouched. Only when the target write succeeds doesclearGroupDefaultsrun, thencommit(). Concurrent admin clicks on different uuids in the same group can only end with a singleisDefault = 1row.Test plan
composer phpcspasses (clean).composer phpmdpasses (clean — fixedMissingImportforInvalidArgumentException).composer test:all— 183 tests / 480 assertions pass (was 169 before; +14 new tests).composer check:strictreportsALL CHECKS PASSED.ready-for-code-reviewlabel only perfeedback_hydra-reset-sequential.md).Notes
tests/Stubs/DoctrineStubs.phpto allow PHPUnit to mockIDBConnectionoutside the Docker container — no-op inside the container, where the real Doctrine classes are loaded bylib/base.php.UserAttributeResolverand PHPStan error inImageMimeValidatorare unrelated to this change and predatedevelopmentHEAD; not touched per the strict "modify only files needed for this implementation" rule.tasks.mdare deferred — backend contract is complete and unblocks them as a follow-up.