You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
typed-router.d.ts gives the Explorer route path as :path(.*)? but the router record is :path* #520
At runtime on v3.7-dev (3.7.0-rc.2, vue-router ^5.2.0), router.getRoutes() lists the same record as /Explorer/:tab?/:volume?/:path*. I read this from DWC's own warning below, which prints the available record paths.
Why it matters
Route overrides are keyed by the record's canonical path string. registerLayout({ routes }) looks each key up with findPageRecord, which does router.getRoutes().find((r) => r.path === path && ...). A plugin author who copies the path from the typed route (the natural place to look, and the only place it is spelled out) gets:
[DWC] Cannot override route "/Explorer/:tab?/:volume?/:path(.*)?": no registered route matches that path. Available paths: /, /:notFound(.*), /BuiltInLayout, /Console, /Dashboard, /Explorer/:tab?/:volume?/:path*, ...
The override is skipped with only that console.warn, so the plugin looks fine and the override silently does nothing. A layout plugin (Flexible Layouts' opt-in Explorer replacement) was inert on rc.2 for this reason until it listed both spellings.
CUSTOM-LAYOUT.md tells authors to use "the strings you see in router.getRoutes().map(r => r.path)", which is right, but the typed file contradicts it for this route.
Related observation
src/pages/Explorer/[[tab]]/[[volume]]/[[...path]].vue already notes that vue-router's :path* catch-all returns an array of segments, so the code knows the record is :path*; only the generated typing differs. Params typed from the same declaration will also disagree in shape ((.*)? gives a string, * gives an array).
Suggestions
Regenerate typed-router.d.ts so the committed file matches what the router builds, if it is only stale.
If it is not stale (the typing generator and the runtime normaliser really disagree for [[...path]]), mention the difference in CUSTOM-LAYOUT.md next to the routes option, or have installRouteOverrides accept either spelling.
I have not checked other [[...x]] routes; /Jobs/:volume?/:path* in the same warning list follows the * form.
Environment
v3.7-dev at 8974abe9, DWC 3.7.0-rc.2, vue-router ^5.2.0, npm run dev.
This issue has been automatically closed because it does not originate from a Duet3D administrator.
Please create a discussion on https://forum.duet3d.com first and fill out the corresponding GitHub template if the bug or feature request is acknowledged.
Confirmed, but it is not stale. src/router/index.ts rewrote :path(.)? to :path on
the compiled records after generation, so the generated file kept the pre-rewrite
spelling for Explorer and Jobs. The param typing was wrong the same way, declared as
a string where the runtime hands you a string[].
Fixed by doing the rewrite in the generator instead, through the vite plugin's
extendRoute hook. The generated records, typed-router.d.ts and the router now agree
on :path*, and path is typed as ParamValueZeroOrMore. The fixCatchAllPath helper is
gone. This will be in the next rc.
Activity
github-actions commentedon Sep 29, 2026
This issue has been automatically closed because it does not originate from a Duet3D administrator.
Please create a discussion on https://forum.duet3d.com first and fill out the corresponding GitHub template if the bug or feature request is acknowledged.
Fixed catch-all route paths in typed-router.d.ts (#520)
chrishamm commentedon Sep 29, 2026
Confirmed, but it is not stale. src/router/index.ts rewrote :path(.)? to :path on
the compiled records after generation, so the generated file kept the pre-rewrite
spelling for Explorer and Jobs. The param typing was wrong the same way, declared as
a string where the runtime hands you a string[].
Fixed by doing the rewrite in the generator instead, through the vite plugin's
extendRoute hook. The generated records, typed-router.d.ts and the router now agree
on :path*, and path is typed as ParamValueZeroOrMore. The fixCatchAllPath helper is
gone. This will be in the next rc.