Skip to content

fix: stop rendering the loading sweep while idle - #96

Closed
ericjypark wants to merge 1 commit into
mainfrom
codex/fix-idle-rendering
Closed

ericjypark wants to merge 1 commit into
mainfrom
codex/fix-idle-rendering

Conversation

@ericjypark

@ericjypark ericjypark commented Sep 11, 2026

Copy link
Copy Markdown
Owner

The visible island kept its 30 Hz angular-gradient TimelineView running whenever Low Power Mode was off, including between refreshes. On the current Mac that held CodexIsland around 19–22% CPU while idle.

Limit the rotating sweep to active usage or cost refreshes while preserving the steady cobalt halo, alert tint, occlusion behavior, and Low Power Mode treatment. In the same idle UI state, the changed build measured 0.1–0.3% CPU; manual refresh still showed the sweep state and returned to the normal synced state.

Validation:

  • ./scripts/run-tests.sh
  • SU_FEED_URL= ./build.sh
  • Compact and expanded UI smoke test
  • Manual refresh smoke test
  • Before/after idle CPU sampling on the same Mac

Summary by CodeRabbit

  • Bug Fixes
    • Updated loading visuals so the cobalt loading sweep appears only while usage or cost data is actively refreshing.
    • Low Power Mode now controls the ambient halo independently, while active refreshes continue to display the loading sweep.
    • Loading animations remain paused when the island is occluded, reducing unnecessary visual activity and resource usage.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 49d0580d-758d-4d9e-bdd7-b67b40c66828

📥 Commits

Reviewing files that changed from the base of the PR and between 06f3a5c and c740a0f.

📒 Files selected for processing (3)
  • Sources/Model/LowPowerModeStore.swift
  • Sources/Views/IslandRootView.swift
  • Sources/Window/IslandWindowController.swift

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The loading sweep now renders only during visible usage or cost refreshes. Low-power mode continues to gate the ambient halo separately. Related comments now describe the updated behavior.

Changes

Loading sweep behavior

Layer / File(s) Summary
Loading sweep activation and documentation
Sources/Model/LowPowerModeStore.swift, Sources/Views/IslandRootView.swift, Sources/Window/IslandWindowController.swift
LoadingSweep now requires an in-flight usage or cost refresh and a visible island. Documentation separates sweep behavior from ambient halo gating and updates occlusion wording.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c740a

The loading sweep is limited to visible refreshes without an identified regression, so the change is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. 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 clearly describes the main change: the loading sweep no longer renders while idle.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-idle-rendering

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.

❤️ Share

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

@ericjypark

Copy link
Copy Markdown
Owner Author

Closing because this work was created from a misunderstanding of the requested task.

@ericjypark ericjypark closed this Sep 11, 2026
@ericjypark
ericjypark deleted the codex/fix-idle-rendering branch September 11, 2026 00:34
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