Skip to content

fix: scope favorite presence and clear badge totals - #34

Merged
kixelated merged 4 commits into
mainfrom
quest/m0/favorite-presence
Nov 7, 2026
Merged

kixelated merged 4 commits into
mainfrom
quest/m0/favorite-presence

Conversation

@kixelated

@kixelated kixelated commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Every favorite watched the entire preview grant, so participants in one room appeared in other favorites. Member-count effects also accumulated badge contributions after participants left or cards unmounted.

Approach

Pass each favorite's room through the existing preview prefix API, apply each count change as one badge delta, and remove its final contribution on Solid cleanup. Clear zero web badges explicitly and serialize platform writes across badge owners so navigation cannot restore a stale count.

Impact

Favorite rosters and the application badge follow current presence through joins, leaves, favorite removal, and Home teardown. No public API or wire changes.

Alternatives

Reuse MoQ's boundary-aware room prefix matching rather than add another filter. Exercise the actual Home view with in-memory announcements and the existing Solid JSX transform; isolate Bun test files so fixture mocks cannot leak. Load Solid and Happy DOM explicitly through the unit-test command, preserving native globals for browser-test tooling.

Follow-ups

None required for this quest. Its completed plan and backlog link are removed.

Validation

  • Reproduced the unscoped room bug and stale badge contribution before fixing each.
  • Reproduced the missing web clear and queued badge-owner race before fixing them.
  • quest gate just check passes: TypeScript, Biome, 5 API tests, 5 app tests, and native formatting.
  • quest gate bun run --cwd app check passes, including the test setup's types.
  • quest gate just build passes. Existing non-failing updater lint, worklet import, and bundle-size warnings remain.
  • No live relay or device permissions are used by the presence regressions. Platform badge APIs are mocked.
  • A native-timer smoke check fails with the global preload and passes after removing it. Unit tests use bun test --isolate --conditions=browser --preload ./test/setup.ts src.
  • Combined local validation with the concurrent speaker and media changes passes: 5 API tests, 21 app unit tests, and the real media browser regression with 49 assertions, plus TypeScript, Biome, and native checks.

Review

Claude Code / claude-opus-5-5 / medium reviewed f9dcfa9b8e34eb6dbaf5c785afde555e27723e84 in round 3 with no findings. All four round-1 findings are fixed: synchronous badge API errors cannot poison later writes; room changes apply one delta; clear/flag assertions differ; the Connection fixture uses a typed property override.

(Written by GPT-6.1 Sol with xhigh)

@kixelated kixelated changed the title Scope favorite-room presence and balance the app badge fix: scope favorite presence and clear badge totals Nov 7, 2026
@kixelated
kixelated marked this pull request as ready for review November 7, 2026 18:11
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 21 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1375ac35-dbb1-40e5-be34-ae63300867f0
Commits

Reviewing files that changed from the base of the PR and between c1c30fc and f9dcfa9.

Files ignored due to path filters: 1

  • bun.lock is excluded by !**/*.lock
Files selected for processing: 10

  • app/package.json
  • app/src/components/badge.test.ts
  • app/src/components/badge.ts
  • app/src/home.test.ts
  • app/src/home.tsx
  • app/src/preview.tsx
  • app/test/setup.ts
  • app/tsconfig.json
  • quest/m0/README.md
  • quest/m0/favorite-presence.md
  • 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

@kixelated
kixelated marked this pull request as draft November 7, 2026 18:47
@kixelated
kixelated marked this pull request as ready for review November 7, 2026 18:50
@kixelated
kixelated merged commit 38ecca4 into main Nov 7, 2026
3 checks passed
@kixelated
kixelated deleted the quest/m0/favorite-presence branch November 7, 2026 22:42
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