Repository navigation
fix(realtime): suppress deltas by originating tab instead of by user - #12
Conversation
Deltas were dropped whenever the actor matched the signed in user, so two tabs of the same person never updated each other. Every mutating request now carries a per tab client id that rides through to the published SyncAction, and the delta bridge skips only its own echo.
… my issues The catch-all rendered a fake empty state for every unimplemented route, so /docs, /views and /my-issues looked like real but empty pages. Unmatched addresses now hit a plain not-found, my issues lists what is assigned to the viewer across teams, and the sidebar only links to surfaces that exist.
The spec signs one user in, opens a second tab in the same browser context, and asserts an issue, a comment and a reaction all reach the second tab with no reload.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 37 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds per-tab origin identifiers to realtime issue updates, suppresses same-tab echoes, and adds cross-tab tests. It also introduces a My issues view and route, updates navigation links, adds a not-found page, and centralizes team issue queries. ChangesRealtime origin synchronization
Issue navigation and personal issue view
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant TabA
participant apiFetch
participant APIHandler
participant RealtimePublisher
participant TabB
TabA->>apiFetch: Send mutation with x-orbit-client-id
apiFetch->>APIHandler: Forward origin client ID
APIHandler->>RealtimePublisher: Publish action with originClientId
RealtimePublisher->>TabB: Deliver sync action
TabB->>TabB: Apply delta through DeltaBridge
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Before
AfterOne user, two tabs in the same browser context. Tab A creates the issue, tab B receives it with no reload: Same story for a comment and a reaction: MechanismEvery tab holds one random id for its lifetime ( Cache patches were already idempotent and the Placeholder removal
Two consequences handled here:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/features/issues/my-issues-view.test.ts`:
- Around line 38-60: Add a view-level test for MyIssuesView that supplies issue
results from multiple teams, verifies they are merged, and asserts the combined
issues are rendered. Keep the existing assignedTo unit tests unchanged and
exercise the route/query integration rather than only the extracted filter.
In `@apps/web/src/lib/query/use-issues.ts`:
- Around line 30-44: Update teamIssuesQuery so its queryFn follows the API
response’s nextCursor until no cursor remains, fetching each subsequent page and
aggregating all page.issues into the returned readonly Issue[]; preserve the
existing abort signal, teamId, and TEAM_ISSUE_LIMIT parameters for every
request.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1e36255e-b195-469f-82db-7065ab73413b
📒 Files selected for processing (19)
apps/web/e2e/same-user-tabs.spec.tsapps/web/src/app/(app)/[...slug]/page.tsxapps/web/src/app/(app)/my-issues/page.tsxapps/web/src/app/not-found.tsxapps/web/src/features/issues/my-issues-view.test.tsapps/web/src/features/issues/my-issues-view.tsxapps/web/src/lib/api/handler.tsapps/web/src/lib/navigation.tsapps/web/src/lib/query/client-id.tsapps/web/src/lib/query/fetcher.tsapps/web/src/lib/query/sync.test.tsapps/web/src/lib/query/sync.tsapps/web/src/lib/query/use-issues.tsapps/web/src/lib/realtime/delta-bridge.test.tsxapps/web/src/lib/realtime/delta-bridge.tsxapps/web/src/lib/realtime/provider.tsxpackages/core/src/realtime/publisher.test.tspackages/core/src/realtime/publisher.tspackages/shared/src/events/index.ts
💤 Files with no reviewable changes (2)
- apps/web/src/app/(app)/[...slug]/page.tsx
- apps/web/src/lib/query/sync.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/features/issues/my-issues-view.test.tsx`:
- Around line 135-141: Add a test alongside the existing empty-state case in the
my-issues view suite using a ready workspace with uncached team queries, and
assert that the pending branch renders “Loading your issues.” Keep the settled
empty-state assertions unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 93828ef6-91ce-4b3d-9708-00f75b7879eb
📒 Files selected for processing (1)
apps/web/src/features/issues/my-issues-view.test.tsx
The suite only exercised the settled empty state, so the pending branch could regress without a failure.



Realtime deltas were dropped whenever the actor matched the signed in user, so two tabs of the same person never updated each other; suppression is now keyed on a per tab client id.