Skip to content

Fix redundant React effect in the dashboard and standardize auth fetching in the layout to use the shared API client. #6

@nazarli-shabnam

Description

@nazarli-shabnam

1. Duplicate useEffect in DashboardPage

  • File: apps/frontend/src/pages/dashboard/DashboardPage.tsx
  • Lines: 86–90 and 100–104
  • Issue: Both effects set selectedWorkspaceId when workspaces loads; redundant and can cause extra renders.
  • Fix: Remove the duplicate effect (lines 100–104).

2. Direct fetch in DashboardLayout

  • File: apps/frontend/src/components/layout/DashboardLayout.tsx
  • Lines: 43–52
  • Issue: Uses raw fetch for /api/auth/me instead of apiFetch; token handling may be inconsistent with the rest of the app.
  • Fix: Replace with apiFetch for consistent auth headers and error handling.

3. Redis connection per broadcast (optional / lower priority)

  • File: api/app/app/websocket/manager.py
  • Issue: broadcast_to_board creates a new Redis client and closes it each time; can be inefficient under load.
  • Fix: Consider a shared Redis client or connection pool for publish operations.

Metadata

Metadata

Labels

APIUIbugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions