[fix] voice typing: cap overlay preview so long dictation doesn't overflow#93
Open
yui0303 wants to merge 1 commit into
Open
[fix] voice typing: cap overlay preview so long dictation doesn't overflow#93yui0303 wants to merge 1 commit into
yui0303 wants to merge 1 commit into
Conversation
… overflow The transcript bubble had no height bound, so a long dictation grew past the fixed 460x180 overlay window and got clipped off-screen (looked like it "stopped"). Bottom-anchor + clip the bubble (max-h, overflow-hidden) so the newest words stay visible while older lines scroll off the top; the full text still goes to the clipboard unchanged. Also cache the Simplified->Traditional conversion per final segment instead of re-converting the whole transcript on every token (was O(n^2) over a long hold). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
Holding the push-to-talk key and dictating a lot made the live transcript appear to "stop" partway through. Two root causes, both in the floating overlay (not a time/character limit — there is none in the session, mic capture, or host):
publishre-ran the full Simplified→Traditional (OpenCC) conversion over the entire accumulated transcript on every incoming token, so a long hold got progressively laggier.Fix
max-h-[84px],flex-col justify-end,overflow-hidden): the newest words stay visible while older lines scroll off the top, so the preview never outgrows the window. The full text still goes to the clipboard / auto-paste unchanged — only the on-screen preview is bounded.start.Notes
main(post [feat] voice typing: global push-to-talk dictation overlay (fn key) #64/fix: remove unused dictation state #89/Voice typing: selectable push-to-talk key #90);tsc --noEmitclean.🤖 Generated with Claude Code