Storm Dragon 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

Bifrost

A fully accessible fediverse client built with PySide6, designed specifically for screen reader users.

Vibe Coding Project

This project was created through "vibe coding" - a collaborative development approach where a human (Storm Dragon) provides direction, requirements, and testing while an AI assistant (Claude) handles the actual code implementation. Vibe coding combines human creativity and domain expertise with AI's rapid development capabilities, resulting in functional software that meets real accessibility needs.

All code in this project was written by Claude (Anthropic's AI assistant) based on specifications and feedback from Storm Dragon.

Features

  • Full ActivityPub Support: Compatible with Pleroma, GoToSocial, and other fediverse servers
  • Screen Reader Optimized: Designed from the ground up for excellent accessibility
  • Threaded Conversations: Navigate complex conversation trees with keyboard shortcuts
  • Timeline Switching: Easy navigation between Home, Messages, Mentions, Local, Federated, Bookmarks, Followers, and Following timelines
  • Desktop Notifications: Cross-platform notifications for mentions, direct messages, and timeline updates
  • Customizable Audio Feedback: Rich sound pack system with themed audio notifications
  • Soundpack Manager: Secure repository-based soundpack discovery and installation
  • Smart Autocomplete: Mention completion with full fediverse handles (@user@instance.com)
  • Comprehensive Emoji Support: 5,000+ Unicode emojis with keyword search
  • Auto-refresh: Intelligent timeline updates based on user activity
  • Clean Interface: Focused on functionality over visual design
  • Keyboard Navigation: Complete keyboard control with intuitive shortcuts
  • Direct Message Interface: Dedicated conversation view with threading support
  • Bookmarks: Save and view bookmarked posts in a dedicated timeline
  • Poll Support: Create, vote in, and view results of fediverse polls with full accessibility

Audio System

Bifrost includes a sophisticated sound system with:

  • Soundpack Manager: Secure HTTPS-based repository system
  • Repository Management: Add/remove soundpack repositories with validation
  • One-click Installation: Download, validate, and install soundpacks securely
  • Customizable Sound Packs: Themed audio notifications (Default pack included)
  • Audio Feedback: Sound events for all major actions and notifications
  • Simple Volume Control: Single volume setting for all sound pack audio
  • Easy Disable: Select "None" sound pack to disable all sounds
  • Cross-platform Audio Support: Works on Linux, Windows, and macOS

Compose Features

  • Mention Autocomplete: Type @ to get suggestions from followers/following/search
  • Full Fediverse Handles: Completes to full format (@user@instance.com)
  • Emoji Autocomplete: Type : to search 5,000+ Unicode emojis
  • Keyword Search: Find emojis by typing keywords (:fire, :heart, :grin)
  • Real-time Character Count: Visual feedback with limit warnings
  • Content Warnings: Optional spoiler text support
  • Visibility Controls: Public, Unlisted, Followers-only, or Direct messages
  • Poll Creation: Add polls with up to 4 options, single or multiple choice, with expiration times

Technology Stack

  • PySide6: Main GUI framework for proven accessibility
  • ActivityPub: Full federation protocol support
  • simpleaudio: Cross-platform audio with subprocess fallback
  • Plyer: Cross-platform desktop notifications
  • emoji: Comprehensive Unicode emoji library (5,000+ emojis)
  • XDG Base Directory: Standards-compliant configuration storage

Keyboard Shortcuts

Timeline Navigation

  • Ctrl+1: Switch to Home timeline
  • Ctrl+2: Switch to Messages/DM timeline
  • Ctrl+3: Switch to Mentions/Notifications timeline
  • Ctrl+4: Switch to Local timeline
  • Ctrl+5: Switch to Federated timeline
  • Ctrl+6: Switch to Bookmarks timeline
  • Ctrl+7: Switch to Followers timeline
  • Ctrl+8: Switch to Following timeline
  • Ctrl+Tab: Switch between timeline tabs
  • F5: Refresh current timeline

Post Actions

  • Ctrl+N: Compose new post
  • Ctrl+R: Reply to selected post
  • Ctrl+B: Boost/reblog selected post
  • Ctrl+F: Favorite selected post
  • Ctrl+C: Copy selected post to clipboard
  • Ctrl+U: Open URLs from selected post in browser

Navigation

  • Arrow Keys: Navigate through posts
  • Right Arrow: Expand thread / Move to first child when expanded
  • Left Arrow: Collapse thread / Move to parent
  • Shift+Left Arrow: Navigate to thread root from any reply
  • Page Up/Down: Jump multiple posts
  • Home/End: Go to first/last post
  • Enter: Expand/collapse threads, or vote in polls
  • Tab: Move between interface elements

Compose Dialog

  • Ctrl+Enter: Send post
  • @: Trigger mention autocomplete
  • :: Trigger emoji autocomplete
  • Arrow Keys: Navigate autocomplete suggestions
  • Enter/Tab: Accept selected completion
  • Escape: Close autocomplete or cancel compose

Application

  • Ctrl+,: Open Settings
  • Ctrl+Shift+A: Add new account
  • Ctrl+Alt+S: Open Soundpack Manager
  • Ctrl+Q: Quit application

Installation

git clone <repository>
cd bifrost
pip install -r requirements.txt
python bifrost.py

Or on Arch Linux:

sudo pacman -S python-pyside6 python-requests python-simpleaudio python-emoji
yay -S python-plyer

Poll Features

Bifrost includes comprehensive poll support with full accessibility:

Creating Polls

  • In Compose Dialog: Check "Add Poll" to create polls with your posts
  • Up to 4 Options: Add 2-4 poll options (minimum 2 required)
  • Choice Types: Single choice (radio buttons) or multiple choice (checkboxes)
  • Expiration: Set when the poll expires (1 hour to 30 days)
  • Real-time Validation: Get immediate feedback on poll requirements

Voting in Polls

  • Accessible Discovery: Polls announced as "Poll: X options, Y votes, press Enter to vote"
  • Keyboard Voting: Use Tab and arrow keys to navigate options, Space to select
  • Radio Button Groups: Single choice polls use accessible radio button navigation
  • Checkbox Lists: Multiple choice polls use standard checkbox interaction
  • Vote Submission: Submit votes with accessible button controls

Viewing Results

  • Automatic Display: Results shown immediately after voting or for expired polls
  • Navigable List: Vote counts and percentages in an accessible list widget
  • Arrow Key Navigation: Review each option's results individually
  • Clear Information: Format like "Option 1: 5 votes (41.7%)"

Poll Accessibility Features

  • Screen Reader Support: Full compatibility with Orca, NVDA, and other screen readers
  • Keyboard Only: Complete functionality without mouse interaction
  • Clear Announcements: Descriptive text for poll status and options
  • Focus Management: Proper tab order and focus placement
  • Error Handling: Accessible feedback for voting errors (duplicate votes, etc.)

Accessibility Features

  • Complete keyboard navigation
  • Proper screen reader announcements
  • Focus management and tab order
  • Accessible names and descriptions for all controls
  • Thread expansion/collapse with audio feedback
  • Poll creation and voting with full accessibility support

Known Qt Display Quirk

Due to a Qt tree widget display synchronization issue, thread collapse may occasionally require a double-operation for the visual display to fully sync:

If collapse appears incomplete:

  1. Navigate to thread root post (use Shift+Left from any reply)
  2. Press Left to collapse → announces "collapsed"
  3. Press Right then Left again → now fully collapsed visually

Note: Navigation logic works correctly after the first collapse (arrow keys will skip collapsed replies), but the visual display may need the extra cycle to sync.

Sound Pack Creation and Installation

Creating Custom Sound Packs

Sound packs in Bifrost allow you to customize the audio feedback for different events. Each sound pack consists of a directory containing audio files and a configuration file.

Sound Pack Structure

A sound pack must contain:

  1. pack.json - Configuration file with metadata and sound mappings
  2. Audio files - WAV or OGG files for each sound event

Required Sound Events

Your sound pack should include audio files for these events:

  • private_message - Direct message received
  • mention - User mentioned in post
  • boost - Post boosted/reblogged
  • reply - Reply to user's post
  • post_sent - User successfully posted
  • timeline_update - New posts in timeline
  • notification - General notification
  • autocomplete - Autocomplete suggestions available (optional)
  • autocomplete_end - Autocomplete interaction ended (optional)
  • startup - Application started (optional)
  • shutdown - Application closing (optional)
  • expand - Thread expanded (optional)
  • collapse - Thread collapsed (optional)
  • success - General success feedback (optional)
  • error - Error occurred (optional)

Creating pack.json

Create a pack.json file with this format:

{
  "name": "My Custom Pack",
  "description": "A description of your sound pack",
  "author": "Your Name",
  "version": "1.0",
  "sounds": {
    "private_message": "dm.wav",
    "mention": "mention.ogg",
    "boost": "boost.wav",
    "reply": "reply.wav",
    "post_sent": "sent.wav",
    "timeline_update": "update.wav",
    "notification": "notification.wav",
    "autocomplete": "autocomplete.wav",
    "autocomplete_end": "autocomplete_end.wav",
    "startup": "startup.wav",
    "shutdown": "shutdown.wav",
    "expand": "expand.wav",
    "collapse": "collapse.wav",
    "success": "success.wav",
    "error": "error.wav"
  }
}

Audio File Requirements

  • Formats: WAV or OGG Vorbis only
  • Size: Maximum 10MB per file
  • Duration: Keep sounds short (1-3 seconds recommended)
  • Quality: 44.1kHz, 16-bit recommended for WAV files

Example Directory Structure

MyPack/
├── pack.json
├── dm.wav
├── mention.ogg
├── boost.wav
├── reply.wav
├── sent.wav
├── update.wav
├── notification.wav
├── startup.wav
├── shutdown.wav
├── expand.wav
├── collapse.wav
├── success.wav
└── error.wav

Installing Sound Packs

Method 1: Manual Installation

  1. Create your sound pack directory structure as shown above
  2. Copy the directory to ~/.local/share/bifrost/sounds/
  3. Restart Bifrost or go to Settings → Audio to select the new pack

Method 2: ZIP Installation

  1. Create ZIP file correctly:

    • Navigate to your sound pack directory
    • Select ALL files (pack.json and audio files)
    • Create a ZIP file containing just the files, NOT the folder
    • Important: The ZIP should contain pack.json at the root, not MyPack/pack.json
  2. Install via Soundpack Manager:

    • Open Bifrost
    • Press Ctrl+Alt+S to open Soundpack Manager
    • Click "Install from ZIP file"
    • Select your ZIP file
    • The soundpack will be validated and installed automatically

Method 3: Repository Installation

If you have access to a soundpack repository:

  1. Open Soundpack Manager (Ctrl+Alt+S)
  2. Browse available soundpacks from configured repositories
  3. Click "Install" next to the desired soundpack
  4. The soundpack will download and install automatically

ZIP File Creation Tips

Correct ZIP structure:

soundpack.zip
├── pack.json
├── dm.wav
├── mention.ogg
└── other_audio_files...

Incorrect ZIP structure (will fail):

soundpack.zip
└── MyPack/
    ├── pack.json
    ├── dm.wav
    └── other_files...

Common Commands for ZIP Creation

Linux/macOS:

cd MyPack
zip -r ../MyPack.zip *

Windows (PowerShell):

cd MyPack
Compress-Archive -Path * -DestinationPath ..\MyPack.zip

Troubleshooting

  • "Invalid filename in archive": Ensure filenames only contain letters, numbers, dots, dashes, and underscores
  • "No valid audio files found": Check that you have WAV or OGG files and they're properly formatted
  • "Invalid pack.json format": Verify your JSON syntax and required fields (name, sounds)
  • Installation fails: Make sure you zipped the files themselves, not the containing folder

Sound Pack Security

Bifrost's soundpack system includes security measures:

  • Maximum file sizes (10MB per file, 50MB total download)
  • File type validation (only WAV/OGG audio files allowed)
  • Path sanitization (prevents directory traversal attacks)
  • Repository validation (HTTPS required for remote repositories)

Contributing

This is a vibe coding project where AI handles implementation. Human contributors can:

  • Test accessibility with different screen readers
  • Suggest features and improvements
  • Create new sound packs (see Sound Pack Creation section above)
  • Report bugs and usability issues

License

This project demonstrates the potential of human-AI collaboration in creating accessible software. It is released under the gpl version 3. See LICENSE file for details.

Description
A vibe coded, fully screen reader accessible fediverse client.
Readme GPL-3.0 259 KiB
Languages
Python 100%