Commit Graph
13393 Commits
Author SHA1 Message Date
Diego Imbert e4453e642c fix: defer script restartSync until script.path lands (Path widget gated on $userStore + $workspaceStore) 2026-06-05 21:32:20 +02:00
Diego Imbert 75b8a08ce4 fix: seed auto-generated path in script new-draft route to suppress Path widget's autosave-triggering mutation 2026-06-05 20:56:04 +02:00
Diego Imbert fbe0552cdd chore: add [draft-sync] console logs to trace script bootstrap autosave 2026-06-05 20:51:00 +02:00
Diego Imbert 479b255857 fix: route create-vs-update on /add deploys; seed policy.execution_mode; sync script template 2026-06-05 20:02:31 +02:00
Diego Imbert c1aba2754d autosave indicator nits 2026-06-05 19:23:39 +02:00
Diego Imbert cca0e67054 feat: flush pending draft saves via keepalive fetch on tab hide / pagehide 2026-06-05 19:18:00 +02:00
Diego Imbert 75e2d99e44 fix: gate per-user draft-only rows in listings on include_draft_only flag 2026-06-05 01:38:40 +02:00
Diego Imbert bb60641ff6 refactor: drop draft-loaded toast in non-route editors, banner now compares draft vs deployed 2026-06-05 01:36:10 +02:00
Diego Imbert 41001aa9fc feat: add AutosaveIndicator backed by reactive UserDraftDbSyncer.getState 2026-06-04 20:24:22 +02:00
Diego Imbert 8ddb2df876 fix: also stopSync in route's new_draft branch + queue pre-acquire suspensions 2026-06-04 19:12:39 +02:00
Diego Imbert ae1652bff3 fix: thread URL path into ScriptBuilder.stopSync (was using empty initialPath) 2026-06-04 18:14:01 +02:00
Diego Imbert 1709f6978c feat: add UserDraft.stopSync/restartSync, wire on script + low-code app /add init 2026-06-04 16:18:58 +02:00
Diego Imbert 4110abcb77 feat: surface draft path in home list when user typed one different from URL 2026-06-04 16:12:24 +02:00
Diego Imbert 67a8654220 refactor: send draft as separate .draft field instead of deep-merging onto deployed 2026-06-04 16:03:04 +02:00
Diego Imbert 99439809f7 fix: drop +page.js files in /add routes that conflicted with +page.ts 2026-06-04 15:45:03 +02:00
Diego Imbert adcaee889f fix: redirect /add routes at load phase to eliminate white flash 2026-06-04 15:43:27 +02:00
Diego Imbert 8972ceb07f fix: seed UserDraft cell from spec defaultValue on acquire 2026-06-04 15:38:27 +02:00
Diego Imbert 9f80974e25 feat: add immediate-save bypass that cancels pending debouncer + runner tasks 2026-06-04 15:32:36 +02:00
Diego Imbert 17cacd67d2 feat: route UserDraftDbSyncer.save through debouncer + coalescing runner 2026-06-04 15:21:19 +02:00
Diego Imbert d0c464e47c fix: bridge saved-draft shape to wire shape in apps/resources/variables loaders 2026-06-04 15:14:44 +02:00
Diego Imbert 1ecc8411e4 refactor: drop await on draft-delete in reset flows, refetch deployed directly 2026-06-04 15:03:09 +02:00
Diego Imbert 8ceb71dcdc createDebouncerByKey 2026-06-04 12:48:12 +02:00
Diego Imbert 74f1206969 example ts doc 2026-06-04 12:47:54 +02:00
Diego Imbert 1a2bf61f45 createCoalescingKeyedRunner 2026-06-04 12:46:37 +02:00
Diego Imbert 589afb0f0b feat: hide 'Reset to deployed' action when no deployed version exists 2026-06-03 10:23:36 +02:00
Diego Imbert 4ebac0ee4c feat: add 'Reset to deployed' action on draft-loaded toast 2026-06-03 10:12:28 +02:00
Diego Imbert 79cb813be7 fix: migrate session runtime + script view to per-user draft API 2026-06-03 09:51:01 +02:00
Diego Imbert cff286bd15 feat: migrate localStorage drafts to DB on layout mount 2026-06-02 18:37:29 +02:00
Diego Imbert fa71fceb8c refactor: drop vestigial LS-era code from UserDraft 2026-06-02 18:32:36 +02:00
Diego Imbert 34f68cbb0e refactor: drop localStorage layer from UserDraft 2026-06-02 17:55:36 +02:00
Diego Imbert 938c2d5336 fix: remove URL-hash sync from script editor (already marked TEMP) 2026-06-02 17:08:02 +02:00
Diego Imbert a6091d91cd fix: skip first observable change in DB sync effect to match LS persist 2026-06-02 14:47:13 +02:00
Diego Imbert a0273f8152 fix: tolerate missing latest-version on draft-only flow reload 2026-06-02 14:46:37 +02:00
Diego Imbert b7d8032134 fix: synthesize value wrapper on draft-only raw_app response 2026-06-02 14:42:20 +02:00
Diego Imbert 859bee78c0 feat: re-add Draft and Draft only badges on home page rows 2026-06-02 14:39:53 +02:00
Diego Imbert 1d940311d0 fix: empty path seed on new_draft so friendly auto-name fires 2026-06-02 14:32:06 +02:00
Diego Imbert dd5028da48 feat: delete user drafts when their underlying item is deleted 2026-06-02 14:22:23 +02:00
Diego Imbert 69d5aa6db9 fix: route draft-only deletes through UserDraftDbSyncer on home page 2026-06-02 14:16:48 +02:00
Diego Imbert d6e8ffc988 fix: prefix draft paths with u/{user} and seed editor state on new_draft 2026-06-02 13:45:59 +02:00
Diego Imbert 715849886a feat: include user drafts in list endpoints with is_draft flag 2026-06-02 13:39:47 +02:00
Diego Imbert 84fc8f4367 fix: drop dangling nobackenddraft assignment in flows edit 2026-06-02 12:35:41 +02:00
Diego Imbert 9e6053adf5 fix: inline get_draft query field instead of flattening 2026-06-02 12:34:25 +02:00
Diego Imbert 32a78be6dc feat: redirect /add pages to /edit/draft_uuid with new_draft flag 2026-06-02 12:29:47 +02:00
Diego Imbert 00e195c1ba readLastSyncMap 2026-06-01 20:30:34 +02:00
Diego Imbert af83a7bd50 Merge remote-tracking branch 'origin/main' into remove-workspace-drafts 2026-06-01 18:22:44 +02:00
Ruben FiszelandClaude Opus 4.8 c19441bc8c perf(python): add --compile-bytecode to uv pip install (#9393)
Python jobs under nsjail experience slow imports (~465ms for `import
requests`) because dependency directories are mounted read-only. Without
pre-compiled `.pyc` files, Python recompiles `.py` source to bytecode
in-memory on every import in every fresh nsjail process, paying the cost
repeatedly.

Add `--compile-bytecode` to both `uv pip install` invocations (the
Rust-driven install in python_executor.rs and the nsjail
download_deps.py.sh script) so `.pyc` files are generated at install
time and available at runtime even through read-only mounts. The files
are included in both the local cache and S3 piptar uploads.

The flag is supported by the uv version (0.9.24+) shipped in the
Dockerfile. The existing `__pycache__` skip only filters top-level dirs
for dedup logic, not subdirs within packages, so there is no conflict.

Fixes WIN-2001

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 15:46:33 +00:00
centdix 5c20d6b4f7 feat: add global ai chat test tools (#9391)
* feat: add global ai chat test tools

* fix: avoid session id in flow test preview

* test: cover global flow preview ids

* test: require script and flow test tools

* fix: harden global flow test fallback

* Revert "fix: harden global flow test fallback"

This reverts commit 97254ef33a.

* fix: fallback from inactive flow test hook

* fix: list nested flow steps in errors
2026-06-01 15:43:07 +00:00
Diego Imbert d8d3a50869 feat: support null value in save_draft for deletes 2026-06-01 16:55:45 +02:00
GuilhemandClaude Opus 4.7 075faabf3b feat(frontend): surface local drafts in drawer editors with an unsaved-changes banner (#9335)
* feat(frontend): surface local drafts in drawer editors with an unsaved-changes banner

Drawer-based editors (the 11 trigger types, plus resource and variable)
restore unsaved edits from browser localStorage on open using the same
mechanism as flows/scripts, but only showed a transient "Reset to deployed"
toast with no way to review the diff.

Add a persistent "You have unsaved changes" banner below the drawer header
with Show diff / Discard actions, shown whenever the form diverges from the
deployed baseline. Replaces the toast for these editors; flows/scripts/apps
(full-page) keep their existing toast.

- new shared LocalDraftBanner.svelte (Alert-styled bar + DiffDrawer)
- DrawerContent: optional `banner` snippet rendered below the header
- useTriggerDraftSync: reactive `hasDraft`, `deployed`/`current` getters and
  `resetToDeployed`; drop the restore toast (banner supersedes it)
- wire the banner into all 11 trigger editors + variable; resource lifts its
  dirty state up to ResourceEditorDrawer via a callback + accessors
- fix ScheduleEditorInner.openNew not resetting initialConfig (reused editor
  instance kept a stale baseline, wrongly flagging a new schedule dirty)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(frontend): address PR review on local-draft drawer banners

- LocalDraftBanner: snapshot diff sides at click time so the diff drawer
  doesn't keep updating as the user types behind it.
- VariableEditor / ResourceEditor: scope the banner and its Discard action
  to the selected workspace; the cross-workspace dirty state stays surfaced
  by the existing otherDirty Alert. Forward can_write via a new
  onCanWriteChange callback so the resource banner hides Discard in
  read-only mode (matching the trigger editors).
- useTriggerDraftSync: drop the now-unused path arg from maybeRestore and
  update all 11 trigger editor call sites.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(frontend): deep-clone fallback in UserDraft.discard to avoid baseline aliasing

When a caller passed a live $state proxy as `fallback` (Variable/Resource
editors handed `initialStates[selected]` to the banner's Discard), the
handle's draft cell ended up sharing the same proxy as the caller's
baseline. Subsequent form edits mutated both sides in lock-step and the
dirty check kept reporting equal, so the banner never reappeared and
the Update button stayed disabled until the drawer was reopened.

Cloning the fallback inside `discard` (via `snapshotDraftValue`) gives
the handle a fresh tree and decouples the two reactive graphs. Trigger
editors already cloned at their call site (resetToDeployed); this just
makes the API self-contained for all callers.

Also switch the variable form's "Audit log for each access" alert from
warning to info — it's informational, not a warning.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(frontend): honor disabled prop in LocalDraftBanner's diff drawer

The banner's `disabled` prop hid the inline Discard button but the diff
drawer's "Discard changes" action was still wired unconditionally, so a
read-only user could bypass the hidden inline action via Show diff.
Gate the diff-drawer button on the same flag so both surfaces agree.

Flagged by cubic and Codex on PR #9335.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 14:46:30 +00:00
Diego Imbert cc66ecd45b feat: extend get_draft overlay to flow, app, resource, variable, schedule, triggers 2026-06-01 15:43:55 +02:00