Critical: Lock state was purely React useState — refreshing the page reset it. Now persisted server-side via is_locked/locked_at columns on user_sessions. POST /auth/lock sets the flag, /auth/verify-password clears it, and GET /auth/status returns is_locked so the frontend initializes correctly. UI: Cache accent color in localStorage and apply via inline script in index.html before React hydrates to eliminate the cyan flash on load. UI: Increase TanStack Query gcTime from 5min to 30min so page data survives component unmount/remount across tab switches without skeleton. UI: Move Projects nav onClick from the icon element to the full-width container div so the entire row is clickable when the sidebar is collapsed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
504 B
Python
19 lines
504 B
Python
"""add is_locked and locked_at to user_sessions
|
|
|
|
Revision ID: 052
|
|
Revises: 051
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = "052"
|
|
down_revision = "051"
|
|
|
|
def upgrade():
|
|
op.add_column("user_sessions", sa.Column("is_locked", sa.Boolean(), server_default="false", nullable=False))
|
|
op.add_column("user_sessions", sa.Column("locked_at", sa.DateTime(), nullable=True))
|
|
|
|
def downgrade():
|
|
op.drop_column("user_sessions", "locked_at")
|
|
op.drop_column("user_sessions", "is_locked")
|