Skip to content

fix(android): hide overview activity heatmap on mobile (#861)#863

Open
HKLHaoBin wants to merge 1 commit into
Open-Less:betafrom
HKLHaoBin:feat/861-hide-mobile-heatmap
Open

fix(android): hide overview activity heatmap on mobile (#861)#863
HKLHaoBin wants to merge 1 commit into
Open-Less:betafrom
HKLHaoBin:feat/861-hide-mobile-heatmap

Conversation

@HKLHaoBin

@HKLHaoBin HKLHaoBin commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

User description

Summary

  • Skip getActivityStats() IPC when useMobileLayout() is true so Android / narrow screens do not fetch 365-day activity data.
  • Do not render ActivityHeatmapCard on mobile layout, avoiding fixed-width heatmap overflow that broke bottom-nav alignment.
  • Desktop Overview behavior and the Theme settings toggle are unchanged.

Closes #861

Test plan

  • Android / narrow window (<720px): Overview has no「年度活动」card; no getActivityStats call
  • Desktop: heatmap still shows when prefs allow; Theme → activity heatmap toggle still works
  • Mobile bottom nav width/alignment OK, no horizontal overflow
  • Resize from narrow → wide: heatmap data loads and card appears (effect depends on mobile)

Made with Cursor


PR Type

Bug fix, Enhancement


Description

  • Skip activity data request when useMobileLayout is true

  • Hide ActivityHeatmapCard on narrow screens to avoid overflow

  • Fix bottom-nav alignment and improve mobile performance


Diagram Walkthrough

flowchart LR
    A[Overview.tsx] --> B{mobile layout?}
    B -- Yes --> C[Skip getActivityStats & render]
    B -- No --> D[Fetch activity & show heatmap]
Loading

File Walkthrough

Relevant files
Bug fix
Overview.tsx
Conditionally skip heatmap on mobile                                         

openless-all/app/src/pages/Overview.tsx

+11/-5   

Skip getActivityStats IPC and ActivityHeatmapCard when useMobileLayout()
is true so narrow screens avoid horizontal overflow and unnecessary work.

Closes Open-Less#861

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

861 - PR Code Verified

Compliant requirements:

  • Android/narrow-screen Overview does not show the "年度活动" card.
  • Android/narrow-screen Overview skips getActivityStats() (early return in useEffect).
  • Desktop Overview rendering condition unchanged (still uses prefs.showOverviewActivityHeatmap and activity data).
  • Desktop Theme toggle remains unaffected.

Requires further human verification:

  • Mobile bottom navigation bar alignment and overflow: cannot be confirmed via code review alone; requires manual testing on actual mobile browser/WebView.
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

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.

fix(android): 移动端隐藏概览页「年度活动」热力图

1 participant