Uh oh!
There was an error while loading. Please reload this page.
docs: document IPC workflow and add project structure - #20
Conversation
…ructure - Add Unix domain socket IPC documentation (workflow, commands, fallback) - Create comprehensive project structure section in CLAUDE.md - Document system tray functionality in README.md - Strengthen macOS native deprecation warning - Add architecture overview to README development section - Document conditional compilation patterns - Clarify CLI socket-first approach with open fallback
📝 WalkthroughWalkthroughAdds Unix-domain socket IPC (Unix-only) and TCP fallback, a macOS CLI installer fast-path, system tray integration notes, a Whisper subtree, public IPC modules in the Tauri backend, and related README/CLAUDE.md documentation including macOS-native deprecation and conditional compilation guidance. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant CLI as CLI (user)
participant Socket as Unix Domain Socket
participant Tauri as Tauri Backend (Rust)
participant Tray as System Tray / UI
CLI->>Socket: connect to /tmp/<app>.sock and send IpcCommand
Socket->>Tauri: accept connection, deliver IpcCommand
Tauri->>Tauri: parse command via ipc_common, execute handler
Tauri->>Tray: update tray state or notify frontend
Tauri-->>Socket: send IpcResponse
Socket-->>CLI: return response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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: 2
🧹 Nitpick comments (1)
CLAUDE.md (1)
150-151: Hard-coded line counts will go stale quickly.Specific counts ("194 lines") and ranges ("lines 7–42") are maintenance liabilities — they'll be wrong after the first code edit.
♻️ Proposed fix
-**Key files:**-- `apps/tauri/src-tauri/src/ipc.rs` - Socket server implementation (194 lines)-- `apps/tauri/src-tauri/src/cli_installer.rs` - CLI script with socket logic (lines 7-42)+**Key files:**+- `apps/tauri/src-tauri/src/ipc.rs` - Socket server implementation+- `apps/tauri/src-tauri/src/cli_installer.rs` - CLI script with socket logic🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@CLAUDE.md` around lines 150 - 151, Remove the hard-coded line counts and explicit line ranges in the CLAUDE.md entries for apps/tauri/src-tauri/src/ipc.rs and apps/tauri/src-tauri/src/cli_installer.rs; instead describe the files generically (e.g., "Socket server implementation" and "CLI script with socket logic") or use non-precise qualifiers like "≈194 lines" or "initial lines" so the doc doesn't break when the source changes, and update the two entries that currently contain "194 lines" and "lines 7-42" accordingly.
🤖 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 101-103: Update the Architecture section reference that currently
says "whisper.rs" to match the new module directory layout shown in the tree:
replace the mention of "whisper.rs" with "whisper/" (or explicitly "whisper/
(module directory with mod.rs and model.rs)") so the docs consistently describe
the whisper module as a directory containing mod.rs and model.rs.
- Line 77: The fenced code block that begins before the directory tree (the
triple backticks surrounding the "arandu/" tree) lacks a language identifier and
triggers MD040; update the opening fence from ``` to a fenced code block with a
language such as ```text or ```plaintext so the directory tree (the "arandu/"
block) is marked as plain text.
---
Nitpick comments:
In `@CLAUDE.md`:
- Around line 150-151: Remove the hard-coded line counts and explicit line
ranges in the CLAUDE.md entries for apps/tauri/src-tauri/src/ipc.rs and
apps/tauri/src-tauri/src/cli_installer.rs; instead describe the files
generically (e.g., "Socket server implementation" and "CLI script with socket
logic") or use non-precise qualifiers like "≈194 lines" or "initial lines" so
the doc doesn't break when the source changes, and update the two entries that
currently contain "194 lines" and "lines 7-42" accordingly.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Add language identifier to project structure code block (MD040) - Update whisper.rs reference to whisper/ directory in Architecture - Update whisper/ tree to reflect actual submodule files - Remove hard-coded line counts from Key files section
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 136-154: The section heading and wording conflate two different
scopes: the Unix socket IPC implementation (apps/tauri/src-tauri/src/ipc.rs) is
enabled for all Unix targets (#[cfg(unix)]) while the CLI installer and fallback
flow (apps/tauri/src-tauri/src/cli_installer.rs and the macOS-only build gate in
lib.rs:11) are macOS-only (#[cfg(target_os = "macos")]). Update the
documentation to either rename the heading to something like "Inter-Process
Communication (macOS CLI installer; Unix socket infrastructure)" or split into
two subsections — one describing the Unix socket server and commands (ipc.rs)
and one describing the CLI installer and its macOS-only fallback behavior
(cli_installer.rs and lib.rs). Also clarify the `open` ambiguity by explicitly
distinguishing the IPC `open` command (handled by the socket server) from the
macOS system `open` fallback used by the CLI installer.
Uh oh!
There was an error while loading. Please reload this page.
Split IPC documentation into three subsections: - Socket Server (Unix: macOS + Linux) for ipc.rs - TCP Server (All Platforms) for tcp_ipc.rs - CLI Installer (macOS Only) for cli_installer.rs Disambiguate IPC `open` command from macOS system `open` tool. Add missing ipc_common.rs and tcp_ipc.rs to project tree and Architecture section.
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 75-118: Update the Project Structure section to remove the
non-existent comments.rs entry, replace the shared/ subtree to list actual files
(style.css, highlight-dark.min.css, highlight-light.min.css, highlight.min.js,
icon.png, icon.svg) instead of a highlight/ directory, and correct the symlink
note in apps/tauri/src/ to indicate symlinks point to individual files under
../../../shared/ (three levels up) rather than a directory at ../../shared/;
keep other entries (TCP port 7474, workflows, whisper files) unchanged.
| ## Project Structure | ||
| ```text | ||
| arandu/ | ||
| ├── .github/ | ||
| │ └── workflows/ | ||
| │ ├── auto-tag.yml # Auto-versioning from conventional commits | ||
| │ ├── release.yml # GitHub release creation | ||
| │ ├── release-tauri.yml # Multi-platform builds (macOS/Linux/Windows) | ||
| │ └── deploy-website.yml # Cloudflare Pages deployment | ||
| ├── apps/ | ||
| │ ├── macos/ # ⚠️ DEPRECATED - macOS native app (DO NOT USE) | ||
| │ └── tauri/ # ✓ Active development - Tauri app | ||
| │ ├── src/ # Frontend (vanilla JS + HTML) | ||
| │ │ ├── index.html # Full UI with modals, comment system | ||
| │ │ ├── main.js # Single entry point | ||
| │ │ └── shared/ # Symlink to ../../shared/ | ||
| │ └── src-tauri/ # Rust backend | ||
| │ ├── Cargo.toml | ||
| │ ├── tauri.conf.json | ||
| │ └── src/ | ||
| │ ├── lib.rs # Core logic, Tauri commands, app setup | ||
| │ ├── ipc_common.rs # Shared IPC types and command processing | ||
| │ ├── ipc.rs # Unix socket IPC server (Unix only) | ||
| │ ├── tcp_ipc.rs # TCP IPC server (all platforms) | ||
| │ ├── tray.rs # System tray integration | ||
| │ ├── cli_installer.rs # macOS CLI installation (macOS only) | ||
| │ ├── comments.rs # Plan review comments storage | ||
| │ └── whisper/ # Voice-to-text module | ||
| │ ├── mod.rs | ||
| │ ├── audio.rs | ||
| │ ├── commands.rs | ||
| │ ├── model_manager.rs | ||
| │ └── transcriber.rs | ||
| ├── shared/ # Shared CSS and highlight.js files | ||
| │ ├── style.css | ||
| │ └── highlight/ | ||
| ├── scripts/ | ||
| │ ├── set-version.sh # Version management across config files | ||
| │ └── build-dev.sh # Local dev builds with git hash | ||
| ├── website/ # Static landing page (Cloudflare Pages) | ||
| ├── examples/ # Sample markdown files | ||
| └── README.md | ||
| ``` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash# Verify specific technical claims in CLAUDE.md project structure and architectureecho"=== TCP port in tcp_ipc.rs ==="
rg -n "7474|TcpListener|bind" apps/tauri/src-tauri/src/tcp_ipc.rs
echo""echo"=== Rust source files in src-tauri/src/ ==="
fd -t f -e rs --max-depth 1 apps/tauri/src-tauri/src | sort
echo""echo"=== Whisper submodule files ==="
fd -t f -e rs apps/tauri/src-tauri/src/whisper | sort
echo""echo"=== GitHub workflow filenames ==="
fd -t f -e yml .github/workflows | sort
echo""echo"=== shared/ top-level contents ==="
fd --max-depth 1 shared | sort
echo""echo"=== apps/tauri/src/shared symlink ==="
ls -la apps/tauri/src/shared 2>/dev/null ||echo"NOT FOUND"Repository: devitools/arandu
Length of output: 1806
🏁 Script executed:
#!/bin/bashecho"=== Rust source files in src-tauri/src/ ==="
fd . apps/tauri/src-tauri/src --max-depth 1 -t f -e rs | sort
echo""echo"=== Whisper submodule files ==="
fd . apps/tauri/src-tauri/src/whisper -t f -e rs | sort
echo""echo"=== GitHub workflow filenames ==="
fd . .github/workflows -t f -e yml | sort
echo""echo"=== shared/ top-level directory listing ==="
ls -la shared/
echo""echo"=== Check if apps/tauri/src/ contains shared reference ==="
ls -la apps/tauri/src/ 2>/dev/null | grep -i shared ||echo"No 'shared' entry found"Repository: devitools/arandu
Length of output: 1822
Fix inaccurate project structure claims: remove non-existent comments.rs, correct shared/ layout, and fix symlink documentation.
The following specific claims in the project structure (lines 75–118) conflict with the actual repository:
comments.rsdoes not exist — This file is listed underapps/tauri/src-tauri/src/in CLAUDE.md but is absent from the repository. Remove it from the documentation.shared/structure is incorrect — CLAUDE.md claimsshared/highlight/as a subdirectory, but the actual structure contains individual files:style.css✓highlight-dark.min.css,highlight-light.min.css,highlight.min.js(not in ahighlight/subdirectory)icon.png,icon.svg(not documented)
Symlink path and nature are misrepresented — CLAUDE.md states
Symlink to ../../shared/, but actual symlinks inapps/tauri/src/point to individual files at../../../shared/(three levels up, not two). The symlinks target specific files, not a directory.
The TCP port 7474 (lines 127, 158) is correctly documented, and all workflow files and whisper submodule files match the project structure as written.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@CLAUDE.md` around lines 75 - 118, Update the Project Structure section to
remove the non-existent comments.rs entry, replace the shared/ subtree to list
actual files (style.css, highlight-dark.min.css, highlight-light.min.css,
highlight.min.js, icon.png, icon.svg) instead of a highlight/ directory, and
correct the symlink note in apps/tauri/src/ to indicate symlinks point to
individual files under ../../../shared/ (three levels up) rather than a
directory at ../../shared/; keep other entries (TCP port 7474, workflows,
whisper files) unchanged.
Summary
~/.arandu/arandu.sock), permissions, and protocol detailsopencommandopen,ping,showapps/macos/directoryipc.rs,tray.rs,whisper/#[cfg(unix)],#[cfg(target_os = "macos")])Test plan
ipc.rsimplementationcli_installer.rs🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation