Repository navigation
[access] refactor(dashboard): split DashboardService creation, template rung and provisioning into named steps - #1081
Open
rubenvdlinde wants to merge 2 commits into
Open
rubenvdlinde wants to merge 2 commits into
rubenvdlinde wants to merge 2 commits into
Conversation
…nd provisioning before the split Assisted-by: ClaudeCode:claude-opus-5-5
…nd provisioning 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:56
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
The dashboard creation path of
DashboardServicereads as named steps. This PR touches different methods than the open group-delete / publication split of the same file and merges cleanly with it.createDashboard(public, signature unchanged):assertMayCreate(public-share bearer, quota, parent — in that order, before anything is built) → factory (factoryOptions) →applyNewIcon→assertNewSlugUnique→ deactivate → insert →completeNewDashboard(seedPrimaryTranslation, then the default widgets when asked).resolveTemplateRung→templateStepsAside(owns a dashboard, or a group-less template yielding to the primary group's default) → view-only answer orcopyTemplateFor.tryCreateFromTemplatehands a template to the resolver as before, elseprovisionPersonalDashboard→seedFromRoleDefaults→provisionedPlacements(role-seeded placements, or the default bundle only when nothing was seeded).Every check runs in the original order before the writes it guards; the writes, logs and results are the same.
Characterisation tests
tests/Unit/Service/DashboardServiceCreationGoldenTest.phpwas committed first, against the old code, and passes before and after: the exact sequence of checks and writes of a full create, a create with defaults and without optional collaborators, an empty slug skipping the uniqueness check, the quota and public-share refusals stopping before any check or write, a failed translation seed logged while creation goes on, and every provisioning branch (template, no template with personal dashboards off, role defaults, nothing seeded, no role service). Mutation check: dropping the quota check on the old code turned two goldens red; restored before committing. The existing template-rung, create-defaults, quota-wiring and create goldens pass unchanged.What ran
vendor/bin/phpunit -c phpunit.xml --no-coverage tests/Unit: 2755 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)App-wide: unit complexity 4.02 → 4.08, unit size 3.40 → 3.42, unit interfacing 3.14 → 3.15.
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