Skip to content

test(web): cover lib/ hooks, API clients and WebRTC logic - #217

Open
MITOM06 wants to merge 14 commits into
mainfrom
test/cov-web-logic
Open

MITOM06 wants to merge 14 commits into
mainfrom
test/cov-web-logic

Conversation

@MITOM06

@MITOM06 MITOM06 commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 1 of the web coverage push: logic only (lib/**, logic hooks, app/api cookie route handlers). No presentational components/pages, no production code changed, scripts/ci/coverage-thresholds.txt untouched.

Coverage (web, lines)

before after
Lines 55.95% (6961/12441) 65.05% (8094/12441)
Statements 55.80% 65.63%
Branches 50.30% 56.91%
Functions 48.89% 61.58%
Tests 1602 2054 (+452)

scripts/ci/coverage-gate.sh web → ✅ 65.05% (threshold 54%; gate suggests web=64 — left for the coordinator).
lib/ remaining uncovered: ~45 lines total (was ~1,000).

What is covered

  • lib/api: admin, ai, ai-actions, ai-context, assistant, bot-admin, calls, connector, friends, kb, meetings, notifications, reminders, usage (routes, non-array coercion, 404→null, error-key mapping).
  • app/api/auth/{session,refresh,set-cookie,clear-cookie}: rotation persistence, transient 503 vs 401, refresh-on-401 without replaying a superseded token, race_lost.
  • lib/hooks: use-connectors, use-ai-context, use-media-preview, use-voice-recorder, use-profile-image-editor, use-call-alerts, use-wallpaper, use-file-attachments, use-sidebar-resize, use-friends, use-call-names, use-meetings, use-display-names, use-relationship, use-notifications, use-assistant, use-open-assistant-chat, use-message-cache (extra paths), use-note-editor, use-meeting-summary, use-meeting-shortcuts, use-capabilities, use-admin lists, small query hooks; extra routing cases for use-meeting-room-stomp / use-realtime-notifications.
  • lib/webrtc: mesh-group-call-manager, mesh-negotiator, mesh-in-call, mesh-call-manager edges, sfu-call-room, sfu-group-call, sfu-call guards, call-manager / group-call-manager façades.
  • lib/rtc / meetings / realtime / ai: livekit-session edges, screen-capture, room-media / room-session wiring, meeting-room-controller race guards, meeting-room-chat, note conflict + event parsing edges, conversation-cache edges, present-notice, media-token edges, stream-routing / pending-actions edges.
  • components/chat logic: use-conversation-settings actions, conversation-item-helpers, wallpaper-presets.

Shared test helper: apps/web/test/query-wrapper.tsx (excluded from coverage).

Verification

  • pnpm exec tsc --noEmit ✅, pnpm run test:cov ✅ (2054 passed), eslint: 0 errors on changed files.
  • Mutation sanity check: 11 deliberate breaks in production code (admin coercion, toast, media fallback, voice cancel, auto-delete null, refresh replay guard, negotiator queue, CALL_NOT_SFU refresh, lobby leave on dispose, unread bump, note conflict) → each made the new tests fail → reverted.

Bugs found

None — no it.skip/BUG: added.

🤖 Generated with Claude Code

MITOM06 and others added 14 commits November 14, 2026 17:48
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge paths

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…min lists and note editor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oller guards

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…yload parsing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… shortcut hooks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
platform-web Ready Ready Preview Nov 14, 2026 11:18am UTC

@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 56882660-46c0-4c9e-a590-2a4de9dcded2
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch was successfully deployed

1 active deployment
Preview — 16f9c1b4 Deployed Nov 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant