Repository navigation
Chore: change query log time range - #28052
Conversation
Summary of ChangesHello @iamjoel, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the time range selection mechanism within the application's overview charts. The primary goal is to provide users with more flexible and intuitive options for filtering data by time, including both predefined periods and custom date ranges, thereby improving the overall user experience for data analysis. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new, more flexible time range picker component and integrates it into the app overview page. The changes are well-structured, breaking down the new functionality into smaller, reusable components. I've identified a critical issue with a useCallback hook that could lead to stale state and incorrect behavior. Additionally, there are several instances where dayjs() is called at the module level, which can result in stale date values. I've also included some suggestions to improve code readability and performance. With these fixes, this will be a solid improvement.
There was a problem hiding this comment.
Pull Request Overview
This PR adds a custom time range picker component with locale-aware date formatting for the app overview page. The implementation includes a new date range selection interface with presets (Today, Last 7 Days, Last 30 Days) and custom date pickers.
Key Changes
- Added
formatToLocalTimeutility function to support localized date formatting with dayjs - Enhanced date picker component with optional confirmation mode (
noConfirm) and date validation (getIsDateDisabled) - Implemented new
TimeRangePickercomponent with preset ranges and custom date selection - Updated select component to pass open state to custom trigger renderers
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| web/utils/format.ts | Added locale mapping and formatToLocalTime utility function for internationalized date display |
| web/i18n/*/app-log.ts | Added translations for "Last 30 Days" and "Custom" period options |
| web/app/components/base/select/index.tsx | Updated renderTrigger to receive open state for dynamic styling |
| web/app/components/base/icons/* | Added new HourglassShape icon for time range separator |
| web/app/components/base/date-and-time-picker/* | Enhanced date picker with no-confirm mode and date disabling capability |
| web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/time-range-picker/* | New time range picker components implementing preset and custom date selection |
| web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chart-view.tsx | Replaced inline time period logic with new TimeRangePicker component |
| web/app/components/app/overview/app-chart.tsx | Minor formatting cleanup in tooltip template |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
….tsx Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…time-range-picker/index.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 17 out of 18 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* test: adding some web tests (langgenius#27792) * feat: add validation to prevent saving empty opening statement in conversation opener modal (langgenius#27843) * fix(web): improve the consistency of the inputs-form UI (langgenius#27837) * fix(web): increase z-index of PortalToFollowElemContent (langgenius#27823) * fix: installation_id is missing when in tools page (langgenius#27849) * fix: avoid passing empty uniqueIdentifier to InstallFromMarketplace (langgenius#27802) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * test: create new test scripts and update some existing test scripts o… (langgenius#27850) * feat: change feedback to forum (langgenius#27862) * chore: translate i18n files and update type definitions (langgenius#27868) Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> * Fix/template transformer line number (langgenius#27867) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> * bump vite to 6.4.1 (langgenius#27877) * Add WEAVIATE_GRPC_ENDPOINT as designed in weaviate migration guide (langgenius#27861) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Fix: correct DraftWorkflowApi.post response model (langgenius#27289) Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix Version 2.0.0-beta.2: Chat annotations Api Error langgenius#25506 (langgenius#27206) Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Asuka Minato <i@asukaminato.eu.org> * fix jina reader creadential migration command (langgenius#27883) * fix agent putout the output of workflow-tool twice (langgenius#26835) (langgenius#27087) * fix jina reader transform (langgenius#27922) * fix: prevent fetch version info in enterprise edition (langgenius#27923) * fix(api): fix `VariablePool.get` adding unexpected keys to variable_dictionary (langgenius#26767) Co-authored-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: implement tenant self queue for rag tasks (langgenius#27559) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: -LAN- <laipz8200@outlook.com> * fix: bump brotli to 1.2.0 resloved CVE-2025-6176 (langgenius#27950) Signed-off-by: kenwoodjw <blackxin55+@gmail.com> * docs: clarify how to obtain workflow_id for version execution (langgenius#28007) Signed-off-by: OneZero-Y <aukovyps@163.com> * fix: fix langgenius#27939 (langgenius#27985) * fix: the model list encountered two children with the same key (langgenius#27956) Co-authored-by: haokai <haokai@shuwen.com> * add onupdate=func.current_timestamp() (langgenius#28014) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * chore(deps): bump scipy-stubs from 1.16.2.3 to 1.16.3.0 in /api (langgenius#28025) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix typo in weaviate comment, improve time test precision, and add security tests for get-icon utility (langgenius#27919) Signed-off-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * feat: Add Audio Content Support for MCP Tools (langgenius#27979) * fix: elasticsearch_vector version (langgenius#28028) Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix workflow default updated_at (langgenius#28047) * feat(api): Introduce Broadcast Channel (langgenius#27835) This PR introduces a `BroadcastChannel` abstraction with broadcasting and at-most once delivery semantics, serving as the communication component between celery worker and API server. It also includes a reference implementation backed by Redis PubSub. Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Chore: change query log time range (langgenius#28052) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * tmp ci * fix * chore: Remove trailing space from migration filename (langgenius#28040) * chore: translate i18n files and update type definitions (langgenius#28054) Co-authored-by: iamjoel <2120155+iamjoel@users.noreply.github.com> * tmp ci * fix --------- Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com> Signed-off-by: kenwoodjw <blackxin55+@gmail.com> Signed-off-by: OneZero-Y <aukovyps@163.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com> Co-authored-by: aka James4u <smart.jamesjin@gmail.com> Co-authored-by: Novice <novice12185727@gmail.com> Co-authored-by: yangzheli <43645580+yangzheli@users.noreply.github.com> Co-authored-by: Elliott <105957288+Elliott-byte@users.noreply.github.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: johnny0120 <johnny0120@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Gritty_dev <101377478+codomposer@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: wangjifeng <163279492+kk-wangjifeng@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Boris Polonsky <BorisPolonsky@users.noreply.github.com> Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com> Co-authored-by: Cursx <33718736+Cursx@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Asuka Minato <i@asukaminato.eu.org> Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: red_sun <56100962+redSun64@users.noreply.github.com> Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com> Co-authored-by: -LAN- <laipz8200@outlook.com> Co-authored-by: hj24 <huangjian@dify.ai> Co-authored-by: kenwoodjw <blackxin55+@gmail.com> Co-authored-by: OneZero-Y <aukovyps@163.com> Co-authored-by: wangxiaolei <fatelei@gmail.com> Co-authored-by: Kenn <kennfalcon@gmail.com> Co-authored-by: haokai <haokai@shuwen.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com> Co-authored-by: Will <vvfriday@gmail.com> Co-authored-by: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com> Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: iamjoel <2120155+iamjoel@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
change query log time range and ui.
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods