feat(ui): configurable floating transcription bar (single-line + multi-line)#122
Merged
joewongjc merged 1 commit intojoewongjc:mainfrom Apr 13, 2026
Conversation
- Add layout presets (General settings): single-line default/wide, multi-line 2–4 rows - Grow bar width with transcript until max width; multiline wraps/scrolls inside - Replace full Capsule clip with capped corner radius to reduce text clipping on wide bars - Multiline: leading-aligned copy, scroll-to-latest, dimmed AudioRipple, centered record dot - Resize NSPanel when layout changes; layout screenshot in docs/images/ Made-with: Cursor
Owner
|
Merged into main — conflicts with our hover preview feature resolved in favor of our implementation. Thanks for the contribution @MangoWAY! Your commit is preserved in history. |
Owner
|
我给你优化了一下,Hover出完整文本,也可以完全关闭。 |
Contributor
Author
👍 |
joewongjc
added a commit
that referenced
this pull request
Apr 13, 2026
Contributed by @MangoWAY — batch selection/delete for history records, transactional multi-row SQLite delete, selection helpers with tests. Additional fix: VStack → LazyVStack for proper infinite scroll pagination. Reverted PR #122 auto-merged floating bar changes (layout mode, corner radius). Co-Authored-By: Claude Opus 4.6 (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.
Summary
Adds user-configurable layout modes for the bottom floating live transcription bar (the non-activating panel shown while recording). Reviewers can see what this looks like in the screenshot below—no need to infer behavior from SwiftUI alone.
Motivation
During long dictation, the previous single-line bar only showed a short tail of text. Users asked for wider single-line and multi-line options so they can still read what they said earlier without relying only on history after the fact.
What’s new
Settings (General → Speech recognition behavior)
New dropdown “Transcription bar” / 「识别悬浮条」 (
UserDefaultskeytf_floatingBarLayout):Implementation notes
FloatingBarLayoutMode: centralizes presets, dimensions, and settings labels (EN/ZH).Capsule()clip with rounded rectangle and capped corner radius (TF.floatingBarMaxCornerRadius) so wide bars don’t use stadium ends that clip text; small square “preparing” state stays circular.AudioRipplebehind text, recording dot vertically centered to the text block; panel resizes on layout change (Notification.Name.floatingBarLayoutDidChange), with anNSObjectselector bridge to satisfy Swift initialization rules for observers.Screenshot
Multi-line mode (4 visible rows) — real capture from local testing:
(Image file in repo:
docs/images/floating-bar-multiline-4rows.png)Testing
swift build -c releaseswift testFiles touched (high level)
Type4Me/UI/FloatingBar/FloatingBarLayoutMode.swift(new)Type4Me/UI/FloatingBar/FloatingBarView.swift,FloatingBarPanel.swiftType4Me/UI/Settings/GeneralSettingsTab.swiftType4Me/UI/DesignSystem.swift(floating bar corner cap token)docs/images/floating-bar-multiline-4rows.png(documentation / PR illustration)