ZDDC/browse/js
ZDDC 41d4e59899 fix(browse): refresh tree after workflow moves, guard double-submit, fix modal listener leaks
Workflow data-consistency cleanup across the transmittal modules.

Stale-tree / re-trigger hazard: Stage, Unstage, and Accept reported success
with "reload to see the move" and never refreshed, leaving the moved item at
its old location in the tree — inviting the user to re-fire the action on a
folder the server had already moved. They now refresh the current listing on
success. This also revealed that events.refreshListing was never exported,
so upload.js's comment-upload refresh (which guards on it) was silently a
no-op — exporting it fixes that path too.

Non-atomic stage: "New folder" does mkdir then a separate move; if the move
failed after the mkdir succeeded the user got a generic "move failed" with an
unexplained empty folder left behind. invokeStage now tracks whether it
created the folder and says so, and refreshes so the orphan is visible.

Double-submit: Accept / Plan Review / Stage / Unstage take a module-level
busy guard so a second menu click while a POST is in flight is ignored.

Modal listener leaks (verified): the Escape keydown handler in accept,
plan-review, and create-transmittal was only removed on the Escape path —
cancel / overlay-click / submit all leaked a live document listener bound to
a detached modal. Bound once and removed in close() (matching history.js).

history.js restore: split the PUT from the post-restore refetch so a refetch
error can no longer surface a misleading "Restore failed" after the restore
has already persisted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 14:59:23 -05:00
..
accept-transmittal.js fix(browse): refresh tree after workflow moves, guard double-submit, fix modal listener leaks 2026-06-03 14:59:23 -05:00
app.js fix(browse): editor lifecycle — dispose on switch, guard unsaved edits, kill leaks 2026-06-03 14:46:31 -05:00
create-transmittal.js fix(browse): refresh tree after workflow moves, guard double-submit, fix modal listener leaks 2026-06-03 14:59:23 -05:00
download.js refactor: virtual file extensions for subtree zip + MD conversion 2026-05-14 12:23:37 -05:00
events.js fix(browse): refresh tree after workflow moves, guard double-submit, fix modal listener leaks 2026-06-03 14:59:23 -05:00
grid.js feat(zddc): Phase 4b — grid mode driven by cascade default_tool 2026-05-11 16:15:25 -05:00
history.js fix(browse): refresh tree after workflow moves, guard double-submit, fix modal listener leaks 2026-06-03 14:59:23 -05:00
hovercard.js feat: show effective permissions + roles per location in the browse hovercard 2026-06-01 11:12:39 -05:00
init.js feat(browse): SPA overhaul — context menu, YAML editor, icons, hovercard, deep links, autofilter 2026-05-14 12:12:42 -05:00
loader.js feat(browse): markdown version-history viewer with diff + restore 2026-05-28 12:49:00 -05:00
plan-review.js fix(browse): refresh tree after workflow moves, guard double-submit, fix modal listener leaks 2026-06-03 14:59:23 -05:00
preview-markdown.js fix(browse): editor lifecycle — dispose on switch, guard unsaved edits, kill leaks 2026-06-03 14:46:31 -05:00
preview-yaml.js fix(browse): editor lifecycle — dispose on switch, guard unsaved edits, kill leaks 2026-06-03 14:46:31 -05:00
preview.js fix(browse): editor lifecycle — dispose on switch, guard unsaved edits, kill leaks 2026-06-03 14:46:31 -05:00
stage.js fix(browse): refresh tree after workflow moves, guard double-submit, fix modal listener leaks 2026-06-03 14:59:23 -05:00
tree.js fix(browse): preserve undefined verbs to distinguish Caddy/FS-API from zddc 2026-05-21 09:00:12 -05:00
upload.js feat(browse): full create/edit/rename/delete in local-directory (offline) mode 2026-06-01 10:46:51 -05:00