feat: implement comments and activity panel in workspace

- Added CommentsPanel component for managing comments on documents.
- Integrated comment creation, deletion, and resolution functionalities.
- Implemented activity tracking for document interactions.
- Enhanced SketchPage with editing and saving capabilities.
- Introduced template management API endpoints for creating, sharing, and deleting templates.
- Added runtime validation report for frontend and backend.
- Created GettingStartedPanel for user onboarding with template options.
- Implemented Playwright E2E tests for accessibility and export functionality.
This commit is contained in:
Anurag Jangid 2026-10-22 21:18:10 +05:30
parent 6e354ba041
commit 809235e962
41 changed files with 2840 additions and 285 deletions

View file

@ -1,4 +1,5 @@
import bcrypt
import secrets
from datetime import UTC, datetime, timedelta
from typing import Any
@ -31,6 +32,20 @@ def create_refresh_token(subject: str) -> str:
return jwt.encode(payload, settings.secret_key, algorithm=ALGORITHM)
def create_oauth_state() -> str:
expire = datetime.now(UTC) + timedelta(minutes=10)
payload = {"nonce": secrets.token_urlsafe(16), "exp": expire, "type": "oauth_state"}
return jwt.encode(payload, settings.secret_key, algorithm=ALGORITHM)
def verify_oauth_state(state: str) -> bool:
try:
payload = decode_token(state)
return payload.get("type") == "oauth_state"
except JWTError:
return False
def decode_token(token: str) -> dict[str, Any]:
return jwt.decode(token, settings.secret_key, algorithms=[ALGORITHM])