Explain activity source priority decisions on detail - #2204
Conversation
Derive a server-authored sourceDecision for activities with multiple matched sources and show the same “How sources were combined” card on web and mobile, completing the Data Trust Center conflict-explanation outcome (#2058). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
Warning Review limit reached
Next review available in: 23 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: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (18)
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. Comment |
PR Summary by QodoAdd server-authored activity sourceDecision and parity detail card
AI Description
Diagram
High-Level Assessment
Files changed (18)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
199 rules✅ Skills:
fix-provider, write-tests, cloudflare 1.
|
Keep the completed Trust Center roadmap checkbox, generate unique card heading ids with useId, and compute source links once in Activity.toDetail(). Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
Addressed Qodo review feedback in 0a21a3f:
|
Mobile PreviewScan to open on device:
To test on device:
|
|
Storybook previews for This comment updates automatically on each PR push. |
Assert custom primary labels and distinct lookup fallbacks, and drop the unused Activity.sourceDecision getter so toDetail is the single mutation-covered path. Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
Summary
sourceDecisionon multi-source activity detail (sourceCount,primarySourceLabel, explanation) so clients do not recompute priority copy.docs/superpowers/plans/2026-07-26-activity-source-decision-explanation.md.Test plan
pnpm vitest run packages/server/src/models/activity-source-decision.test.ts packages/server/src/models/activity.test.tspnpm vitest run packages/web/src/components/ActivitySourceDecisionCard.test.tsx packages/web/src/pages/ActivityDetailPage.test.tsxpnpm test:mobilepnpm lint(with local ClickHouse)pnpm tsc --noEmit+ server/web package typechecksSummary by cubic
Adds a server-owned
sourceDecisionfor multi-source activities and shows a shared “How sources were combined” card on web and mobile. Explains the primary source and why, completing the Data Trust Center source-conflict outcome (#2058).New Features
sourceDecisionwithsourceCount,primarySourceLabel, and an explanation viaActivity.toDetail()/activity.byId.ActivitySourceDecisionCardfrom server data; single-source activities don’t show the card.Refactors
useIdto generate unique heading IDs for accessibility.Activity.toDetail()computessourceLinksonce and is now the single path forsourceDecision(removed the unusedActivity.sourceDecisiongetter).Written for commit 282e5cc. Summary will update on new commits.