mirror of
https://github.com/HeyPuter/puter.git
synced 2026-10-06 03:42:15 +00:00
In dashboard mode there is no taskbar, so a minimized app window's only switcher was its Apps-tab tile — invisible from the Files tab. Opening a file, minimizing, and clicking the file again launched a second instance of the app, stranding the first (and any unsaved edits) somewhere unreachable. Make the file row itself the switcher: - launch_app stamps the opened file's uid on the window (data-file_uid; the signature's uid wins so shortcuts resolve to their target) - open_item (dashboard mode) restores/focuses an existing window that has the file open instead of launching a duplicate, mirroring the Apps-tab tile's single-instance behavior — keyed by file, not app, so opening a different file still gets its own instance - re-clicks while a launch's fetches are still in flight are swallowed (same idea as TabApps._launchingApps, keyed by file uid, TTL'd so a failed launch can't swallow clicks forever) - dashboard file opens now default to maximized, so they get the same headless full-tab chrome + control drawer as tile launches instead of a floating titlebar window - rows show a dot while their file is open in a (possibly minimized) window — under the name in grid view, inline after it in list view — driven by the existing dashboard-app-windows-changed event Desktop mode is untouched: the reuse branch and maximized default are gated on is_dashboard_mode, and opening the same file twice there still creates two windows as before.