fix(folder-picker): import toast from ui primitive, not sonner#2965
Merged
Conversation
FolderPicker imported `toast` from `sonner`, but `sonner` is not a declared dependency (it was removed in #2958) and is absent from the lockfile, so `build` and `typecheck` fail on main. Use the canonical `@posthog/ui/primitives/toast` (the same `toast.error(title, { description })` API) like the other 66 call sites. Generated-By: PostHog Code Task-Id: dc505d33-c219-41c9-ac6b-192caf7730ea
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(folder-picker): import toast from th..." | Re-trigger Greptile |
raquelmsmith
added a commit
that referenced
this pull request
Jun 27, 2026
Unblocks local build/typecheck on this branch, which inherits the broken `sonner` import from main (FolderPicker imports an undeclared dependency). This is the same one-line fix as hotfix PR #2965; once that merges to main and main is merged back in, this resolves identically (no conflict). Kept here so the branch builds locally in the meantime. Generated-By: PostHog Code Task-Id: dc505d33-c219-41c9-ac6b-192caf7730ea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
packages/ui/src/features/folder-picker/FolderPicker.tsximportstoastfromsonner, butsonnerwas removed as a dependency in #2958 ("remove stale sonnerreferences") and is not declared in any
package.jsonnor present in thelockfile. #2859 then re-introduced the
sonnerimport, so currentmainfailsbuild,typecheck,unit-test, andintegration-testfor everyone.Why: unblock CI / local builds on
main.Changes
Import
toastfrom the canonical@posthog/ui/primitives/toast(the sametoast.error(title, { description })API used by the other 66 call sites in thecodebase). One-line change; no behavior change.
How did you test this?
sonneris undeclared in everypackage.jsonand absent from thelockfile, and that
FolderPicker.tsxis the only remainingsonnerimporter.@posthog/ui/primitives/toasttoast.error(title, { description })signature matches the existing call.
biome checkclean on the changed file.Created with PostHog Code