feat: add user display profiles and fix web context menu UX
Some checks failed
CI / test (push) Failing after 17s

backend:

- add required user name and optional bio fields

- extend auth/register and user schemas/services with name/bio

- add alembic migration 0006 with safe backfill name=username

- compute per-user chat display_title for private chats

- keep Saved Messages delete-for-all protections

web:

- registration now includes name

- add profile edit modal (name/username/bio/avatar url)

- show private chat names via display_title

- fix context menus to open near cursor with viewport clamping

- stabilize +/close floating button to remove visual jump
This commit is contained in:
2026-03-08 00:57:02 +03:00
parent 321f918dca
commit 456595a576
20 changed files with 249 additions and 39 deletions

View File

@@ -0,0 +1,29 @@
"""add user name and bio
Revision ID: 0006_user_name_bio_profile
Revises: 0005_chat_public_saved_features
Create Date: 2026-03-08 02:20:00.000000
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
revision: str = "0006_user_name_bio_profile"
down_revision: Union[str, Sequence[str], None] = "0005_chat_public_saved_features"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.add_column("users", sa.Column("name", sa.String(length=100), nullable=True))
op.add_column("users", sa.Column("bio", sa.String(length=500), nullable=True))
op.execute("UPDATE users SET name = username WHERE name IS NULL OR name = ''")
op.alter_column("users", "name", existing_type=sa.String(length=100), nullable=False)
def downgrade() -> None:
op.drop_column("users", "bio")
op.drop_column("users", "name")