fix: restore mobile transitions and sonar coverage - #12
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6fafded25e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const locale = i18n.language; | ||
| const dateFnsLocale = locale === "pt-BR" ? ptBR : enUS; | ||
|
|
||
| const { data: fetchedLogs } = useHabitLogs(externalLogs ? null : habitId); |
There was a problem hiding this comment.
Skip logs query when parent already loads full detail
This call triggers a second logs request whenever HabitCalendar is rendered with logs === null (the initial state in HabitDetailDrawer while useHabitFullDetail is still loading). Because useHabitFullDetail already returns logs, opening the drawer now issues two API calls for the same log data on the first load, which increases latency and unnecessary backend traffic. Gate this query on an explicit loading state from the parent (or pass an empty-array sentinel) so only one source fetches logs.
Useful? React with 👍 / 👎.
… guards (#12) (#324) Root cause: setMenuVisible ran only inside an async measureInWindow callback that silently no-ops on Android Fabric release builds. Now opens synchronously via a centralized useAnchoredMenu hook + MenuAnchorHost (all 4 sites) with a fallback anchor. Guards: behavioral test (menu opens when measureInWindow never fires / ref null) + no-gorhom-sheet lint rule (bans gorhom + imperative sheet present/dismiss outside the wrapper). Web unaffected (DOM Popover). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>


No description provided.