fix(tauri): UI fixes - mic button state and window persistence#9
fix(tauri): UI fixes - mic button state and window persistence#9
Conversation
…opening - Remove recording button color changes (now just a link to recording window) - Simplify CSS by removing recording state classes and animations - Fix window opening without document on startup
- Add BUNDLE_VERSION variable in project.yml (dev for Debug, 0.2.0 for Release) - Update Info.plist to use $(BUNDLE_VERSION) for version strings - Add 'make dev' and 'make build-debug' targets for Debug builds - About panel now shows 'Version dev' in development builds
The Tauri version is now the primary and actively maintained version. macOS native (apps/macos/) is no longer receiving updates.
The plugin was installed but not initialized. Now windows will save and restore their position/size between sessions.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR shifts the project to a Tauri‑centric architecture (deprecating the macOS native path), adds Makefile-driven build workflows and a git‑hash development build script, adjusts Tauri permissions and window‑state handling, updates the Whisper transcriber hint, and implements outline scroll‑tracking plus UI/CSS tweaks. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Replace modal-btn with btn and modal-btn-primary with btn-primary to fix styling in dark theme.
The recording window should always start hidden, not restore previous visibility state.
d0a94d5 to
67a75a8
Compare
Adds native macOS behavior - double-clicking the title bar toggles maximize/restore.
- Add apps/tauri/Makefile with targets: dev, build, build-dev, install, clean
- Add scripts/build-dev.sh for local builds with git hash (0.0.0-{hash})
- Update CLAUDE.md with Makefile usage and build documentation
- Local builds clearly show version 0.0.0-abc1234 to differentiate from releases
- Highlight current visible heading in outline sidebar - Use IntersectionObserver to track scroll position - Auto-scroll outline to keep active heading visible - Add visual styling for active heading with border and color
Changed from Some("auto") to None as per whisper.cpp API specification for automatic language detection
Persist last active heading when scrolling between sections to prevent outline from losing active state
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/macos/Makefile (1)
1-12:⚠️ Potential issue | 🟡 MinorAdd
devto.PHONYto avoid file-name collisions.Without this, a file named
devcould prevent the target from running.🔧 Proposed fix
-.PHONY: all generate build build-debug install install-script uninstall clean dist +.PHONY: all generate build build-debug dev install install-script uninstall clean dist🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/macos/Makefile` around lines 1 - 12, The .PHONY declaration currently lists targets but omits the dev target, which can cause a real file named "dev" to block running the dev recipe; update the .PHONY line to include dev (i.e., add "dev" to the list alongside all, generate, build, build-debug, install, install-script, uninstall, clean, dist) so the dev target is always treated as phony and not shadowed by a filesystem entry.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/tauri/Makefile`:
- Around line 35-48: The install target in the Makefile currently copies
"$(BUNDLE_DIR)/$(APP_NAME)" into "$(APP_DEST)" but doesn't ensure the
destination exists; update the install recipe (install target) to create the
"$(APP_DEST)" directory (and parent directories if needed) before running cp -R,
and likewise ensure the "$(CLI_DEST)" directory exists prior to copying the CLI
script; modify the install target commands to run a mkdir -p on "$(APP_DEST)"
(and on the directory portion of "$(CLI_DEST)" if different) so cp won't fail on
fresh machines/CI.
In `@CLAUDE.md`:
- Around line 53-54: The documentation line for scripts/set-version.sh omits
that Info.plist is updated; update the CLAUDE.md entry that currently lists
"updates Cargo.toml, tauri.conf.json, package.json" to include Info.plist as
well so it reads that scripts/set-version.sh updates Info.plist, Cargo.toml,
tauri.conf.json, and package.json; reference the script name
scripts/set-version.sh and the config file names Info.plist, Cargo.toml,
tauri.conf.json, package.json when making the change.
---
Outside diff comments:
In `@apps/macos/Makefile`:
- Around line 1-12: The .PHONY declaration currently lists targets but omits the
dev target, which can cause a real file named "dev" to block running the dev
recipe; update the .PHONY line to include dev (i.e., add "dev" to the list
alongside all, generate, build, build-debug, install, install-script, uninstall,
clean, dist) so the dev target is always treated as phony and not shadowed by a
filesystem entry.
|
Sobre o comentario outside-diff do CodeRabbit (adicionar |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CLAUDE.md`:
- Around line 42-49: The "Local development builds" section references
./scripts/build-dev.sh but doesn't state the required working directory; update
the doc near the "Local development builds:" header to add a single-line cue
that scripts/build-dev.sh must be run from the repository root (e.g., "Run this
from the repo root: cd <repo-root> && ./scripts/build-dev.sh") so readers don't
mistakenly run it from apps/tauri; mention the script path
"scripts/build-dev.sh" and the command " ./scripts/build-dev.sh" explicitly to
make it unambiguous.
---
Duplicate comments:
In `@apps/tauri/Makefile`:
- Around line 35-49: The install target can fail because the CLI destination
directory may not exist; update the install recipe (install target) to create
the CLI destination directory before copying the script by running mkdir -p
"$(CLI_DEST)" (or mkdir -p "$(CLI_DIR)" if you keep a directory variable) prior
to sudo cp and chmod so that the CLI copy commands using CLI_DEST succeed;
modify the block that checks for "../../scripts/arandu" to first ensure the
destination directory exists, then copy and chmod the file.
macOS requires NSMicrophoneUsageDescription in Info.plist for apps that access the microphone. Without it, the system silently blocks microphone access when the app is launched via Finder/Spotlight, causing Whisper transcription to return [BLANK_AUDIO]. The app worked when launched from terminal because it inherited permissions from Terminal.app.
Implements Drop trait for AudioRecorder to explicitly close the audio stream when the recorder is destroyed. Adds a 100ms delay after stopping the stream to give macOS time to update the microphone indicator icon in the menu bar. This prevents the microphone icon from staying active after recording is stopped or cancelled.
|
✅ Implementado em 004c926 Adicionado comentário clarificando que Ref: #9 (comment) |
Calls stream.pause() before dropping to ensure the audio device is properly released. Increases delay from 100ms to 200ms to give macOS more time to update the microphone indicator in the menu bar. Applies to both stop() method and Drop trait implementation.
Summary
Changes
Tauri UI fixes
setRecordingState()function and event listeners that changed button appearance.recording-active,.recording-processingclasses and@keyframes pulse-recordingtauri_plugin_window_statepluginDocumentation & macOS
make devandmake build-debugtargetsTest plan
cd apps/tauri && npx tauri dev🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
UI/UX Improvements
Build & Development
Permissions
Deprecations