Skip to content

[OpenSpec] publish-widgets-to-nc-dashboard #1141

Open

Description

@github-actions

⚠️ OpenSpec-managed issue — this content is automatically synced
from the openspec/ directory. Manual edits will be overwritten on next sync.

Artifacts

Specs

Tasks

  • 1.1 Move package-lock.json onto the released @conduction/nextcloud-vue carrying ncDashboard, then verify npm ls @conduction/nextcloud-vue reports that version and node_modules/@conduction/nextcloud-vue/src/schemas/app-manifest-v2.schema.json contains ncDashboard under $defs/widgetEntry.
  • 1.2 Add a vitest manifest-validation spec running the installed schema over three fixtures, and verify it passes for a valid ncDashboard and fails for the two invalid ones.
  • 2.1 Extract lib/Service/PublishedApplicationProvider.php, move AppNavigationService's per-request $cachedApplications into it, repoint both callers, and verify a PHPUnit test counting object-service calls across one boot reports exactly one read.
  • 3.1 Build a widget descriptor from a published Application's production manifest, collecting every widgets[] entry carrying ncDashboard, and verify a PHPUnit test over a fixture manifest returns one descriptor per promoted entry and none for unpromoted entries.
  • 3.2 Derive the widget id as buildiq-{applicationUuid}-{widgetEntryId}, normalised deterministically into ^[a-z][a-z0-9\-_]*$, and verify a PHPUnit regression test that renames an Application's slug and asserts every id is byte-identical before and after.
  • 4.1 Add lib/Dashboard/VirtualAppWidget.php implementing IWidget and IIconWidget from a descriptor, including load() providing this user's visible descriptors as initial state and calling Util::addScript, and verify a PHPUnit test asserts the id, title, icon url, order and link.
  • 4.2 Add lib/Service/DashboardWidgetRegistrar.php registering one container service per descriptor under a synthetic name and calling IManager::lazyRegisterWidget() for each, and verify a PHPUnit test asserts one registration per promoted widget and none for unpromoted ones.
  • 4.3 Call the registrar from Application::boot() beside the existing AppNavigationService call inside a guard that never throws, and verify a PHPUnit test with a failing object service completes boot, logs a warning and registers nothing.
  • 4.4 Add the pin test: register a service under a synthetic name, lazyRegisterWidget it, and verify IManager::getWidgets() contains the derived id.
  • 5.1 Implement IConditionalWidget::isEnabled() on VirtualAppWidget reusing PermissionResolver plus the placement's roles, in AppNavigationService's existing check order, and verify a PHPUnit matrix covering all four branches.
  • 6.1 Add the ncDashboard entry to webpackConfig.entry in webpack.config.js emitting buildiq-ncDashboard.js, write src/ncDashboard.js looping the initial-state descriptors into OCA.Dashboard.register(id, cb), and verify a production build emits the file and the app's dashboard panel renders in a browser.
  • 6.2 Render each widget through @conduction/nextcloud-vue's CnWidgetWrapper with chrome="nc-dashboard", and verify a vitest spec mounts a widget from a descriptor and a second one asserts an unresolvable widget key shows the unknown-widget state naming the key.
  • 7.1 Add lib/Service/Dashboard/WidgetItemProjector.php with getItemsV2(string $userId, ?string $since = null, int $limit = 7): WidgetItems, projecting a declarative dataSource to one WidgetItem per row, and verify a PHPUnit test asserting the outbound objects query sends BARE filter keys.
  • 7.2 Project an aggregating data source to a single WidgetItem whose title is the number, and verify a PHPUnit test asserting the outbound aggregations query sends BRACKETED filter[...] keys.
  • 7.3 Return WidgetItems([], emptyContentMessage: …) pointing at the app page for a raw graphql data source and for the chart and gauge types, and verify a PHPUnit test asserting no numeric value appears in the response.
  • 8.1 Add the per-widget promote control to the v2 widget placement editor delivered by v2-widget-placement-editor, revealing panel title and panel icon when on, auto-filling id on promote and keeping it on demote, and verify vitest specs for promote, demote and the untouched-page no-op.
  • 8.2 Load the hydra writing skill (.claude/skills/writing/, references/voice.md) and run every new user-facing string and the app docs page for this feature through it, then verify no em-dash and no Title Case remains in the added copy.
  • 9.1 Add a Playwright spec that promotes a widget in the designer, finds it in the Nextcloud dashboard widget picker, adds it and asserts it renders, and verify the run is green against the live instance.

Design

See design.md for technical design details.


Synced from openspec/changes/publish-widgets-to-nc-dashboard by OpenSpec workflow
App: buildiq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions