Repository navigation
Conversation
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Each item comes from #15976 (a native Notes
What this change shipsInventory (10 items) — 7 justifiedIntent: stop four destructive actions in apps from opening a native OS dialog that breaks the keyboard on Windows. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 059b8e2 Description read[DESCRIPTION-READ] 713e0f823dfb76ef13bd73e13ef63064f995897dd83e35eb41b3977c51303f55 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: each confirmation captures its target before asking, and the take-away readers listed ( Notes
[DESIGN-REVIEWED] 059b8e2 Description read[DESCRIPTION-READ] 68c7db0591d01001d5ce567b28aef531f3e5fa0f28f31648ca130136c3e9eb51 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) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the Auto Improvement commit-failure row. The diff restyles it as an inline Evidence gaps
Notes
[UX-REVIEWED] 059b8e2 Description read[DESCRIPTION-READ] 9544f066d98162e216a4def18205a3303b4a7617d6d822e59ff64d302f956cd0 That sha256 names everything this verdict read: the PR description, plus the 11 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 |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
22f9834 to
dd7f77c
Compare
3f5ed53 to
eccb220
Compare
|
HOLD (policy: data-deleting paths) at This PR replaces the native I found no concrete defect. Each action captures its target before the question and acts only on that target (Meetings, Papyrus, Design Tweak). Repeat presses are ignored. The Auto Improvement commit re-checks its target at dispatch (AutoImprovementPage.tsx#L302-L309). CI is green at this head. AI findings judged non-blocking
— crew-pr-reviewer (r148) |
eccb220 to
1947616
Compare
1947616 to
ecf76ef
Compare
ecf76ef to
c2044bd
Compare
Code change approver recommendation: A person should decideWhy: the decider raised 1 possible problem and estimates a 65% chance that this change introduces a defect; a person should check it. The migration from native confirm() to useConfirm in the four pages is careful. Each action captures its target before asking, ignores repeat presses, and has tests. But auto-improvement is an adopted, pinned app, and AGENTS.md requires the fix to land in its app repository first, with the PR naming that commit. The PR names no auto-improvement app commit, and PR Hygiene fails for exactly this reason. Adopted hosts would keep the native dialog, so the stated goal is only met on the wheel-copy path. The Papyrus app reference is also a PR number, not the required commit sha. Secondary, and fail-safe: a refused commit after a target change can be silent. Things to check (possible problems the decider raised; at this confidence many turn out to be fine):
An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
c2044bd to
c272d93
Compare
Deleting a meeting, a Design Tweak request or a Papyrus paper, and committing an Auto Improvement finding, 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). Each page now asks 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. Every action captures its target before it waits and acts only on a true answer. Auto Improvement also compares the captured repository, URL, clone and branch with the latest configuration inside the mutation, immediately before the request, so a change while the question is open sends nothing. Design Tweak's new guard covers the question only, so deleting a different request while one is in flight still works. Meetings renders its dialog in the list, meeting and settings views. Add apps.meetings.list.deleteMeetingButton for the Meetings dialog's confirm button, and remove the four files from the native-dialog allowlist. Part of kirodotdev#15976
c272d93 to
059b8e2
Compare
Problem / Motivation
Goal: Deleting a meeting, a Design Tweak request or a Papyrus paper, and committing an Auto Improvement finding, ask for confirmation inside the app window instead of in an OS dialog.
These four actions 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 four prompts are among the remaining native calls that can reach the Windows keyboard problem in #15976. Replacing them shrinks that set.
Not a goal
useConfirmcaller today and gets its own change.What changed (motivation → approach → change)
Each page now asks through the in-app
useConfirmdialog. The native question becomes the dialog body unchanged, and the title is a short action label, becauseModaltruncates a title to one line and would hide the warning.The old dialog blocked the page, so the target could not change while it was open. The in-app one does not, so each action captures its target first and uses only that:
AutoImprovementPage.tsx: captures the fingerprint and the repository, URL, clone and branch. Inside the mutation, immediately before the request, it compares those four with the latest configuration and sends nothing if any differ, including after an offline resume.useDesignTweakPageState.ts(withDesignTweakPage.tsx): the delete action moves into the state hook that already owns the page's requests. The new guard covers the question only, so deleting a different request while one is in flight still works.MeetingsPage.tsx: renders the dialog in the list, meeting and settings views. Adds the dialog-only keyapps.meetings.list.deleteMeetingButtonto the English catalog, the eleven translations anden-XA.json.ProjectList.tsx: the confirm button uses the existingcomponents.commentsSidebar.deletelabel and keeps the paper name in the body. That avoids a new key but borrows another component's string, and a dedicated key is easy to add if preferred.website/eslint.config.js: the four paths leave the allowlist.Backwards compatibility
Compatible: the actions, labels and locale keys that exist today are unchanged. Only the dialog that asks is different, plus one new locale key.
The Design Tweak state hook stops exporting
errMsgand stops returningsetStatusandrefresh, because the delete action that used them moved into the hook.Reader: website/src/apps/design-tweak/DesignTweakPage.tsx:errMsg -- app -- its only use was the delete action, which moved into the hook with it
Reader: website/src/apps/design-tweak/DesignTweakPage.tsx:setStatus, refresh -- app -- only the delete action read them from the hook, and it now lives inside the hook
Tests
Each surface has tests for: Cancel does nothing; approval acts on the target captured when the question opened, even if the list, filter, project or queue changes during the question; a second press is ignored; and the full question renders in the dialog body. Meetings also checks that the dialog stays rendered after switching to the meeting or settings view. Auto Improvement also covers a change to any of the four target fields during the question, after approval before the request, and during an offline pause. Design Tweak covers deleting a different request during a pending call. Six of the seven touched test files 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 page 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
Meetings, dark theme:
Papyrus project list, light theme:
Auto Improvement, Design Tweak and the other themes
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/apps ':!*test*'Sibling: website/src/apps/papyrus/PapyrusPage.tsx:1011 -- tracked in #15976 -- allowlisted native confirm, migrated in a later PR of this series.
Sibling: website/src/apps/crew-companion/GalleryPanel.tsx:1163 -- tracked in #30305 -- allowlisted native confirm, migrated by the open gallery PR.
Sibling: website/src/apps/mochi/src/renderer/GalleryPanel.tsx:813 -- tracked in #30305 -- allowlisted native confirm, migrated by the open gallery PR.
Sibling: website/eslint.config.js -- tracked in #15976 -- the remaining allowlisted modules are the full inventory, including alert and prompt callers outside apps/.
Checked and not affected: website/src/apps/issue-radar/views/CrewPageView.tsx:302, website/src/apps/meetings/components/AgentPanel.tsx:203 and :226, and website/src/apps/papyrus/PapyrusPage.tsx:560 call 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.
App repo: KiroCrewCaptain/kirocrew-app-papyrus#5