feat(router): move opencatalogi off hash routing to clean path URLs - #1341
Merged
Merged
Conversation
Third app in the move off `#` routing, after stackiq (softwarecatalog#899) and zaakafhandelapp (#609). Same two parts as those: 1. createWebHashHistory -> createWebHistory. 2. routerBase(), derived from the URL actually being served. Nextcloud serves the app under BOTH /apps/opencatalogi/... and /index.php/apps/opencatalogi/..., but generateUrl() returns only the form the instance is configured for. Arriving on the other leaves the path outside the router base, vue-router cannot resolve it, and the catch-all redirects to '/' -- the visitor lands on the dashboard with no error and the deep link is silently swallowed. This app matters more than most here: its own e2e suite uses BOTH spellings -- /index.php/apps/opencatalogi in _nav.ts and the visual spec, /apps/opencatalogi in docs-screenshots.spec.ts -- so either would have broken without routerBase(). 7 spec files built URLs as `${APP}/#/<route>` (and one as `${APP}/#${route}`); all now use real paths. Verified: eslint exits 0, prettier --check on the FULL glob (**/*.{js,ts,vue,css,scss}, tests included) is clean, webpack compiles.⚠️ NOT yet verified in a browser. The shared dev container has been cycling in and out of maintenance mode throughout, so every deep-link probe returned 503. The pattern is proven on the two apps above (stackiq 18/18, zaakafhandelapp 24/24 after re-running three environment-flap failures), but this app's own deep links and reload behaviour still need a run against a stable instance before merge.
Quality Report — ConductionNL/opencatalogi @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-l10n | ✅ | ||||
| check-manifest | ✅ | ||||
| format | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| check-l10n-js | ✅ | ||||
| composer | ✅ | ✅ 129/129 | |||
| npm | ✅ | ✅ 881/881 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ⏭️ deferred — runs on the promotion into beta/main, not on a pull request into development | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-09-01 08:05 UTC
Download the full PDF report from the workflow artifacts.
This was referenced Sep 1, 2026
rubenvdlinde
added a commit
that referenced
this pull request
Sep 1, 2026
Follow-up to #1341, which left one E2E test red on development (111 passed, 1 failed). SPA-001 navigates correctly -- gotoHash() was already de-hashed -- but its closing assertion still required the URL to contain '#/search', which history routing no longer produces. Matched as a SUFFIX rather than an exact URL: Nextcloud serves the app as both /apps/... and /index.php/apps/..., and the router emits whichever base the page was loaded under, so pinning either would fail on the other for a reason that is not a defect. Renamed the file-local gotoHash() to gotoRoute(). It stopped using a hash when the app moved to history routing, and a helper whose name says 'hash' is the next reader's wrong turn. Extended the docblock to say WHY the assertion matters: the Dashboard is exactly what renders when the router cannot resolve a path and the catch-all redirects to '/', so 'Search, not Dashboard' is the real guard against a base-mismatch regression. Verified: SPA-001 passes against the dev container. prettier --check on the full glob is clean. Co-authored-by: Conduction Release Bot <release-bot@conduction.nl>
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.
Third app off
#routing, after stackiq (softwarecatalog#899) and zaakafhandelapp (#609).Two parts, and the second is the one that matters
createWebHashHistory→createWebHistory.routerBase(), derived from the URL actually being served. Nextcloud serves the app under both/apps/opencatalogi/...and/index.php/apps/opencatalogi/..., butgenerateUrl()returns only the form the instance is configured for. Arriving on the other leaves the path outside the router base, vue-router cannot resolve it, and the catch-all redirects to/— the visitor lands on the dashboard with no error, deep link silently swallowed.This app needed it most of the three: its own e2e suite uses both spellings —
/index.php/apps/opencatalogiin_nav.tsand the visual spec,/apps/opencatalogiindocs-screenshots.spec.ts— so one or the other would have broken regardless of which base was hardcoded.7 spec files built URLs as
`${APP}/#/<route>`(and one as`${APP}/#${route}`); all now use real paths.Verification
/apps/opencatalogi/catalogi/index.php/apps/opencatalogi/catalogi/index.php/apps/opencatalogi/themes/index.php/.../themesNo hash anywhere.
eslintexits 0,prettier --checkon the full glob (**/*.{js,ts,vue,css,scss}, tests included) is clean, webpack compiles.-v2because the original branch was reset todevelopmentby a parallel session working the same checkout, orphaning the commit. It was recovered intact viagit push origin <sha>:refs/heads/<new-branch>and its content re-verified — the source carries 0 references tocreateWebHashHistory.