Skip to content

fix: ensure store item picker registers picker:open on first open#2001

Merged
willeastcott merged 3 commits intomainfrom
fix/store-picker-close-warning
Apr 13, 2026
Merged

fix: ensure store item picker registers picker:open on first open#2001
willeastcott merged 3 commits intomainfrom
fix/store-picker-close-warning

Conversation

@willeastcott
Copy link
Copy Markdown
Contributor

Summary

  • Fixes "picker:close fired for already closed picker storeitem" console warning when clicking the back arrow in the Store item picker
  • The store item panel was created with hidden=false (the PCUI default), so the first open never triggered a hidden transition — the show event never fired and picker:open was never registered in the picker tracking system
  • Creates the panel with hidden: true and explicitly sets hidden = false after appending, ensuring the show event fires and picker:open is properly paired with picker:close

The store item panel was created with hidden=false (the PCUI default), so the
first open never triggered a hidden transition and the 'show' event never fired.
This meant picker:open was never registered, causing a "picker:close fired for
already closed picker storeitem" warning when navigating back with the back arrow.

Fix by creating the panel with hidden:true and explicitly setting hidden=false
after appending, so the transition fires 'show' and registers picker:open.

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
editor Ready Ready Preview, Comment Apr 13, 2026 3:20pm

Request Review

@willeastcott willeastcott requested a review from Copilot April 13, 2026 15:08
@willeastcott willeastcott self-assigned this Apr 13, 2026
@willeastcott willeastcott added the bug Something isn't working label Apr 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an event-tracking mismatch in the Store item picker by ensuring the panel’s first “open” produces a real hidden: true -> false transition, so picker:open is emitted before a corresponding picker:close.

Changes:

  • Initialize the Store item picker panel with hidden: true to force a first-time show transition.
  • After appending the panel into the store UI, explicitly set hidden = false to trigger the show event and register picker:open.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/editor/pickers/store/picker-storeitem.ts
@willeastcott willeastcott merged commit 0079286 into main Apr 13, 2026
7 checks passed
@willeastcott willeastcott deleted the fix/store-picker-close-warning branch April 13, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants