aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/db
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-19 16:36:29 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-19 16:36:29 +0200
commit90c3c6a01f46c9b29c5d92702d7383f32e8951d7 (patch)
tree779f5ee3557d5111e0a7f1fdc211a2845bc3bc69 /packages/meshbay-hub/src/meshbay_hub/db
parent9498ce0a34cc363e8cf9a42575c8fcf7dfe0fd1a (diff)
downloadmeshbay-90c3c6a01f46c9b29c5d92702d7383f32e8951d7.tar.gz
feat(ui): 11-point UI overhaul — tabs, transfers, settings, uploads
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 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/db')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/db/migrations/versions/f1a2b3c4d5e6_add_user_preferences.py30
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/db/models.py9
2 files changed, 39 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/db/migrations/versions/f1a2b3c4d5e6_add_user_preferences.py b/packages/meshbay-hub/src/meshbay_hub/db/migrations/versions/f1a2b3c4d5e6_add_user_preferences.py
new file mode 100644
index 0000000..e30a4da
--- /dev/null
+++ b/packages/meshbay-hub/src/meshbay_hub/db/migrations/versions/f1a2b3c4d5e6_add_user_preferences.py
@@ -0,0 +1,30 @@
+"""add_user_preferences
+
+Revision ID: f1a2b3c4d5e6
+Revises: d28b9caf9f07
+Create Date: 2026-08-19 12:00:00.000000
+
+"""
+from typing import Sequence, Union
+
+from alembic import op
+import sqlalchemy as sa
+
+
+revision: str = 'f1a2b3c4d5e6'
+down_revision: Union[str, Sequence[str], None] = 'd28b9caf9f07'
+branch_labels: Union[str, Sequence[str], None] = None
+depends_on: Union[str, Sequence[str], None] = None
+
+
+def upgrade() -> None:
+ op.create_table('user_preferences',
+ sa.Column('user_id', sa.String(36), sa.ForeignKey('users.id'), nullable=False),
+ sa.Column('key', sa.String(64), nullable=False),
+ sa.Column('value', sa.Text(), nullable=False),
+ sa.PrimaryKeyConstraint('user_id', 'key'),
+ )
+
+
+def downgrade() -> None:
+ op.drop_table('user_preferences')
diff --git a/packages/meshbay-hub/src/meshbay_hub/db/models.py b/packages/meshbay-hub/src/meshbay_hub/db/models.py
index 12507a6..f1f11e2 100644
--- a/packages/meshbay-hub/src/meshbay_hub/db/models.py
+++ b/packages/meshbay-hub/src/meshbay_hub/db/models.py
@@ -288,6 +288,15 @@ class ContentBlocklist(Base):
added_by: Mapped[str | None] = mapped_column(String(64)) # "auto" or admin username
+class UserPreference(Base):
+ __tablename__ = "user_preferences"
+
+ user_id: Mapped[str] = mapped_column(
+ String(36), ForeignKey("users.id"), primary_key=True)
+ key: Mapped[str] = mapped_column(String(64), primary_key=True)
+ value: Mapped[str] = mapped_column(Text, nullable=False)
+
+
class IPLog(Base):
"""
Connection log for legal compliance.