Commit Graph

27 Commits

Author SHA1 Message Date
2b8382e4eb Add fediverse client identification to posts and timeline
- Add application field to Post model to capture client metadata from API
- Display client info in timeline view after timestamp (e.g. "5 minutes ago via Bifrost")
- Show client information in post details dialog metadata section
- Gracefully handle missing client data by silently omitting when unavailable
- Handle common generic client names (Web, Mobile) with cleaner formatting
- Support client identification for both original posts and reblogs

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 01:45:32 -04:00
2365b6a134 Fix broken notifications tab by handling Account object attribute access
Fixed AttributeError where 'Account' object has no attribute 'id' that was preventing notifications from displaying. The account manager returns Account objects with 'account_id' but not 'id' attribute, causing crashes when timeline code tried to access active_account.id.

Changes:
- Added proper attribute checking with hasattr() before accessing active_account.id
- Enhanced error handling in timeline_view.py:136, 155, and 294
- Added comprehensive debugging to identify Account object structure
- Fixed notifications tab crash that occurred after successful post processing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 00:00:32 -04:00
65f59533cf Implement smart notification system with intelligent content analysis
Major improvements to notification handling:
- Replace blanket skip_notifications with content source analysis
- Immediate notifications for external mentions, DMs, and posts from others
- Smart sound selection based on content type (mention/DM/timeline_update)
- Remove focus-based auto-refresh blocking for seamless background updates
- Fix notifications timeline AttributeError from removed skip_notifications
- Track user actions to prevent sound spam from own expected content
- Context-aware suppression only for user's own posts, not external content

User experience improvements:
- Never miss external mentions or DMs due to timing issues
- Auto-refresh works regardless of timeline focus
- Appropriate sounds play immediately for genuine external notifications
- No redundant sounds from user's own post actions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 15:38:39 -04:00
cd535aebdf Fix context menu accessibility, conversation replies, and integrate polls into post details
This commit addresses several critical accessibility and functionality issues:

- Fix context menu keyboard shortcuts (Applications key and Shift+F10) in messages tab
- Resolve 404 errors when replying to private message conversations by implementing separate conversation reply handling
- Restore Enter key functionality for viewing post details
- Integrate poll voting into post details dialog as first tab instead of separate dialog
- Fix accessibility issues with poll display using QTextEdit and accessible list patterns
- Add comprehensive accessibility guidelines to CLAUDE.md covering widget choices, list patterns, and context menu support
- Update README.md with new features including context menu shortcuts, poll integration, and accessibility improvements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 03:45:47 -04:00
8b9187e23f Implement comprehensive professional logging system
Added complete logging infrastructure for AI-only development debugging:

**Core Logging Features:**
- Command-line debug flags: -d (console) and -d filename (file output)
- Custom log format: "message - severity - timestamp"
- Professional Python logging with hierarchical loggers (bifrost.module)
- Clean separation: debug mode vs production (warnings/errors only)

**Comprehensive Coverage - Replaced 55+ Print Statements:**
- timeline_view.py: Timeline operations, new content detection, sound events
- main_window.py: Auto-refresh system, streaming mode, UI events
- activitypub/client.py: API calls, streaming connections, server detection
- audio/sound_manager.py: Sound playback, pack loading, volume control
- error_manager.py: Centralized error handling with proper log levels
- All remaining modules: Complete print statement elimination

**Enhanced Auto-Refresh Debugging:**
- Fixed repetitive refresh interval logging (only logs on changes)
- Added detailed auto-refresh execution tracing with timing
- New content detection logging with post ID tracking
- Sound event logging showing which sounds play and why

**Sound System Visibility:**
- Complete audio event logging with file paths and volumes
- Sound pack loading and fallback detection
- Audio playback success/failure with detailed error context

**Documentation Updates:**
- README.md: Complete debug system documentation for users
- CLAUDE.md: Professional logging guidelines for AI development
- Comprehensive usage examples and troubleshooting guides

