improvement(logs): fix trigger badge wrapping, time range picker, status filters, and React anti-patterns#4207
Conversation
…tus filters, and React anti-patterns
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Fixes time-range filtering UX by replacing the Includes small React correctness/cleanup tweaks: stabilizes the search suggestion callback, simplifies derived label computations, makes refresh spinner behavior reusable, and corrects selector display-name lookups to key off Reviewed by Cursor Bugbot for commit 4ec1fa3. Configure here. |
Greptile SummaryThis PR fixes several bugs in the logs feature: the stale-closure time-range revert (via Confidence Score: 5/5Safe to merge — all core bugs are correctly fixed; only a redundant double-call on Cancel remains as a non-functional P2. The three main bugs (stale-closure Apply revert, workflow/table selector type matching, Cancelling filter option) are all correctly addressed. The dateRangeAppliedRef pattern is sound, getSuggestions stabilization is correct, and the subBlock.type fix is a strict improvement. The only remaining issue (handleDatePickerCancel called twice on Cancel) is idempotent and produces no observable difference in behavior. logs-toolbar.tsx and logs.tsx — double-cancel call on the Cancel button path, P2 only. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant DatePicker
participant Toolbar
participant FilterStore
User->>DatePicker: Click Apply
DatePicker->>Toolbar: onRangeChange(start, end)
Toolbar->>Toolbar: dateRangeAppliedRef.current = true
Toolbar->>FilterStore: setDateRange(start, end)
Toolbar->>Toolbar: setDatePickerOpen(false) [queued]
DatePicker->>Toolbar: onOpenChange(false)
Toolbar->>Toolbar: ref=true → reset ref, skip cancel ✓
User->>DatePicker: Click Cancel
DatePicker->>Toolbar: onCancel() → handleDatePickerCancel() [1st]
DatePicker->>Toolbar: onOpenChange(false) → handleDatePickerCancel() [2nd, redundant]
User->>DatePicker: Click Outside / Escape
DatePicker->>Toolbar: onOpenChange(false)
Toolbar->>Toolbar: ref=false → handleDatePickerCancel() ✓
Reviews (2): Last reviewed commit: "fix(logs): prevent DatePicker onOpenChan..." | Re-trigger Greptile |
|
Re: Greptile bug report — Good catch. |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4ec1fa3. Configure here.
Summary
whitespace-nowrapfilterableflag to STATUS_CONFIG)__dev__/mock-logs.ts, tree-shaken in prod)getSuggestionscallback in logs.tsx to fix memo chain instabilityhsl(var(--muted-foreground))withtext-[var(--text-muted)]in line-chartsubBlock.typeinstead ofsubBlock.idfor workflow/table selector display name lookupType of Change
Testing
Tested manually
Checklist