mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 16:02:19 +00:00
30a0eeda61
The legacy migration was consuming any localStorage key starting with `app-`, `flow-`, or `rawapp-`, with no constraint on what followed and no shape check on the decoded payload. Two failure modes called out in review: 1. A future feature (or third-party extension) picking a name like `app-recent` would silently lose data on first migration run. 2. A stray key that happened to base64-decode to valid JSON but wasn't a real legacy draft would still get promoted to the new format, surfacing later as a phantom "Restored from local storage" toast on the next edit. Two guards: - `LEGACY_PATH_SHAPE = /^[uf]\/[^/]+\/.+$/`: after a `<prefix>-` match, the remainder must look like a Windmill item path (`u/owner/name` or `f/folder/name`, possibly with deeper segments). Bare-prefix empty-path entries (`app` / `flow` / `rawapp` for `/add` autosaves) still match the exact branch and don't go through the shape gate. - `isPlausibleLegacyValue`: after decode, require the payload to carry the field the legacy writers actually produced (`flow.flow` for flows, any of `summary|value|policy|path` for apps, any of `files|runnables|data` for raw apps). Both are belt-and-suspenders: nothing else currently uses these key prefixes, but enforcing the shape locally keeps the migration safe against future namespace collisions.
Windmill frontend
The Windmill frontend written in Svelte 5 + Tailwind CSS
The frontend is under AGPL, see the LICENSE file at the root of this repo