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.
Add create post functionality with community picker:
Features:
- Community models for API responses
- listCommunities and createPost API endpoints
- Community picker screen with search and pagination
- Create post screen with URL validation and input limits
- Optimistic post navigation support
Tests:
- 76 tests covering models, API, and widget behavior
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Comprehensive test coverage for community features:
Unit tests:
- CommunitiesResponse, CommunityView JSON parsing
- CreatePostResponse, ExternalEmbedInput serialization
- SelfLabels, SelfLabel const construction and serialization
- CovesApiService.listCommunities with pagination/errors
- CovesApiService.createPost with validation/errors
Widget tests:
- CreatePostScreen UI elements and form validation
- Character limits enforcement (title: 300, content: 10000)
- NSFW toggle, URL field show/hide behavior
Logic tests:
- Community search filtering (name, displayName, description)
- Member count formatting (K/M suffixes)
- Description line building with separators
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add isOptimistic flag to PostDetailScreen to skip initial comment
loading for newly created posts that haven't been indexed yet.
Also adds AlwaysScrollableScrollPhysics for consistent pull-to-refresh.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Create post screen improvements:
- Community picker integration
- URL validation (http/https only)
- Input length limits from backend lexicon (title: 300, content: 10000)
- NSFW toggle with self-labels
- Language selection dropdown
- Navigate to feed after successful post creation
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Full-screen community selection interface for post creation:
- Search with debounced client-side filtering
- Infinite scroll pagination
- Cached avatar images with error fallback
- Proper authenticated API service with disposal
- Member/subscriber count formatting (K/M suffixes)
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add CovesApiService methods for community operations:
- listCommunities(): Fetch communities with pagination and sorting
- createPost(): Create posts with title, content, embeds, and labels
Both methods include proper error handling and debug logging.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add data models for community-related API operations:
- CommunitiesResponse and CommunityView for listing communities
- CommunityViewerState for subscription/membership status
- CreatePostRequest and CreatePostResponse for post creation
- ExternalEmbedInput for link embeds
- SelfLabels and SelfLabel for content labels (NSFW, etc.)
All models support const constructors for better performance.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>