Skip to content

feat: Replace sync normalized-data with async flow (API-432)#48

Closed
hilnius wants to merge 2 commits into
mainfrom
robinnicollet/api-431-sample-app-add-async_correction-support-for-dictate-ws
Closed

feat: Replace sync normalized-data with async flow (API-432)#48
hilnius wants to merge 2 commits into
mainfrom
robinnicollet/api-431-sample-app-add-async_correction-support-for-dictate-ws

Conversation

@hilnius

@hilnius hilnius commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Showcase the recommended integration pattern for generate-normalized-data-async with a shared pollUntilSucceeded helper: poll after 10 seconds, stop after 5 minutes

hilnius and others added 2 commits July 15, 2026 11:57
Opt into async corrections on dictate CONFIG, handle server refinements in the note UI, and bump API version to 2026-07-01.

Co-authored-by: Cursor <cursoragent@cursor.com>
Showcase the recommended integration pattern for generate-normalized-data-async with a shared pollUntilSucceeded helper: poll after 10 seconds, stop after 5 minutes
@hilnius hilnius self-assigned this Jul 17, 2026
@hilnius hilnius closed this Jul 17, 2026

@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 and found 1 potential issue.

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit b4b53c5. Configure here.

if (job.status === "FAILED") {
throw new Error(`Async job ${job.id} failed.`);
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Timeout check precedes fetch, causing premature timeout

Medium Severity

In the polling loop, the deadline check on line 23 runs before fetchJob() on line 27. This means on the final iteration, the function throws a timeout error without making one last fetch. The effective timeout is timeoutMs - intervalMs (e.g. ~4 min 50 s instead of 5 min). A job that succeeds during the last sleep interval is never seen, producing a false timeout. Moving the deadline check after the fetch-and-status-check block fixes this.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b4b53c5. Configure here.

@hilnius
hilnius deleted the robinnicollet/api-431-sample-app-add-async_correction-support-for-dictate-ws branch July 17, 2026 11:18
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