Skip to content

[CRD] show my memberships if recent spaces are missing#9770

Merged
bobbykolev merged 2 commits into
developfrom
crd-dashboard-recent
May 29, 2026
Merged

[CRD] show my memberships if recent spaces are missing#9770
bobbykolev merged 2 commits into
developfrom
crd-dashboard-recent

Conversation

@bobbykolev
Copy link
Copy Markdown
Collaborator

@bobbykolev bobbykolev commented May 29, 2026

Summary by CodeRabbit

  • Refactor
    • Optimized recent spaces loading on the dashboard to defer memberships fetching until needed, improving performance.
    • Updated recent spaces population to use additional data sources when available.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0b16f90d-11c9-4067-b795-d2d72400dab5

📥 Commits

Reviewing files that changed from the base of the PR and between d621d5b and 17ccd1c.

📒 Files selected for processing (2)
  • src/main/crdPages/dashboard/DashboardWithMemberships.tsx
  • src/main/crdPages/dashboard/dashboardDataMappers.tsx

Walkthrough

The PR refactors the dashboard's recent spaces and memberships data loading to consolidate two separate query mechanisms. RecentSpaceEntry is exported from the mapper, then used in the dashboard to support a new fallback: when dedicated recent spaces are unavailable, the component defers a shared memberships query and falls back to the user's hierarchical memberships, filtering out the home space.

Changes

Dashboard data flow consolidation

Layer / File(s) Summary
Type export and import
src/main/crdPages/dashboard/dashboardDataMappers.tsx, src/main/crdPages/dashboard/DashboardWithMemberships.tsx
RecentSpaceEntry type is exported from the mapper module and imported into the dashboard component to support the updated recent spaces fallback logic.
Shared memberships query and recent spaces fallback
src/main/crdPages/dashboard/DashboardWithMemberships.tsx
The memberships query is elevated earlier in the component with a skip condition that defers fetching until the memberships dialog is open or recent spaces finish loading empty. The recentSpaces derivation is rewritten to fall back from myRecentSpaces to hierarchical memberships (filtering out home space), and both RecentSpaces and MyMembershipsPanel component props are updated to consume the shared query's loading state instead of separate queries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the dashboard to display user memberships as a fallback when recent spaces data is unavailable, which aligns with the conditional logic introduced in DashboardWithMemberships.tsx.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch crd-dashboard-recent

Comment @coderabbitai help to get the list of available commands and usage tips.

@bobbykolev bobbykolev merged commit 4f72ec0 into develop May 29, 2026
3 of 4 checks passed
@bobbykolev bobbykolev deleted the crd-dashboard-recent branch May 29, 2026 14:55
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