From 8528bce49bb637f4e9fb653fff148b7ea45cfdac Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 15 Aug 2026 14:34:08 +0200 Subject: feat(settings): choose between Save As and saving into a folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Downloading a selection of twenty files meant twenty Save As dialogs, which is the wrong answer for the feature that had just been built. Settings → Downloads now offers saving automatically, and that is the default; asking every time stays available for people who want it. The correction worth recording: a web page cannot be given a filesystem path and cannot read one either. There is no ~/Downloads to configure and nothing to type, on any operating system — which is also why none of this will need changing on Windows. What a browser grants is a handle to a folder the user picked in a dialog, so that is what the setting keeps: picked once, stored in IndexedDB, re-confirmed once a session because the grant comes back as a claim rather than a permission. Where no folder has been granted, and in Firefox and Safari where none can be, files go to the browser's own download folder — which on most machines is the folder that was meant all along. Automatic saving has one risk a dialog does not: it can silently replace a file. It does not — a taken name gets a suffix before the extension, `clip (2).mp4`, so a download folder does not fill up with files the system no longer recognises. That, and the default, are what test_downloads.py pins. Co-Authored-By: Claude Opus 5 --- packages/meshbay-hub/src/meshbay_hub/static/i18n.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/i18n.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/i18n.js b/packages/meshbay-hub/src/meshbay_hub/static/i18n.js index f43981b..25fbd77 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/i18n.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/i18n.js @@ -124,6 +124,25 @@ const en = { // Settings 'settings.title': 'Settings', 'settings.coming_soon': 'Coming soon.', + 'settings.downloads': 'Downloads', + 'settings.dl_auto': 'Save automatically', + 'settings.dl_auto_hint': 'Files go straight into the folder you choose below, ' + + 'with no dialog. Downloading twenty files puts twenty files there.', + 'settings.dl_ask': 'Ask every time', + 'settings.dl_ask_hint': 'A Save As dialog for each file — one per file, ' + + 'including when you download a selection.', + 'settings.dl_folder': 'Folder: {name}', + 'settings.dl_no_folder': 'No folder chosen — downloads go wherever your browser ' + + 'puts them', + 'settings.dl_choose': 'Choose folder', + 'settings.dl_change': 'Change', + 'settings.dl_forget': 'Forget', + 'settings.dl_path_note': 'A web page cannot be given a path, so there is nothing ' + + 'to type here: your browser grants access to the folder you pick, and MeshBay ' + + 'only ever writes inside it. You may be asked to confirm once per session.', + 'settings.dl_unsupported': 'This browser cannot write into a folder of your ' + + 'choosing (no File System Access API), so downloads go to its own download ' + + 'folder. Chrome and Edge support choosing one.', 'settings.profile': 'Profile', 'settings.username': 'Username', 'settings.node_pins': 'Node identities', -- cgit v1.2.3