Skip to content

feat(meetings): add a per-meeting note the user owns - #7194

Closed
kaizawa97 wants to merge 2 commits into
kirodotdev:mainfrom
kaizawa97:pr/meetings-note
Closed

kaizawa97 wants to merge 2 commits into
kirodotdev:mainfrom
kaizawa97:pr/meetings-note

Conversation

@kaizawa97

@kaizawa97 kaizawa97 commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Collaborative or multi-tab editing: the note is last-write-wins, with no conflict UI.
  • Keeping a draft after the meeting view itself unmounts on a refused save (see Accepted residual).
  • Hiding the note from agents' reads: the fence refuses writes only.

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.

  • Storage. <data>/notes/<meeting>/note.md, with pasted images in images/ beside it (store.py, constants.py). The whole tree is on _WRITE_PROTECTED_HOME_PATHS in security/paths_lists.py: an agent's file tool cannot rewrite it, while /api/file-raw still serves its images. Nothing is migrated from the old <meeting>/_note.md location, which never shipped.
  • Routes (routes/meeting_lifecycle.py, registered in routes/__init__.py behind require_owner). GET/PUT /meetings/{id}/note carries the whole note: MAX_NOTE_CHARS 100k, 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/images takes one image per request, signature-sniffed through messaging.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's path is returned with forward slashes, so pasted images resolve on Windows too. routes/_common.py lets the note PUT pass its own body cap.
  • Draft. hooks/useNoteDraft.ts owns the draft for as long as the meeting view is mounted, so closing components/NoteSidebar.tsx keeps 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, through useMeetingSession.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. A pagehide listener saves on reload and tab close, which never unmount React. A save whose body fits the browser's 64 KiB keepalive cap is sent with keepalive, 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 shared request() wrapper in api.ts no longer forces a JSON Content-Type onto FormData, which the multipart upload needs; noteText.ts holds the snippet helpers.
  • Panel. "My note" in the meeting's overflow menu (app.json and components/appstore/appManifest.ts add 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 in ErrorNotice. Strings are added to every catalog under website/src/i18n/locales/ (for example locales/en.json), and docs/system-specs/modules/meetings.md covers 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 keepalive cap is sent without keepalive, 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.tsx asserts 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, the pagehide save, 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.ts and MeetingsTranslation.test.tsx cover the panel states, the leave path (Back, Close and both settings exits), the note and image API calls (multipart without a hand-set Content-Type, keepalive only 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

My note in the meeting overflow menu

Empty note

Empty note

Typing, Unsaved changes

Typing, Unsaved changes

Saved after the debounce

Saved after the debounce

Preview mode

Preview mode

Back with a refused save: the view stays, the panel shows the refusal

Back with a refused save: the view stays, the panel shows the refusal

A note that could not be read: editing paused

A note that could not be read: editing paused

320 px viewport: the panel stacks below the meeting

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

  • 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

@kaizawa97
kaizawa97 requested review from a team and patrigao August 31, 2026 03:25
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Aug 31, 2026
@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 Aug 31, 2026

@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.

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 hours MAX_SESSION_DURATION allows).

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.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 3, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

Open PR relationship audit

This 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

  • PR #5738 is OVERLAPPING relative to this PR. The goals differ or the implementations can complement each other; this is not a duplicate claim. Recommended action for PR #5738: CONTINUE_DEVELOPMENT. Independent Meetings features that collide only on shared surfaces (the toolbar, the session return object, the manifest highlight numbering and 13 locale catalogs). Both should land; the second to land renumbers its highlight and resolves the toolbar conflict. Worth noting for the author because the app.json/appManifest.ts collision auto-merges without a conflict marker and would ship a mismatched App Store highlight list. Files: src/kiro_crew/apps/builtins/meetings/app.json, website/src/apps/meetings/MeetingView.tsx, website/src/apps/meetings/hooks/useMeetingSession.ts.
  • PR #7196 is OVERLAPPING relative to this PR. The goals differ or the implementations can complement each other; this is not a duplicate claim. Recommended action for PR #7196: REBASE. Complementary meetings features sharing the manifest, app.json permission list, MeetingView header and useMeetingSession surface. Whichever lands second resolves the highlight renumbering; no code needs to be dropped. Files: website/src/components/appstore/appManifest.ts, src/kiro_crew/apps/builtins/meetings/app.json, website/src/apps/meetings/MeetingView.tsx.
  • PR #8081 is OVERLAPPING relative to this PR. The goals differ or the implementations can complement each other; this is not a duplicate claim. Recommended action for PR #8081: REBASE. Same app and the same shared append points, entirely different user goal. Independent; no coordination needed beyond ordinary locale-file merges. Files: website/src/apps/meetings/api.ts and src/kiro_crew/apps/builtins/meetings/backend/constants.py. The two independent directions used different labels; the matrix conservatively retains OVERLAPPING for coordination.

