Skip to content

Conversation

@kylengn
Copy link
Contributor

@kylengn kylengn commented Jan 20, 2026

Note

Modernizes the interval selector and its integrations with a modular architecture and streamlined API.

  • Introduces new hook structure: use-interval-selector, use-interval-selector-input, use-interval-selector-navigation, and use-interval-selector-state; removes legacy monolithic logic and interval-selector.utils
  • Replaces value-based API with selection/suggestions model: IntervalSelector now accepts relativeSuggestions and intervalSuggestions (with defaults) and no longer uses value/onValueChange or option/value strings
  • Adds types.ts and utils (constants, format) for clearer types and formatting; generateDurationShortcut now returns the highest present unit; parseTextInterval no longer treats duration shortcuts as intervals
  • Updates IntervalSelectorCalendar and IntervalSelectorSuggestions to operate on IntervalSelection directly; keyboard navigation refactored to work with unified suggestions list
  • Cleans up dashboard context and toolbar by removing intervalValue state/props and wiring directly to selection
  • Testing: adds unit tests for hooks and formatting, refines date formatting tests, introduces test/setup.ts, and splits Vitest config into storybook and unit projects

Written by Cursor Bugbot for commit eda7588. This will update automatically on new commits. Configure here.

@kylengn kylengn self-assigned this Jan 20, 2026
@vercel
Copy link

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
react-ui Ready Ready Preview, Comment Jan 21, 2026 7:00am

Request Review

@argos-ci
Copy link

argos-ci bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 12 changed, 3 added Jan 21, 2026, 7:01 AM

cursor[bot]

This comment was marked as outdated.

@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.


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 and usage tips.

cursor[bot]

This comment was marked as outdated.

…torCalendar and streamline date range handling
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@noe-charmet
Copy link
Contributor

Offering a refactor on the current proposal.

I mainly focused on improving state management and removing all unnecessary bloat.

  • Now all the state thinks with either Duration or Interval object natively.
  • All the date / shortcut parsing and humanizing is done through existing items in this library.
  • Removed as much as possible of the cheap operations outside of the state and straight in the render to make things more easy to comprehend, straight forward, and avoid updates on multiple render cycles.
  • Reworked the Calendar selection to properly start with an empty state on open.

I didn't touche the animation / navigation / mouse handling parts as they are less critical to the behavior of the component. Not sure however how much we need all the ref passing around and editing.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@kylengn kylengn merged commit f62bc06 into feat/interval-selector Jan 21, 2026
6 checks passed
@kylengn kylengn deleted the feat/interval-selector-refactor branch January 21, 2026 07:23
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