Skip to content

fix(meetings): ask before an exit drops unsent chat or quick-add text - #32625

Merged
bolichen97 merged 1 commit into
mainfrom
fix/30636-meeting-exit-unsent-text
Nov 9, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/30636-meeting-exit-unsent-text

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Leaving a meeting never silently throws away text the user typed but did not send.

In a meeting, text typed into an agent's chat line, the broadcast bar or the quick-add field, and not yet sent, vanished when the user pressed Back, opened Settings, or followed "Open that meeting" on a refused Start. Nothing asked first. An unsaved minutes draft was only guarded on the last of those exits.

Why it matters

A user who types a correction, an aside to the agents or an action item, then clicks Back or the agent settings button, loses that text with no warning and no way back. The issue asks that every exit treat unsent text the way it treats unsaved minutes: keep it, or ask before dropping it.

Not a goal

  • Keeping unsent text across a navigation (a stored draft). Asking is the option the issue offers and needs no new state.
  • Browser-level navigation (closing the tab, a reload). That is outside the view's exits, as it already is for the note.
  • Text lost without leaving the view, such as closing the task sidebar or switching an agent back from its chat view.

An earlier version of this PR also listed "new dialog wording" here and reused the minutes "Discard unsaved changes" dialog. A maintainer ruled that the question must say what is lost and that confirming leaves the meeting, so that bullet is gone: every exit dialog gets leave wording below.

What changed (motivation → approach → change)

Exits of the meeting view go through one leave function. It saved the note, then navigated. Only the "Open that meeting" path also checked minutes drafts, none checked the one-line inputs, and the transcription notice's "Open Voice settings" link skipped leave altogether.

Exit Before After
Back saves the note, leaves saves the note, then asks if anything unsent would be lost
Settings (agent bar) saves the note, leaves same as Back
Open that meeting saves the note, asks only about minutes same as Back
Open Voice settings (streaming-off notice) a plain link: no note save, no question same as Back
What would be lost Dialog
Unsent text "Leave with unsent text?", confirm "Discard and leave"
Unsent text and a minutes draft same title; the body also names the unsaved edits
A minutes draft only "Leave with unsaved edits?", confirm "Discard and leave"

leave now runs one check after the note save. It asks when a minutes draft is unsaved (Back and Settings used to drop one silently), or when an agent's chat line, the broadcast bar or quick add holds non-blank text. The Voice settings link becomes a button that leaves through leave, like "Open that meeting". Those three inputs are uncontrolled, so their text exists only in the DOM. Each is marked data-unsent, and the check reads their values under the view's root at the moment of exit. With nothing unsent, every exit leaves exactly as before. The six new strings live under apps.meetings.meeting in every locale catalog (website/src/i18n/locales/en.json and its translations), with the en-XA pseudolocale regenerated. The meetings spec (docs/system-specs/modules/meetings.md) describes the exit rule and lists the new test.

The external Meetings repository carries the same fix: KiroCrewCaptain/kirocrew-app-meetings commit 9b63fe85ef435790b05839f1d3e82dde22756004 ports it into that repository's ui/ with the same test, all twelve ui/i18n catalogs and a rebuilt ui/dist/index.mjs, and its CI is green. Meetings is not pinned to that repository yet, so nothing here depends on the commit.

Backwards compatibility

Compatible: no API, route or stored data changes; an exit with nothing unsent behaves as before.

Removes nothing: the change only adds a confirmation before an exit that would drop typed text.

Tests

MeetingsExitUnsent.test.tsx renders MeetingView with the session hook stubbed and pins:

  • Back with unsent text in an agent's chat line, the broadcast bar or quick add opens "Leave with unsent text?", does not leave, and leaves once the user presses "Discard and leave".
  • Back with only an unsaved minutes draft opens "Leave with unsaved edits?", and "Discard and leave" leaves.
  • Unsent text plus a minutes draft shows the body that names both.
  • Settings, "Open Voice settings" and "Open that meeting" ask the same way, and each still goes where it pointed after a discard.
  • Text typed while the note save is still in flight is asked about too, so the check runs after the save.
  • Cancel keeps the user in the meeting with the text intact.
  • Blank text leaves without asking.
  • Agent output whose sanitized markdown carries the data-unsent attribute on a div does not block the exit: the check reads only input[data-unsent].

