Add a friends hub with realtime online presence
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- cypress, javascript, nodejs, react, redis
Direzione di ricerca
Leggi i criteri di accettazione e le dipendenze #75, #105 e #82, quindi traccia lo stato REST esistente delle amicizie e il namespace Socket.IO e i punti di ingresso alle room per utente. Il lavoro è completato quando il friends hub, la presenza effimera riservata agli amici, la riconciliazione dopo la riconnessione, i test mirati del server e del client e l’happy path di Cypress con due utenti soddisfano tutti i criteri elencati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Goal
Give authenticated users one dependable place to see friendships, pending requests, and which friends are currently available to race.
User experience
Add a /friends route reachable from the header/profile menu with:
- online friends first, then offline friends;
- incoming and outgoing pending requests;
- actions to open a profile, accept/decline/cancel a request, unfriend, block, or invite an eligible friend to the current room;
- clear empty, loading, disconnected, and error states;
- a responsive layout that works with the existing mobile navigation.
Presence contract
- Presence is ephemeral and friends-only in this surface.
- "Online" means the user has at least one authenticated Let’s Cube socket connected.
- Multiple tabs/devices count as one user; offline is emitted only after the last socket disconnects.
- Do not persist or display
last seenin the MVP. - Do not create durable "friend came online" notifications in the MVP.
- REST owns the durable friend list; Socket.IO only delivers presence changes. Reconnect must refetch/reconcile durable state.
Acceptance criteria
- Add friend-list/request state and selectors without coupling React components directly to sockets.
- Move friend presence through the global namespace and existing per-user Socket.IO rooms.
- Compute first-connect/last-disconnect correctly across multiple processes through the Redis adapter.
- Deliver an initial presence snapshot and incremental updates only for accepted friendships.
- Handle Redis/socket interruption without deleting friendships or permanently showing stale presence.
- Add focused server tests for multi-tab, multi-process, blocked/unfriended, and reconnect behavior.
- Add client tests for sorting, request states, offline/error states, responsive actions, and reconnect reconciliation.
- Add a Cypress happy path with two authenticated test users.
Dependencies
- #75 friendship lifecycle
- #105 notification/request state
- #82 public profile links
Non-goals
- Persistent last-seen timestamps.
- Browser/OS push notifications.
- Direct messaging.
- Lingua principale
- JavaScript
- Stelle
- 30
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder13/LetsCube
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
area: data area: platform enhancement priority: P1
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
Tutte le issue di coder13/LetsCube
Issue simili
-
[Feature]:Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
Uuriko/project-room#1554 ·
I maintainer di solito rispondono entro 1 giorno
-
automated issue report
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
lirantal/discoprint#36 ·
I maintainer di solito rispondono entro 1 giorno
-
accepting PR Content:HTML
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
mdn/content#45988 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pnpm/pnpm#16635 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno