Skip to content

Overlay: a slow transcription holds the disc instead of bouncing - #69

Merged
dinooo13 merged 1 commit into
mainfrom
overlay-one-exit
Sep 28, 2026
Merged

dinooo13 merged 1 commit into
mainfrom
overlay-one-exit

Conversation

@dinooo13

Copy link
Copy Markdown
Owner

Summary

When a toggle dictation was stopped, the pill sometimes dived, came back up saying "Transcribing…", and dived again.

The cause. At the release the pill gathers into the disc and dives. If the text had not been pasted 300 ms after the release, a spinner task flew the pill back up as the "Transcribing…" row. At Quick the dive takes 460 ms (260 ms gathering, 200 ms slide), so every transcription between 300 ms and the end of the dive bounced. A release inside an engine pass is exactly that case: a 42.6 s toggle dictation logged release-to-paste 0.489 s … engine 0.434 … engine-time 0.179 s. Long toggle dictations run more passes, so they hit it more often.

Now there is one exit, decided where the gathering ends:

  • Pasted by then (the usual case): the disc dives, as before.
  • Not yet: the disc stays where it is, a spinner replaces the wave, and it dives when .idle arrives. The clipboard hint and an error open out of it in place.
  • The late "Transcribing…" pill, its task and its 300 ms delay are removed. Only the polish path, which waits seconds, still shows the row.
  • A flight-in that completes after the release has begun the exit no longer opens the disc back into the row.

OverlayDemo gains a "late" take, pasted 450 ms after the release, the reported case.

Test plan

  • swift build, swift test: all suites pass.
  • scripts/overlay-demo.sh, Compact at Quick. "late" (450 ms) and "slow" (900 ms) gather into the disc, hold it with the spinner and dive once; no "Transcribing…" row and no second flight. "plain" and "copied" look the same as before.
  • Live: a long toggle dictation whose release lands inside an engine pass.

No benchmark: only the overlay changes, and nothing between recordingStopped and inserted in DictationCoordinator is touched.

🤖 Generated with Claude Code

At the release the pill gathers into the disc and dives. When the text was
not pasted 300 ms after the release, a spinner task flew the pill back up
as "Transcribing…" and it left a second time. At Quick the dive takes
460 ms, so every transcription between 300 ms and the end of the dive
bounced: down, up, down. A release inside an engine pass is exactly that
case (a 42.6 s toggle dictation logged engine 0.434 s against engine-time
0.179 s), and long toggle dictations run more passes.

Now the decision is made where the gathering ends. Pasted by then, the
disc dives as before. Not yet, and the disc stays where it is with a
spinner in place of the wave until `.idle` sends it down; the clipboard
hint and an error open out of it in place. The late "Transcribing…" pill
and its delay are gone; only the polish path, which waits seconds, still
shows the row.

A flight-in that completes after a release has begun the exit no longer
opens the disc back into the row.

The overlay demo gains a "late" take, pasted 450 ms after the release.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dinooo13
dinooo13 merged commit 3addeb6 into main Sep 28, 2026
1 check passed
@dinooo13
dinooo13 deleted the overlay-one-exit branch September 28, 2026 18:42
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