Commit Graph

4 Commits

Author SHA1 Message Date
Mikhail Kilin
776271ff36 docs: add Phase 12 - voice message playback
Documented new feature for playing voice messages directly from TUI
with full playback controls and visual feedback.

Documentation Changes:
- ROADMAP.md: Added Phase 12 with 7 stages
  - Stage 1: Audio infrastructure (audio module, AudioPlayer, VoiceCache)
  - Stage 2: TDLib integration (VoiceNoteInfo, download_voice_note)
  - Stage 3: UI for playback (progress bar, status indicators, footer)
  - Stage 4: Hotkeys (play/pause, stop, seek, volume control)
  - Stage 5: Configuration and UX (AudioConfig, ticker updates)
  - Stage 6: Error handling and fallback (system player)
  - Stage 7: Additional improvements (prefetching, animations)

- CONTEXT.md: Added PLANNED section for Phase 12
  - Technical stack: rodio 0.17, TDLib downloadFile
  - Platforms: Linux (ALSA/PulseAudio), macOS (CoreAudio), Windows (WASAPI)
  - Architecture: src/audio/ module with 3 submodules
  - LRU cache (100 MB limit)
  - Async loading, ticker for progress updates
  - Configuration options in config.toml
  - Fallback to system players (mpv, ffplay)

- HOTKEYS.md: Added new hotkeys
  - `Space` - play/pause (in voice message selection mode)
  - `s` / `ы` - stop playback
  - `←` / `→` - seek -5s/+5s (during playback)
  - `↑` / `↓` - volume +/-10% (during playback)
  - Added new "Voice Playback" section
  - Added new "Voice Playback Mode" section

- PROJECT_STRUCTURE.md: Added audio/ module documentation
  - player.rs - AudioPlayer with rodio
  - cache.rs - VoiceCache for downloaded OGG files
  - state.rs - PlaybackState (status, position, duration, volume)
  - Updated dependencies section (rodio 0.17)
  - Updated App state with audio fields

Technical Details:
- rodio 0.17 Pure Rust audio library (cross-platform)
- OGG Opus support (Telegram voice message format)
- Visual progress bar: ▶ ████████░░░░░░ 0:08 / 0:15
- Status indicators: ▶ (playing), ⏸ (paused), ⏹ (stopped),  (loading)
- Smart caching with size limits
- Async non-blocking file download
- Ticker for smooth progress updates (100ms)
- Graceful fallback to system players

New Configuration (config.toml):
- enabled: bool - enable/disable audio playback
- default_volume: f32 - volume (0.0 - 1.0)
- seek_step_seconds: i32 - seek step in seconds (default 5)
- autoplay: bool - autoplay on selection
- cache_size_mb: usize - cache size limit in MB
- show_waveform: bool - show waveform visualization
- system_player_fallback: bool - use system player fallback
- system_player: String - system player command (mpv, ffplay)

Status: PLANNED (documentation complete, implementation pending)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-05 02:51:04 +03:00
Mikhail Kilin
8844c2953d docs: add Phase 11 - image display in chat
Documented new feature for displaying images directly in terminal
instead of text placeholders like "[Фото]".

Documentation Changes:
- ROADMAP.md: Added Phase 11 with 6 stages
  - Stage 1: Infrastructure (media module, ImageCache, dependencies)
  - Stage 2: TDLib integration (PhotoInfo, download_photo)
  - Stage 3: UI rendering (inline previews, scaling)
  - Stage 4: Fullscreen viewer (new ViewImage mode)
  - Stage 5: Configuration and UX (MediaConfig in config.toml)
  - Stage 6: Error handling and fallback

- CONTEXT.md: Added PLANNED section for Phase 11
  - Technical stack: ratatui-image 1.0, TDLib downloadFile
  - Protocols: Sixel, Kitty Graphics, iTerm2, Unicode Halfblocks
  - Architecture: src/media/ module with 3 submodules
  - LRU cache (100 MB limit)
  - Async loading, lazy loading for visible images
  - Configuration options in config.toml

- HOTKEYS.md: Added new hotkeys
  - `v` / `м` - open image in fullscreen (in selection mode)
  - `←` / `→` - navigate between images (in viewer mode)
  - `Esc` - close image viewer
  - Added new "View Image Mode" section

- PROJECT_STRUCTURE.md: Added media/ module documentation
  - image_cache.rs - LRU cache for downloaded images
  - image_loader.rs - Async loading via TDLib
  - image_renderer.rs - Rendering with protocol detection
  - Updated dependencies section
  - Updated App state with new fields

Technical Details:
- Terminal protocol auto-detection (Sixel/Kitty/iTerm2/Halfblocks)
- Cross-platform support (Linux, macOS, Windows)
- Graceful fallback to Unicode halfblocks for all terminals
- Async non-blocking image loading
- Smart caching with size limits
- Configurable quality and protocol settings

New Configuration (config.toml):
- show_images: bool - enable/disable image display
- image_cache_mb: usize - cache size limit in MB
- preview_quality: "low" | "medium" | "high"
- render_protocol: "auto" | "sixel" | "kitty" | "iterm2" | "halfblocks"

Status: PLANNED (documentation complete, implementation pending)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-05 02:43:04 +03:00
Mikhail Kilin
68a2b7a982 fixes 2026-01-28 11:39:21 +03:00
Mikhail Kilin
051c4a0265 fixes
Some checks failed
CI / Check (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
2026-01-28 01:29:03 +03:00