This logging system provides essential debugging capabilities for
the AI-only development constraint, enabling systematic issue
resolution without human code intervention.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 23:32:55 -04:00
3c45932fea Add comprehensive content type support with interface settings reorganization
- Rename Accessibility tab to Interface in settings dialog for better organization
- Add default content type setting (Plain Text, Markdown, HTML) in Interface tab
- Add per-post content type selection in compose dialog with user default
- Implement automatic settings migration from accessibility to interface section
- Separate content display vs editing: timeline shows rendered content, editing shows source
- Wire content type selection through all posting paths (new posts, replies, edits)
- Update Post model with get_display_content() for rendered display and get_content_text() for editing
- Support markdown posts that display formatted in timeline but show source when editing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 22:57:26 -04:00
b80ae3b0e2 Fix multiple notification and UI bugs to improve user experience
- Fix priority-based notification sounds to prevent mentions playing timeline update sounds
- Fix reply functionality to use full @username@domain.com format for proper federation
- Fix missing reply sound notifications by adding reply to priority system
- Fix duplicate reply count display to prevent "(1 replies) (2 replies)" accumulation
- Fix poll voting to automatically refresh timeline and prevent duplicate vote attempts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 17:45:56 -04:00
ff32d6a10b Update comprehensive documentation and complete feature implementation
- Updated README.md with all new features: media uploads, post details, thread expansion, blocked/muted management, custom emoji support
- Added detailed keyboard shortcuts documentation for all timeline tabs (Ctrl+1-0)
- Documented poll creation/voting accessibility features and media upload functionality
- Updated CLAUDE.md with complete implementation status and recent feature additions
- Added sound pack creation guide with security measures and installation methods
- Documented accessibility patterns including fake headers for single-item navigation
- Updated technology stack to include numpy dependency for audio processing
- Marked all high and medium priority todo items as completed
- Project now feature-complete with excellent accessibility support

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 16:53:16 -04:00
c19d2ff162 Add comprehensive media upload support with accessibility features
Implements full-featured media attachment system for posts:
- MediaUploadWidget with file picker supporting images, videos, audio
- Server-side upload limit validation via /api/v1/instance endpoint
- Alt text editing for accessibility compliance (mandatory for images)
- File validation with MIME type and size checking
- Background upload with progress tracking and error handling
- Integrated into compose dialog with graceful fallback handling
- Updated ActivityPub client with media attachment API methods
- Proper media_ids integration in posting workflow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 11:49:37 -04:00
e96ce0c861 Add comprehensive custom emoji support with instance-specific emojis
- Create CustomEmojiManager for fetching, caching, and searching custom emojis
- Add get_custom_emojis() API method to ActivityPub client for /api/v1/custom_emojis
- Implement hybrid emoji autocomplete showing both Unicode and custom emojis
- Cache custom emojis per instance in ~/.cache/bifrost/custom_emojis/ for performance
- Support proper emoji insertion: Unicode as characters, custom as :shortcode: format
- Add visual distinction with "(custom)" suffix in autocomplete suggestions
- Smart emoji limits: 5 Unicode + 5 custom emojis in autocomplete dropdown
- Automatic emoji loading when compose dialog opens for seamless experience

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 11:24:12 -04:00
3d9ce28334 Add blocked/muted user management tabs with complete keyboard navigation
- Add Blocked Users and Muted Users timeline tabs with visual indicators (🚫/🔇)
- Implement dedicated context menus for unblocking/unmuting from management tabs
- Add complete keyboard shortcuts for all 10 timeline tabs (Ctrl+1 through Ctrl+0)
- Add block (Ctrl+Shift+B) and mute (Ctrl+Shift+M) keyboard shortcuts with confirmation
- Fix timeline tab indices and add missing shortcuts for all social timelines
- Handle blocked/muted account display with accessibility-friendly status announcements
- Prevent self-blocking/muting with appropriate error messages and sound feedback
- Support immediate removal from lists after unblock/unmute actions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 11:15:58 -04:00
684919f4ca Add comprehensive user profile viewer with full accessibility support
- Create ProfileDialog with threaded loading and tabbed interface
- Display user bio, profile fields, stats, and recent posts
- Implement Follow/Unfollow, Block/Unblock, Mute/Unmute actions
- Add ActivityPub API methods for social actions and account management
- Enable keyboard navigation in read-only bio text with TextInteractionFlags
- Replace TODO profile viewing with fully functional dialog
- Update documentation to reflect completed profile features

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 10:39:07 -04:00
1391d0c66f Enhance thread navigation with improved expand/collapse behavior
Major improvements to threaded conversation navigation:

