Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

feat(manifest): json-manifest Tier 2 — Decisions via CnPageRenderer (re-do of #138)#182

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feature/json-manifest-tier2-decisions
May 12, 2026
Merged

feat(manifest): json-manifest Tier 2 — Decisions via CnPageRenderer (re-do of #138)#182
rubenvdlinde merged 1 commit into
developmentfrom
feature/json-manifest-tier2-decisions

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

Re-do of #138 (whose branch feature/json-manifest-pilot had unrelated histories with development — orphan root, no merge-base, un-rebaseable). Since #138 was opened, the codebase advanced past it: decidesk is already at Tier 4 (CnAppRoot), src/manifest.json already drives all 27 pages, the hand-written Decisions.vue view was already removed, and /decisions already renders through CnPageRenderer via the index page type. So the remaining delta is the page-config half of the pilot.

What changed

  • pages[].Decisions.config.columns — upgraded from string shorthand (["title","outcome",…]) to { key, label } objects with widget / formatter hints (and a hidden legalBasis column users can re-enable from the columns sidebar tab). CnPageRenderer spreads page.config into CnIndexPage, so these become its columns prop.
  • pages[].Decisions.config.actions — added (none existed) as { id, label, ... } objects:
    • viewhandler: "navigate", route: "DecisionDetail", primary: true (fully wired; clicking dispatches $router.push).
    • publishhandler: "emit", confirm: true, gated on the decidesk.decision.publish permission. Declares intent; the page-level @action listener that calls POST /api/decisions/{id}/publish is a follow-up (see below).
  • menu[].SettingsMenu — fixed a pre-existing manifest schema violation: the entry used an unsupported "action": "user-settings" field (dead config — CnAppNav only handles route / href), which made node tests/validate-manifest.js fail against the v1.3.0 schema. Pointed it at the existing Settings route instead.

Verification

  • npm run build — succeeds (only pre-existing entrypoint-size warnings).
  • node tests/validate-manifest.jsPASS (0 errors) against the bundled @conduction/nextcloud-vue v1.3.0 schema (was failing before this PR on the SettingsMenu.action field).
  • npm run lint — 0 errors (17 pre-existing warnings, unchanged).
  • npm run stylelint — clean.
  • composer phpcs — 60/60 files pass (no PHP touched).

Follow-ups

  • Wire the page-level @action listener for the publish row action → POST /api/decisions/{decisionId}/publish (CnPageRenderer renders CnIndexPage directly under CnAppRoot, so the host needs to expose an @action handler — small lib/host wiring task).
  • Once a newer @conduction/nextcloud-vue beta ships, consider promoting the other index pages' columns to the same {key,label} shape.

Supersedes #138.

Promote the Decisions index page to a richer manifest-driven config:
upgrade config.columns from string shorthand to {key,label} objects
(with widget/formatter hints and a hidden legalBasis column) and add
config.actions ({id,label,...} objects — a navigate-handler View
action and an emit-handler Publish action gated on the
decidesk.decision.publish permission). The /decisions route already
renders via CnPageRenderer (the app is at Tier 4 / CnAppRoot), so
this is the page-config half of the json-manifest pilot.

Also fixes a pre-existing manifest schema violation: the SettingsMenu
menu entry used an unsupported "action": "user-settings" field (dead
config — CnAppNav only handles route/href); point it at the existing
Settings route instead.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/decidesk @ c82a1d3

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm ✅ 469/469
PHPUnit
Newman
Playwright ⏭️

Coverage: 0% (0/115 statements)


Quality workflow — 2026-05-12 05:40 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde rubenvdlinde merged commit 9681492 into development May 12, 2026
45 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant