Skip to content

Revert PR #2 — plugin moved to single-segment URL, fix no longer needed#3

Closed
nothing-stops-this-train wants to merge 1 commit into
lnd-integrationfrom
revert-router-base-trailing-slash
Closed

Revert PR #2 — plugin moved to single-segment URL, fix no longer needed#3
nothing-stops-this-train wants to merge 1 commit into
lnd-integrationfrom
revert-router-base-trailing-slash

Conversation

@nothing-stops-this-train
Copy link
Copy Markdown

Revert of #2.

#2 patched Nuxt's getLocation quirk so that plugin routes one or more segments deep below the admin base (e.g. `/admin/plugins/liquidityhelper`) would resolve on a fresh load. That worked, but it's a workaround in the bitcart-admin tree for what is really a plugin-side decision.

The liquidityhelper plugin route is now a single segment (`/admin/liquidityhelper` — see BareBits/bitcart_liquidity@), which sidesteps the quirk entirely. Single-segment URLs already work on upstream router.js — that's how every built-in admin page (`/admin/stores`, `/admin/invoices`, `/admin/plugins`) loads. So we no longer need the trailing-slash normalization, and reverting keeps this fork minimally diverged from upstream bitcart-admin.

Test plan

  • Rebuild admin image from this branch + redeploy liquidityhelper plugin with its new `/liquidityhelper` route.
  • Hard-reload `/admin/liquidityhelper` — plugin page renders on first paint.
  • Hard-reload `/admin/stores` — still works (sanity-check; nothing else regressed).
  • Hard-reload `/admin/plugins/liquidityhelper` — clean 404 (route no longer exists, as expected).

@nothing-stops-this-train
Copy link
Copy Markdown
Author

Closing — tested on the regtest rig and the hypothesis didn't hold.

Setup: pointed the VPS at this branch (BITCART_ADMIN_REPO_BRANCH=revert-router-base-trailing-slash), wiped the local clone, ran the plugin deploy with --rebuild. Deployed the companion plugin route change (/plugins/liquidityhelper/liquidityhelper, single segment). Confirmed the running container's /src/router.js had no trailing-slash normalization and the compiled bundle had the new single-segment route.

Result: 0/6 fresh-context loads of /admin/liquidityhelper rendered the dashboard. All six attempts got the SPA 404 page (title="404 Not Found - bitcart-admin"), even though SSR returned HTTP 200. Restored the fix → 6/6 worked.

So a single-segment URL doesn't sidestep the bug for vuems-registered plugin routes. The recovery that lets /admin/stores survive a corrupted getLocation slice only applies to Nuxt-auto-routed pages — vuems-extended routes added in router.js don't get it. The only ways to actually drop the patch would be to register the plugin page through Nuxt's auto-routing (would require restructuring how bitcart loads UI plugins) or fix it upstream.

Keeping the patch on lnd-integration.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant