[PR #1823] [MERGED] refactor(community): improve map legend and data fetching logic #27295

Closed
opened 2026-06-18 16:53:09 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1823
Author: @kai4avaya
Created: 5/30/2026
Status: Merged
Merged: 6/2/2026
Merged by: @profvjreddi

Base: devHead: kai/clarify-community-map-totals


📝 Commits (1)

  • 53e4209 refactor(community): improve map legend and data fetching logic

📊 Changes

1 file changed (+92 additions, -49 deletions)

View changed files

📝 tinytorch/quarto/community/community.html (+92 -49)

📄 Description

Summary
This PR refactors the community globe's legend and data-fetching logic to improve clarity and scalability. It
consolidates the member count display and implements pagination to ensure the map accurately reflects the total
community size as it grows.

Area

  • TinyTorch (modules, tests, milestones)
  • Infrastructure (CI/CD, scripts, config)

Changes

  • Simplified Legend: Updated community.html to show a unified "Total Members" count, removing the redundant "Lost at
    Sea" legend item for a cleaner look.
  • Pagination Logic: Refactored the fetchAllProfiles function to support multi-page API requests, allowing the map to
    load more than the previous 1,000-member limit.
  • Data Classification: Introduced classifyProfiles to cleanly separate mapped users from those missing coordinates,
    making the frontend logic more robust.

Testing

  • Rendered the book locally (quarto render)
  • Ran tests (pytest tests/)
  • Manual verification: Verified the legend updates and API payload handling via local script inspection and code
    review of the D3/Supabase integration.

Related Issues

  • Related to community scalability and map visualization improvements.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1823 **Author:** [@kai4avaya](https://github.com/kai4avaya) **Created:** 5/30/2026 **Status:** ✅ Merged **Merged:** 6/2/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `kai/clarify-community-map-totals` --- ### 📝 Commits (1) - [`53e4209`](https://github.com/harvard-edge/cs249r_book/commit/53e42090d2afab3353b26cc132e29bfecba78ae7) refactor(community): improve map legend and data fetching logic ### 📊 Changes **1 file changed** (+92 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `tinytorch/quarto/community/community.html` (+92 -49) </details> ### 📄 Description Summary This PR refactors the community globe's legend and data-fetching logic to improve clarity and scalability. It consolidates the member count display and implements pagination to ensure the map accurately reflects the total community size as it grows. Area - [x] TinyTorch (modules, tests, milestones) - [x] Infrastructure (CI/CD, scripts, config) Changes - Simplified Legend: Updated community.html to show a unified "Total Members" count, removing the redundant "Lost at Sea" legend item for a cleaner look. - Pagination Logic: Refactored the fetchAllProfiles function to support multi-page API requests, allowing the map to load more than the previous 1,000-member limit. - Data Classification: Introduced classifyProfiles to cleanly separate mapped users from those missing coordinates, making the frontend logic more robust. Testing - [ ] Rendered the book locally (quarto render) - [ ] Ran tests (pytest tests/) - [x] Manual verification: Verified the legend updates and API payload handling via local script inspection and code review of the D3/Supabase integration. Related Issues - Related to community scalability and map visualization improvements. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-18 16:53:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#27295