Repository navigation
feat(launchpad): build building-edit-a-dashboard-together - #1200
Merged
rubenvdlinde merged 2 commits intoNov 14, 2026
Merged
Conversation
Each widget placement gets a version that every save raises. A save
on PUT /api/widgets/{id} that names the version it was made on claims
it in one statement; when a colleague saved that widget first the save
is refused with 409 and the colleague's version. Bulk position writes
raise the version too. A new widget or tile takes the spot asked for
when it is free in the saved layout, else the first free spot.
Assisted-by: ClaudeCode:claude-opus-5-5
…n runs [skip ci] Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
November 14, 2026 08:24
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.
Builds the server half of
openspec/changes/building-edit-a-dashboard-together. Changes to a widget now carry a version, a stale save is refused instead of silently overwriting, and a new widget never lands on top of another one. Presence and replacing the edit lock are not done yet (see below).Tasks done
1.2 Per-widget versions.
Version002013Date20261114090000) addsversion(int, default 0) tolaunchpad_widget_placements. It is serialized on every placement, and<version>ininfo.xmlis bumped soocc upgraderuns the migration.PUT /api/widgets/{placementId}acceptsversion, the version the change was made on.WidgetPlacementMapper::claimVersion()compares and raises the version in one UPDATE statement, so of two saves on the same version exactly one wins.{error: "stale", message, placement}, whereplacementis the colleague's saved widget, so the editor can redo the change on top of it.version(today's client) still raises the version. The bulk position write inupdatePositions()raises it too, so versions stay truthful whichever path wrote.1.3 Placement.
PlacementService::addWidget()andaddTileFromArray()keep the requested spot when it is free in the saved layout. Otherwise the widget goes to the first free spot, scanning row by row within the dashboard'sgridColumns. A widget wider than the grid is clamped to the grid width. This is the newFreeSpotFinder.1.5 Unit tests.
DashboardCoEditingTestcovers:WidgetApiControllerActionsGoldenTestcovers the 409 answer.Tasks left, and why
Views.vue. It is not in this PR.PUT /api/dashboard/{id}. Moving the store to versioned per-widget saves of only the changed widgets belongs with 1.4.Test changes
These tests record exact shapes, so they now include the new field and statements:
add-widgetfixtures gain"version":0;version + 1and theclaimVersionstatement (re-recorded withLAUNCHPAD_RECORD_GOLDEN=1);RequestDataExtractorTestaddsversionto the placement fields it reads;WidgetPlacementMapperCoverageTestadds the version raise toupdatePositions.No assertion was removed.
Checks
phpunit.xml): development 4062 tests OK, this branch 4069 OK (13 skipped in both).php -lis clean. phpcs reports no errors on the changed files; its warnings are existing missing@spectags onWidgetPlacement. phpstan is clean on the changed files.--scope-to-diff): all pass exceptor-abstraction-anti-patterns, which namesPermissionServiceandRoleFeaturePermissionService. This PR does not touch either file.Generated by Claude Code