Skip to content

claude code vibe feat(inference): inline quick-range chips for date selection#313

Open
functionstackx wants to merge 1 commit intomasterfrom
claude/issue-273-20260505-0421
Open

claude code vibe feat(inference): inline quick-range chips for date selection#313
functionstackx wants to merge 1 commit intomasterfrom
claude/issue-273-20260505-0421

Conversation

@functionstackx
Copy link
Copy Markdown
Contributor

Closes #273

Summary

Replaces the footer-buried "Max Range / Last 90 Days / Last 30 Days" buttons with a 5-chip preset row (7D · 30D · 90D · YTD · All) rendered inline under the date-range trigger AND lifted to the top of the picker dialog. The inline placement gives repeat users a one-click path to a sensible window; the elevated dialog placement gives newcomers an obvious starting point the moment they open the picker.

  • New quick-range-presets lib (pure helpers, colocated test)
  • New QuickRangeChips component shared between inline and dialog uses
  • Disabled chips show "Not enough data points in this window" tooltip
  • inference_quick_range_selected { id, source: 'inline'|'dialog', ... } analytics
  • Round-trips through URL: a shared ?i_dstart=...&i_dend=... auto-lights the matching chip

Test plan

  • pnpm typecheck
  • pnpm lint
  • pnpm fmt
  • pnpm test:unit — 1745/1745 app unit tests pass; pre-existing db TLS failures unrelated
  • New Cypress e2e quick-range-chips.cy.ts (4 cases)
  • Verified in Playwright at /inference?i_gpus=b200_sglang: chips render, "All" lights up after click, chart plots real data (10/01/2025 + 03/25/2026 curves), dialog "Quick range" row appears above the calendar

🤖 Generated with Claude Code

Closes #273

Replace the footer-buried "Max Range / Last 90 Days / Last 30 Days" buttons
with a 5-chip preset row (7D · 30D · 90D · YTD · All) rendered inline under
the date-range trigger AND lifted to the top of the picker dialog. The
inline placement gives repeat users a one-click path to a sensible window;
the elevated dialog placement gives newcomers an obvious starting point
the moment they open the picker.

- New `quick-range-presets` lib with pure helpers:
  - `buildQuickRangePresets(today)` returns 5 presets with `getRange()`
    that returns null when fewer than 2 in-window dates exist.
  - `matchActivePreset()` round-trips a {start,end} back to the chip id
    that produced it, so URL-restored ranges light up the matching chip.
- New `QuickRangeChips` component shared between inline and dialog uses,
  with disabled chips wrapped in tooltips ("Not enough data points in
  this window") for discoverability.
- `inference_quick_range_selected { id, source: 'inline'|'dialog', ... }`
  analytics event on every chip click.
- Removes the in-dialog footer row of legacy buttons; existing
  `date_range_picker_*` events for opens/closes/applies/manual clicks
  are preserved.

Verified end-to-end at /inference?i_gpus=b200_sglang: chips render,
"All" lights up after click, both dated lines (2025-10-01 and 2026-03-25)
plot real data, dialog row displays above the calendar.

Co-authored-by: functionstackx <functionstackx@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

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

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview, Comment May 5, 2026 4:48am

Request Review

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.

Historical view redesign

1 participant