fix(meetings): Copy notes copies the open template report, not the Standard note#318
fix(meetings): Copy notes copies the open template report, not the Standard note#318Optic00 wants to merge 3 commits into
Conversation
|
Heads-up on overlap with #317: that PR's latest revision also touches |
There was a problem hiding this comment.
1 issue found and verified against the latest diff
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/renderer/src/routes/MeetingDetail.tsx">
<violation number="1" location="app/renderer/src/routes/MeetingDetail.tsx:498">
P2: Copy notes can show a false success state when clipboard write fails, because the handler marks `copied` immediately instead of after a successful write. Matching the transcript copy pattern (or chaining `.then`) would keep feedback aligned with actual clipboard outcome.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| }, | ||
| activeReport ? { content: stripReasoning(activeReport.content) } : null, | ||
| ); | ||
| void navigator.clipboard.writeText(text); |
There was a problem hiding this comment.
P2: Copy notes can show a false success state when clipboard write fails, because the handler marks copied immediately instead of after a successful write. Matching the transcript copy pattern (or chaining .then) would keep feedback aligned with actual clipboard outcome.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/renderer/src/routes/MeetingDetail.tsx, line 496:
<comment>Copy notes can show a false success state when clipboard write fails, because the handler marks `copied` immediately instead of after a successful write. Matching the transcript copy pattern (or chaining `.then`) would keep feedback aligned with actual clipboard outcome.</comment>
<file context>
@@ -474,36 +475,25 @@ function DetailContent({ meeting }: { meeting: Meeting }) {
+ },
+ activeReport,
+ );
+ void navigator.clipboard.writeText(text);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
</file context>
… the Standard note copyNotes built the clipboard payload from the Standard structured fields unconditionally, so with a generated template report on screen the copy silently disagreed with the displayed note. Extract the builder into lib/notesCopy.ts (pure, unit-tested) and route it through the component's activeReport: report open -> title + meta + the report's markdown, otherwise the Standard sections as before. Coverage: vitest unit tests for the builder + a T1 e2e spec driving the real pill switch and Copy notes action against a seeded meeting carrying a report (new STENOAI_E2E_SEED_REPORT seam in the mock IPC, gated so transcript-export.t1 keeps its report-less meeting).
- Disable Copy notes while a summary/report stream is on screen (all non-idle phases are transient in-flux states) so the clipboard can't get the old note while the body shows streamed text (Codex finding). - Make the mock IPC's set-active-report stateful for the seeded report so the pill switch survives the post-mutation refetch like the real sidecar does, keeping the T1 spec faithful rather than relying on the re-sync effect's unchanged-dep skip.
Align the copy paths with the rendered views (and with ruzin#317, which makes the report view render stripReasoning'd content): both the Standard summary and an open report's markdown are stripped before hitting the clipboard. Seeded T1 report now carries a leading <think> block and the spec asserts it never reaches the clipboard.
a067e89 to
37926a7
Compare
Problem
With a generated template report open in MeetingDetail, the header "Copy notes" action still copied the Standard structured note. The clipboard silently disagreed with what was on screen.
Fix
app/renderer/src/lib/notesCopy.ts(pure, unit-tested): when a report is open it copies title + date/duration + that report's markdown; otherwise the Standard sections exactly as before (byte-identical output for the standard path).streamPhase !== 'idle', all transient states) — same bug class: the body shows in-flux streamed text while the clipboard would get the old note.Coverage
buildNotesCopyText(standard path, report path, empty-section omission, whitespace-only report).copy-notes-report.t1.spec.tsdriving the real pill switch + Copy notes action against a seeded meeting carrying a report. NewSTENOAI_E2E_SEED_REPORTseam in the mock IPC (env-gated sotranscript-export.t1keeps its report-less meeting), with a statefulset-active-reportmock so the pill switch survives the post-mutation refetch like the real sidecar.Full T1 suite 19/19, vitest 78/78, typecheck + lint clean.
Not changed (by design)
Template reports intentionally live in the
<stem>_reports.jsonsidecar, not as standalone.mdfiles (src/report_store.py) — "view containing folder" not showing a report md is the designed storage model, out of scope here.Summary by cubic
Fixes “Copy notes” to copy the open template report (not always the Standard note), strips hidden reasoning blocks, and disables the action while streaming to avoid stale copies.
Bug Fixes
streamPhase !== 'idle'to prevent clipboard/display mismatches.Refactors
app/renderer/src/lib/notesCopy.tswith unit tests.copy-notes-report.t1.spec.ts; mock IPC now supportsSTENOAI_E2E_SEED_REPORTand a statefulset-active-report(seeded report includes a block to verify stripping).Written for commit 37926a7. Summary will update on new commits.