Conversation
|
📝 WalkthroughWalkthroughThis change refactors multiple React hooks and components across the dashboard application to replace locally memoized timestamps (using Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant LogsRefresh
participant useQueryTimeProvider
participant TRPCQueryCache
User->>LogsRefresh: Click Refresh Button
LogsRefresh->>useQueryTimeProvider: refreshQueryTime()
LogsRefresh->>TRPCQueryCache: Invalidate relevant queries
sequenceDiagram
participant Component
participant useQueryTimeProvider
participant TRPCHook
Component->>useQueryTimeProvider: Get current timestamp
Component->>TRPCHook: Fetch data with timestamp as startTime/endTime
TRPCHook-->>Component: Return data
Possibly related PRs
Suggested reviewers
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/dashboard/app/(app)/logs/components/table/hooks/use-logs-query.test.ts(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (15)
- GitHub Check: Test Packages / Test ./apps/dashboard
- GitHub Check: Test Packages / Test ./packages/rbac
- GitHub Check: Test Packages / Test ./packages/nextjs
- GitHub Check: Test Packages / Test ./packages/hono
- GitHub Check: Test Packages / Test ./packages/cache
- GitHub Check: Test Packages / Test ./packages/api
- GitHub Check: Test Packages / Test ./internal/clickhouse
- GitHub Check: Test Packages / Test ./internal/resend
- GitHub Check: Test Packages / Test ./internal/keys
- GitHub Check: Test Packages / Test ./internal/id
- GitHub Check: Test Packages / Test ./internal/hash
- GitHub Check: Test Packages / Test ./internal/encryption
- GitHub Check: Test Packages / Test ./internal/billing
- GitHub Check: autofix
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
apps/dashboard/app/(app)/logs/components/table/hooks/use-logs-query.test.ts (1)
9-15: Mock implementation matches refactoring intentThe added mock for
@/providers/query-time-providerproperly supports the refactoring to use a shared timestamp source instead of localDate.now()calls. The implementation correctly provides a fixed query time based onmockDateand a mock for therefreshQueryTimefunction.
What does this PR do?
Prevent revalidation of the log and charts if time params don't change. This PR is also a continuation of #3147 see this for more detail and how to test.
Type of change
How should this be tested?
Checklist
Required
pnpm buildpnpm fmtconsole.logsgit pull origin mainAppreciated
Summary by CodeRabbit