Skip to content

feat(launchpad): build launcher-tile-open-behaviour - #1217

Open
rubenvdlinde wants to merge 8 commits into
developmentfrom
quality/build-launcher-tile-open-behaviour
Open

rubenvdlinde wants to merge 8 commits into
developmentfrom
quality/build-launcher-tile-open-behaviour

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Builds openspec/changes/launcher-tile-open-behaviour (rows d-link-target, d-open-inside).

Tasks done

  1. Tile link target validated. lib/Service/TileLinkTarget.php holds same-tab / new-tab / side-panel and the resolution order. TileUpdater refuses any other value on create (linkTarget, now read by RequestDataExtractor) and on update (content.linkTarget), which the placement endpoint answers with 400.
  2. Dashboard default. Migration Version002013Date20261114090000 adds a nullable default_link_target (app version bumped to …20261114090000, also in openapi.json), Dashboard::defaultLinkTarget, and DashboardService::updateDashboard() validates it; an empty value clears it.
  3. Exposed in the dashboard JSON and the viewer view (the initial state carries the serialised dashboard). PUT /api/dashboard/{id} takes defaultLinkTarget; like placements, it needs full edit rights, not metadata rights.
  4. Tile editor: an "Opens in" radio group (as the dashboard decides / same tab / new tab / panel). The panel option is greyed out with a reason when validateIframeUrl refuses an outside host, and that choice is dropped.
  5. Dashboard config modal: an "Opens in" select. It is sent only when changed, so a metadata-only editor's save never needs edit rights.
  6. TileWidget resolves the tile's choice, then the dashboard default, then the old rule. A side-panel tile opens the panel through a small tilePanel pinia store rather than an open-in-panel event chain through Views; edit mode never opens it.
  7. Quick search clicks the rendered tile link, so a side-panel tile opens in the panel there too (integration spec).

Tasks left

  • 7, Playwright: TileSidePanel is built and unit-tested: one panel, close button, Escape, focus return, framing check with the "Open in new tab" fallback, overlay below 768px. The Playwright run needs a live instance.
  • 9: nl strings added. English uses the source strings: en is sparse in this repo, and adding keys there would require all 36 parity locales. The spec update and the capabilities.json rows belong to the archive step.

Tests

  • PHPUnit 4062 → 4071, no failures: TileLinkTargetTest, TileUpdaterTest (+3), DashboardServiceLinkTargetTest, Version002013Date20261114090000Test. Serialise/golden fixtures re-recorded; their only change is the new defaultLinkTarget key, and RequestDataExtractorTest adds linkTarget.
  • Vitest 2208 → 2230, all passing: tileLinkTarget, tilePanel, TileWidget.linkTarget, TileSidePanel, TileEditor.opensIn, DashboardConfigModal.linkTarget, useTileSearchHost.sidePanel. Three existing specs adjusted for the new markup and field; the props golden gains the two new props.
  • phpcs/phpstan clean on changed files (one pre-existing phpcs warning on TileUpdater); eslint clean; check:l10n-parity OK.

Generated by Claude Code

A tile can open in the same tab, a new tab or a panel beside the tiles,
chosen per tile in the tile editor; a tile without a choice follows the
dashboard's default, and a dashboard without one keeps the old rule (web
address in a new tab, app in the same tab). The panel frames an address
on this Nextcloud directly and an outside one only after the server's
framing check, falling back to an "Open in new tab" card. Quick search
opens a side-panel tile in the panel too.

Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde and others added 7 commits November 14, 2026 08:56
…our [skip ci]

Assisted-by: ClaudeCode:claude-opus-5-5
…n [skip ci]

#1212 adds lib/Migration/Version002013Date20261114090000.php for the app
catalogue and this branch added a different migration under the same class
name, with the same app version. Whichever landed second would collide, and
on an instance already at that version its migration would never run. This
branch's migration becomes Version002014Date20261114100000 and the app
version 1.1.7-unstable.20261114100000.

Assisted-by: ClaudeCode:claude-opus-5-5
…our [skip ci]

Development's launcher-tile-launch-types overlaps this line in the tile
code. A launch type's own target (program, remote desktop, sso) wins in
the tile anchor, else the resolved open-in target; a create tile opens
its dialog, a side-panel tile the panel. A new tile stores its content
and link target before the launch link is checked, and the create patch
also carries the link target. Both sides' tests and Dutch strings are
kept; the app version moves past development's so the branch's
migration runs.

Assisted-by: ClaudeCode:claude-opus-5-5
…ip ci]

Keeps the branch's app version 1.1.7-unstable.20261117010000, above development's.

Assisted-by: ClaudeCode
…c [skip ci]

tilePanel open/close, isLinkTarget, resolveLinkTarget, isSameOrigin and
TileSidePanel's setup and url watcher now carry @SPEC links to their
requirement, so the spec-coverage check passes on this change.

Assisted-by: ClaudeCode:claude-opus-5-5
…e body [skip ci]

DashboardApiController::update read defaultLinkTarget as a ninth argument
and decided metadata-only inline, which raised its complexity to 11 and
its parameter count to 9. The value is now read from the request body like
the controller's other optional fields, and the metadata-only decision is
its own helper. A non-string value is ignored. New tests pin that a link
target change asks the full edit permission and is refused without it.

Assisted-by: ClaudeCode:claude-opus-5-5
…ip ci]

Assisted-by: ClaudeCode:claude-opus-5-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants