Files
windmill/frontend/src/lib/components
Diego Imbert 24c09ee99b fix(frontend): apps detect drift + restore on /apps/add reload
Two related issues in the app editor's UserDraft wiring:

1. Drift wasn't detected on first deploy/draft after starting an
   autosave. The route only backfilled meta on a reload that found a
   local diff — so the first external change after editing slipped
   through with empty `previousMeta`. AppEditor now receives the
   load-time revs as `initialRevs` and seeds them into the handle's
   meta on the first mirror, capturing the rev at autosave-creation
   time.

2. /apps/add didn't restore from LS on plain reload. The route
   always initialised `value` to `emptyApp()` and the AppEditor's
   `stateApp` captured the prop unconditionally, so the LS autosave
   was shadowed. `stateApp` now falls back to `appDraftHandle.draft`
   when present; the template/hub/import branches explicitly
   `UserDraft.remove('app', '')` to keep "start fresh from this
   content" semantics.

Also work around `useLocalStorageValue`'s `saveInitialValue: false`
skip slot — in the mirror pattern the slot survived past mount and
swallowed the user's first edit. Consume it up-front with a
wipe-then-restore pair so subsequent edits persist normally.
2026-05-15 17:55:21 +02:00
..
2026-04-07 21:03:06 +00:00
2026-05-05 21:12:00 +00:00
2026-03-26 18:52:15 +00:00
2026-03-05 18:11:40 +01:00
2026-03-05 18:11:40 +01:00
2026-03-27 19:39:55 +00:00
2025-10-30 06:47:26 +00:00
2025-10-28 17:52:04 +00:00
2026-03-05 18:11:40 +01:00
2026-04-07 21:03:06 +00:00
2025-12-16 21:16:42 +00:00
2026-05-12 13:59:37 +02:00
2025-11-04 19:13:09 +00:00
2025-11-29 01:23:47 +00:00
2026-03-05 18:11:40 +01:00
2025-11-04 19:13:09 +00:00
2026-02-17 12:48:58 +00:00
2026-02-11 06:27:21 +00:00
2026-02-19 09:33:33 +00:00
2025-11-29 01:23:47 +00:00
2026-03-05 18:11:40 +01:00
2026-02-19 09:33:33 +00:00
2026-03-05 18:11:40 +01:00
2026-03-05 18:11:40 +01:00
2026-03-05 18:11:40 +01:00
2025-12-27 12:35:19 +00:00