Skip to content

Commit 6d9cea2

Browse files
authored
docs: document plan review and voice-to-text features + UI fixes (#6)
* fix(voice-to-text): resolve 4 critical bugs in recording - Add single-instance detection to prevent duplicate tray icons - Implement window lifecycle management (hide instead of destroy) - Add microphone permission validation and audio stream checking - Move command invocation to Rust for global shortcut independence Fixes issues: global shortcut only working with window open, window not reopening after close, CLI creating duplicate instances, and blank audio transcription with model loaded. * build: add http-server for Tauri dev mode - Add http-server dependency for serving static files - Configure beforeDevCommand to auto-start dev server - Remove center positioning from recording window * feat(voice-to-text): implement audio device selection backend - Add list_audio_devices() to enumerate available microphones - Modify AudioRecorder to accept device_name parameter - Add RMS validation (threshold 0.001) to detect silent audio - Add 50ms delay before stopping stream to prevent sample loss - Persist selected device in WhisperSettings - Add Tauri commands: list_audio_devices, set_audio_device - Add window permissions: allow-hide, allow-show, allow-set-focus - Restore onCloseRequested behavior for minimize-to-tray * feat(voice-to-text): add audio device selection UI - Add microphone dropdown in Settings modal - Load and display available audio devices - Persist device selection on change - Add CSS styling for device selector - Add diagnostic logging for window close handlers * feat(voice-to-text): add recording modes and clipboard integration - Add button mode and shortcut mode for recording - Add cancel_recording command for better control - Add write_clipboard command for transcription results - Add long_recording_threshold setting (default 60s) - Enable macOS private API for better integration - Update recording window size and config * refactor(ui): reorganize toolbar layout and add close file button - Simplify toolbar to horizontal layout (file name on left, actions on right) - Add close file button (X) next to filename - Remove 'Arandu' label from toolbar for cleaner look - Add components.css for reusable component styles - Improve toolbar spacing and button consistency - Add closeFile() function to clear current file state * refactor(tray): update icon to match Arandu logo style - Replace horizontal bar with diamond/losango shape - Make apex more pointed (sharper top) - Use thinner stroke for refined appearance - Icon now matches the Arandu logo design * fix(ui): clear comments state when closing file - Reset selectedBlocks and commentsData - Hide bottom-bar (comments panel) - Hide stale comments banner - Prevents UI state from persisting after file close * fix(ui): restore refresh button padding - Revert padding from merge conflict resolution - Keep consistent with other toolbar buttons * ci(auto-tag): skip tag creation for docs-only changes - Check if apps/shared/scripts changed before creating tag - Skip release build for website/README updates only - Reduces unnecessary CI runs and costs * chore(deps): update Cargo.lock from merge * refactor(tauri): consolidate button styles * docs(website): add plan review and voice-to-text features * docs(readme): document plan review and voice-to-text features * fix(ui): prevent comment modal preview overflow - Increase modal width to match review modal (700px) - Add max-height and scroll to block preview - Normalize whitespace in preview text (remove line breaks, collapse spaces) * fix(style): add word-break to prevent code overflow Add overflow-wrap, word-wrap, and word-break properties to inline code elements to prevent horizontal overflow when displaying long paths or identifiers. Changes: - shared/style.css: add word-break properties to code blocks - website/css/site.css: add word-break properties to mockup code elements * chore: add examples/ to gitignore for private reference files * fix: use null for beforeBuildCommand and remove deprecated word-wrap * fix(style): remove aggressive word-break: break-all from inline code overflow-wrap: break-word alone prevents overflow while preserving readability by not splitting identifiers mid-word.
1 parent f3b5cbd commit 6d9cea2

8 files changed

Lines changed: 191 additions & 28 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,6 @@ yarn-error.log*
9797

9898
# Plan review comments
9999
*.comments.json
100+
101+
# Examples (private reference files)
102+
examples/

README.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
# Arandu
22

3-
A minimal, cross-platform Markdown viewer powered by [Tauri](https://tauri.app).
3+
A minimal, cross-platform Markdown viewer with plan review comments and voice-to-text transcription. Powered by [Tauri](https://tauri.app).
44

55
![macOS](https://img.shields.io/badge/macOS-13%2B-blue)
66
![Linux](https://img.shields.io/badge/Linux-x86__64-orange)
77
![Windows](https://img.shields.io/badge/Windows-x86__64-green)
88

99
## Features
1010

11+
### Document Viewing
1112
- GitHub Flavored Markdown rendering (tables, task lists, strikethrough, autolinks)
12-
- Syntax highlighting for code blocks
13-
- Dark / light / system theme cycling
14-
- Sidebar outline navigation
13+
- Syntax highlighting for 190+ languages
14+
- Sidebar outline navigation with smooth scrolling
1515
- Live reload on file save
16-
- CLI: `arandu README.md`
16+
- Dark / light / system theme cycling
17+
18+
### Productivity Tools
19+
- **Plan review comments** — GitHub-style inline comments for markdown files with AI prompt generation
20+
- **Voice to text** — Built-in speech transcription powered by OpenAI Whisper (offline, 4 model sizes)
21+
22+
### CLI
23+
- `arandu README.md` — Open files from terminal
24+
- Installable via Homebrew (macOS) or manual download
1725

1826
## Installation
1927

@@ -47,6 +55,27 @@ arandu *.md # open all .md files in the current directory
4755
arandu # opens the file picker
4856
```
4957

58+
## Advanced Features
59+
60+
### Plan Review Comments
61+
62+
Add inline comments to markdown blocks, track unresolved feedback, and generate consolidated review prompts for AI coding assistants. Comments persist in `.comments.json` sidecar files alongside your markdown.
63+
64+
**Usage:**
65+
- Cmd/Ctrl+Click blocks to select and comment
66+
- Bottom panel shows all comments with block indicators (H2, P3, C4, etc.)
67+
- Generate review prompts with quoted context for AI tools
68+
69+
### Voice to Text
70+
71+
Record audio and transcribe to text using OpenAI Whisper models (runs locally, no API keys needed).
72+
73+
**Usage:**
74+
- Alt+Space to start recording (configurable)
75+
- Choose model size: tiny (75MB, fastest) to medium (1.5GB, most accurate)
76+
- Transcription automatically copies to clipboard
77+
- Select audio input device from settings
78+
5079
## Development
5180

5281
### Prerequisites

apps/tauri/src-tauri/tauri.conf.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"identifier": "com.devitools.arandu",
66
"build": {
77
"beforeDevCommand": "npm run dev:server",
8+
"beforeBuildCommand": null,
89
"devUrl": "http://localhost:1420",
910
"frontendDist": "../src"
1011
},

apps/tauri/src/app.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,9 @@ html.dark link[media*="light"] { media: not all; }
841841
padding: 8px;
842842
border-radius: 4px;
843843
margin-bottom: 10px;
844+
max-height: 80px;
845+
overflow-y: auto;
846+
overflow-wrap: break-word;
844847
}
845848

846849
/* Review Modal */

apps/tauri/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ <h3>Voice-to-Text Settings</h3>
122122

123123
<!-- Comment Modal -->
124124
<div id="comment-modal" class="modal-overlay" role="dialog" aria-modal="true" aria-labelledby="comment-modal-title" style="display:none">
125-
<div class="modal-box">
125+
<div class="modal-box modal-large">
126126
<h3 id="comment-modal-title">Add Comment</h3>
127127
<p id="comment-context">Block: "<span id="comment-block-preview"></span>"</p>
128128
<textarea id="comment-input" aria-label="Comment text" placeholder="Your comment here..." rows="4"></textarea>

shared/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ code {
8686
padding: 0.15em 0.4em;
8787
border-radius: 3px;
8888
border: 1px solid var(--border);
89+
overflow-wrap: break-word;
8990
}
9091

9192
pre {

website/css/site.css

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ nav a:hover { color: var(--text); }
361361
padding: 0.15em 0.4em;
362362
border-radius: 3px;
363363
border: 1px solid var(--border);
364+
overflow-wrap: break-word;
364365
}
365366

366367
.mockup-content.markdown-body table {
@@ -451,6 +452,106 @@ nav a:hover { color: var(--text); }
451452
padding: 20px 24px;
452453
}
453454

455+
/* Plan Review Comment Badge */
456+
.comment-badge {
457+
display: inline-flex;
458+
align-items: center;
459+
justify-content: center;
460+
min-width: 18px;
461+
height: 18px;
462+
padding: 0 5px;
463+
background: var(--link);
464+
color: #fff;
465+
font-size: 10px;
466+
font-weight: 600;
467+
border-radius: 9px;
468+
margin-left: 6px;
469+
vertical-align: middle;
470+
}
471+
472+
/* Plan Review Bottom Bar Mockup */
473+
.plan-review-bar {
474+
border-top: 1px solid var(--border);
475+
background: var(--sidebar-bg);
476+
font-size: 12px;
477+
}
478+
479+
.bar-header {
480+
display: flex;
481+
align-items: center;
482+
justify-content: space-between;
483+
padding: 8px 12px;
484+
border-bottom: 1px solid var(--border);
485+
background: var(--bg);
486+
}
487+
488+
.bar-title {
489+
font-size: 10px;
490+
font-weight: 600;
491+
color: var(--text-muted);
492+
letter-spacing: 0.05em;
493+
display: flex;
494+
align-items: center;
495+
gap: 6px;
496+
}
497+
498+
.count-pill {
499+
display: inline-flex;
500+
align-items: center;
501+
justify-content: center;
502+
min-width: 16px;
503+
height: 16px;
504+
padding: 0 5px;
505+
background: var(--text-muted);
506+
color: var(--bg);
507+
border-radius: 8px;
508+
font-size: 10px;
509+
font-weight: 600;
510+
}
511+
512+
.bar-btn-primary {
513+
padding: 4px 10px;
514+
font-size: 11px;
515+
background: var(--link);
516+
color: white;
517+
border: none;
518+
border-radius: 4px;
519+
font-weight: 500;
520+
}
521+
522+
.bar-item {
523+
padding: 8px 12px;
524+
background: var(--bg);
525+
border-bottom: 1px solid var(--border);
526+
}
527+
528+
.bar-item:last-child {
529+
border-bottom: none;
530+
}
531+
532+
.bar-indicators {
533+
display: flex;
534+
gap: 4px;
535+
margin-bottom: 4px;
536+
}
537+
538+
.block-indicator {
539+
display: inline-block;
540+
padding: 2px 6px;
541+
background: var(--code-bg);
542+
color: var(--text-muted);
543+
border-radius: 3px;
544+
font-size: 9px;
545+
font-weight: 600;
546+
font-family: var(--font-mono);
547+
letter-spacing: 0.02em;
548+
}
549+
550+
.bar-text {
551+
color: var(--text);
552+
line-height: 1.5;
553+
}
554+
454555
/* === Syntax Highlight Colors (mockup) === */
455556

456557
.code-keyword { color: #d73a49; }

website/index.html

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ <h2 id="mock-features">Features</h2>
171171
<td>GFM Support</td>
172172
<td>Tables, task lists, strikethrough</td>
173173
</tr>
174+
<tr>
175+
<td>Plan Reviews <span class="comment-badge">2</span></td>
176+
<td>GitHub-style inline comments</td>
177+
</tr>
174178
<tr>
175179
<td>Syntax Highlighting</td>
176180
<td>Powered by highlight.js</td>
@@ -281,6 +285,43 @@ <h2>Syntax Highlighting</h2>
281285
</div>
282286
</div>
283287

288+
<div class="feature-split fade-in">
289+
<div class="feature-text">
290+
<h2>Plan Review Comments</h2>
291+
<p>GitHub-style inline commenting for markdown files. Select blocks, add feedback,
292+
and generate consolidated review prompts for AI coding assistants. Perfect for
293+
document review workflows.</p>
294+
</div>
295+
<div class="feature-visual">
296+
<div class="mini-mockup">
297+
<div class="mockup-content markdown-body">
298+
<h2>Installation</h2>
299+
<p>Quick start guide for Arandu <span class="comment-badge">2</span></p>
300+
<pre><code>brew install --cask devitools/arandu/arandu</code></pre>
301+
</div>
302+
<div class="plan-review-bar">
303+
<div class="bar-header">
304+
<span class="bar-title">PLAN REVIEWS <span class="count-pill">2</span></span>
305+
<button class="bar-btn-primary">Generate Review</button>
306+
</div>
307+
<div class="bar-item">
308+
<div class="bar-indicators">
309+
<span class="block-indicator">H2</span>
310+
<span class="block-indicator">P3</span>
311+
</div>
312+
<div class="bar-text">Consider adding Linux install instructions</div>
313+
</div>
314+
<div class="bar-item">
315+
<div class="bar-indicators">
316+
<span class="block-indicator">C4</span>
317+
</div>
318+
<div class="bar-text">This command requires Homebrew pre-installed</div>
319+
</div>
320+
</div>
321+
</div>
322+
</div>
323+
</div>
324+
284325
<div class="features-compact fade-in">
285326
<div class="container">
286327
<div class="compact-grid">
@@ -432,29 +473,13 @@ <h3>Theme Switching</h3>
432473
stroke-linecap="round"
433474
stroke-linejoin="round"
434475
>
435-
<rect
436-
x="2"
437-
y="3"
438-
width="20"
439-
height="14"
440-
rx="2"
441-
ry="2"
442-
/>
443-
<line
444-
x1="8"
445-
y1="21"
446-
x2="16"
447-
y2="21"
448-
/>
449-
<line
450-
x1="12"
451-
y1="17"
452-
x2="12"
453-
y2="21"
454-
/>
476+
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"/>
477+
<path d="M19 10v2a7 7 0 0 1-14 0v-2"/>
478+
<line x1="12" y1="19" x2="12" y2="23"/>
479+
<line x1="8" y1="23" x2="16" y2="23"/>
455480
</svg>
456-
<h3>Cross-Platform</h3>
457-
<p>Powered by Tauri on macOS, Linux, and Windows.</p>
481+
<h3>Voice to Text</h3>
482+
<p>Built-in speech transcription with OpenAI Whisper. Works offline, no API keys.</p>
458483
</div>
459484
</div>
460485
</div>

0 commit comments

Comments
 (0)