From 90c3c6a01f46c9b29c5d92702d7383f32e8951d7 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Wed, 19 Aug 2026 16:36:29 +0200 Subject: feat(ui): 11-point UI overhaul — tabs, transfers, settings, uploads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hub/UI: - Icon-only group tabs (chat, files, settings) with per-group default tab - Transfer widget: filename becomes a clickable link to open completed downloads - Pulse animation on transfer icon (pale→dark green) while active - Download button feedback in FilePreview (spinner, auto-reset) - Group mute toggle persists across navigation - Login page autofocus, chat refocus after send - Theme toggle closes menu, status badge and duplicate connecting removed - Create-folder restricted to operators, download-path note removed - User preferences API (CRUD) with Alembic migration - Profile: email display/edit via PATCH /v1/users/me - Settings: "Defaults" section for default tab selector - All 10 locale files updated Node: - upload_dir in node.toml: separate filesystem path for uploads - Root.direct flag: uploads land at root path, no subdirectory - CLI --upload-dir flag on `group add` - Admin UI accepts upload_dir Client (Electron): - shell.openPath bridge for opening completed downloads - platform.js passes open callback from native save Co-Authored-By: Claude Opus 4.6 --- packages/meshbay-node/src/meshbay_node/ops.py | 28 +++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'packages/meshbay-node/src/meshbay_node/ops.py') diff --git a/packages/meshbay-node/src/meshbay_node/ops.py b/packages/meshbay-node/src/meshbay_node/ops.py index c111581..20345bb 100644 --- a/packages/meshbay-node/src/meshbay_node/ops.py +++ b/packages/meshbay-node/src/meshbay_node/ops.py @@ -315,7 +315,8 @@ async def list_groups(state: dict) -> dict: return {"groups": out} -async def attach_group(state: dict, name: str, shared_dir: str) -> dict: +async def attach_group(state: dict, name: str, shared_dir: str, + upload_dir: str = "") -> dict: """ Write a new [[groups]] block into node.toml. @@ -360,19 +361,30 @@ async def attach_group(state: dict, name: str, shared_dir: str) -> dict: block = (f'\n[[groups]]\n' f'id = "{group["id"]}"\n' f'name = "{group["name"]}"\n' - f'visibility = "{group.get("visibility", "private")}"\n' - f'\n [[groups.roots]]\n' - f' path = "{path}"\n' - f' upload = true\n') + f'visibility = "{group.get("visibility", "private")}"\n') + if upload_dir: + upload_path = Path(upload_dir).expanduser() + try: + upload_path.mkdir(parents=True, exist_ok=True) + except OSError as e: + raise OpError(f"Cannot create {upload_path}: {e}") from e + block += f'upload_dir = "{upload_path}"\n' + block += (f'\n [[groups.roots]]\n' + f' path = "{path}"\n') + if not upload_dir: + block += f' upload = true\n' try: with conf_path.open("a") as f: f.write(block) except OSError as e: raise OpError(f"Cannot write {conf_path}: {e}", status=500) from e - return {"group_id": group["id"], "name": group["name"], - "shared_dir": str(path), "config": str(conf_path), - "note": "restart the node to pick it up"} + result = {"group_id": group["id"], "name": group["name"], + "shared_dir": str(path), "config": str(conf_path), + "note": "restart the node to pick it up"} + if upload_dir: + result["upload_dir"] = str(upload_path) + return result async def add_root(state: dict, group_id: str, path: str, *, -- cgit v1.2.3