claude code vibe feat(inference): inline quick-range chips for date selection / 内联快捷日期范围选择器#313
Open
functionstackx wants to merge 1 commit into
Open
claude code vibe feat(inference): inline quick-range chips for date selection / 内联快捷日期范围选择器#313functionstackx wants to merge 1 commit into
functionstackx wants to merge 1 commit into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.quick-range-presetslib (pure helpers, colocated test)QuickRangeChipscomponent shared between inline and dialog usesinference_quick_range_selected { id, source: 'inline'|'dialog', ... }analytics?i_dstart=...&i_dend=...auto-lights the matching chipTest plan
pnpm typecheck✅pnpm lint✅pnpm fmt✅pnpm test:unit— 1745/1745 app unit tests pass; pre-existing db TLS failures unrelatedquick-range-chips.cy.ts(4 cases)/inference?i_gpus=b200_sglang: chips render, "All" lights up after click, chart plots real data (10/01/2025+03/25/2026curves), dialog "Quick range" row appears above the calendar🤖 Generated with Claude Code
中文说明
用内联的 5 个快捷日期范围选择器(7D / 30D / 90D / YTD / All)替换原来隐藏在底部的日期快捷按钮。选择器同时出现在日期触发器下方和日期选择对话框顶部,方便常用用户一键选择时间窗口。数据不足的选项以禁用状态显示提示。选择结果通过 URL 参数完整往返,并记录分析事件。