Dedicated Tailscale funnel for svelte-playground #7

Closed
opened 2026-03-26 05:18:19 +00:00 by forgejo_admin · 3 comments

Type

Feature

Lineage

Standalone — discovered during westside prototype deploy. Replaces shared /svelte/ subpath with dedicated hostname.

Repo

forgejo_admin/pal-e-deployments (deployment config)
forgejo_admin/svelte-playground (vite base path revert)

User Story

As a superuser, I want svelte-playground served from its own hostname so that Vite assets resolve naturally without base path hacks, and prototype URLs are clean for client demos.

story:prototype-iterate, story:client-demo

Context

svelte-playground is currently served at playground.tail5b443a.ts.net/svelte/ as a subpath of the shared playground nginx. This requires base: '/svelte/' in vite.config.js and every internal link to be prefixed. We hit this exact problem during the westside prototype deploy — spent 20 minutes debugging CSS/link resolution. Our own SOP (feedback_spa_no_subpath_proxy) warns: "SPAs can't be path-proxied. Vite assets are absolute from /. One hostname per project or swap ports." The project architecture note already listed "dedicated Tailscale funnel" as an option.

File Targets

Files to create (pal-e-deployments):

  • overlays/svelte-playground/prod/deployment.yaml — nginx pod serving ~/svelte-playground/dist at /
  • overlays/svelte-playground/prod/service.yaml — ClusterIP service
  • overlays/svelte-playground/prod/ingress.yaml — Tailscale funnel ingress (hostname: svelte-playground or svelte)
  • overlays/svelte-playground/prod/configmap.yaml — nginx config (simple, serve from root)

Files to modify (pal-e-deployments):

  • overlays/playground/prod/deployment.yaml — remove svelte-playground volume + volumeMount
  • overlays/playground/prod/configmap.yaml — remove /svelte/ nginx location block

Files to modify (svelte-playground):

  • vite.config.js — remove base: '/svelte/' (revert to default /)
  • index.html — revert /svelte/ prefixed links to /

Files NOT to touch:

  • Any other playground volumes/locations — only removing svelte-playground from shared config

Acceptance Criteria

  • svelte-playground accessible at its own https://{hostname}.tail5b443a.ts.net/
  • vite.config.js has no base override (default /)
  • All internal links work without /svelte/ prefix
  • playground.tail5b443a.ts.net/svelte/ no longer serves content (or redirects)
  • Existing playground routes (/, /westside/, /mcd-tracker/) unaffected
  • npm run build output serves correctly from new hostname
  • Westside prototype accessible at {hostname}.tail5b443a.ts.net/westside/

Test Expectations

  • curl https://{hostname}.tail5b443a.ts.net/ returns hub page
  • curl https://{hostname}.tail5b443a.ts.net/westside/ returns westside prototype
  • curl https://playground.tail5b443a.ts.net/svelte/ returns 404 or redirect
  • All existing playground routes still work
  • No automated tests (infrastructure)

Constraints

  • Follow existing Tailscale funnel ingress pattern from overlays/playground/prod/ingress.yaml
  • Namespace: svelte-playground (new namespace)
  • hostPath volume pointing to ~/svelte-playground/dist
  • nginx:alpine image, same resource limits as playground

Checklist

  • PR opened on pal-e-deployments
  • PR opened on svelte-playground (base path revert)
  • kubectl apply on new namespace
  • Verify live URL
  • No regressions on shared playground
  • project-svelte-playground — project page
  • feedback_spa_no_subpath_proxy — the lesson that predicted this problem
  • pal-e-deployments PR #48 — the shared deploy we're replacing
