Repository navigation
fix(dialogs): ask in-app for meeting links and papyrus actions - #30752
Conversation
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: a shared in-app prompt hook replacing native Notes
[DESIGN-REVIEWED] c70549a Description read[DESCRIPTION-READ] 3da4362d7cee193ba8fb30383197d43968a6aca01d537584cda85b47ee5b4005 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 Commit & Push dialog. It is one of the four dialogs this PR adds, and none of the four attachments shows it. Evidence gaps
Notes
[UX-REVIEWED] c70549a Description read[DESCRIPTION-READ] c238ee2216b948ad9db29238717823a2b25da88fb9d3d26451fc377afdce239e That sha256 names everything this verdict read: the PR description, plus the 7 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. Every native Not checked: whether the Windows keyboard lock in #15976 actually clears after the in-app dialogs close. Notes
What this change shipsInventory (8 items) — 6 justifiedIntent: stop Meeting link and Papyrus file and commit actions from opening OS dialogs that can lock the Windows keyboard. FIX.
[FIRST-PRINCIPLES-REVIEWED] c70549a Description read[DESCRIPTION-READ] f870e42bfa2fc3d1ef4c8ac08f183e963dde1b87c854538ebdd86a064738b359 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
ba3e068 to
0fe227b
Compare
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
61a6962 to
0c9e81f
Compare
0c9e81f to
0928b5a
Compare
0928b5a to
c11b59d
Compare
c11b59d to
d03d998
Compare
d03d998 to
55eb294
Compare
Meeting link attachments and Papyrus commit messages, new file names and file deletion ask through native prompt() or confirm(). In the desktop app that is an OS dialog, and on Windows the window can stop taking keyboard input after it closes until it is re-activated (kirodotdev#15976). Ask for text through the in-app useTextPrompt dialog and for file deletion through useConfirm. Show the existing instruction as the input's label under a short action title. Focus the input, submit with Enter and keep required blank input open with an accessible message. Restore Meeting attachment focus to the surviving paperclip button. Keep Meeting URL trimming, hostname labels and non-URL text. Leaving the keyed meeting or live view cancels its prompt and drops a late answer. Papyrus captures the paper, file and main-file fallback before it waits, so a question cannot redirect its action to another paper. Guard late success and error writes against the original paper scope and invalidate that paper's existing cache keys. A successful create still opens the new file when another file was selected in the same paper. Ignore duplicate file-delete questions and keep the pending push trigger disabled. Forward an empty commit message as "" so the backend still owns the default. Close the attachments menu when the link prompt is cancelled, so focus returning to the paperclip leaves no open menu behind. Add the three consumed keys in all 13 catalogs and regenerate the pseudolocale. Remove MeetingView and PapyrusPage from the native-dialog allowlist. Part of kirodotdev#15976
55eb294 to
c70549a
Compare
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 20% chance that this change introduces a defect, above the 12% limit for approving on its own. Replaces the native prompt()/confirm() calls in MeetingView (add link) and PapyrusPage (new file, commit message, delete file) with in-app dialogs: a new useTextPrompt hook and the existing useConfirm. It also removes both files from the ESLint native-dialog allowlist. The GPT lane's earlier blocker (a pending delete when the same paper is reopened) is fixed: onSuccess now matches by paper name, and a test covers it. Targets are recorded before each question. Cache refreshes use the original paper's keys. Late success cannot touch another paper's view, and late failures are reported with the paper's name. Dialogs render in both Papyrus branches, and the mount tracking survives the same-render remount when the page switches views. The Meeting prompt is tied to the eventId and cancels on leaving. The tests that stubbed native dialogs now drive the in-app dialogs, and new tests cover the changed behaviour. The App repo line uses the documented # form. No blocking issues found. 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 |
bolichen97
left a comment
There was a problem hiding this comment.
LGTM. I read the whole diff, tests included.
useTextPromptfollows theuseConfirmpattern: it resolves the untrimmed text, ornullon Cancel, Escape, the close button, the backdrop, a replacement, owner unmount, or a renderer that is omitted or removed. TheDialogMountSignalplus the microtask keeps a StrictMode remount from cancelling the question.- Meetings:
AttachLinkPromptis keyed byeventId, so leaving the live view or switching meetings cancels a pending link, and a link accepted as the meeting leaves is not added. Focus returns to the paperclip trigger after the menu closes. - Papyrus: each action captures its paper and a
projectScopebefore it asks. A late result for a paper the user has left refreshes that paper's cache but does not touch the open view, and a late failure names the paper. Delete now uses the in-appconfirm, and a second press while it is open is ignored. - The lint exemptions for
MeetingView.tsxandPapyrusPage.tsxare removed, so the native-dialog gate now covers both files. The empty-message commit still forwards""for the backend default, and every locale gets the three new strings.
All checks are green on this head.
…#6) Port the Meetings page changes Kiro Crew made to its built-in copy since this repository was last kept in step, and release 0.1.2: - export a sketch agent's output as one self-contained HTML file (kirodotdev/KiroCrew#33042) - export all outputs as one HTML bundle (kirodotdev/KiroCrew#33505) - Add a link asks in-app, not through window.prompt (kirodotdev/KiroCrew#30752) - the roster comment of kirodotdev/KiroCrew#28263 The dashboard's useTextPrompt and escapeScriptClose are not App Kit exports, so they are restated under ui/src/host/. The new strings are in all 12 locales, and PORTING.md is now in step with Kiro Crew main 9b32941be6. Co-authored-by: KiroCrewCaptain <312312717+KiroCrewCaptain@users.noreply.github.com>
Problem / Motivation
Goal: Adding a Meeting link, naming a Papyrus file, describing a Papyrus commit, and deleting a Papyrus file ask inside the app window instead of in an OS dialog.
These four actions call the browser-native
prompt()orconfirm(). #15854 added the lint gate against new native dialogs and exempted the existing callers in a shrink-only allowlist. On Windows, a native dialog from the renderer can leave the window ignoring the keyboard until it is re-activated (#15976).Why it matters
These Meeting and Papyrus actions are among the remaining native calls that can reach the Windows keyboard problem in #15976. Replacing them removes four ways to reach that problem while keeping the action in the app window.
Not a goal
ProjectList.tsxbelongs to a later PR in this series.ConfirmDialoglifecycle, which belongs to a later PR in this series.What changed (motivation → approach → change)
Meeting links and Papyrus file names and commit messages now ask through
useTextPromptinTextPromptDialog.tsx. The existing instruction is the input's visible label, and a short action label is the title. Focus enters the input and Enter submits. A required blank or whitespace-only value leaves the question open with its caller's accessible error, where the native prompt used to dismiss silently. A commit message may be empty. Cancel, Escape, the close control, backdrop dismissal, replacement and renderer removal answernull. The dialog keeps its last content while it closes, and typing stays inside the form rather than rerendering the page.The old dialogs blocked the page. The in-app ones let an action outlive the view that opened it, so each caller keeps its original target:
AgentPillBar.tsxgives the dialog a surviving paperclip focus target, so both clicking and Enter return focus there after adding a link.An empty commit message still reaches the backend as
"", so the backend keeps owning the default subject.The three new keys supply the required-link message, required-file-name message and Delete file label in all 13 catalogs, including regenerated
en-XA.MeetingView.tsxandPapyrusPage.tsxleave the native-dialog allowlist.Backwards compatibility
Compatible: the backend APIs, accepted nonblank attachment and file-name values, URL labels, git staging and the backend-owned blank commit default are unchanged. A blank required link or file name used to dismiss silently and now keeps the dialog open with a message.
The one behavior change is that a blank required link or file name now keeps the dialog open with a message instead of dismissing silently. Nothing that worked before stops working.
Reader: website/eslint.config.js:native-dialog allowlist entry for MeetingView.tsx -- release -- the attachment prompt no longer calls a native dialog, so the page passes the existing error gate without its exemption
Reader: website/eslint.config.js:native-dialog allowlist entry for PapyrusPage.tsx -- release -- both text prompts and the remaining file-delete confirm are in-app, so the page passes the existing error gate without its exemption
Reader: .github/workflows/ci.yml:frontend ESLint command -- release -- whole-source ESLint passes with both removed rows and still rejects new native callers
Reader: .github/workflows/main-ratchet-audit.yml:frontend ESLint audit -- release -- reads the same shrink-only gate, whose remaining rows are unchanged
Reader: website/src/apps/papyrus/PapyrusCloseProject.test.tsx:native prompt stubs -- release -- replaced by in-app input and submit interactions in "flushes before a create switches the open file away" and "does not create the file when the flush fails"
Reader: website/src/apps/papyrus/PapyrusPageCoverage.test.tsx:native prompt and confirm stubs -- release -- file and git tests answer rendered dialogs and still verify their original mutations and flush behavior
Tests
TextPromptDialog.test.tsxcovers Enter, input focus, required whitespace, optional empty text, dismissal, replacement, omitted or removed renderers, owner unmount and StrictMode. "associates the visible instruction with the input and focuses it when clicked" checks the label, "keeps typing and required-field errors inside the prompt without rerendering its owner" checks form ownership, and "keeps the Modal mounted with its content while it closes" checks the closing content.MeetingsAttachmentPrompt.test.tsxcovers Cancel, required-link errors, URL trimming and labels, meeting replacement and leaving for loading, error or review. "does not add a link accepted as the meeting leaves the live view" catches a late answer. "returns focus to the attachment trigger after adding a link with %s" runs for clicking and Enter against the real attachment menu and waits for the dialog to finish closing. "adds nothing and closes the menu after Cancel" checks that cancelling also closes the menu and returns focus to the trigger, so Escape keeps working.PapyrusPageCoverage.test.tsxcovers required file names, Cancel, captured deletion targets, duplicate questions, the disabled pending push trigger and dialogs that remain open in the paper list. "opens the created file after selecting another file during the %s" covers both the question and request. Target-lifetime cases verify the captured paper, the original cache keys and late success and failure isolation for New file, Delete file and Commit & Push.PapyrusCloseProject.test.tsxkeeps its flush-before-create and failed-flush coverage using the in-app input.Proof: not provable -- frontend test (prove.py runs Python only).
With the paperclip focus change and the create and delete success guards reverted, the click and Enter focus cases and the late New file and Delete file success cases fail.
TypeScript, ESLint and i18n pass. The related test files pass, including all 141 cases in the four touched test files.
Manual verification
The real MeetingView and PapyrusPage components were rendered with stubbed API responses in headless Chromium, and each question was opened by clicking its real control (screenshots below). No native dialog opened and no attachment, file, commit, push or delete request was sent.
A live desktop build and a Windows check of keyboard input after each dialog were not run.
Screenshots / video
Meeting Add a link, empty:
Meeting Add a link, required input:
Papyrus file actions
Related Issues
Part of #15976. Also relates to #15662, which #15854 closed after adding the shrink-only native-dialog allowlist that this PR shrinks.
Open PRs that also edit
MeetingView.tsx: PR #25573, PR #18207, PR #7196, and PR #5738. The attachment hunks avoid the Start flow. No open PR directly editsPapyrusPage.tsx,AgentPillBar.tsxor the attachment tests.Many open PRs edit the locale catalogs and
website/eslint.config.js. This PR adds three keys per catalog and removes two allowlist rows, so the overlapping hunks are small.Sibling sweep
Swept:
git grep -nE '(window\.)?\b(confirm|alert|prompt)\(' 5e8741f5255b94c52c62db52db1c48d397d46707 -- website/src ':!*test*' ':!*.snap'Comments, locally bound callbacks and in-app
useConfirmcalls were excluded by checking the call expressions and bindings against the allowlist. Four native calls are changed here. Each of the 54 remaining native call sites has its own line below.Sibling: website/src/apps/auto-improvement/AutoImprovementPage.tsx:477 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/apps/auto-research/ResearchLabPage.tsx:525 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/apps/auto-research/ResearchLabPage.tsx:557 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/apps/design-tweak/DesignTweakPage.tsx:394 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/apps/meetings/MeetingsPage.tsx:244 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/apps/papyrus/ProjectList.tsx:533 -- tracked in #15976 -- allowlisted native paper-delete confirm, assigned to another PR in this series.
Sibling: website/src/components/RestartButton.tsx:19 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/components/TagManagerList.tsx:394 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/components/WebAppArtifactCard.tsx:442 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/components/themeEditor.tsx:306 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/hooks/useSessionActions.ts:318 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/hooks/useSessionActions.ts:320 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/hooks/useSessionActions.ts:322 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/hooks/useSessionActions.ts:325 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/hooks/useSessionActions.ts:437 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/pages/ArtifactDetailPage.tsx:137 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/ArtifactsPage.tsx:727 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/ChannelPage.tsx:1175 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/ProjectsPage.tsx:401 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/pages/ProjectsPage.tsx:411 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/pages/ProjectsPage.tsx:789 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/pages/ProjectsPage.tsx:792 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/pages/knowledge/DetailView.tsx:339 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/knowledge/SourcesList.tsx:1125 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/knowledge/index.tsx:225 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/members/MembersPage.tsx:609 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/members/MembersPage.tsx:629 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/members/MembersPage.tsx:632 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/members/MembersPage.tsx:633 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/members/MembersPage.tsx:635 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/members/NewCrewmateDialog.tsx:710 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/AgentCfgTab.tsx:23 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/pages/overview/AgentCfgTab.tsx:28 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
Sibling: website/src/pages/overview/AgentTemplatesTab.tsx:376 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/AgentTemplatesTab.tsx:583 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/AgentTemplatesTab.tsx:595 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/AgentTemplatesTab.tsx:719 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/AgentTemplatesTab.tsx:926 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/AgentTemplatesTab.tsx:1124 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/KiroCrewCfgTab.tsx:255 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/KiroCrewCfgTab.tsx:585 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/MemoryTab.tsx:134 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/PortabilityTab.tsx:420 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/PromptsTab.tsx:370 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/PromptsTab.tsx:428 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/PromptsTab.tsx:495 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/PromptsTab.tsx:615 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/PromptsTab.tsx:698 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/PromptsTab.tsx:702 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/SkillsTab.tsx:737 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/SkillsTab.tsx:1027 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/SkillsTab.tsx:1628 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/pages/overview/SteeringTab.tsx:918 -- tracked in #15976 -- allowlisted native confirm, assigned to another PR in this series.
Sibling: website/src/utils/popoutController.ts:259 -- tracked in #15976 -- allowlisted native alert, assigned to another PR in this series.
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