Display today period current hour as dashed line#480
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAdds period and timezone propagation from TrafficView → TrafficChart → getSettings, initializes dayjs UTC/timezone plugins, and refactors feedback tracking to use a Swetrix import and aligned error variable naming. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@web/app/pages/Project/View/ViewProject.helpers.tsx`:
- Around line 683-697: The formatter error is caused by inconsistent wrapping in
the regionStart ternary/object block around regionStart and regionObj
(references: regionStart, regionObj, chart.x, xAxisSize); fix by running the
project's formatter (oxfmt --write) to normalize the ternary branches and object
formatting, or manually reformat that block so the ternary expressions and the
regionObj literal follow the project's oxfmt style (consistent line breaks and
indentation) and then re-run oxfmt to ensure CI passes.
- Around line 661-697: The region currently created in the today/timezone branch
(regionObj) only sets start which makes the dashed style run to the end of the
series; update the logic that computes regionObj to also set an end timestamp
clipped to the current hour boundary—use the computed currentIndex and chart.x
to choose the next hour boundary (e.g., chart.x[currentIndex] or
chart.x[currentIndex + 1] / the next hour start) when available, otherwise
compute the next hour from nowInTz, and assign that value to regionObj.end so
the dashed region covers only the active hour.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 510ca9c6-fa98-4fc2-a90f-794681666c91
📒 Files selected for processing (4)
docs/components/FeedbackWidget.tsxweb/app/pages/Project/View/ViewProject.helpers.tsxweb/app/pages/Project/tabs/Traffic/TrafficChart.tsxweb/app/pages/Project/tabs/Traffic/TrafficView.tsx
Changes
If applicable, please describe what changes were made in this pull request.
Community Edition support
Database migrations
Documentation
Summary by CodeRabbit
New Features
Chores