No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit.

@dwu96 dwu96 added the needs-pr-triage PR scanner: awaiting automated triage label Sep 7, 2026
@NicholasRBowers NicholasRBowers added drive-to-green PR claimed by drive-to-green pipeline and removed needs-pr-triage PR scanner: awaiting automated triage labels Sep 7, 2026
@NicholasRBowers

Copy link
Copy Markdown
Contributor

🤖 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 focus-ring cue to the NoteSidebar.tsx:211 textarea (clears the Focus Cue Gate) and add a route-specific MAX_NOTE_BODY_BYTES to handle_put_note so a 100k-char CJK/emoji note doesn't 413, with a multi-byte TestBodyCaps mirror and the one-sentence spec update. A rebase clears the inherited backend reds; also fixing the broken source-pattern frontend test and committing the mandatory screenshots.

If you'd prefer I don't touch this PR, add the pr-no-autofix label.

@bolichen97

Copy link
Copy Markdown
Contributor

Rebased onto main 1192049a by a maintainer as part of the 2026-09-08 open-PR audit (was 1065 commits behind).

Conflicts, resolved additively (no behaviour change to this PR):

  • src/kiro_crew/apps/builtins/meetings/backend/constants.py — kept main's new # importing an existing recording block and appended this PR's # notes block after it.
  • docs/system-specs/modules/meetings.md — 3 hunks: kept both audio.py and images.py file-map rows; kept main's client-supplied-path bullet plus this PR's two note bullets and merged the "no blocking call" list; merged the test inventory so test_meetings_audio_import.py and the two note test files are both listed.

Gates run locally on the rebased head: black, isort, flake8 (changed files), pytest test_meetings_note{,_images}.py test_meetings_minutes.py test_meetings_routes.py 318 passed, tsc --noEmit clean, MeetingsNote.test.tsx green.

One pre-existing failure, unchanged by the rebase: MeetingsTranslation.test.tsx "keeps the two side panels mutually exclusive" — its source regex expects setSidebarOpen(false) adjacent to setTranslationOpen(open => !open), and this PR inserts setNoteOpen(false) between them. It fails identically on your old head b3f19506; the property still holds, the regex needs widening for the third panel. Please fix in your next push.

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.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Sep 8, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Rebased onto main 3f771b76 by a maintainer (head b98d60a4, was d49f76003 on 1192049a). Shape held: 29 files, +2039/-31 against the new base.

Conflicts, and how they were resolved

  • website/src/apps/meetings/MeetingView.tsx — one hunk, the lucide-react import list. main added Pause as PauseIcon; this PR adds NotebookPen. Kept both, in alphabetical order. No other hunk in the file conflicted.
  • Every other file auto-merged, including the three the 2026-09-08 rebase had to settle by hand (backend/constants.py, docs/system-specs/modules/meetings.md, the locale catalogues) — main has not touched those append points since.

Repairs to this PR's own code, in the same push

  1. The MeetingsTranslation.test.tsx mutual-exclusion test, which the previous rebase note asked for. keeps the two side panels mutually exclusive matched setSidebarOpen(false) and the translation toggle as two ADJACENT lines, and this PR writes setNoteOpen(false) between them. The property holds — each of the three toggles closes the other two — so the assertion was widened rather than relaxed: it now checks, per toggle, that the lines preceding it close every sibling panel, which no longer pins the order the closes happen to be written in. Renamed to keeps the side panels mutually exclusive.
  2. A focus cue on the note textarea, which the Focus Cue Gate required. NoteSidebar.tsx's textarea carried outline-none with nothing in its place, so the gate failed on an element this diff wrote. Replaced with focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent — an INSET ring, because the panel is overflow-hidden and the global :focus-visible outline (2px at 2px offset, painted outside the box) is clipped on the edges this field sits flush against. Matches the treatment already used on the scrolling panels in SessionSummaryTab.tsx and WorkflowCompletionCard.tsx.
  3. A lost indent on const transcriptKey = ... in useMeetingSession.ts, which this PR's own hunk had flattened to column 0.

Nothing else was changed. In particular: handle_put_note reads its body with the shared 256 KiB _common.MAX_BODY_BYTES default while MAX_NOTE_CHARS is 100_000 characters, so a CJK note inside the route's own documented limit is refused with a 413 before the character check runs. That is worth a MAX_NOTE_BODY_BYTES mirroring MAX_MINUTES_BODY_BYTES, but MAX_BODY_BYTES has been 256 KiB since the app landed in #1080 — the rebase did not cause it and the fix is not rebase repair, so it is left for a separate change rather than folded into this diff.

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 recording/ package, no /api/ws/recording route, no recording.require_local_gateway key and no website/src/apps/meetings/audio/ — verified by filename scan over git diff --name-only origin/main...HEAD.

What ran on this head

Backend, pytest -n0 over the whole meetings suite (test_meetings_note, test_meetings_note_images, test_meetings_minutes, test_meetings_routes, test_meetings_store, test_meetings_session, test_meetings_translation, test_meetings_audio_import, test_meetings_agent_names, test_meetings_dictionary, test_meetings_providers, test_meetings_calendar_poller): 881 passed.

Frontend, vitest run over the meetings modules (MeetingsNote, MeetingsTranslation, MeetingsPage, MeetingsPageCov80, MeetingsApiClient, MeetingsSessionLogic, UseMeetingSessionCoverage): 238 passed.

Gates, each run the way CI invokes it, all green: check_focus_cue.py (whole tree and diff-scoped), check_comment_history.py, check_black_formatting.py, check_brand_name.py, check_feature_map.py, check_changelog_history.py, check_testpaths_coverage.py, check_sync_io_in_async.py, check_loop_bound_locks.py, check_harness_parity.py, docs_lint.py, npm run i18n:check, npm run lint:phantom-classes, tsc -p tsconfig.app.json, eslint --max-warnings 0 on the changed files, and isort/flake8/mypy over the meetings package.

A symbol check on every non-test .py this PR touches (comm -23 of the def names at origin/main against this head) is empty for all four, so no upstream function was dropped; every removed line in the diff is either a JSON trailing-comma edit or a prose reflow that keeps main's sentence.

One check this push does not turn green

Screenshot Evidence needs an image in the description, and this PR adds a real sidebar, so the <!-- no-visual-delta --> waiver would be a false claim and is deliberately not used. No image file is committed either — review media does not belong in the tree. Capturing the panel needs a live meeting in a running gateway, so the attachment is left to a human with the app open; gh pr edit 7194 --attach <file> on this PR, before any further push, is the route.

The description was also missing ## Why it matters, which the Fork PR Description check requires; that section has been added.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 21, 2026
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

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

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

  • Upload in progress: the footer reads apps.meetings.note.uploading "Adding image…" with a pulsing ImagePlus icon. Needs a screenshot taken mid-upload.
  • Upload refused: the ErrorNotice with "Could not add that image. Paste a PNG, JPEG, GIF or WebP." and "That image is too large to add to a note." Needs a screenshot of each.
  • Pasted image in place: the inline placeholder, the ![<elapsed>](images/…) markdown in edit mode, and the image rendered in Preview through BasePathCtx. Needs one edit-mode and one preview-mode screenshot after a paste.
  • "Loading your note…" and "Saving…" footer states: both are new strings that appear in no screenshot. Needs one screenshot of each.

Notes

  • 320 px screenshot (attachment-08): the Transcript card runs past its column's bottom border and overlaps the broadcast input. The note panel's min-h-[260px] leaves the meeting column too short. Either cap the note panel lower on narrow viewports, or let the page scroll so the transcript card stays inside its own area.
  • noteSaveFailed "Could not save your note." gives no next step, but the draft retries on its own. Say so in the notice, e.g. "Could not save your note. Retrying as you type — keep this panel open."
  • The Preview/Edit toggle is icon-only (Eye/Pencil) and these icons are not in the universal set. Add the visible text "Preview"/"Edit" next to the icon, matching the text-labelled header buttons.

[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 .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.

@bolichen97

Copy link
Copy Markdown
Contributor

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.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Large valid notes cannot be saved span=504a9718a8ca

fixed in 93d067c.
saveNote sets keepalive only when the encoded body is at most 64 KiB (NOTE_KEEPALIVE_MAX_BYTES); a larger note is sent as a plain fetch and saves normally.
Locked by two tests in MeetingsApiClient.test.ts (under and over the cap).

@bolichen97

Copy link
Copy Markdown
Contributor
  • Saving deletes valid Unicode characters span=4b3bed02c324

fixed in 93d067c.
Placeholders are now built from the Unicode noncharacters U+FDD0 and U+FDD1, which the standard reserves for internal use and never assigns a glyph. U+E000 and U+E001 the user types are saved unchanged.
New test in MeetingsNoteDraft.test.tsx saves a note containing private-use characters and asserts the body is byte-identical.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Concurrent uploads bypass the image-count ceiling span=4b2b2e3acf4c

fixed in 93d067c.
_save_note_image re-counts the images inside store.meta_transaction(), the same lock as the write, and refuses with 400 at MAX_NOTE_IMAGES. The earlier count stays as a fast path that spares reading the body.
New test in test_meetings_note_images.py simulates the race (fast path sees room, the locked count sees the note full) and asserts nothing is written.

@bolichen97

Copy link
Copy Markdown
Contributor
  • keepalive on every save span=0c896745b14b

fixed in 93d067c.
keepalive is set only when the body fits the 64 KiB cap; larger notes use a plain fetch. Tests in MeetingsApiClient.test.ts.

@bolichen97

Copy link
Copy Markdown
Contributor
  • flush reports saved when a refetch failed span=cf8f6e901069

fixed in 93d067c.
loadFailed is now noteQuery.isError && noteQuery.data === undefined, so only a note that never loaded pauses editing. A failed refetch of a loaded note keeps saving, and leaveNote waits for that save.
New test in UseMeetingSessionCoverage.test.tsx fails on the old expression and passes on this one.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Windows note path breaks image preview span=5cde485323de

fixed in 93d067c.
store.read_note returns path.as_posix(), so the renderer's forward-slash strip resolves images/... beside the note on every host. test_meetings_note.py asserts the path has no backslash.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Two note-named surfaces in one view span=9443c9576134

needs-a-decision.
The menu item reads "My note" so it is told apart from the agent-written "Notes" widget. Whether that is enough for a first-time reader is a product call: maintainer, please confirm the label or name an alternative.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Preview/Edit toggle is icon-only span=44134ea84e69

needs-a-decision.
The toggle carries an accessible name from the catalog (note.preview / note.edit). Adding visible text changes the panel header layout, which the frozen goal did not settle: maintainer, please say whether to add the visible label in this PR.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Nothing says images can be pasted span=58aaac7b7aac

needs-a-decision.
A paste hint is new copy in eleven catalogs. Maintainer, please confirm the wording to add to note.hint, or leave it out of this PR.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Image too large names no limit span=765048c05497

needs-a-decision.
The 413 response carries max_bytes, so the message can name the 8 MB limit. It is new copy in every catalog: maintainer, please confirm the change belongs in this PR.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Missing rendered evidence of the new panel span=c09aaca12aa7

needs-a-decision.
Fresh captures of this head (empty, typing, preview, refused save, load failure, narrow viewport) still have to be taken on a live gateway. This lane stays blocked until they are attached to the description.

@bolichen97

Copy link
Copy Markdown
Contributor
  • OS clipboard paste never exercised span=8a9ff7910241

needs-a-decision.
One manual paste from the operating system clipboard on a live gateway at this head is still owed, and needs a person at a desktop browser.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Restoring the baseline during a pending save loses the restoration span=4b3bed02c324

fixed in de4d34c. A flush that finds a different body on the wire now waits for it to settle and judges the draft against what landed, so an edit undone mid-save is sent after the in-flight PUT.
Regression test: MeetingsNoteDraft.test.tsx, saves an edit undone while its save was on the wire.

@bolichen97

Copy link
Copy Markdown
Contributor
  • A departed view's upload can overwrite subsequently saved notes span=4b3bed02c324

fixed in de4d34c. The unmount cleanup sends the final flush at once, then clears the debounce and forgets the hook's pending upload tokens, so a late upload completion is a no-op and sends nothing. Closing only the panel does not unmount the hook, so uploads still land then.
Regression test: MeetingsNoteDraft.test.tsx, drops an upload that completes after unmount.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Reloading before debounce loses edits without attempting the final save span=4b3bed02c324

fixed in de4d34c. A pagehide listener runs an unload flush, which sends at once and uses keepalive when the body fits the 64 KiB cap. It is removed on unmount.
Regression tests: MeetingsNoteDraft.test.tsx, saves on pagehide, and stops listening for pagehide once the hook is gone.

@bolichen97

Copy link
Copy Markdown
Contributor
  • A refused exit opens the note alongside another side panel span=53bfb3fec851

fixed in de4d34c. leaveNote closes Translation before it opens the note on a refusal, and MeetingView closes its task sidebar on the same refusal.
Regression test: UseMeetingSessionCoverage.test.tsx, closes translation when a refusal opens the note.

@bolichen97

Copy link
Copy Markdown
Contributor
  • _note_image_alt invents a timestamp for an ended meeting span=5f9b3a11db9b

fixed in de4d34c. An ended meeting now gets the empty alt text the docstring already prefers over an invented time.
Regression test: test_meetings_note_images.py, an ended meeting stamps no time it never reached.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Cannot evaluate: no rendered evidence for the new note panel span=14018547ff5f

fixed: the description now carries eight captures of this revision, attached before the push of de4d34c: the menu item, empty, typing, saved, preview, a refused save on Back, a load failure, and a 320 px viewport.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Elapsed-time alt text on pasted images is undeclared

rebutted as subtraction: the alt text is how a reader lines a pasted screenshot up against the transcript, it costs one helper, and an ended meeting now gets the empty alt. Kept; the maintainer can ask for its removal.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Cannot evaluate: missing screenshots of the My note panel

fixed: eight captures of this revision are attached in the description, covering empty, typing, preview, refused save, load failure and a narrow viewport.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Settings navigation bypasses the refused-save exit guard span=1ceeaf61a008

fixed in 0c744e1. The agent bar's settings exits now go through the same awaited leave path as Back and Close: settings opens only once the note is on disk, and a refusal keeps the view with the note panel open.
Pinned in MeetingsNote.test.tsx: no raw onOpenSettings prop is forwarded and no direct onBack call remains.

@bolichen97

Copy link
Copy Markdown
Contributor
  • The note write fence does not stop agent shell writes span=5f2de26241bf

needs-a-decision, for a maintainer. The finding is real: the notes tree is fenced at the file-tool gate only, and no OS seal covers it.
A seal on the nested leaf apps/meetings/data/notes is weaker than it looks: the parent apps/meetings/data stays writable, so a sandboxed shell could rename it and move the notes out from under the mount, which is why other gateway-owned data uses a top-level leaf.
Option A, which I would take: move the notes to a top-level crew-home leaf and seal it read-only through the existing precreate and no-follow lists. Option B: seal the nested leaf and accept the rename residual.
Either one changes sandbox files, and this fork PR already needs a same-repository takeover for Sensitive Change Review, so I left the choice to that takeover.

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).
@bolichen97

Copy link
Copy Markdown
Contributor

target=gpt head=1807867138272d4e8fc89d2fd156d81f41924e25

  • Leaving during an upload silently drops the pasted screenshot (useNoteDraft.ts:266): fixed in 1807867.

exit now waits for every pending upload to settle before it saves, so the image markdown is in the draft it saves.
Each upload is aborted at the client deadline (NOTE_IMAGE_UPLOAD_TIMEOUT_MS), so the wait is bounded.
Only the unload flush, which cannot wait, still strips an unresolved placeholder.
Tests: exit waits for a pending upload; the empty note case answers only after the image is saved.

  • Recheck newer edits before permitting navigation (useNoteDraft.ts:273): fixed in 1807867.

After each landed exit save, exit compares the current draft to the acknowledged baseline and saves again until they match.
A refused save returns false, so the view stays and the draft stays dirty with the failure shown.
Tests: an edit typed during the exit save is saved before exit answers; a refused newer edit answers false.

@bolichen97

Copy link
Copy Markdown
Contributor

Thanks @kaizawa97. This PR edits security/paths_lists.py, and Sensitive Change Review cannot pass a fork PR that touches a sensitive path, so the same change is reopened from a branch of this repository as #23335. Your commit content is carried over unchanged apart from the rebase onto current main, with you credited through Co-authored-by. Review continues there; this PR stays open for now.

@bolichen97

Copy link
Copy Markdown
Contributor
  • Shell-enabled agents can still overwrite the user's note

rebutted by maintainer ruling (@bolichen97): the notes tree gets no sandbox seal against shell writes. This tier gates file edits only, and the same shell gap is accepted for config.json.
The meeting agents that are handed the meeting path ship fs_read, fs_write, grep and glob and no shell tool, so the file edit fence is the boundary they can reach. On the real gate an fs_write to the note and its images is denied, the same as config.json.
The change continues in #23335, which records this ruling in its description.

@bolichen97

Copy link
Copy Markdown
Contributor

[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.

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) merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants