Mikhail Kilin
3b7ef41cae
fix: resolve all 40 clippy warnings (dead_code, unused_imports, lints)
...
ci/woodpecker/pr/check Pipeline was successful
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
- Add #[allow(unused_imports)] on pub re-exports used only by lib/tests
- Add #[allow(dead_code)] on public API items unused in binary target
- Fix collapsible_if, redundant_closure, unnecessary_map_or in main.rs
- Prefix unused test variables with underscore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-22 17:50:18 +03:00
Mikhail Kilin
2a5fd6aa35
perf: optimize Phase 11 image rendering with dual-protocol architecture
...
Redesigned UX and performance for inline photo viewing:
UX changes:
- Always-show inline preview (fixed 50 chars width)
- Fullscreen modal on 'v' key with ←/→ navigation between photos
- Loading indicator "⏳ Загрузка..." in modal for first view
- ImageModalState type for modal state management
Performance optimizations:
- Dual renderer architecture:
* inline_image_renderer: Halfblocks protocol (fast, Unicode blocks)
* modal_image_renderer: iTerm2/Sixel protocol (high quality)
- Frame throttling: inline images 15 FPS (66ms), text remains 60 FPS
- Lazy loading: only visible images loaded (was: all images)
- LRU cache: max 100 protocols with eviction
- Skip partial rendering to prevent image shrinking/flickering
Technical changes:
- App: added inline_image_renderer, modal_image_renderer, last_image_render_time
- ImageRenderer: new() for modal (auto-detect), new_fast() for inline (Halfblocks)
- messages.rs: throttled second-pass rendering, visible-only loading
- modals/image_viewer.rs: NEW fullscreen modal with loading state
- ImagesConfig: added inline_image_max_width, auto_download_images
Result: 10x faster navigation, smooth 60 FPS text, quality modal viewing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-08 01:36:36 +03:00
Mikhail Kilin
b0f1f9fdc2
feat: implement Phase 11 — inline photo viewing with ratatui-image
...
Add feature-gated (`images`) inline photo support:
- New types: MediaInfo, PhotoInfo, PhotoDownloadState, ImagesConfig
- Media module: ImageCache (LRU filesystem cache), ImageRenderer (terminal protocol detection)
- Photo metadata extraction from TDLib MessagePhoto with download_file() API
- ViewImage command (v/м) to toggle photo expand/collapse in message selection
- Two-pass UI rendering: placeholder lines in message bubbles + StatefulImage overlay
- Collapse all expanded photos on Esc (exit selection mode)
Dependencies: ratatui-image 8.1, image 0.25 (optional, behind `images` feature flag)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-06 21:25:17 +03:00