Skip to content

fix a handful of ui things: empty strain rings, calories/steps on body screen, wrong icons#151

Merged
abdulsaheel merged 1 commit into
mainfrom
fix/issues
Jul 25, 2026
Merged

fix a handful of ui things: empty strain rings, calories/steps on body screen, wrong icons#151
abdulsaheel merged 1 commit into
mainfrom
fix/issues

Conversation

@abdulsaheel

@abdulsaheel abdulsaheel commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

follow-up on #150, which was already merged before this landed on the same branch — my bad, should've checked. this is just the one remaining commit, fresh PR for it.

  • empty "training load" ring on a workout row that has real data: noData's check missed the case where avg_hr is real but strain itself is null, which fell through to ArcGauge(value: double.nan) — and ArcGauge's own doc says NaN renders as a "muted empty ring". gated the text-vs-gauge choice on strain == null directly instead.

  • removed "Calories & steps" from the strain/body detail screen entirely. it used to be nested inside "Training load" until an earlier fix split it out (contributor feedback: "why is calories under training load, makes no sense"), but it still didn't belong on the strain screen at all — that's energy expenditure, not strain/intensity, and it's already shown properly on Today + the Steps screen. deleted the now-dead _energyCard with it.

  • community links (GitHub/Discord/Reddit/X) in Profile were all using the same generic OsIcon.activity pulse icon — added real per-brand marks via phosphor's logo set (flat Regular weight, not duotone — doesn't make sense for a plain monochrome brand mark). note: i'd actually deleted these enum members during the earlier icon-pack migration because grepping for OsIcon.github turned up nothing — missed that the call site was already degraded to a generic icon instead of removed, so the grep looked clean when it wasn't. added them back properly.

  • recap share card's logo badge was OsIcon.bodyStrain (a barbell, no relation to the app itself) — swapped for the real app icon asset (assets/images/icon.png, same one boot_splash.dart already uses).

  • AI breakdown/recap screen's regenerate button was also OsIcon.activity — swapped to OsIcon.sync, which is what this app already uses everywhere else for "run this again".

611/611 tests green, flutter analyze clean (same pre-existing baseline, nothing new).

Summary by CodeRabbit

  • New Features

    • Added dedicated GitHub, Discord, Reddit, and X icons for community links.
    • Updated the recap share card with the app’s branded icon.
  • Bug Fixes

    • Corrected the AI regeneration action icon.
    • Workout cards now display “No data” when strain information is unavailable.
    • Removed the Calories & steps section from strain details.

…y screen, wrong icons

- the "training load" ring on a workout row could show up as a hollow/
  empty circle even for a workout with real data, because of a gap in the
  noData check: if avg_hr was real but strain itself happened to be null,
  it fell through to ArcGauge with value: double.nan, and ArcGauge's own
  contract literally says NaN renders as "muted empty ring". just gate the
  text-vs-gauge choice on strain==null directly instead of the compound
  flag that had this blind spot.

- removed the "Calories & steps" section from the strain/body detail
  screen entirely. it used to be nested under training load until an
  earlier fix split it into its own section (contributor feedback: "why
  is calories under training load, makes no sense") - but it still didn't
  really belong on the strain screen at all, calories/steps are energy
  expenditure not strain/intensity and they're already shown properly on
  Today + the Steps screen. deleted the now-unused _energyCard along with
  it.

- community links in profile (github/discord/reddit/x) were ALL using
  OsIcon.activity - a generic pulse icon - as a stand-in for every single
  one, so they all looked identical. added real per-brand marks via
  phosphor's logo set (regular weight, not duotone, since a two-tone
  render doesn't make sense for a plain monochrome brand logo) and wired
  them in. worth noting: i dropped these enum members earlier during the
  icon pack migration because a grep for `OsIcon.github` etc turned up
  zero hits - what i missed was the call sites were already degraded to
  a generic icon instead of being removed, so the grep looked clean when
  it wasn't. added them back properly this time.

- the recap share card's little logo badge next to the "OpenStrap"
  wordmark was OsIcon.bodyStrain (a barbell) which has nothing to do with
  the app's own identity. swapped it for the actual app icon
  (assets/images/icon.png, same asset + errorBuilder pattern
  boot_splash.dart already uses for it).

- the regenerate button on the ai breakdown/recap screen was also
  OsIcon.activity, same generic-icon problem. swapped to OsIcon.sync
  (arrows in a circle) which is what this app already uses everywhere
  else for "run this again".

611/611 green, analyze clean (same 8 pre-existing baseline issues, nothing new).
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e217bcd1-959d-443c-8067-94d70edff47a

📥 Commits

Reviewing files that changed from the base of the PR and between aad8a76 and 2c49ce9.

📒 Files selected for processing (6)
  • lib/ui/activity/strain_detail_screen.dart
  • lib/ui/ai/ai_breakdown_screen.dart
  • lib/ui/kit/os_icons.dart
  • lib/ui/profile/profile_screen.dart
  • lib/ui/recap/recap_screen.dart
  • lib/ui/workouts/workouts_screen.dart

📝 Walkthrough

Walkthrough

The PR removes calories and steps from strain details, handles missing workout strain values, restores social brand icons, updates icon usage in AI and profile screens, and changes the recap badge to use the bundled app icon.

Changes

Strain display updates

Layer / File(s) Summary
Strain detail content
lib/ui/activity/strain_detail_screen.dart
Removes energy-related calculations, rendering, and the private energy card; training load remains conditional on strain-related values.
Workout strain fallback
lib/ui/workouts/workouts_screen.dart
Displays “No data” for missing strain values and renders the gauge only when strain is present.

Iconography updates

Layer / File(s) Summary
Social icon registry
lib/ui/kit/os_icons.dart
Adds GitHub, Discord, Reddit, and X/Twitter enum members and Phosphor glyph mappings.
Icon consumers
lib/ui/ai/ai_breakdown_screen.dart, lib/ui/profile/profile_screen.dart
Uses the sync icon for regeneration and platform-specific icons for community links.

Recap branding

Layer / File(s) Summary
Recap badge rendering
lib/ui/recap/recap_screen.dart
Uses the bundled app icon asset with a recap icon fallback.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main UI fixes: empty strain rings, removal of calories/steps, and icon updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issues

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

@abdulsaheel
abdulsaheel merged commit b81e67d into main Jul 25, 2026
1 check passed
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