Ten of the twelve cases fail on main; the blank-text and agent-output cases pass on both, as they should. The agent-output case fails when the selector is widened back to [data-unsent]. MeetingsNote.test.tsx's source pin of leave is updated to the new shape (note save first, then the check). The src/i18n catalog suites (parity, placeholders, per-locale style) pass with the new strings.

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

Ran the built SPA against stubbed meeting APIs in Chromium (the repository's meetings capture-harness pattern): typed into the broadcast bar and pressed Back, saw "Leave with unsent text?"; with an edited agent output as well, saw the body that names both; with only an edited output, the earlier build showed "Discard unsaved changes"; this head shows "Leave with unsaved edits?" (frames below).

Screenshots / video

Unsent broadcast-bar text, then Back asks (dark):

Leave with unsent text, dark

Leave with unsent text, light

Unsent text and an unsaved edit to an agent's output: the body names both.

Unsent text and edits, dark

An unsaved edit alone now says that confirming leaves the meeting. The dialog is rendered by a capture entry through the same useConfirm call and catalog keys MeetingView passes:

Edits only, leave wording, dark

Edits only, leave wording, light

The streaming-off notice's "Open Voice settings" action keeps its look (an underlined text action, the same element as "Open that meeting"); it is not pictured because that notice needs a live transcription refusal the stubbed harness does not produce. Its behaviour is pinned by MeetingsExitUnsent.test.tsx.

Before the dialog: typed text, Cancel, and the empty case

Broadcast bar with unsent text

Cancel keeps the text

Nothing typed, Back leaves without asking

Broadcast bar with unsent text, light

Related Issues

Closes #30636

Sibling sweep

Swept: git grep -nE "<Input|<textarea|<input" -- website/src/apps/meetings/
Sibling: website/src/apps/meetings/components/AgentPanel.tsx -- changed here
Sibling: website/src/apps/meetings/components/BroadcastBar.tsx -- changed here
Sibling: website/src/apps/meetings/components/TaskSidebar.tsx -- changed here
Sibling: website/src/apps/meetings/components/MeetingTitle.tsx -- not affected -- the title saves on blur, which the exit click triggers first
Sibling: website/src/apps/meetings/components/NoteSidebar.tsx -- not affected -- the note is saved by the exit before anything else runs

Pattern harvest

Not generalizable: the fix routes this view's existing single exit through one unsaved-text check; other views keep their own drafts in their own ways.

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

Contributed under the project's Apache-2.0 license (see the Licensing section of CONTRIBUTING.md).

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 7, 2026 20:58
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 9dff399133cff7b55a7cd323d45c4ce2f1a5a6f6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: every exit already went through leave, and the fix adds one check there. The change is easy to revert, and the description includes screenshots of this revision.

Notes

  • Reading input[data-unsent] values from the DOM under rootRef ties the guard to markup. If one of these three fields becomes a <textarea> or a controlled input, its unsent text drops out of the check without any warning. Lifting those values into state (as dirtyMinutes already does for minutes drafts) would remove that dependency, if the fields are ever reworked.

[DESIGN-REVIEWED] 9dff399

Description read

[DESCRIPTION-READ] 1f8b27f282c7a517cf6058ebb06b059f31159a7b57c509dbefcfc151684a637c

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 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 9dff399133cff7b55a7cd323d45c4ce2f1a5a6f6 — 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. One gap in coverage: navigating out through the app shell still drops unsent text without asking, and the description leaves those exits out.

Notes

  • Item 1 — symptom-level: the Goal says "Leaving a meeting never silently throws away text", but the check only runs inside the view's own leave. Leaving through the global sidebar NavItem, the command palette or a notification jump still loses unsent text silently. Those are the exits that website/src/components/NavigationLeaveGuard.tsx:44-52 already guards. I grepped non-test files under website/src/apps for LeaveGuard|GuardedLeave|NavigationStake and found 0 matches, so no app hooks into that guard. The description does not say which exits stay uncovered, and it should.

What this change ships

Inventory (8 items) — 8 justified

Intent: let a user leave a meeting without silently losing typed-but-unsent text or unsaved minutes edits. This is a FIX.

  1. Back and Settings now ask before dropping unsent chat, broadcast or quick-add text — justified
  2. Back and Settings now ask before dropping an unsaved minutes draft — justified
  3. "Open that meeting" minutes dialog relabeled "Leave with unsaved edits?" / "Discard and leave" — justified
  4. The Voice settings link becomes a button that saves the note and asks before leaving — justified
  5. Three inputs carry a data-unsent marker that is read at exit — justified
  6. Six new dialog strings across every locale catalog — justified
  7. The meetings spec describes the exit rule and lists the new test — justified
  8. The MeetingsNote source pin is rewritten to the new leave shape — justified

[FIRST-PRINCIPLES-REVIEWED] 9dff399

Description read

[DESCRIPTION-READ] 84ef86fa6cd7bbf3d86dd5b281f4b694dbe3cc0e63c7dc154d80a799a09dd220

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 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 9dff399133cff7b55a7cd323d45c4ce2f1a5a6f6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks: every dialog wording and the typed-text-then-Back path are pictured, and the blind reader read "Cancel" and "Discard and leave" correctly.

Notes

  • leaveUnsentHint: the reader "only guessing what 'the agents' and 'an action item' are" because the meeting screen never uses the word "agent", and the hint doesn't say which input holds the text. Name the input that is actually dirty, e.g. "Your unsent message to Note Taker will be lost."
  • leaveUnsentWithEditsHint: this dialog also covers unsaved edits, but its title still says only "Leave with unsent text?". Use a title that names both, e.g. "Leave with unsent text and unsaved edits?"
  • "Open Voice settings" is no longer a <Link> but a <button className="underline">, so middle-click and open-in-new-tab stop working. Add cursor-pointer so it still reads as clickable.

[UX-REVIEWED] 9dff399

Description read

[DESCRIPTION-READ] 4525d4948a33be783f3b933a4dcc3503d3005ad964031862b7bb2e4b3e362f7a

That sha256 names everything this verdict read: the PR description, plus the 12 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 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 9dff399133cff7b55a7cd323d45c4ce2f1a5a6f6 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 9dff399

Verdict parsed from the review's SHA-scoped output markers for commit 9dff399133cff7b55a7cd323d45c4ce2f1a5a6f6.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 9dff399133cff7b55a7cd323d45c4ce2f1a5a6f6 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 9dff399133cff7b55a7cd323d45c4ce2f1a5a6f6 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 9dff399

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 9dff399133cff7b55a7cd323d45c4ce2f1a5a6f6 false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 enabled auto-merge (squash) November 7, 2026 21:14
@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 7, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased: main moved in the Backend Tests shard 5 and 6 tests since this head ran (4048364 -> 390fc5d, onto main with #32606); CI re-running. This head also answers the UX blocker: per a maintainer ruling, unsent text now gets its own "Leave with unsent text?" dialog that names what is lost, with "Discard and leave" as the confirm label, in every locale. A minutes draft alone keeps the "Discard unsaved changes" dialog. The "new dialog wording" bullet is removed from Not a goal, and the screenshots show the new dialog.

@bolichen97
bolichen97 force-pushed the fix/30636-meeting-exit-unsent-text branch from 4048364 to 390fc5d Compare November 8, 2026 06:17
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 8, 2026
@bolichen97
bolichen97 force-pushed the fix/30636-meeting-exit-unsent-text branch from 390fc5d to ee3ac95 Compare November 8, 2026 07:10
@bolichen97

bolichen97 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor Author

span=1ceeaf61a008
self-added: yes
mechanism: exit check reads typed text from marked inputs under the meeting view root

fixed in ee3ac95: the exit check now selects input[data-unsent], so a data-unsent attribute on agent markdown (a div with no value) is never read.
A new test renders agent output <div data-unsent>Agenda</div>, presses Back, and expects the view to leave with no dialog; it fails when the selector is widened back to [data-unsent].

@bolichen97
bolichen97 force-pushed the fix/30636-meeting-exit-unsent-text branch from ee3ac95 to 08b3602 Compare November 8, 2026 09:25
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Fixed the Frontend Tests (3) red on ee3ac95: hiStyle.test.ts ([changed-values] register) flagged the two new Hindi strings for the formal imperative. They now use the informal register (08b3602, rebased onto current main). The other reds on that head were API rate-limit read failures; CI re-running.

@bolichen97
bolichen97 force-pushed the fix/30636-meeting-exit-unsent-text branch from 08b3602 to 06eda36 Compare November 8, 2026 17:11
@bolichen97

bolichen97 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: exit dialog wording when only an agent-output edit is unsaved

  • The edits-only exit dialog hides that confirming leaves the meeting span=9d782ddd1e5c

fixed in 06eda36: the edits-only exit now asks "Leave with unsaved edits?" with the body "Your unsaved edits to an agent's output will be lost when you leave the meeting." and the confirm "Discard and leave", so it says both what is lost and that confirming leaves.
The panel's own "Discard unsaved changes" wording is unchanged for its in-panel use. The two new strings are in every locale catalog, with the pseudolocale regenerated, and the test pins the title, body and confirm for this case.

@bolichen97

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: exit check reads typed text from marked inputs under the meeting view root
span=1ceeaf61a008

fixed in ee3ac95: the exit check now selects input[data-unsent], so a data-unsent attribute on agent markdown (a div with no value) is never read.
A new test renders agent output <div data-unsent>Agenda</div>, presses Back, and expects the view to leave with no dialog; it fails when the selector is widened back to [data-unsent].

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 8, 2026
@bolichen97
bolichen97 force-pushed the fix/30636-meeting-exit-unsent-text branch from 06eda36 to 3d0eded Compare November 8, 2026 19:15
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased onto main to clear a merge conflict in docs/system-specs/modules/meetings.md: main's test list now names the HTML export, and this PR adds MeetingsExitUnsent.test.tsx to the same list, so both lines are kept. No code changed (06eda36 -> 3d0eded). Meetings and i18n tests, tsc, and local GPT and Opus reviews pass on the new head.

AI-assisted, posted on behalf of bolichen97

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 8, 2026
KiroCrewCaptain added a commit to KiroCrewCaptain/kirocrew-app-meetings that referenced this pull request Nov 8, 2026
Text typed into an agent's chat line, the broadcast bar or quick add,
and not yet sent, vanished when the user pressed Back, opened Settings,
followed the transcription notice's Voice settings action or opened the
meeting a refused Start names. A minutes draft was only guarded on the
last of those.

Every exit now goes through the one `leave` path: it saves the note,
then asks when a marked input holds non-blank text or a minutes draft
is unsaved. The Voice settings action becomes a button that leaves
through `leave` and navigates with the SDK's `useNavigate`, so the
local `host/Link.tsx` is unused and removed. The six new strings are in
every ui/i18n catalog and the committed bundle is rebuilt.

Carries kirodotdev/KiroCrew#32625 (closes kirodotdev/KiroCrew#30636).
Back, Settings, the streaming-off notice's Voice settings action and
opening the meeting a refused Start names all unmount the meeting
view, and with it the text typed into an agent's chat line, the
broadcast bar or quick add that was never sent. Every one of these
exits now saves the note first and then asks with the existing
"Discard unsaved changes" dialog when such text, or an unsaved minutes
draft, would be lost; with nothing unsent it leaves as before.

Closes #30636
@bolichen97
bolichen97 force-pushed the fix/30636-meeting-exit-unsent-text branch from 3d0eded to 9dff399 Compare November 8, 2026 23:49
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased onto main for the Backend Tests shard 6 red on 3d0eded (Linux and Windows): test_dashboard_server_composition_contract.py::test_the_lazy_imports_stay_inside_the_functions_that_need_them asserted 140 == 139, a main red fixed by #33377. The Frontend Tests (1) red was a GitHub artifact upload failure (Failed to FinalizeArtifact), not a test. The diff's changed lines are byte-identical (3d0eded -> 9dff399); meetings, src/i18n and tsc pass locally on the new head. CI re-running.

The external Meetings repository now carries the same fix: KiroCrewCaptain/kirocrew-app-meetings commit 9b63fe85ef435790b05839f1d3e82dde22756004 (its ui/, the same test, all twelve ui/i18n catalogs, rebuilt ui/dist/index.mjs), CI green. The PR body names it.

Retrospective for this round (run in-line: no model-pinned subagent facility in this driver): the three declared mechanisms (exit check over input[data-unsent], the edits-only leave wording, and the leave-wording dialog) are each inside the frozen goal and keep. The SEAM REPEAT on span=1ceeaf61a008 counts the round-2 disposition, which re-recorded the round-0 fix (ee3ac95) rather than a second edit; no finding re-raises it, so no fix this round.

AI-assisted, posted on behalf of bolichen97

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

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved on head 9dff399: PR Readiness is green, every AI review lane on this head passes with no blocking findings, and no change request stands.

@bolichen97
bolichen97 merged commit 35ae32e into main Nov 9, 2026
99 checks passed
@bolichen97
bolichen97 deleted the fix/30636-meeting-exit-unsent-text branch November 9, 2026 00:54
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Meetings: unsent chat and quick-add text is lost on every MeetingView exit

2 participants