- Add Shift+Left shortcut to navigate to thread root from any reply
- Fix navigation state synchronization using accessibility flags instead of Qt's isExpanded()
- Implement proper child item flag management (selectable/non-selectable)
- Add comprehensive scrollToItem() calls for better focus management
- Enhance navigation methods with safety checks and proper state handling
- Force visual refresh attempts to work around Qt display sync issues

Navigation improvements:
- Right Arrow: Expand thread or move to first child when expanded
- Left Arrow: Collapse thread or move to parent
- Shift+Left: Jump to thread root from anywhere in the thread
- All navigation properly skips collapsed items

Known Qt quirk documented: Visual display may occasionally require
double-collapse cycle due to Qt tree widget display synchronization,
but navigation logic works correctly after first collapse.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 10:07:41 -04:00
ed7de5dafa Simplify sound system with pack-based approach
- Remove complex per-event sound enable/disable settings
- Replace dual volume controls with single "Sound Pack Volume"
- Add "None" sound pack option to disable all sounds
- Fix boolean settings parsing in settings dialog
- Update documentation to reflect simplified sound system

Sound system is now intuitive: select a sound pack (or "None")
and set one volume level. Much cleaner than the previous
per-event checkboxes and confusing dual volume controls.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 09:17:32 -04:00
3c3b50bdb9 Fix notification and sound system issues with comprehensive improvements
- **Fixed duplicate sound events**: Prevent success/shutdown sounds from playing multiple times during timeline switches and app quit
- **Added event coordination patterns**: Implemented flags and source tracking to prevent circular UI event chains
- **Completed sound event coverage**: Added missing sound methods (play_favorite, play_follow, play_unfollow, play_direct_message, play_post) and wired them to user actions
- **Enhanced notification system**: Fixed desktop notifications ignoring enable/disable settings by adding missing notifications section to default config
- **Improved timeline-specific sounds**: Conversations now use direct_message sound instead of generic timeline_update sound
- **Added duplicate code prevention guidelines**: Comprehensive CLAUDE.md section with patterns, checklist, and testing requirements to prevent future duplicate implementations
- **Sound pack compatibility**: Full support for both default pack (private_message, post_sent) and Doom pack (direct_message, post) naming conventions with intelligent fallback

All sound events now properly trigger on user actions: boost/favorite posts, follow/unfollow users, notifications, timeline updates, and lifecycle events.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 07:53:36 -04:00
014f288524 Add comprehensive poll support with full accessibility
Features:
- Poll creation in compose dialog with up to 4 options, single/multiple choice, expiration times
- Accessible poll discovery with keyboard navigation (Enter to vote on polls in timeline)
- Poll voting dialog with radio buttons/checkboxes and proper focus management
- Poll results display using navigable list widget for accessibility
- Real-time poll validation and error handling
- Updated README with complete poll documentation

Technical improvements:
- Added poll endpoints to ActivityPub client (create_poll, vote_in_poll)
- Extended Post model with poll data fields and accessibility methods
- Enhanced timeline view with Enter key handling for poll interaction
- Simplified radio button implementation following doom launcher patterns
- Fixed undefined variable bug in poll info generation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 01:19:46 -04:00
cf240e1aa5 Add comprehensive direct messaging and bookmarks system
- Add dedicated Messages timeline with conversation threading
- Implement bookmarks timeline for saved posts
- Support both standard ActivityPub conversations and Pleroma chats
- Auto-mark conversations as read when selected
- Full pagination support for messages and bookmarks
- Reorder timeline tabs for better UX (Messages now second tab)
- Remove verbose prefixes for cleaner accessibility
- Add conversation management API endpoints
- Maintain accessibility-first design with no text truncation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 00:37:45 -04:00
352bea6ec7 Documentation updates. 2025-07-20 21:53:01 -04:00
31314764bf Enhance autocomplete sound system with completion feedback
- Add autocomplete_end sound event for completion confirmation
- Remove programmatic sound generation in favor of sound pack files
- Implement state tracking to prevent duplicate autocomplete sounds
- Add comprehensive sound system policy to CLAUDE.md
- Restore full CLAUDE.md documentation with development workflow
- Update Doom sound pack to include autocomplete_end.ogg mapping

Sound behavior improvements:
- Autocomplete sound plays once per session when suggestions appear
- Autocomplete_end sound plays when user selects or dismisses suggestions
- State resets cleanly for next autocomplete interaction
- Follows sound pack architecture instead of generating audio

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 21:38:16 -04:00
2e0c7263b4 Add audio feedback for autocomplete suggestions
- Implemented autocomplete sound notification system for accessibility
- Added gentle 150ms chime (800Hz) when autocomplete suggestions appear
- Enhanced AutocompleteTextEdit to accept sound_manager parameter
- Created automatic sound generation for default pack (autocomplete.wav)
- Added play_autocomplete() method to SoundManager with 30% volume
- Sound includes 20ms fade in/out to prevent audio clicks
- Provides valuable audio feedback for screen reader users

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 20:53:18 -04:00
daca679fb9 Fix username autocomplete for Pleroma instances and remote users
- Enhanced API search limits from 10 to 40 users with remote resolution
- Added 'resolve: True' parameter to enable finding users from remote instances
- Improved filtering logic to match username parts before @ symbol
- Increased follower/following search limits from 50 to 100 each
- Added Pleroma compatibility with parameter validation and fallback endpoints
- Fixed state management for autocomplete re-triggering after API calls
- Now successfully finds remote users like storm@social.wolfe.casa

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 20:43:32 -04:00
037fcbf7e0 Add comprehensive social features with accessibility-first design
Implements complete post management and social interaction capabilities:

**Post Management:**
- Delete posts with confirmation dialog (owned posts only)
- Edit posts using existing compose dialog (owned posts only)
- Robust ownership validation and error handling

**Follow System:**
- Follow/unfollow users from context menus and keyboard shortcuts
- Manual follow dialog for @user@instance lookups
- Account search and validation before following
- Smart context menu options based on post ownership

**Timeline Extensions:**
- Followers tab showing accounts following you
- Following tab showing accounts you follow
- Seamless integration with existing timeline system
- Account list display for social relationship viewing

**Keyboard Shortcuts:**
- Ctrl+Shift+E: Edit post
- Shift+Delete: Delete post (with confirmation)
- Ctrl+Shift+F: Follow user
- Ctrl+Shift+U: Unfollow user
- Ctrl+Shift+M: Manual follow dialog

**ActivityPub API Extensions:**
- edit_status() method for post editing
- get_relationship() method for follow status checking
- Enhanced followers/following pagination support

**Critical Accessibility Fix:**
- Eliminated ALL text truncation throughout the application
- Added explicit no-truncation rule to development guidelines
- Full content accessibility for screen reader users

All features maintain Bifrost's accessibility-first principles with proper error handling, user feedback, and complete information display.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 19:46:31 -04:00
b936e4994d Updated README. 2025-07-20 18:42:20 -04:00
6fa0cf481a Enhance compose experience with comprehensive autocomplete systems
## Major Features Added

### Smart Mention Completion
- **Full fediverse handles**: @user@instance.com format instead of incomplete usernames
- **Multi-source suggestions**: Search API + followers + following for comprehensive results
- **Real-time API integration**: No more hardcoded sample data
- **Intelligent filtering**: Prefix-based matching across all user connections

### Comprehensive Emoji System
- **5,000+ Unicode emojis**: Complete emoji dataset via python-emoji library
- **Keyword-based search**: Find emojis by typing descriptive words (:fire, :heart, :grin)
- **Actual emoji insertion**: Inserts Unicode characters (🎃) not shortcodes (🎃)
- **Accurate selection**: Fixed bug where wrong emoji was inserted from autocomplete list
- **Smart synonyms**: Common aliases for frequently used emojis

### Enhanced ActivityPub Integration
- **Account relationships**: get_followers(), get_following(), search_accounts() methods
- **Expanded API coverage**: Better integration with fediverse social graph
- **Robust error handling**: Graceful fallbacks for API failures

### User Experience Improvements
- **Bug fixes**: Resolved autocomplete selection and focus restoration issues
- **Documentation**: Updated README with comprehensive feature descriptions
- **Dependencies**: Added emoji>=2.0.0 to requirements for Unicode support

## Technical Details
- Removed incomplete fallback data in favor of live API integration
- Improved completer selection logic to use actually selected items
- Enhanced error handling for network requests and API limitations
- Updated installation instructions for new emoji library dependency

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 16:06:04 -04:00
f2c4ad1bd6 Add comprehensive soundpack manager with security-first design
- **Soundpack Manager**: Full-featured package discovery, download, and installation system
  - Repository management with HTTPS enforcement and validation
  - Directory listing support (auto-discovers .zip files) + soundpacknames.txt fallback
  - Secure download with size limits, timeout protection, and path sanitization
  - Zip bomb protection: file count, individual size, and total extraction limits
  - Audio file validation using magic numbers (not just extensions)
  - Accessible UI with keyboard navigation and screen reader optimization

- **Auto-refresh system**: Smart timeline updates respecting user activity
  - 300-second default interval + 10-second idle buffer
  - Keyboard activity tracking prevents interrupting active users
  - True new content detection using post IDs instead of counts
  - Preserves cursor position during background refreshes

- **Enhanced notifications**: Fixed spam issues and improved targeting
  - Timeline switching now silent (no notifications for actively viewed content)
  - Initial app load notifications disabled for 2 seconds
  - Generic "New content in timeline" messages instead of misleading post counts
  - Separate handling for auto-refresh vs manual refresh scenarios

- **Load more posts improvements**: Better positioning and user experience
  - New posts load below cursor position instead of above
  - Cursor automatically focuses on first new post for natural reading flow
  - Fixed widget hierarchy issues preventing activation

- **Accessibility enhancements**: Workarounds for screen reader quirks
  - Added list headers to fix Orca single-item list reading issues
  - Improved accessible names and descriptions throughout
  - Non-selectable header items with dynamic counts
  - Better error messages and status updates

- **Settings integration**: Corrected soundpack configuration management
  - Fixed inconsistent config keys (now uses [audio] sound_pack consistently)
  - Added soundpack manager to File menu (Ctrl+Shift+P)
  - Repository persistence and validation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 15:18:50 -04:00
8661fa67ce Some cleanup, a couple new features added. 2025-07-20 04:32:37 -04:00
460dfc52a5 Initial commit: Bifrost accessible fediverse client
- Full ActivityPub support for Pleroma, GoToSocial, and Mastodon
- Screen reader optimized interface with PySide6
- Timeline switching with tabs and keyboard shortcuts (Ctrl+1-4)
- Threaded conversation navigation with expand/collapse
- Cross-platform desktop notifications via plyer
- Customizable sound pack system with audio feedback
- Complete keyboard navigation and accessibility features
- XDG Base Directory compliant configuration
- Multiple account support with OAuth authentication

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 03:39:47 -04:00