Commit deab1f5
feat(routing): serve the pages the manifest declares (#551)
* feat(routing): serve the pages the manifest declares
LaunchPad declared nine pages and served ONE. /store, /reports and
/flows each redirected to /dashboard, and /reports/dashboards rendered
the workspace grid — because there was no vue-router at all.
`createRouter` appeared nowhere in src/: navigation was Pinia state that
never touched the URL, and this was the only app in the fleet that did
not root on CnAppRoot.
main.js has named this change since Tier 1 adoption landed. Its own file
header already described the intent — "App.vue watches it and passes the
live value down to CnAppRoot" — and the implementation stopped short.
WHAT CHANGED
App.vue roots on CnAppRoot. The route table is derived from
manifest.pages, so a declared page is a routed page by construction.
`/` and `/dashboards/:id` render WorkspaceApp; the rest render their
declared page types.
The org navigation rail stays exactly where it is. It is NOT an app
menu — it renders an org-wide tree from GET /api/admin/org-navigation,
group-filtered, with its own position setting — so it coexists with
CnAppNav rather than folding into it, and it renders only when an admin
has configured a tree.
The bespoke skip link is gone. It existed BECAUSE this app did not root
on NcContent; CnAppRoot renders it, and two bypass links are worse than
one. #launchpad-main-content keeps tabindex="-1" for the quick-search
Esc contract, which needs it independently.
A dashboard has an address now. /dashboards/:id was declared all along
and routed nowhere; WorkspaceApp watches the param and switches. An
unknown id is left alone deliberately — the store already resolves a
sensible active dashboard, and overriding would make a bad link empty
the page instead of falling back.
TWO PAGES WERE NOT PAGES
admin-settings named AdminSettingsPage, which has never existed, and
admin-templates-index named TemplatesPage, which is a TAB inside the
Nextcloud admin section. Routing them would have rendered half an admin
surface beside the real one. Both resolve to AdminSettingsRedirect,
which sends the operator to /settings/admin/launchpad and renders a real
anchor as well as navigating.
TESTS
The four test.fail() markers come off — this is the change that earns
them. The tripwire is INVERTED rather than deleted: it asserted the
absence of CnAppNav, and now asserts the shared chrome renders with the
workspace still inside it. A new test asserts a dashboard has an
address, asking the app which dashboards exist rather than seeding an id.
Verified: check:manifest, format, check:schema-l10n and lint pass;
webpack compiles (exit 0, the 3 warnings are the pre-existing bundle-size
ones); vitest WorkspaceApp 14 passed; playwright --list collects 9.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(chrome): give CnAppNav a slot, and answer the two gates
Three findings, all real.
🔴 REQ-SHELL-001 SUPPRESSED THE NAVIGATION SLOT. PageController passed
`id-app-navigation => null` so Nextcloud allocated no left panel — the
app rendered its own slide-in sidebar and nothing else. CnAppRoot renders
NcContent, and NcContent allocates that panel for CnAppNav, so leaving
the suppression in place would have left the shared chrome with nowhere
to render: an empty rail, not an error. Every other app in the fleet
passes no slot ids at all. Found by reading the spec this change
contradicts, not by CI.
gate-16 wanted @SPEC on three changed methods. The change had no spec to
point at, so one is written — `specs/manifest-routing/spec.md`, six
requirements including REQ-ROUTE-004, which records that it supersedes
REQ-SHELL-001's chrome-slot clause. Every anchor was checked to resolve;
a tag that merely exists is not evidence.
gate-26 wanted a visual baseline for two new page components.
AdminSettingsRedirect gets a real test: both admin routes are opened and
must either reach /settings/admin/launchpad or render the notice, since
the redirect deliberately does both. WorkspaceApp gets `@visual exclude`
with the reason — it is not a new screen, it is this app's oldest and
only one, and a baseline captured now would be a baseline of the screen
that already shipped.
Verified: all 78 applicable hydra gates pass locally against
origin/development; check:manifest, format and lint green; phpcs clean on
PageController; playwright --list collects 10.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Conduction Release Bot <release-bot@conduction.nl>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 5aacaf1 commit deab1f5
11 files changed
Lines changed: 576 additions & 189 deletions
File tree
- lib/Controller
- openspec/changes/launchpad-manifest-tier-3
- specs/manifest-routing
- src
- views
- tests/e2e
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
234 | 243 | | |
235 | 244 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 245 | + | |
241 | 246 | | |
242 | 247 | | |
243 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
78 | 102 | | |
79 | 103 | | |
80 | 104 | | |
| |||
Lines changed: 115 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
21 | 33 | | |
22 | 34 | | |
23 | 35 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
30 | | - | |
31 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments