Skip to content

Comments

Add popupClose action support for apps#6310

Merged
lkostrowski merged 5 commits intomainfrom
FRS-228
Feb 3, 2026
Merged

Add popupClose action support for apps#6310
lkostrowski merged 5 commits intomainfrom
FRS-228

Conversation

@lkostrowski
Copy link
Member

@lkostrowski lkostrowski commented Feb 3, 2026

Summary

  • Added support for the popupClose action from @saleor/app-sdk, allowing apps to programmatically close popups via code
  • Implemented useHandlePopupCloseAction handler in appActionsHandler.ts that calls deactivate() on the active app extension and returns an OK response
  • Wired the new handler into useAppActions to handle popupClose action type from app iframes
  • Added unit tests for the new popupClose action handler

Depends on: saleor/app-sdk#488 (app-sdk release with PopupClose type)

Test plan

  • Verify that an app running in a popup iframe can send a popupClose action to close itself
  • Verify existing app actions (notifications, redirects, form updates) still work correctly
  • Unit tests pass: pnpm run test:quiet src/extensions/views/ViewManifestExtension/components/AppFrame/appActionsHandler.test.ts

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 3, 2026 09:34
@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: 8cb48a2

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lkostrowski lkostrowski changed the title popupClose action support for apps Add popupClose action support for apps Feb 3, 2026
Copy link
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

Adds Dashboard-side handling for the new App SDK popupClose action so apps running in an embedded frame can request closing the popup.

Changes:

  • Wire popupClose into the useAppActions dispatcher.
  • Implement useHandlePopupCloseAction that deactivates the active app extension popup and responds with { ok: true }.
  • Add a unit test for the new handler and introduce a changeset entry for the release.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/extensions/views/ViewManifestExtension/components/AppFrame/useAppActions.ts Routes incoming popupClose messages to the new handler.
src/extensions/views/ViewManifestExtension/components/AppFrame/appActionsHandler.ts Adds useHandlePopupCloseAction that deactivates the popup and returns a response status.
src/extensions/views/ViewManifestExtension/components/AppFrame/appActionsHandler.test.ts Adds coverage for the popup close handler and mocks useActiveAppExtension.
.changeset/every-terms-drive.md Release note for App SDK update + popupClose support.

@lkostrowski lkostrowski marked this pull request as ready for review February 3, 2026 12:54
Copilot AI review requested due to automatic review settings February 3, 2026 12:54
@lkostrowski lkostrowski requested a review from a team as a code owner February 3, 2026 12:54
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Differences Found

✅ No packages or licenses were added.

Summary

Expand
License Name Package Count Packages
0BSD 1
Packages
  • tslib
CC0-1.0 1
Packages
  • type-fest
MIT/X11 1
Packages
  • nub
MPL-1.1 1
Packages
  • harmony-reflect
MPL-2.0 1
Packages
  • dompurify
Public Domain 1
Packages
  • jsonify
Python-2.0 1
Packages
  • argparse
WTFPL 1
Packages
  • utf8-byte-length
<<missing>> 2
Packages
  • busboy
  • streamsearch
CC-BY-4.0 2
Packages
  • @saleor/macaw-ui
  • caniuse-lite
SEE LICENSE IN LICENSE 2
Packages
  • posthog-js
  • spawndamnit
BlueOak-1.0.0 4
Packages
  • glob
  • lru-cache
  • minimatch
  • path-scurry
BSD-2-Clause 23
Packages
  • browser-process-hrtime
  • css-select
  • css-what
  • domelementtype
  • domhandler
  • domutils
  • dotenv
  • dotenv-expand
  • entities
  • escodegen
  • eslint-scope
  • espree
  • esprima
  • esrecurse
  • estraverse
  • esutils
  • nth-check
  • regjsparser
  • stringify-object
  • terser
  • And 3 more...
BSD-3-Clause 42
Packages
  • @saleor/app-sdk
  • @sentry/cli
  • @sentry/cli-darwin
  • @sentry/cli-linux-arm
  • @sentry/cli-linux-arm64
  • @sentry/cli-linux-i686
  • @sentry/cli-linux-x64
  • @sentry/cli-win32-arm64
  • @sentry/cli-win32-i686
  • @sentry/cli-win32-x64
  • @sinonjs/commons
  • @sinonjs/fake-timers
  • abab
  • asn1js
  • babel-plugin-istanbul
  • chroma-js
  • dataloader
  • diff
  • esquery
  • exenv
  • And 22 more...
ISC 47
Packages
  • @istanbuljs/load-nyc-config
  • anymatch
  • boolbase
  • cli-width
  • cliui
  • electron-to-chromium
  • fastq
  • flatted
  • fs.realpath
  • get-caller-file
  • get-own-enumerable-property-symbols
  • glob
  • glob-parent
  • graceful-fs
  • inflight
  • inherits
  • ini
  • isexe
  • knip
  • lru-cache
  • And 27 more...
Apache-2.0 54
Packages
  • @editorjs/editorjs
  • @eslint/config-array
  • @eslint/config-helpers
  • @eslint/core
  • @eslint/object-schema
  • @eslint/plugin-kit
  • @humanfs/core
  • @humanfs/node
  • @humanwhocodes/module-importer
  • @humanwhocodes/retry
  • @opentelemetry/api
  • @opentelemetry/semantic-conventions
  • @playwright/test
  • @pollyjs/adapter
  • @pollyjs/core
  • @pollyjs/persister
  • @pollyjs/utils
  • @swc/core
  • @swc/core-darwin-arm64
  • @swc/core-darwin-x64
  • And 34 more...
MIT 1293
Packages
  • @adobe/css-tools
  • @apollo/client
  • @ardatan/relay-compiler
  • @ardatan/sync-fetch
  • @babel/code-frame
  • @babel/compat-data
  • @babel/core
  • @babel/generator
  • @babel/helper-annotate-as-pure
  • @babel/helper-compilation-targets
  • @babel/helper-create-class-features-plugin
  • @babel/helper-globals
  • @babel/helper-member-expression-to-functions
  • @babel/helper-module-imports
  • @babel/helper-module-transforms
  • @babel/helper-optimise-call-expression
  • @babel/helper-plugin-utils
  • @babel/helper-replace-supers
  • @babel/helper-skip-transparent-expression-wrappers
  • @babel/helper-string-parser
  • And 1273 more...

Copy link
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

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines 3 to +5
minimumReleaseAge: 720 # 12h
minimumReleaseAgeExclude:
- "@saleor/app-sdk"
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

minimumReleaseAgeExclude for @saleor/app-sdk weakens the workspace’s supply-chain safeguard (allows installing very newly published versions). If this is intended as a temporary workaround for the SDK release, consider documenting the rationale (e.g., comment in the file / PR description) and/or scoping a plan to remove the exclusion once the release has aged.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.59%. Comparing base (0bdad3e) to head (8cb48a2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...festExtension/components/AppFrame/useAppActions.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6310    +/-   ##
========================================
  Coverage   42.58%   42.59%            
========================================
  Files        2497     2497            
  Lines       43373    43384    +11     
  Branches    10231     9851   -380     
========================================
+ Hits        18470    18479     +9     
- Misses      24866    24868     +2     
  Partials       37       37            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lkostrowski lkostrowski merged commit 3693eb4 into main Feb 3, 2026
19 checks passed
@lkostrowski lkostrowski deleted the FRS-228 branch February 3, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants