Skip to content

fix(overview): confirm settings actions in-app instead of natively - #30516

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
abirkel:fix/native-dialog-m05-overview
Nov 7, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
abirkel:fix/native-dialog-m05-overview

Conversation

@abirkel

@abirkel abirkel commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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 native confirm() 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

  • Migrating any other allowlisted file. Each remaining one has its own PR in this series.
  • Changing the confirmation wording, the visible buttons (including the Dismiss All label), leave guards or edit flows.

What changed (motivation → approach → change)

Each tab now asks through the in-app useConfirm dialog. The native question becomes the dialog body unchanged, and the title is the action's own existing label, because Modal truncates 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 reviewed content_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 deleted user/ file. For a workspace/ 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 uses staleTime: 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 a workspace/ file across three slots with staleTime: Infinity. The integration test checks the delete endpoint receives the request only after the in-app confirm button is pressed. The converted tests share website/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 delete

Skills tab at 480 px wide with a 265-character unbroken name (the body wraps and both buttons stay reachable):

Long name

The other three dialogs

Portability replace import

Skills dismiss candidate

Skills dismiss all

Steering delete

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-globals and no-restricted-properties in website/eslint.config.js (#15854). This PR shrinks that allowlist.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

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
@abirkel
abirkel requested review from a team and KiroCrewCaptain as code owners November 5, 2026 15:38
@abirkel
abirkel requested a review from chenmingwei23 November 5, 2026 15:38
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 780a7e5f7da3401a5f32fdefed0354c6e0774c92 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • SteeringTab.tsx now evicts a workspace/ detail only when queryKey[3] === (projectKey ?? null). The read key at line 458 normalizes to null, but the save path at line 508 writes draftProjectKey ?? projectKey, which can be undefined. That cache entry would then miss the eviction and live on under staleTime: Infinity. Normalize the writer the same way, or match both values.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of 780a7e5f7da3401a5f32fdefed0354c6e0774c92 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 780a7e5f7da3401a5f32fdefed0354c6e0774c92 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The change replaces five native confirm() calls with the existing useConfirm and shrinks the allowlist that #15854 made shrink-only. Two riders are notes.

Notes

What this change ships

Inventory (8 items) — 6 justified

Intent: Settings confirmations open inside the app window, so Windows keyboard focus is not lost (#15976). FIX.

  1. Replace-mode import asks in an in-app dialog — justified
  2. Skill delete asks in an in-app dialog, for the captured key — justified
  3. Candidate Dismiss and Dismiss All ask in-app, with the queue snapshotted — justified
  4. Steering delete asks in-app, with key/slot/project captured — justified
  5. Skill delete question is cancelled when the budget view opens — justified
  6. Empty pending panel stays mounted (hidden) to host the dialog — justified
  7. Workspace steering delete no longer evicts other projects' cached copies — rides along
  8. New test helper confirmAction.ts, copied from fix(dashboard): settle useConfirm asks when their dialog disappears #30251 — duplicate of fix(dashboard): settle useConfirm asks when their dialog disappears #30251's helper

[FIRST-PRINCIPLES-REVIEWED] 780a7e5

Description read

[DESCRIPTION-READ] 43586c22a7dcbe8c17ddc668fa983371375483c4cf33654a9914ae47f0e142a5

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 780a7e5f7da3401a5f32fdefed0354c6e0774c92 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 780a7e5

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 780a7e5f7da3401a5f32fdefed0354c6e0774c92 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 780a7e5

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 5, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 6, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Hold for human review at 780a7e5f7da3401a5f32fdefed0354c6e0774c92. I found no defect.

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 confirm() to an async in-app dialog. That is a behaviour change, not a mechanical move, so it is reserved for a human reviewer.

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

  • Design (Notes): a save with an undefined project key would escape steering eviction. Does not block: TanStack hashes undefined like null in a key array, so the save updates the read's existing entry, which is stored with ?? null (#L460). The updater creates no entry when none exists (#L509-L512).
  • First Principles (item 7): the narrowed workspace/ eviction rides along. Does not block: it is correct and tested, and it only stops evicting another project's file (#L557).
  • First Principles (item 8): confirmAction.ts copies fix(dashboard): settle useConfirm asks when their dialog disappears #30251's helper. Does not block: it is test-only and byte-identical, so the second PR to merge has no content conflict (confirmAction.ts).

— crew-pr-reviewer (r147)

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@bolichen97
bolichen97 merged commit c6d7c36 into kirodotdev:main Nov 7, 2026
140 of 143 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 7, 2026
buluoray added a commit that referenced this pull request Nov 8, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants