Skip to content

claude code vibe feat(inference): inline quick-range chips for date selection / 内联快捷日期范围选择器#313

Open
functionstackx wants to merge 1 commit into
masterfrom
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 into
masterfrom
claude/issue-273-20260505-0421

Conversation

@functionstackx

@functionstackx functionstackx commented May 5, 2026

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

中文说明

用内联的 5 个快捷日期范围选择器(7D / 30D / 90D / YTD / All)替换原来隐藏在底部的日期快捷按钮。选择器同时出现在日期触发器下方和日期选择对话框顶部,方便常用用户一键选择时间窗口。数据不足的选项以禁用状态显示提示。选择结果通过 URL 参数完整往返,并记录分析事件。

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

vercel Bot commented May 5, 2026

Copy link
Copy Markdown

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

@functionstackx functionstackx changed the title claude code vibe feat(inference): inline quick-range chips for date selection claude code vibe feat(inference): inline quick-range chips for date selection / 内联快捷日期范围选择器 Jul 4, 2026
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