mirror of
https://github.com/HeyPuter/puter.git
synced 2026-10-05 11:28:26 +00:00
* fix: progress window covering paste conflict dialog; ghost row after Replace Pasting a copied file onto a name collision buried the Replace/Cancel dialog under a stuck 'Preparing...' progress window, and answering Replace left a stale duplicate row in every client. - helpers.js: copy_clipboard_items armed its delayed progress window with a 0ms timer (its siblings use 2s), so the window opened instantly over the dialog. Use 2s, and in all three of copy_clipboard_items / copy_items / move_items pause the timer while a conflict dialog (or the own-location / trash-deny alerts) is waiting for input, re-arming it after. A window that opens mid-operation now shows the current file instead of a stuck 'Preparing...', and the trash-deny bail no longer leaks a timer that opened an orphan window after the operation ended. - LegacyFSController: /copy and /move dropped the legacy 'overwritten' response field and never emitted item.removed for the entry an overwrite deleted, so clients kept a ghost row until re-listing. Resolve the entry before the operation, return it, and emit item.removed on success. - helpers.js: copy_items read resp[0].overwritten but removed resp.overwritten (always undefined), and the data-uid cleanup selectors were unquoted — invalid CSS when a UUID starts with a digit. Fixed all three sites. * test: pin the v1 overwrite/collision wire contract for move and copy The collision tests asserted only statusCode 409, which is how the item_with_same_name_exists code regressed to 'conflict' unnoticed and broke every replace/skip prompt in the GUI. Assert the legacy code and entry_name explicitly, and add controller tests for the overwrite path: the replaced entry must ride along as 'overwritten' in the /copy and /move responses and be announced via outer.gui.item.removed so clients drop its row.