Repository navigation
[access] refactor(dashboard): split DashboardService group delete, publication visibility and group-shared pick into named steps - #1075
Open
rubenvdlinde wants to merge 2 commits into
Open
rubenvdlinde wants to merge 2 commits into
rubenvdlinde wants to merge 2 commits into
Conversation
…ility and group-shared pick before the split Assisted-by: ClaudeCode:claude-opus-5-5
… visibility, group-shared pick and updates into named steps Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
November 11, 2026 18:30
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.
What changed
Eight
DashboardServicemethods read as named steps:deleteGroupShared(public, unchanged signature):assertAdmin→findGroupDashboard→assertNotLastInGroup→deleteWithPlacements→dispatchGroupSharedDeleted, in the original order.effectivePublicationStatus→materialisedStatus(legacy empty rows, due scheduled rows) → take-down check;materialiseDueScheduleandmaterialisedStatusshare oneisDuecheck instead of two copies.filterByPublicationStatekeeps a published dashboard, or a draft / scheduled one for its owner (isOwnedBy) or an admin.resolveGroupSharedDashboardwalksgroupSharedRungs(the same four rungs, two for a viewer in the default group);findFirstGroupSharedWhere(signature unchanged) readsentriesFromSource,isGroupSharedInandmeetsDefaultRequirement.applyDashboardUpdates→applyFieldUpdates(applyIconUpdate), tree and footer updates as before, the update stamp, thenapplyPlacementUpdates;resolveFooterMode→validFooterMode.Allowed and refused outcomes are unchanged (who may delete, which dashboards a viewer sees), every check still runs before the operation it guards, and the messages, events and mutations are the same.
Characterisation tests
tests/Unit/Service/DashboardServiceStepsGoldenTest.phpwas committed first, against the old code, and passes before and after: a non-admin delete refused before anything is read, a group mismatch, the last-in-group refusal, the default-group exemption with the cascade and event order, no event without a dispatcher or UUID; every publication state (legacy, draft, scheduled due / future / missing / malformed, published, taken down, malformed take-down, due-then-taken-down) with the stored status after; the visibility filter for an owner, an admin and an anonymous viewer; the scheduled materialisation; the group-shared pick order for each rung, wrong sources, wrong types, other groups and a default-group viewer; every footer-mode outcome and message; and the plain field updates. Private steps are reached through reflection; times are relative to now. Mutation check: making every viewer an owner on the old code turned the visibility golden red; restored before committing.What ran
vendor/bin/phpunit -c phpunit.xml --no-coverage tests/Unit: 2783 tests OK (13 skipped, as on development).vendor/bin/phpcsandvendor/bin/phpstan analyseonlib/Service/DashboardService.php: clean.Figures (touched file
lib/Service/DashboardService.php)createDashboard,resolveTemplateRung,tryCreateFromTemplate, untouched)App-wide: unit complexity 4.02 → 4.12, unit size 3.40 → 3.43, unit interfacing 3.14 → 3.16, duplication 4.54 → 4.55.
Maintainability floor: compare against development holds.
AI-assisted: prepared with Claude Code (claude-opus-5-5); reviewed by a maintainer before merge.
Generated by Claude Code