code
Clone this repository
https://tangled.org/bretton.dev/coves-mobile
git@knot.bretton.dev:bretton.dev/coves-mobile
For self-hosted knots, clone URLs may differ based on your setup.
Dependencies added/updated:
- video_player: ^2.8.7 (pinned for stability)
- http_mock_adapter: ^0.6.1 (dev, for testing)
- Removed chewie: ^1.7.0 (unused)
Configuration fixes:
- Moved http to dev_dependencies (was misplaced)
- Fixed YAML syntax error
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace unsafe .cast<Map<String, dynamic>>() with .whereType() to
prevent runtime errors when parsing images array.
The .cast() method throws at runtime if list contains non-Map items.
The .whereType() method safely filters out invalid items.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add unit and widget tests for video functionality:
StreamableService tests (19 test cases):
- Shortcode extraction from various URL formats
- Standard URLs: streamable.com/abc123
- /e/ URLs: streamable.com/e/abc123
- URLs without scheme
- URLs with query parameters
- Video URL fetching with mocked API responses
- Caching behavior validation
- Error handling (404, missing fields, network errors)
- Protocol-relative URL handling
PostCard widget tests:
- Play button display for Streamable videos
- Loading indicator during API calls
- No play button for non-video embeds
- Proper StreamableService injection
All tests passing with proper mocking using http_mock_adapter.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Integrate video playback with proper architecture:
- PostCard: Display play button overlay on Streamable videos
- Loading state with spinner during URL fetch
- Context-safe async handling (captured before await)
- Navigates to fullscreen player on tap
- Error handling with user-friendly snackbar
- Dependency Injection: StreamableService via Provider
- Added to app-level providers in main.dart
- Injected into _EmbedCard via constructor
- No direct service instantiation in widgets
- Architecture: Clean separation of concerns
- Widget layer handles UI only
- Service layer handles API calls
- Proper state management (StatefulWidget)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add core services and widgets for Streamable video playback:
- StreamableService: API client for fetching video URLs
- Extracts shortcodes from URLs (handles /e/ format)
- 5-minute URL caching to reduce API calls
- Singleton Dio instance with 10s timeouts
- Handles protocol-relative URLs
- FullscreenVideoPlayer: Immersive video playback
- Swipe-to-dismiss gesture (vertical drag)
- Tap to play/pause
- Fade out background during swipe
- Lifecycle-aware (pauses on app background)
- MinimalVideoControls: Clean scrubber interface
- Progress bar with seek support
- Current time / total duration display
- Minimal, non-intrusive design
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Integrates backend community handles into PostCard with bidirectional
conversion utilities. Community names shown in light blue/cyan with
grey instance domains (!gaming@coves.social format), matching the
user-friendly display from Lemmy.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Update dependencies to support URL launching and apply Dart
formatting to all modified files.
Dependencies:
- Add url_launcher: ^6.3.1 (for external browser launching)
- Add url_launcher_platform_interface: ^2.3.2 (dev, for testing)
Code Formatting:
- Apply dart format to all 95 files in codebase
- Ensures consistent style following Dart guidelines
- All files pass flutter analyze with 0 errors, 0 warnings
Quality Checks:
✅ dart format . (95 files formatted)
✅ flutter analyze (0 errors, 0 warnings, 43 info)
✅ flutter test (143 passing, 9 skipped, 0 failing)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>