Skip to content

Feat/pacing tooltip projection and limit hit eta#87

Merged
robinebers merged 4 commits intorobinebers:mainfrom
marcjaner:feat/pacing-tooltip-projection-and-limit-hit-eta
Feb 7, 2026
Merged

Feat/pacing tooltip projection and limit hit eta#87
robinebers merged 4 commits intorobinebers:mainfrom
marcjaner:feat/pacing-tooltip-projection-and-limit-hit-eta

Conversation

@marcjaner
Copy link
Copy Markdown
Contributor

@marcjaner marcjaner commented Feb 6, 2026

Summary by cubic

Adds pacing tooltip details: projected usage by reset, a “Limit in …” ETA when behind pace, and “Limit reached” when already at 100%. Also updates status copy (“You’re good”), extracts tooltip logic to a shared lib, and standardizes reset time formatting.

  • New Features

    • Tooltip shows projected % at reset; when behind, shows “Limit in …” ETA if before reset and “Limit reached” when at/over limit; falls back to status-only when pace data isn’t available.
  • Refactors

    • Extracted tooltip utilities to src/lib/pace-tooltip.ts and reused compact duration for “Resets in …”; simplified pace status logic (zero usage = ahead, over-limit = behind), updated status label to “You’re good”, and added tests.

Written for commit c435fd1. Summary will update on new commits.

@marcjaner marcjaner marked this pull request as draft February 6, 2026 22:04
@macroscopeapp
Copy link
Copy Markdown

macroscopeapp bot commented Feb 6, 2026

Add pacing tooltip projection and limit-hit ETA to provider progress rows and update PaceIndicator accessibility labels

Introduce getPaceStatusText, formatCompactDuration, and buildPaceDetailText for tooltip status and detail lines; update MetricLineRenderer to compute pace, limit-reached state, and detail text; refactor reset text to use compact durations; remove getPaceStatusColor; adjust tests and dark theme popover color. Key files: src/components/provider-card.tsx, src/lib/pace-status.ts, src/lib/pace-tooltip.ts.

📍Where to Start

Start in PaceIndicator and progress rendering within src/components/provider-card.tsx, then review pace classification in src/lib/pace-status.ts and tooltip builders in src/lib/pace-tooltip.ts.


Macroscope summarized c435fd1.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

@robinebers
Copy link
Copy Markdown
Owner

Relates to #86 - taking a look. Thanks Marc!

- Changed pace status text from "Ahead of pace" to "You're good" for better user understanding.
- Updated tooltip content to reflect new status and limit reached conditions.
- Refactored related functions to enhance readability and maintainability, including the introduction of a LIMIT_REACHED constant.
- Adjusted tests to align with the updated status messages and tooltip behavior.
- Removed the LIMIT_REACHED constant and updated related tooltip logic for clarity.
- Simplified the pace status calculation by directly handling edge cases for zero usage and over-limit conditions.
- Improved the PaceIndicator component to accept an isLimitReached prop for better status representation.
- Updated tests to reflect changes in pace status handling and tooltip behavior.
@robinebers robinebers marked this pull request as ready for review February 7, 2026 04:19
@robinebers
Copy link
Copy Markdown
Owner

robinebers commented Feb 7, 2026

@codex review this. Cursor review this.

@robinebers
Copy link
Copy Markdown
Owner

I've refactored this a little bit, cleaned up some code from the overall tooltip logic, changed the copy, and made it respect the left and used toggle in the settings so that it either shows how much you will have left or how much you will have used by the end.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c435fd16f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

nowMs: number
displayMode: DisplayMode
}): string | null {
if (!paceResult || !Number.isFinite(limit) || limit <= 0 || paceResult.projectedUsage === 0) return null
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Show projection for zero usage when data available

In buildPaceDetailText, projectedUsage === 0 forces a null return, so any line with zero usage never shows the “projected % at reset” detail even after enough time has elapsed for a projection. calculatePaceStatus now returns {status:"ahead", projectedUsage: 0} for used === 0, so late‑period zero usage will still render only the status text instead of the projection (e.g., “0% used at reset” / “100% left at reset”), which contradicts the new tooltip spec of showing projected usage when pace data is available. Consider only suppressing when the pace result is unavailable, not when the projection is zero.

Useful? React with 👍 / 👎.

@robinebers robinebers merged commit 0605d4b into robinebers:main Feb 7, 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.

2 participants