Add recents global nav action - #4012
Conversation
Generated-By: PostHog Code Task-Id: f68869f0-4c94-4017-add1-ce18b6a323b3
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Generated-By: PostHog Code Task-Id: f68869f0-4c94-4017-add1-ce18b6a323b3
| const { mutate } = useMutation({ | ||
| mutationFn: (input: RecentEngagementInput) => | ||
| client.recents.record.mutate(input), | ||
| onSuccess: () => | ||
| queryClient.invalidateQueries(trpc.recents.list.pathFilter()), |
There was a problem hiding this comment.
Recents failures lack diagnostics
Every engagement write uses a void, fire-and-forget mutation with no error handler, so authentication, connectivity, missing-canvas, and backend failures leave recent items absent without any user feedback or diagnostic signal.
Rule Used: Always wrap asynchronous calls that may fail, such... (source)
Learned From
PostHog/posthog#32098
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/ui/src/features/recents/useRecents.ts
Line: 23-27
Comment:
**Recents failures lack diagnostics**
Every engagement write uses a void, fire-and-forget mutation with no error handler, so authentication, connectivity, missing-canvas, and backend failures leave recent items absent without any user feedback or diagnostic signal.
**Rule Used:** Always wrap asynchronous calls that may fail, such... ([source](https://app.greptile.com/posthog-org-19734/-/custom-context?memory=df81f021-48c3-45e4-981f-7348133f5f7a))
**Learned From**
[PostHog/posthog#32098](https://github.com/PostHog/posthog/pull/32098)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Prompt To Fix All With AI### Issue 1
packages/ui/src/features/recents/useRecents.ts:23-27
**Recents failures lack diagnostics**
Every engagement write uses a void, fire-and-forget mutation with no error handler, so authentication, connectivity, missing-canvas, and backend failures leave recent items absent without any user feedback or diagnostic signal.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "refactor: back recents with server engag..." | Re-trigger Greptile |
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
Generated-By: PostHog Code Task-Id: f68869f0-4c94-4017-add1-ce18b6a323b3
Generated-By: PostHog Code Task-Id: f68869f0-4c94-4017-add1-ce18b6a323b3
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
Problem
Frequently revisited tasks and canvases need a fast, global way back without navigating through individual spaces.
Changes
Why: Recent work should remain one hover or click away wherever someone is in the app.
How did you test this?
Automatic notifications
Created with PostHog Code