Repository navigation
Conversation
bolichen97
left a comment
There was a problem hiding this comment.
Description / code mismatch
Two surfaces the Description presents as complete land differently in the code: the note sidebar it describes as a finished editor ships without a focus cue, and the 100k-character ceiling it advertises is unreachable in the non-Latin scripts the dashboard is translated into.
1. The note textarea suppresses the global focus outline with no replacement cue
The Description says —
Frontend: a
NoteSidebar(edit/preview, autosave state, image paste with the meeting's elapsed time), opened from the meeting's overflow menu.
The code does — the textarea that is the editor carries focus:outline-none with no focus-ring, no focus-visible: cue, and no focus-within: cue on the enclosing <aside>, so the element the whole feature exists to type into has no visible focus indicator at all. website/src/apps/meetings/components/NoteSidebar.tsx:211.
Risk — a keyboard-only or low-vision user tabbing into the note editor cannot tell where focus is, which is WCAG 2.4.7 Level AA. The module contract at the top of scripts/check_focus_cue.py states that rule and states that focus:outline-none is a suppressor rather than a cue; the scanner therefore flags this line. That gate is a required check — focus-cue-lint / "Focus Cue Gate", listed in docs/ci/ci-and-reviews.md:126 and wired at .github/workflows/ci.yml:246 — and it is red on the head SHA, so the PR cannot merge in this state.
Required change — append focus-ring to the textarea's className, matching the precedent at website/src/components/AgentPanel.tsx:293, or add a focus-visible: cue on the textarea or a focus-within: cue on the enclosing <aside>. Then re-run FOCUS_CUE_BASE_REF=origin/main python3 scripts/check_focus_cue.py.
2. The note PUT keeps the shared 256 KiB body cap, so the advertised 100k-character ceiling is unreachable in non-Latin scripts
The Description says —
Markdown, autosaved, capped at
MAX_NOTE_CHARS(100k — a human typing for at most the 4 hoursMAX_SESSION_DURATIONallows).
The code does — handle_put_note calls json_body without a max_bytes argument, so the note inherits the shared _common.MAX_BODY_BYTES of 256 KiB, while the sibling whole-document route passes a route-specific MAX_MINUTES_BODY_BYTES sized for its own character cap. src/kiro_crew/apps/builtins/meetings/backend/routes/meeting_lifecycle.py:734. The character cap is enforced, the byte cap is not raised to cover it, and the two disagree for any text above one byte per character.
Risk — the dashboard ships in 12 languages. A Japanese, Chinese, Korean, Hindi, Bengali, or Russian note crosses 256 KiB of UTF-8 JSON at roughly 87,400 characters (about 65,500 for emoji, and about 43,000 for a client that \u-escapes non-ASCII), well under the advertised 100,000. From that point every autosave answers 413 and the frontend surfaces only the generic noteSaveFailed toast ("Could not save your note."), so everything the user types afterwards is silently unsaved — on the one file the code itself calls the thing in this app the user cannot regenerate. No test observes it, because test_put_accepts_a_note_at_the_cap uses "x" * MAX_NOTE_CHARS, which is ASCII.
This is not new arithmetic: test/test_meetings_minutes.py:516, class TestBodyCaps, already pins precisely this invariant on main, its functional case at :538 uses content = "議" * 100_000 — exactly MAX_NOTE_CHARS many CJK characters — asserting len(payload.encode()) > _common.MAX_BODY_BYTES, and its docstring already names the failure mode as the user being able to open the document, edit it, and only then be told it cannot be saved.
Required change — either give the note a route-specific body cap (a MAX_NOTE_BODY_BYTES sized as MAX_MINUTES_BODY_BYTES is, covering 100_000 * 12 plus envelope) and pass it to json_body in handle_put_note, or lower MAX_NOTE_CHARS to a value the shared 256 KiB cap actually covers and say so in the Description. Either way, extend the spec sentence at docs/system-specs/modules/meetings.md:461 on main — the same sentence sits at roughly line 478 in this head, unchanged by the diff — to name the second whole-document route, and mirror TestBodyCaps for the note with a multi-byte case.
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
|
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]: This PR has been inactive for 7+ days with failing CI. I've assessed the blockers and they appear resolvable — I'll push fixes directly to this branch as a co-author. Assessment: Both blocking review findings come with exact file:line fixes — add a If you'd prefer I don't touch this PR, add the |
b3f1950 to
d49f760
Compare
|
Rebased onto main Conflicts, resolved additively (no behaviour change to this PR):
Gates run locally on the rebased head: One pre-existing failure, unchanged by the rebase: Please review the resolution. A maintainer push makes the maintainer the last pusher, so a second approver is needed under the repo's last-push rule. Reply here if anything looks wrong. |
d49f760 to
b98d60a
Compare
|
Rebased onto Conflicts, and how they were resolved
Repairs to this PR's own code, in the same push
Nothing else was changed. In particular: The audio stack is NOT in this diff#5738 (WebSocket meeting audio) and #7196 (Electron system audio, stacked on #5738) are both still open and both still conflict; neither was pulled in. The final diff contains no What ran on this headBackend, Frontend, Gates, each run the way CI invokes it, all green: A symbol check on every non-test One check this push does not turn greenScreenshot Evidence needs an image in the description, and this PR adds a real sidebar, so the The description was also missing |
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 image-paste flow. Pasting a screenshot is the feature's headline ("paste a screenshot and it lands with the meeting's elapsed time"), but no screenshot shows the upload state, either upload error, or a pasted image in Preview. Evidence gaps
Notes
[UX-REVIEWED] 1807867 Description read[DESCRIPTION-READ] 07bc33dc93eea865b46a83693ad2047204677396be4691ec79a008db06792a4e 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 |
|
Taking this over to get it green, since it has been idle for over a week. I will keep your authorship and keep the change scoped to the original goal. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The minutes an agent writes belong to the agent. This adds a note that belongs to the user: free-form Markdown stored per meeting, autosaved, and kept separate from anything an agent generates. Images pasted into the note are stored beside it and referenced from the Markdown relatively, so a screenshot taken during a call lands in the note with the meeting's elapsed time instead of being lost with the clipboard. Storage: the note lives under an app-owned `<data>/notes/<id>/` tree, OUTSIDE the agent-writable meeting directory every meeting agent is handed the path of (all three ship fs_read/fs_write). The tree is on the shared WRITE-only fence (`_WRITE_PROTECTED_HOME_PATHS`, the `app-sources` shape) rather than the read+write floor `edits/` uses: pasted images are served through `/api/file-raw`, which applies the read floor, so a read-fenced tree answers 403 for every image. The app.json grant of `/api/file-raw` is dropped -- the SPA fetches images as the dashboard user, whose token bypasses `permissions.api`, so the grant only widened what a meetings app token could read. Body cap: the note PUT gets `MAX_NOTE_BODY_BYTES` (2 MiB) paired with `MAX_NOTE_CHARS`, as the minutes route pairs its two caps -- a CJK note crossed the shared 256 KiB default at ~87k characters and every later autosave answered 413. Frontend: the draft lives in `useNoteDraft`, mounted with the meeting, not in the panel. Closing the panel unmounts it, and a draft held in component state died with it -- a close-time save that was refused lost the only copy. The hook advances its confirmed baseline when a save LANDS (a stale response never replaces newer typing; a refused save stays dirty and is retried by every exit), and owns the pending paste so an upload that outlives the panel still inserts and saves its markdown. Every failure the user can act on -- refused save, refused load (localized by code), refused paste -- renders in the panel through ErrorNotice. The menu item reads "My note", the panel's own title, so it cannot be mistaken for the Note Taker agent's tab.
exit now waits for every pending upload before it saves, so a screenshot pasted just before Back is inserted and saved instead of stripped, and it saves until the current draft is acknowledged, so an edit typed while the exit save was on the wire is saved too (or refused, which keeps the view).
|
target=gpt head=1807867138272d4e8fc89d2fd156d81f41924e25
|
|
Thanks @kaizawa97. This PR edits |
|
|
[operator: bolichen97] Closing as superseded: this work landed on main through #23335, reopened from a same-repo branch so the Sensitive Change Review could run. Thank you for the contribution; your commits are credited there. |
Problem / Motivation
Goal: Give the user a per-meeting note of their own, beside the agents' outputs, that no agent can overwrite and that survives the panel closing, a refused save and a pasted screenshot.
Everything written during a meeting belongs to an agent: the minutes, the diagram, the action items. The user's own thoughts have nowhere to go — anything typed into the broadcast bar is dispatched to the agents, and the minutes are rewritten by the note-taker after every batch.
Why it matters
The one artefact of a meeting nobody can regenerate is the part a person thought of themselves. Today the user keeps it outside the app, so the meeting's record is split in two: the agents' output here, the reasoning that explains it somewhere else.
Not a goal
What changed (motivation → approach → change)
The note is a Markdown file the user owns, stored outside every agent-writable directory and edited in a side panel that autosaves.
<data>/notes/<meeting>/note.md, with pasted images inimages/beside it (store.py,constants.py). The whole tree is on_WRITE_PROTECTED_HOME_PATHSinsecurity/paths_lists.py: an agent's file tool cannot rewrite it, while/api/file-rawstill serves its images. Nothing is migrated from the old<meeting>/_note.mdlocation, which never shipped.routes/meeting_lifecycle.py, registered inroutes/__init__.pybehindrequire_owner).GET/PUT /meetings/{id}/notecarries the whole note:MAX_NOTE_CHARS100k, a 2 MiB body cap so a CJK or escaped note under the character cap is not refused, an unencodable body answered with 400, and a save for a deleted meeting answered with 404.POST /meetings/{id}/note/imagestakes one image per request, signature-sniffed throughmessaging.raster.sniff_raster_mime(PNG, JPEG, GIF, WebP), at most 8 MiB each and 200 per meeting (domain/images.py), the count re-checked under the same lock as the write so concurrent pastes cannot pass it. An image's alt text is the meeting's elapsed time while it runs, and empty once it has ended. The note'spathis returned with forward slashes, so pasted images resolve on Windows too.routes/_common.pylets the note PUT pass its own body cap.hooks/useNoteDraft.tsowns the draft for as long as the meeting view is mounted, so closingcomponents/NoteSidebar.tsxkeeps it. A save's response never replaces newer typing, and a refused save stays dirty and is retried. A paste inserts a placeholder built from Unicode noncharacters and each upload replaces only its own, so concurrent pastes land in place; no placeholder character reaches a save, and every upload completion re-arms autosave. A flush waits for a different body still on the wire, so an edit undone mid-save is saved too. Once the hook unmounts it forgets its pending uploads, so a late upload cannot send an older draft over a reopened view. A stalled upload aborts after 60 s. Leaving the meeting view (MeetingView.tsx, throughuseMeetingSession.ts), for the list or for settings, first waits for any pending image upload, then saves until the current draft is acknowledged, so a screenshot pasted just before Back and an edit typed while that save was on the wire are both kept: on a refusal it stays and reopens the panel, closing the other side panels. Apagehidelistener saves on reload and tab close, which never unmount React. A save whose body fits the browser's 64 KiBkeepalivecap is sent withkeepalive, and a larger one as a plain fetch, so a big note still saves. Editing pauses only when the note never loaded; a failed refetch of a loaded note keeps saving. The sharedrequest()wrapper inapi.tsno longer forces a JSONContent-TypeontoFormData, which the multipart upload needs;noteText.tsholds the snippet helpers.app.jsonandcomponents/appstore/appManifest.tsadd it to the app's highlights). It has edit and preview modes, a footer reading Saving / Saved / Unsaved changes / Editing paused, and failures shown inline inErrorNotice. Strings are added to every catalog underwebsite/src/i18n/locales/(for examplelocales/en.json), anddocs/system-specs/modules/meetings.mdcovers the routes, layout and fence.Accepted residual
The draft lives exactly as long as the meeting view. If the view unmounts anyway while its final save is refused (for example a browser navigation that cannot be held), that draft is lost. Separately, a note larger than the 64 KiB
keepalivecap is sent withoutkeepalive, so a reload or tab close does not deliver it, and an unload save queued behind a save still on the wire dies with the page.MeetingsNoteDraft.test.tsxasserts the first case as accepted. An earlier revision kept such drafts in a module-level store with a conflict notice; it is removed here because every repair of it reopened a stale-overwrite path.Backwards compatibility
Compatible: new routes, a new data directory and a new write-fence entry; no existing file or route changes shape.
Tests
test/test_meetings_note.py— containment outside the agent tree and the live write fence, linked-directory refusal, no migration, the HTTP contract, body caps (100k CJK characters accepted), 400 / 404 / 500 paths.test/test_meetings_note_images.py— multipart validation, signature sniffing per format, the per-meeting image budget including a concurrent upload that fills it, the deletion guard, and no alt text for an ended meeting.test/test_meetings_owner_gate.py— both mutation routes refuse a non-owner.website/src/test/MeetingsNoteDraft.test.tsx— stale acknowledgements, refused saves, the panel-close and exit paths, concurrent and edited-away placeholders, private-use characters the user typed surviving a save, an edit undone during a save, exit waiting for a pending upload (including on an empty note), exit saving an edit typed while its save was on the wire and answering false when that edit is refused, thepagehidesave, an upload completing after unmount, and a whole-suite assertion that no saved body carries a placeholder character.MeetingsNote.test.tsx,UseMeetingSessionCoverage.test.tsx,MeetingsApiClient.test.tsandMeetingsTranslation.test.tsxcover the panel states, the leave path (Back, Close and both settings exits), the note and image API calls (multipart without a hand-setContent-Type,keepaliveonly under the 64 KiB cap), a failed refetch that must still save on the way out, and the one-side-panel rule.Manual verification
Earlier revisions were driven against a live gateway (overflow menu, paste round trip through
/api/file-raw, refused save, size refusal). This head was driven in the built dashboard against stubbed meeting routes for the captures below. Still not covered by any run: a paste from the operating-system clipboard, and a note taken during a live transcribed meeting.Screenshots / video
Captured from this head in the built dashboard with stubbed meeting routes.
My note in the meeting overflow menu
Empty note
Typing, Unsaved changes
Saved after the debounce
Preview mode
Back with a refused save: the view stays, the panel shows the refusal
A note that could not be read: editing paused
320 px viewport: the panel stacks below the meeting
Related Issues
no linked issue: feature work from the Meetings stack; independent of #5738, #5741 and #2190.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)