### Type Feature ### Lineage Standalone — discovered during westside prototype deploy. Replaces shared `/svelte/` subpath with dedicated hostname. ### Repo `forgejo_admin/pal-e-deployments` (deployment config) `forgejo_admin/svelte-playground` (vite base path revert) ### User Story As a superuser, I want svelte-playground served from its own hostname so that Vite assets resolve naturally without base path hacks, and prototype URLs are clean for client demos. story:prototype-iterate, story:client-demo ### Context svelte-playground is currently served at `playground.tail5b443a.ts.net/svelte/` as a subpath of the shared playground nginx. This requires `base: '/svelte/'` in vite.config.js and every internal link to be prefixed. We hit this exact problem during the westside prototype deploy — spent 20 minutes debugging CSS/link resolution. Our own SOP (`feedback_spa_no_subpath_proxy`) warns: "SPAs can't be path-proxied. Vite assets are absolute from /. One hostname per project or swap ports." The project architecture note already listed "dedicated Tailscale funnel" as an option. ### File Targets Files to create (pal-e-deployments): - `overlays/svelte-playground/prod/deployment.yaml` — nginx pod serving `~/svelte-playground/dist` at `/` - `overlays/svelte-playground/prod/service.yaml` — ClusterIP service - `overlays/svelte-playground/prod/ingress.yaml` — Tailscale funnel ingress (hostname: `svelte-playground` or `svelte`) - `overlays/svelte-playground/prod/configmap.yaml` — nginx config (simple, serve from root) Files to modify (pal-e-deployments): - `overlays/playground/prod/deployment.yaml` — remove svelte-playground volume + volumeMount - `overlays/playground/prod/configmap.yaml` — remove `/svelte/` nginx location block Files to modify (svelte-playground): - `vite.config.js` — remove `base: '/svelte/'` (revert to default `/`) - `index.html` — revert `/svelte/` prefixed links to `/` Files NOT to touch: - Any other playground volumes/locations — only removing svelte-playground from shared config ### Acceptance Criteria - [ ] svelte-playground accessible at its own `https://{hostname}.tail5b443a.ts.net/` - [ ] `vite.config.js` has no `base` override (default `/`) - [ ] All internal links work without `/svelte/` prefix - [ ] `playground.tail5b443a.ts.net/svelte/` no longer serves content (or redirects) - [ ] Existing playground routes (`/`, `/westside/`, `/mcd-tracker/`) unaffected - [ ] `npm run build` output serves correctly from new hostname - [ ] Westside prototype accessible at `{hostname}.tail5b443a.ts.net/westside/` ### Test Expectations - [ ] `curl https://{hostname}.tail5b443a.ts.net/` returns hub page - [ ] `curl https://{hostname}.tail5b443a.ts.net/westside/` returns westside prototype - [ ] `curl https://playground.tail5b443a.ts.net/svelte/` returns 404 or redirect - [ ] All existing playground routes still work - No automated tests (infrastructure) ### Constraints - Follow existing Tailscale funnel ingress pattern from `overlays/playground/prod/ingress.yaml` - Namespace: `svelte-playground` (new namespace) - hostPath volume pointing to `~/svelte-playground/dist` - nginx:alpine image, same resource limits as playground ### Checklist - [ ] PR opened on pal-e-deployments - [ ] PR opened on svelte-playground (base path revert) - [ ] kubectl apply on new namespace - [ ] Verify live URL - [ ] No regressions on shared playground ### Related - `project-svelte-playground` — project page - `feedback_spa_no_subpath_proxy` — the lesson that predicted this problem - pal-e-deployments PR #48 — the shared deploy we're replacing
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-376-2026-03-25
File Targets section is incomplete — 6 files with 54 /svelte/ path references are not listed.

  • Missing files: westside/staff.html (16), westside/success.html (12), westside/sponsors.html (13), westside/index.html (5), westside/App.svelte (1), westside/Nav.svelte (7)
  • Missing constraint: deployment ordering (pal-e-deployments PR must apply before svelte-playground base path revert)
  • Missing acceptance criterion: westside HTML internal links resolve correctly after /svelte/ prefix removal
