Skip to content

Insights fix#644

Merged
feruzm merged 4 commits into
developfrom
stats
Feb 4, 2026
Merged

Insights fix#644
feruzm merged 4 commits into
developfrom
stats

Conversation

@feruzm
Copy link
Copy Markdown
Member

@feruzm feruzm commented Feb 4, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Fixed modal and dropdown interaction in the wallet operations dialog for improved usability.
    • Ensured analytics data is always refreshed and current (no stale cached results).
  • Documentation

    • Updated changelogs for SDK and wallets with the new patch version.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

Normalized API date-range destructuring, adjusted wallet dialog click handling to use capture-phase interception and explicit dropdown closing, and made analytics query keys deterministic by sorting metrics/dimensions and forcing fresh results.

Changes

Cohort / File(s) Summary
API Route Parameter Normalization
apps/web/src/app/api/stats/route.ts
Changed destructuring to read date_range as dateRange to match downstream camelCase usage in outgoing payload.
Wallet Dialog Event Handling
apps/web/src/features/wallet/wallet-operations-dialog.tsx
Added useContext/DropdownContext usage, switched onClickonClickCapture, stop propagation during capture, reset modal state on open, and explicitly close dropdown via setDropdownShow(false).
Analytics Query Optimization
packages/sdk/src/modules/analytics/queries/get-page-stats-query-options.ts
Sorts dimensions and metrics for deterministic queryKey to avoid cache fragmentation; sets staleTime: 0 to force fresh data when range changes.
Package/version bumps & changelogs
packages/sdk/package.json, packages/wallets/package.json, packages/sdk/CHANGELOG.md, packages/wallets/CHANGELOG.md
Bumped package versions to 1.5.27 and added corresponding changelog entries; no API/signature changes.
Manifest
package.json
Minor single-line change (context in repo manifest).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Click caught in the air, I leap,
I hush the dropdown, tidy the heap,
Keys are sorted, caches wake,
Dates align for data's sake,
A tiny hop, the app sings neat.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Insights fix' is vague and does not clearly describe the specific changes made in the pull request, which involve query key determinism, dropdown behavior fixes, and date range parameter refactoring. Consider a more descriptive title that captures the main technical changes, such as 'Fix analytics query caching and dropdown state management' or 'Ensure deterministic analytics query keys and fix dropdown behavior'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch stats

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@apps/web/src/features/wallet/wallet-operations-dialog.tsx`:
- Line 39: The component calls setDropdownShow from useContext(DropdownContext)
but doesn't guard against the context being undefined; update the destructuring
or the call to handle a missing provider—for example, change the extraction of
setDropdownShow from useContext(DropdownContext) to provide a safe default
(e.g., const { setShow: setDropdownShow = () => {} } =
useContext(DropdownContext) ?? {}) or use optional chaining where it’s invoked
(setDropdownShow?.(false)); ensure references to setDropdownShow in
wallet-operations-dialog.tsx (the destructuring and the call site) are updated
accordingly.

Comment thread apps/web/src/features/wallet/wallet-operations-dialog.tsx
@feruzm feruzm added the patch Bug fixes and patches (1.0.0 → 1.0.1), add this only if any packages/ have patch changes in PR label Feb 4, 2026
@feruzm feruzm merged commit 58f78a3 into develop Feb 4, 2026
1 check passed
@feruzm feruzm deleted the stats branch February 4, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Bug fixes and patches (1.0.0 → 1.0.1), add this only if any packages/ have patch changes in PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant