Repository navigation
fix(overview): confirm settings actions in-app instead of natively - #30516
Conversation
Importing a config in Replace mode, deleting or dismissing a skill, dismissing all pending skills, and deleting a steering file asked through the browser-native confirm(). In the desktop app that is an OS dialog that blocks the renderer, and on Windows the window can stop taking keyboard input after it closes until it is re-activated (kirodotdev#15976). The Portability, Skills and Steering tabs now ask through the in-app useConfirm dialog. The title is a short action label and the unchanged question is the dialog body, because Modal truncates a title to one line. Each action captures its target before it waits and acts only on a true answer: the chosen import file, mode and memory choice, the skill key, the candidate and its reviewed digest, the candidate queue shown when the question opened, and the steering file with its slot and project. Steering deletion keeps invalidating every steering listing and keeps evicting every cached copy of a deleted user file. For a workspace file it now evicts only the captured project's copies, so another project's file with the same name keeps its cache. The query client sets staleTime: Infinity, so an entry left in the cache is not refetched on its own. Switching the Skills tab to the budget view, including through browser history, or the owning candidate row disappearing, cancels its pending question. Remove the three files from the native-dialog allowlist. Part of kirodotdev#15976
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. Each tab saves its target when the question opens, and that answers the main risk of a dialog that does not block the page. Screenshots of this revision are attached, and the lint allowlist only gets shorter. Notes
[DESIGN-REVIEWED] 780a7e5 Description read[DESCRIPTION-READ] 0b848be4b6babee47dd73a5213e969674c655c6296aaad15ebcdb25b8b63e1cc That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS The screenshots show all five in-app confirmations, plus the narrow-width wrap case. No first-time reader has looked at them, because this fork lane runs no blind read; pushing the branch to this repository would add one. [UX-REVIEWED] 780a7e5 Description read[DESCRIPTION-READ] ba1752bea0f7abce3575f38c13b8b4be874483436fb8f948d1595c5441242365 That sha256 names everything this verdict read: the PR description, plus the 9 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The change replaces five native Notes
What this change shipsInventory (8 items) — 6 justifiedIntent: Settings confirmations open inside the app window, so Windows keyboard focus is not lost (#15976). FIX.
[FIRST-PRINCIPLES-REVIEWED] 780a7e5 Description read[DESCRIPTION-READ] 43586c22a7dcbe8c17ddc668fa983371375483c4cf33654a9914ae47f0e142a5 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
|
Hold for human review at This PR rewrites the confirmation in front of data-deleting actions: skill delete, pending-skill Dismiss and Dismiss All, steering delete, and Replace-mode import. The guard moves from a blocking native What I checked: every action captures its target before awaiting the dialog, so a later selection change cannot redirect it. See SteeringTab.tsx#L925-L935, SkillsTab.tsx#L746 and #L1655. The allowlist only shrinks, and all current-head checks are green. AI findings judged non-blocking
— crew-pr-reviewer (r147) |
bolichen97
left a comment
There was a problem hiding this comment.
Approving 780a7e5. The five native confirm() calls (Replace-mode import, skill delete, dismiss, dismiss all, steering delete) now ask through the in-app useConfirm dialog with the same wording, and the three files leave the shrink-only allowlist in eslint.config.js, which is the direction that gate was built for.
What I checked in the diff: each action captures its target before the question opens (the import file, the skill key, the candidate slug and its content_sha256, the dismiss-all queue as it was, the steering key with its slot and project), so something that changes while the dialog is open cannot redirect the action. The pending delete is cancelled when the tab switches to the budget view. The change adds no regex in product code and no new restriction, and all 93 checks pass on this head.
…30516) Importing a config in Replace mode, deleting or dismissing a skill, dismissing all pending skills, and deleting a steering file asked through the browser-native confirm(). In the desktop app that is an OS dialog that blocks the renderer, and on Windows the window can stop taking keyboard input after it closes until it is re-activated (#15976). The Portability, Skills and Steering tabs now ask through the in-app useConfirm dialog. The title is a short action label and the unchanged question is the dialog body, because Modal truncates a title to one line. Each action captures its target before it waits and acts only on a true answer: the chosen import file, mode and memory choice, the skill key, the candidate and its reviewed digest, the candidate queue shown when the question opened, and the steering file with its slot and project. Steering deletion keeps invalidating every steering listing and keeps evicting every cached copy of a deleted user file. For a workspace file it now evicts only the captured project's copies, so another project's file with the same name keeps its cache. The query client sets staleTime: Infinity, so an entry left in the cache is not refetched on its own. Switching the Skills tab to the budget view, including through browser history, or the owning candidate row disappearing, cancels its pending question. Remove the three files from the native-dialog allowlist. Part of #15976 (cherry picked from commit c6d7c36) Co-authored-by: abirkel <34585063+abirkel@users.noreply.github.com>
Problem / Motivation
Goal: Importing a config in Replace mode, deleting a skill, dismissing one or all pending skills, and deleting a steering file ask for confirmation inside the app window instead of in an OS dialog.
The Portability, Skills and Steering tabs call the browser-native
confirm(). #15854 added the lint gate against new native dialogs and exempted these files, with the other existing callers, in a shrink-only allowlist. On Windows, a nativeconfirm()from the renderer leaves the window ignoring the keyboard until it is re-activated (#15976).Why it matters
These five prompts are among the remaining native calls that can reach the Windows keyboard problem in #15976. Replacing them shrinks that set.
Not a goal
Dismiss Alllabel), leave guards or edit flows.What changed (motivation → approach → change)
Each tab now asks through the in-app
useConfirmdialog. The native question becomes the dialog body unchanged, and the title is the action's own existing label, becauseModaltruncates a title to one line and would hide the warning. The body wraps long names (see the narrow screenshot).The old dialog blocked the page, so nothing could change while it was open. The in-app one does not, so each action captures what it needs first:
PortabilityTab.tsx: the file chosen for the import.SkillsTab.tsx: delete captures the skill key. Dismiss captures the candidate slug and its reviewedcontent_sha256. Dismiss All captures the queue as it was when the question opened, so later arrivals are not dismissed. Each dialog stays with the subcomponent that owns its target. A pending delete is cancelled when the tab switches to the budget view, and a candidate question is cancelled if its row disappears.SteeringTab.tsx: the file key, slot and project are mutation variables, so a project change during the question cannot delete another project's same-named file. The success handler still invalidates every steering listing and still removes every cached copy of a deleteduser/file. For aworkspace/file it now removes only the captured project's copies, so another project's file with the same name keeps its cache. The app's query client usesstaleTime: Infinity, so a cache entry that is not removed is never refetched on its own.website/eslint.config.js: the three paths leave the allowlist. The two comment lines that counted the modules lose the number, matching the same edit in fix(gallery): confirm pack deletion in-app instead of native confirm #30305.Backwards compatibility
Compatible: the actions, labels and locale keys are unchanged, with no new keys. Only the dialog that asks is different.
Removes nothing: the native
confirm()calls are replaced by the in-app dialog and no exported name, key or route is removed.Tests
Every action has tests that Cancel does nothing, that approval acts on the target captured when the question opened, and that the full question renders in a wrapping body. Portability also covers a changed file, mode and memory choice during the question, and unmount. Skills delete covers a selection change, a list reload, a second press while deleting and the switch to the budget view. Dismiss covers a digest refresh and the row disappearing. Dismiss All covers later arrivals and an emptied queue. Steering covers a selection change, a project switch, a second press while deleting, and cache eviction for a
user/and aworkspace/file across three slots withstaleTime: Infinity. The integration test checks the delete endpoint receives the request only after the in-app confirm button is pressed. The converted tests sharewebsite/src/test/confirmAction.ts, a byte-identical copy of the helper added in #30251, so the two merge without conflict.Proof: not provable -- frontend test (prove.py runs Python only).
Manual verification
The real tab components were rendered with stubbed API responses in headless Chromium, and each confirmation was opened by clicking the real control (screenshots below). A live desktop build was not run.
Screenshots / video
Skills tab, delete:
Skills tab at 480 px wide with a 265-character unbroken name (the body wraps and both buttons stay reachable):
The other three dialogs
Related Issues
Part of #15976. Also relates to #15662, which #15854 closed after adding the allowlist.
Sibling sweep
Swept:
git grep -nE "(window\.)?\bconfirm\(" origin/main -- website/src/pages/overview ':!*test*'Swept:
git grep -nE "\b(alert|prompt)\(" origin/main -- website/src/pages/overview ':!*test*'Sibling: website/src/pages/overview/AgentTemplatesTab.tsx:376 -- tracked in #15976 -- allowlisted native confirm, migrated in a later PR of this series.
Sibling: website/src/pages/overview/PromptsTab.tsx:370 -- tracked in #15976 -- allowlisted native confirm, migrated in a later PR of this series.
Sibling: website/src/pages/overview/KiroCrewCfgTab.tsx:255 -- tracked in #15976 -- allowlisted native confirm, migrated in a later PR of this series.
Sibling: website/src/pages/overview/MemoryTab.tsx:134 -- tracked in #15976 -- allowlisted native leave confirm, migrated in a later PR of this series.
Sibling: website/src/pages/overview/AgentCfgTab.tsx:23 -- tracked in #15976 -- allowlisted native alert, migrated in a later PR of this series.
Sibling: website/eslint.config.js -- tracked in #15976 -- the allowlist names every remaining native caller outside this folder.
Checked and not affected: website/src/pages/overview/VectorMemoryCard.tsx:285 and MemoryTab.tsx:309 already await the in-app confirm.
Pattern harvest
Rule candidate: lint
Pattern: renderer calls to native confirm, alert and prompt, already refused outside the allowlist by
no-restricted-globalsandno-restricted-propertiesinwebsite/eslint.config.js(#15854). This PR shrinks that allowlist.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.