## Scope Review: NEEDS_REFINEMENT Review note: `review-376-2026-03-25` File Targets section is incomplete — 6 files with 54 `/svelte/` path references are not listed. - **Missing files:** `westside/staff.html` (16), `westside/success.html` (12), `westside/sponsors.html` (13), `westside/index.html` (5), `westside/App.svelte` (1), `westside/Nav.svelte` (7) - **Missing constraint:** deployment ordering (pal-e-deployments PR must apply before svelte-playground base path revert) - **Missing acceptance criterion:** westside HTML internal links resolve correctly after `/svelte/` prefix removal
Author
Owner

Scope refinement based on review-376-2026-03-25:

1. Expanded File Targets (svelte-playground)

Files to modify — ALL files with /svelte/ path references:

  • vite.config.js — remove base: '/svelte/'
  • index.html — revert /svelte/ prefixed hub links
  • westside/staff.html — 16 /svelte/ references in nav, links, assets
  • westside/sponsors.html — 13 /svelte/ references
  • westside/success.html — 12 /svelte/ references
  • westside/index.html — 5 /svelte/ references
  • westside/Nav.svelte — 7 /svelte/ references
  • westside/App.svelte — 1 /svelte/ reference

Total: 54 path references across 8 files. A global find-replace of /svelte// covers most, but each file should be verified.

2. Deployment ordering constraint

Step 1: Merge + apply pal-e-deployments PR (create new namespace + remove from shared)
Step 2: Then merge svelte-playground PR (base path revert)
Step 3: Rebuild (npm run build) and verify

3. Added acceptance criterion

  • All internal links in westside HTML pages (staff, sponsors, success) resolve correctly after /svelte/ prefix removal
  • grep -r '/svelte/' dist/ returns zero matches after build
**Scope refinement based on review-376-2026-03-25:** ### 1. Expanded File Targets (svelte-playground) Files to modify — ALL files with `/svelte/` path references: - `vite.config.js` — remove `base: '/svelte/'` - `index.html` — revert `/svelte/` prefixed hub links - `westside/staff.html` — 16 `/svelte/` references in nav, links, assets - `westside/sponsors.html` — 13 `/svelte/` references - `westside/success.html` — 12 `/svelte/` references - `westside/index.html` — 5 `/svelte/` references - `westside/Nav.svelte` — 7 `/svelte/` references - `westside/App.svelte` — 1 `/svelte/` reference Total: 54 path references across 8 files. A global find-replace of `/svelte/` → `/` covers most, but each file should be verified. ### 2. Deployment ordering constraint **Step 1:** Merge + apply pal-e-deployments PR (create new namespace + remove from shared) **Step 2:** Then merge svelte-playground PR (base path revert) **Step 3:** Rebuild (`npm run build`) and verify ### 3. Added acceptance criterion - [ ] All internal links in westside HTML pages (staff, sponsors, success) resolve correctly after `/svelte/` prefix removal - [ ] `grep -r '/svelte/' dist/` returns zero matches after build
Author
Owner

Scope Review: READY

Review note: review-376-2026-03-25-r2
Re-review after refinement. All 3 findings from previous review (review-376-2026-03-25) resolved:

  • 6 missing files: All now listed with accurate per-file counts (58 total /svelte/ references across 8 files)
  • Deployment ordering: Explicit 3-step ordering added (pal-e-deployments first, then svelte-playground, then rebuild+verify)
  • Acceptance criterion: Two criteria added — westside link resolution + grep -r '/svelte/' dist/ zero-match verification

Ticket is ready for next_up. Agent should read both issue body and comment #7350 when executing.

## Scope Review: READY Review note: `review-376-2026-03-25-r2` Re-review after refinement. All 3 findings from previous review (`review-376-2026-03-25`) resolved: - **6 missing files:** All now listed with accurate per-file counts (58 total `/svelte/` references across 8 files) - **Deployment ordering:** Explicit 3-step ordering added (pal-e-deployments first, then svelte-playground, then rebuild+verify) - **Acceptance criterion:** Two criteria added — westside link resolution + `grep -r '/svelte/' dist/` zero-match verification Ticket is ready for `next_up`. Agent should read both issue body and comment #7350 when executing.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/svelte-playground#7
No description provided.