Skip to content

fix(folder-picker): import toast from ui primitive, not sonner#2965

Merged
raquelmsmith merged 1 commit into
mainfrom
posthog-code/fix-folderpicker-sonner-import
Jun 27, 2026
Merged

fix(folder-picker): import toast from ui primitive, not sonner#2965
raquelmsmith merged 1 commit into
mainfrom
posthog-code/fix-folderpicker-sonner-import

Conversation

@raquelmsmith

Copy link
Copy Markdown
Member

Problem

packages/ui/src/features/folder-picker/FolderPicker.tsx imports toast from
sonner, but sonner was removed as a dependency in #2958 ("remove stale sonner
references") and is not declared in any package.json nor present in the
lockfile. #2859 then re-introduced the sonner import, so current main fails
build, typecheck, unit-test, and integration-test for everyone.

Why: unblock CI / local builds on main.

Changes

Import toast from the canonical @posthog/ui/primitives/toast (the same
toast.error(title, { description }) API used by the other 66 call sites in the
codebase). One-line change; no behavior change.

How did you test this?

  • Confirmed sonner is undeclared in every package.json and absent from the
    lockfile, and that FolderPicker.tsx is the only remaining sonner importer.
  • Verified the @posthog/ui/primitives/toast toast.error(title, { description })
    signature matches the existing call.
  • biome check clean on the changed file.

Created with PostHog Code

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
@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit c2207ed.

@greptile-apps

greptile-apps Bot commented Jun 27, 2026

Copy link
Copy Markdown
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
@raquelmsmith raquelmsmith marked this pull request as ready for review June 27, 2026 23:39
@raquelmsmith raquelmsmith added the Stamphog This will request an autostamp by stamphog on small changes label Jun 27, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Trivial one-line fix switching from a direct third-party import to the project's internal toast primitive, consistent with the codebase conventions.

@raquelmsmith raquelmsmith merged commit d5fa6c2 into main Jun 27, 2026
27 checks passed
@raquelmsmith raquelmsmith deleted the posthog-code/fix-folderpicker-sonner-import branch June 27, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant