Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds a new "Transcribe" tab to Hex with a FileTranscription TCA feature: job model and status, reducer with async transcription effects (security-scoped access, duration detection, VAD chunking, optional history persistence), SwiftUI views for drag-and-drop and file import, app integration, localization, and related small UI/persistence tweaks. ChangesFile Transcription Feature
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/d2cc062c.md:
- Line 5: The changeset summary "Add a Transcribe tab for drag-and-drop audio
transcription." is missing the required GitHub PR/issue reference token; update
that summary line to include the reference in the format "Add a Transcribe tab
for drag-and-drop audio transcription. (#<PR_OR_ISSUE_NUMBER>)" so the
release-note formatting requirement is satisfied.
In `@Hex/Features/FileTranscription/FileTranscriptionFeature.swift`:
- Line 54: Remove the trailing comma after the "wav" element in the set/array
literal in FileTranscriptionFeature (the literal containing "wav") to satisfy
SwiftLint's trailing_comma rule; locate the literal in
FileTranscriptionFeature.swift and delete the comma so the collection ends with
"wav" without a trailing comma.
- Around line 188-189: The log statements in FileTranscriptionFeature use
unannotated interpolations for file/path values: update the
fileTranscriptionLogger calls to mark path-derived interpolations as private
(e.g. change fileTranscriptionLogger.notice("Transcribing imported audio
file=\(url.lastPathComponent)") to use \(url.lastPathComponent, privacy:
.private)) and similarly mark the file/path in the fileTranscriptionLogger.error
call (and any interpolated error details if sensitive) with privacy: .private;
locate these in the FileTranscriptionFeature (references:
fileTranscriptionLogger.notice and fileTranscriptionLogger.error) and apply the
privacy annotation to each path/file interpolation.
In `@Hex/Features/FileTranscription/FileTranscriptionView.swift`:
- Around line 122-156: The method loadDroppedFileURLs(from:) currently uses
NSItemProvider.loadItem with callbacks plus DispatchGroup/NSLock; replace this
with structured concurrency by creating an async wrapper around
NSItemProvider.loadItem (using
withCheckedContinuation/withCheckedThrowingContinuation) and then use a Task or
TaskGroup to await all providers, collect URLs via Self.fileURL(from:) and
capture the first error if any; finally call store.send(.addFiles(droppedURLs))
or store.send(.importFailed(firstError)) on the main actor once when complete.
Ensure the wrapper returns URL? or throws so you can handle nil/throwing
results, and update loadDroppedFileURLs to be async (or spawn a Task) so callers
remain non-blocking. Use the existing symbols: loadDroppedFileURLs(from:),
NSItemProvider.loadItem(forTypeIdentifier:...), Self.fileURL(from:),
store.send(.addFiles(...)) and store.send(.importFailed(...)).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c3e25c6f-3e09-43d0-972c-84fd1af60813
📒 Files selected for processing (10)
.changeset/d2cc062c.mdHex/Features/App/AppFeature.swiftHex/Features/FileTranscription/FileTranscriptionFeature.swiftHex/Features/FileTranscription/FileTranscriptionJob.swiftHex/Features/FileTranscription/FileTranscriptionJobRow.swiftHex/Features/FileTranscription/FileTranscriptionView.swiftHex/Features/History/HistoryFeature.swiftHex/Features/Settings/GeneralSectionView.swiftHexCore/Sources/HexCore/TranscriptPersistenceClient/TranscriptPersistenceClient.swiftLocalizable.xcstrings
|
Actionable comments posted: 0 |
|
there are lots of open source apps that do this already. imo this would just bloat hex and doesn't belong in this app. |
|
@what-name like which ones? |
Add a "Transcribe" tab for importing audio/video files via drag-and-drop or the file picker, transcribing them with the currently selected model. Adapted from kitlangton#232 for this fork's dual-engine setup. - Works with every engine. WhisperKit and Parakeet batch use the existing file-based transcribe; the Nemotron streaming model gains a one-shot transcribeFile path that feeds the whole file through the streaming manager (process(audioBuffer:) + finish()) in ~5s blocks. TranscriptionClient routes streaming models here instead of rejecting file-based transcribe. - Per-job progress: determinate percentage + bar for the Nemotron file path (real framesFed/total), indeterminate bar for batch engines that don't expose a decode fraction, plus a live elapsed timer for every job. - Multi-file import, per-job copy/remove, Clear Finished, and clear errors for unsupported or silent files. Imported transcripts save to History (preserving the original file extension) when history is enabled. Part of the Nemotron streaming integration (kitlangton#236). Verified: Debug build succeeds and HexCore swift test passes (62 tests, 5 suites); file transcription runtime-tested across engines with live progress. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Testing
xcodebuild -scheme Hex -configuration Debug -skipMacroValidation CODE_SIGNING_ALLOWED=NO -quiet buildcd HexCore && swift testSummary by CodeRabbit
New Features
Improvements
Localization