Skip to content

fix(desktop): never generate summaries for too-short transcripts - #6596

Open
ComputelessComputer wants to merge 1 commit into
mainfrom
fix/skip-summary-for-short-transcripts
Open

fix(desktop): never generate summaries for too-short transcripts#6596
ComputelessComputer wants to merge 1 commit into
mainfrom
fix/skip-summary-for-short-transcripts

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

The 160-character eligibility gate only guarded the auto-enhance path,
so manual regenerate, template apply, and upload flows could still
produce a summary while the auto path toasted "Summary wasn't
generated" for the same session — and an undischarged pending
auto-enhance job kept re-firing that toast every resume cycle.

  • Gate EnhancerService.enhance() on transcript_too_short before any
    note writes, emitting the skip event and returning a too_short result
    (sessions without any transcript still enhance from notes)
  • Precheck eligibility in onRegenerate before starting the task directly
  • Discard the pending auto-enhance job when eligibility gives up, so the
    resume loop stops re-queueing and re-toasting

Note

Low Risk
Targeted guardrails on summary generation UX and job lifecycle; no auth, data migration, or broad architectural changes.

Overview
Unifies the transcript length gate so manual regenerate and other EnhancerService.enhance() callers behave like auto-enhance: if a transcript exists but fails the word/character minimums (transcript_too_short), enhancement stops before any summary document writes or AI task start, emits auto-enhance-skipped, and returns { type: "too_short" }. Sessions with no transcript still enhance from notes only.

Auto-enhance cleanup: when retries exhaust eligibility or enhance() returns too_short, durable pending auto-enhance jobs are discarded so resume cycles stop re-queueing and re-toasting.

UI: onRegenerate calls checkEligibility first and shows the same “Summary wasn’t generated” warning instead of starting generation in the main window path.

Reviewed by Cursor Bugbot for commit f524b93. Bugbot is set up for automated code reviews on this repo. Configure here.

The 160-character eligibility gate only guarded the auto-enhance path,
so manual regenerate, template apply, and upload flows could still
produce a summary while the auto path toasted "Summary wasn't
generated" for the same session — and an undischarged pending
auto-enhance job kept re-firing that toast every resume cycle.

- Gate EnhancerService.enhance() on transcript_too_short before any
  note writes, emitting the skip event and returning a too_short result
  (sessions without any transcript still enhance from notes)
- Precheck eligibility in onRegenerate before starting the task directly
- Discard the pending auto-enhance job when eligibility gives up, so the
  resume loop stops re-queueing and re-toasting
@netlify

netlify Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploy Preview for old-char canceled.

Name Link
🔨 Latest commit f524b93
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a76d67386f21300084c39bd

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f524b93. Configure here.

});
return;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Silent regenerate skip off main

Medium Severity

The new regenerate precheck depends on getEnhancerService(), which is null in standalone note windows that mount with includeServices={false}. Eligibility is skipped there, requestMainEnhance still runs, and main enhance() returns too_short with the skip toast only on main—so regenerate fails with no feedback in the window where it was triggered.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f524b93. Configure here.

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.

1 participant