Skip to content

Add frozen legacy version served at /legacy/ - #367

Merged
lewish merged 1 commit into
mainfrom
add-legacy-version
Jun 24, 2026
Merged

lewish merged 1 commit into
mainfrom
add-legacy-version

Conversation

@lewish

@lewish lewish commented Jun 24, 2026 •

Copy link
Copy Markdown
Owner

What

Keeps the previous version of ASCIIFlow reachable at /legacy/, served from the same origin as the current app so the two share localStorage automatically.

How

  • site/legacy/ — the built output of tag v1.0.1 (webpack bundle + assets), committed as static files. Absolute /public/... asset refs rewritten to /legacy/public/... so the snapshot is self-contained regardless of trailing-slash behaviour. Both versions use HashRouter, so no base-path/router config is needed to host it under a subpath.
  • site/BUILD — a legacy copy target drops the snapshot into the deploy output, so bazel build site/... emits bazel-bin/site/legacy/ next to the new app. No deploy.yaml change required (CI already builds site/... and copies bazel-bin/site).
  • client/toolbar.tsx — adds a "legacy version" link in the help footer.
  • site/legacy/index.html — adds a "switch to new →" link back to /.

Testing

  • bazel build site/... emits both apps (new at root, old under legacy/).
  • Served locally: / → 200, /legacy → 301 → /legacy/ → 200, all legacy assets (incl. logo_min.svg from the bundle) → 200.
  • //client:all + //common:all unit tests pass; new bundle type-checks with the link.
  • Verified both routes render correctly in a headless browser.

Notes

  • Data sharing is per-origin: it kicks in on asciiflow.com. Subdomains (e.g. beta.) keep separate stores by nature.
  • Compatibility is bidirectional: the localStorage keys, the Layer v2 serialization, and the share encoder are identical across v1.0.1 and the current app (the Zustand refactor preserved the on-disk format), so saved drawings, undo/redo stacks, and share links round-trip both ways. The only divergences are benign — the new-only showGrid view preference (silently ignored by the old app) and cosmetic font geometry (offsets are translated, so view position is preserved). The old app also wraps deserialization in try/catch and falls back to an empty canvas, so nothing corrupts.

🤖 Generated with Claude Code

Snapshots the pre-2026-rush release (tag v1.0.1) as static files under
site/legacy/ and serves it from the same origin at /legacy/, so the old
ASCIIFlow stays reachable and shares localStorage with the current app.

- site/legacy/: built output of v1.0.1 (webpack bundle + assets), with
  absolute /public/ asset refs rewritten to /legacy/public/ so the
  snapshot is self-contained regardless of trailing-slash behaviour.
  Both versions use HashRouter, so no base-path/router config is needed.
- site/BUILD: copy the snapshot into the deploy output, so
  `bazel build site/...` emits bazel-bin/site/legacy/ alongside the new
  app. No CI/deploy.yaml change required.
- client/toolbar.tsx: add a "legacy version" link in the help footer.
- site/legacy/index.html: add a "switch to new" link back to /.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lewish
lewish enabled auto-merge (squash) June 24, 2026 20:52
@lewish
lewish disabled auto-merge June 24, 2026 20:58
@lewish
lewish merged commit f2f29b4 into main Jun 24, 2026
1 check passed
@lewish
lewish deleted the add-legacy-version branch June 24, 2026 20:58
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