Files
nick-doc/Issues/ISSUE-060-frontend-contacts-popover-reads-userid-from-non-existent-local.md
Siavash Sameni dceaf82934 audit: 2026-05-30 full-codebase audit — report, issues, docs, runbooks
Full-codebase-audit 2026-05-30 outputs:
- Audit report: 09 - Audits/Full Codebase Audit - 2026-05-30.md
- 81 issue files ISSUE-055..135 (decisions + 1 skipped no-brainer).
- Scanner docs from scratch (was zero): architecture, data model, API ref, payment
  flow, operations runbook + repo README.
- Doc-sync updates across API reference, data models, flows, design system.
- Secret Rotation Runbook (08 - Operations) for the exposed credentials.
- Reusable workflow guide (07 - Development) + .claude/workflows/full-codebase-audit.js.

Issues remain status:open intentionally — the code fixes are uncommitted-then-committed
working-tree changes per repo and aren't "resolved" until merged/deployed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 18:48:04 +04:00

1.2 KiB

issue, title, severity, domain, labels, status, created, source
issue title severity domain labels status created source
060 Frontend contacts-popover reads userId from non-existent localStorage 'user' key high Chat
bug
frontend
open 2026-05-30 Full Codebase Audit 2026-05-30

Frontend contacts-popover reads userId from non-existent localStorage 'user' key

Severity: high Domain: Chat Labels: bug, frontend

Description

src/layouts/components/contacts-popover.tsx:61 reads currentUserId from localStorage.getItem('user'), but no part of the auth flow writes a 'user' key to localStorage. The result is always null, breaking any per-user contact filtering in the popover.

Options

  1. Use the auth context (useAuthContext) to get the real user id.
  2. Decode the user id from the access token claims.
  3. Add a real 'user' object to storage on login and read it here.

Recommendation

Pull currentUserId from the live auth context rather than a non-existent storage key. Requires confirming the canonical user-id field name in the auth context.

Affected Files

  • frontend/src/layouts/components/contacts-popover.tsx:61

References