Skip to content

fix: show reset datetime in tooltip#253

Merged
validatedev merged 4 commits intorobinebers:mainfrom
sonwr:feat/reset-tooltip-issue-108
Mar 1, 2026
Merged

fix: show reset datetime in tooltip#253
validatedev merged 4 commits intorobinebers:mainfrom
sonwr:feat/reset-tooltip-issue-108

Conversation

@sonwr
Copy link
Contributor

@sonwr sonwr commented Feb 28, 2026

Summary

  • show reset date/time in the reset tooltip so users can quickly verify the next reset moment
  • keep existing UI behavior unchanged except for additional tooltip detail
  • add tests to validate tooltip rendering and datetime formatting behavior

Testing

  • run project test suite related to the updated UI component
  • verify tooltip content includes reset datetime for expected states

Before / After

  • Before: reset tooltip lacked explicit date/time context
  • After: tooltip includes clear reset datetime to reduce ambiguity

Closes #108


Summary by cubic

Show the exact next reset date/time in provider card tooltips so users can verify the next reset moment. Preserves existing labels and toggle behavior; closes #108.

  • New Features
    • Display “Next reset: <localized date/time>” in a tooltip when resetsAt is valid; no tooltip for invalid timestamps.
    • Add formatResetTooltipText helper with tests (deduped); include before/after screenshots in docs.

Written for commit 2f89185. Summary will update on new commits.

Copy link
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.

1 issue found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/components/provider-card.test.tsx">

<violation number="1" location="src/components/provider-card.test.tsx:264">
P2: Duplicated formatting logic: `formatResetTooltipText` is already imported but not used here. This inline `Intl.DateTimeFormat` construction mirrors the implementation in `src/lib/reset-tooltip.ts` verbatim, creating a maintenance burden. If the format changes, this test must be updated independently. Use the imported function for consistency (as done in the toggle test at line 416).</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@robinebers
Copy link
Owner

Hi Wooram,

Thank you for your contribution.

Would love to see screenshots to understand what the before and after is.

@sonwr
Copy link
Contributor Author

sonwr commented Feb 28, 2026

Thanks for the review — sharing the requested screenshots for clarity:

  • before.png: before the change
image
  • before_toggle.png: before the change, after clicking Resets in ... to toggle to Resets tomorrow at ...
image
  • after_hover.png: after the change, hovering Resets in ... now shows Next reset: ... in a tooltip
image

This PR is a small UI/UX refinement. Since this kind of improvement can be preference-dependent, please feel free to decide based on your product UX direction.
I’m happy to adjust or close it if it doesn’t fit your product style.

@github-actions github-actions bot added the docs label Feb 28, 2026
Copy link
Collaborator

@davidarny davidarny left a comment

Choose a reason for hiding this comment

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

I fixed P2 and removed screenshots from the docs/ folder. Otherwise, looks clean, thanks!

Copy link
Collaborator

@validatedev validatedev left a comment

Choose a reason for hiding this comment

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

Looks clean, no issues! Thank you!

@validatedev validatedev merged commit 8b30e94 into robinebers:main Mar 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hover tooltip on Resets in label to display date time of the reset

4 participants