feat: add search APIs and telegram-like chats sidebar flow
All checks were successful
CI / test (push) Successful in 24s

- implement chat query filtering and message search endpoints

- add db indexes for search fields

- activate chats search input in web

- replace inline create panel with floating TG-style action menu
This commit is contained in:
2026-03-08 00:19:34 +03:00
parent 0a602e4078
commit 4d704fc279
11 changed files with 299 additions and 86 deletions

View File

@@ -31,10 +31,11 @@ router = APIRouter(prefix="/chats", tags=["chats"])
async def list_chats(
limit: int = 50,
before_id: int | None = None,
query: str | None = None,
db: AsyncSession = Depends(get_db),
current_user: User = Depends(get_current_user),
) -> list[ChatRead]:
return await get_chats_for_user(db, user_id=current_user.id, limit=limit, before_id=before_id)
return await get_chats_for_user(db, user_id=current_user.id, limit=limit, before_id=before_id, query=query)
@router.post("", response_model=ChatRead)