From 00b2fcdea3f1eebbbbe829a64e0ef3c15c69362e Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Tue, 11 Aug 2026 18:31:39 -0700 Subject: [PATCH] docs: document the COOP false-resolve limitation of showFeedbackDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Under COOP the popup's opener link is severed, so the SDK deliberately resolves false while the popup stays open and the user can still submit (a feedback submission has no server read-back the way a permission grant does). The documented contract ('resolves to true if the user submitted feedback') was silently wrong on cross-origin-isolated pages — state the limitation in the doc and the SDK jsdoc: false means 'not confirmed', not 'not sent'. --- src/docs/src/UI/showFeedbackDialog.md | 2 ++ src/puter-js/src/modules/UI.js | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/docs/src/UI/showFeedbackDialog.md b/src/docs/src/UI/showFeedbackDialog.md index ea9ca094d..e1bdcc772 100644 --- a/src/docs/src/UI/showFeedbackDialog.md +++ b/src/docs/src/UI/showFeedbackDialog.md @@ -27,6 +27,8 @@ None. ## Return value A `Promise` that resolves to `true` if the user submitted feedback, and `false` if the dialog was dismissed or feedback is unavailable. It never rejects. +On a website that is cross-origin isolated (COOP severs the popup's connection to your page), the promise resolves `false` even though the popup stays open and the user may still submit their feedback there. Treat `false` as "not confirmed", not "not sent". + ## Examples ```html;ui-show-feedback-dialog diff --git a/src/puter-js/src/modules/UI.js b/src/puter-js/src/modules/UI.js index 14b327b78..4deae7995 100644 --- a/src/puter-js/src/modules/UI.js +++ b/src/puter-js/src/modules/UI.js @@ -1684,7 +1684,10 @@ class UI extends EventListener { * * @returns {Promise} `true` when the user submitted feedback, * `false` when the dialog was dismissed or feedback is unavailable. - * Never rejects. + * Never rejects. On a cross-origin-isolated page COOP severs the + * popup's link to the opener, so the promise resolves `false` while + * the popup stays open and the user may still submit — `false` means + * "not confirmed", not "not sent". */ async showFeedbackDialog () { if ( this.env === 'app' ) {