Skip to content

Commit 52bc201

Browse files
doublegateclaude
andcommitted
feat(clients): complete Phases 18-20 - Chat Protocol Wire-Up, DNS STUN Resolution & WRAITH-Share
This major release delivers three development phases with comprehensive protocol integration and a new production-ready client application. ## Phase 18: Chat Protocol Wire-Up ### Voice Call Signaling (voice_call.rs +920 lines) - Protocol-level voice call initiation, acceptance, and termination - Call state machine with proper transitions (Initiating→Ringing→Connected→Ended) - Signaling messages: OFFER, ANSWER, ICE_CANDIDATE, HANGUP - Media codec negotiation and capability exchange - Comprehensive error handling with user-friendly messages ### Video Call Coordination (video_call.rs +576 lines) - Protocol integration for video call establishment - Bandwidth estimation with adaptive bitrate adjustment - Dynamic resolution negotiation (360p-1080p) - Screen sharing signaling support ### Group Messaging Protocol (group.rs +642 lines) - Sender Keys distribution via WRAITH protocol streams - Key rotation protocol with 7-day automatic intervals - Member management with join/leave protocol notifications - Admin controls for promote/demote/kick operations ### Additional Chat Enhancements - Database improvements for call history and group metadata (+162 lines) - State management for call tracking (+149 lines) - New IPC command handlers (+451 lines) - Enhanced Opus codec and VP8/VP9 frame handling ## Phase 19: DNS STUN Resolution ### DNS-Based Server Discovery (manager.rs +278 lines) - DNS SRV record queries for STUN server discovery - A/AAAA fallback when SRV records unavailable - TTL-based response caching for performance - Health monitoring with automatic failover - Response time tracking for server prioritization ### ICE Protocol Enhancements (ice.rs +88 lines) - Enhanced candidate gathering for host, server-reflexive, and relay - Mobile network optimization for cellular/WiFi transitions - RFC 5245 compliant candidate prioritization ## Phase 20: WRAITH-Share Complete (New Tier 2 Application) ### Backend Architecture (15+ Rust modules, ~4,500 lines) - Tauri 2.0 backend with thread-safe state management - SQLite database with comprehensive schema - Unified error handling with thiserror - 30+ Tauri IPC commands ### File Transfer System - Chunked transfers with progress tracking - Swarm-based multi-peer parallel downloads - BitTorrent-style piece selection - Automatic resume for interrupted transfers ### Sharing Features - Link sharing with expiration, download limits, password protection - Fine-grained access control (view/download/upload/admin) - Group sharing with role-based permissions - Real-time activity tracking ### Frontend (12+ React components, ~2,800 lines) - React 18 + TypeScript with strict typing - File browser with grid/list views - Group management UI - Activity feed and share dialogs - 4 Zustand stores for state management ### Platform Support - Wayland/X11 compatibility with automatic detection - WebKit workarounds for Wayland display ## Metrics - Tests: 1,712 passing (was 1,695) - Code: ~80,000 lines Rust + ~22,000 lines client code - Clients: 6 production applications (was 5) - Story Points: 2,460 delivered (was 2,257) ## Files Changed - 89 files changed - ~27,823 insertions, ~116 deletions - 79 new files (WRAITH-Share) - 10 modified files (Chat, Discovery) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent bc64e2c commit 52bc201

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+28137
-160
lines changed

CHANGELOG.md

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,249 @@ _No changes yet._
1111

1212
---
1313

14+
## [1.8.0] - 2026-01-22 - Phases 18-20 Complete: Chat Protocol Wire-Up, DNS STUN Resolution & WRAITH-Share
15+
16+
### Phases 18-20 - Chat Protocol Integration, Discovery Enhancements & Distributed File Sharing
17+
18+
This major release completes three development phases: Phase 18 (Chat Protocol Wire-Up) integrates voice calling, video calling, and group messaging with the WRAITH protocol layer; Phase 19 (DNS STUN Resolution) adds dynamic STUN server discovery with health monitoring; and Phase 20 (WRAITH-Share) delivers a complete distributed anonymous file sharing application with swarm-based transfers and link-based sharing.
19+
20+
### Highlights
21+
22+
- **6 Production-Ready Client Applications**: Transfer, Chat, Android, iOS, Sync, Share
23+
- **1,712+ Tests Passing**: 100% pass rate across all crates and clients
24+
- **WRAITH-Share Complete**: New Tier 2 distributed file sharing application
25+
- **Chat Protocol Wire-Up**: Voice/video call signaling and group messaging via WRAITH protocol
26+
- **DNS STUN Resolution**: Dynamic server discovery with health monitoring and failover
27+
- **Swarm-Based Transfers**: Multi-peer parallel downloads with automatic peer discovery
28+
- **Link-Based Sharing**: Shareable links with expiration, download limits, password protection
29+
- **Access Control System**: Fine-grained permissions for shared content
30+
- **ICE Protocol Enhancements**: Improved NAT traversal with enhanced candidate gathering
31+
32+
### Added
33+
34+
#### Phase 18: Chat Protocol Wire-Up
35+
36+
##### Voice Call Signaling (`clients/wraith-chat/src-tauri/src/voice_call.rs`)
37+
- **Protocol Integration**: Voice call initiation, acceptance, and termination via WRAITH protocol streams
38+
- **Call State Machine**: Proper state transitions (Initiating → Ringing → Connected → Ended)
39+
- **Signaling Messages**: OFFER, ANSWER, ICE_CANDIDATE, HANGUP message types
40+
- **Media Negotiation**: Codec capability exchange and selection
41+
- **Error Handling**: Comprehensive error propagation with user-friendly messages
42+
- **920+ lines of voice call signaling implementation**
43+
44+
##### Video Call Coordination (`clients/wraith-chat/src-tauri/src/video_call.rs`)
45+
- **Protocol Integration**: Video call establishment with quality negotiation
46+
- **Bandwidth Estimation**: Adaptive bitrate based on network conditions
47+
- **Resolution Negotiation**: Dynamic quality adjustment (360p-1080p)
48+
- **Screen Sharing Signaling**: Protocol support for screen share initiation
49+
- **576+ lines of video call coordination implementation**
50+
51+
##### Group Messaging Protocol (`clients/wraith-chat/src-tauri/src/group.rs`)
52+
- **Sender Keys Distribution**: Key distribution via WRAITH protocol streams
53+
- **Key Rotation Protocol**: Automatic key rotation signaling (7-day interval)
54+
- **Member Management**: Join/leave notifications via protocol
55+
- **Admin Controls**: Promote/demote/kick operations with protocol support
56+
- **642+ lines of group messaging protocol implementation**
57+
58+
##### Additional Chat Enhancements
59+
- **Database Improvements** (`database.rs`): +162 lines for call history and group metadata
60+
- **State Management** (`state.rs`): +149 lines for call state tracking
61+
- **Commands** (`commands.rs`): +451 lines for new IPC command handlers
62+
- **Audio Processing** (`audio.rs`): Enhanced Opus codec integration
63+
- **Video Processing** (`video.rs`): VP8/VP9 frame handling improvements
64+
65+
#### Phase 19: DNS STUN Resolution
66+
67+
##### DNS-Based Server Discovery (`crates/wraith-discovery/src/manager.rs`)
68+
- **SRV Record Lookup**: DNS SRV record queries for STUN server discovery
69+
- **A/AAAA Fallback**: Direct address resolution when SRV unavailable
70+
- **TTL Caching**: Response caching based on DNS TTL values
71+
- **Health Monitoring**: Automatic health checks with response time tracking
72+
- **Failover Logic**: Automatic failover to backup servers on failure
73+
- **278+ lines of DNS resolution implementation**
74+
75+
##### ICE Protocol Enhancements (`crates/wraith-discovery/src/nat/ice.rs`)
76+
- **Enhanced Candidate Gathering**: Improved host, server-reflexive, and relay candidate collection
77+
- **Mobile Network Optimization**: Better handling of cellular/WiFi transitions
78+
- **Candidate Prioritization**: RFC 5245 compliant priority calculation
79+
- **88+ lines of ICE enhancements**
80+
81+
#### Phase 20: WRAITH-Share Application
82+
83+
##### Backend Architecture (`clients/wraith-share/src-tauri/src/`)
84+
- **Tauri 2.0 Backend**: Complete Rust backend with 15+ modules
85+
- **State Management** (`state.rs`): Application state with Arc<RwLock> thread safety
86+
- **Database Layer** (`database.rs`): SQLite with comprehensive schema for files, shares, groups
87+
- **Error Handling** (`error.rs`): Unified error types with user-friendly messages
88+
- **IPC Commands** (`commands.rs`): 30+ Tauri commands for all operations
89+
90+
##### File Transfer System
91+
- **File Transfer Manager** (`file_transfer.rs`): Chunked transfers with progress tracking
92+
- **Swarm Manager** (`swarm.rs`): Multi-peer swarm coordination for parallel downloads
93+
- **Chunk Distribution**: BitTorrent-style piece selection for efficient distribution
94+
- **Resume Support**: Automatic resume of interrupted transfers
95+
- **Progress Callbacks**: Real-time progress updates to frontend
96+
97+
##### Sharing Features
98+
- **Link Sharing** (`link_share.rs`): Shareable links with configurable options
99+
- Expiration dates (1 hour to never)
100+
- Download limits (1 to unlimited)
101+
- Password protection with BLAKE3 hashing
102+
- View/download permission separation
103+
- **Access Control** (`access_control.rs`): Fine-grained permission system
104+
- Role-based access (viewer, downloader, uploader, admin)
105+
- Per-file and per-folder permissions
106+
- Inheritance with override support
107+
- **Group Sharing** (`group.rs`): Share with groups of peers
108+
- Group creation and management
109+
- Member invitation and removal
110+
- Role-based group permissions
111+
112+
##### Activity and Versioning
113+
- **Activity Tracking** (`activity.rs`): Real-time activity feed
114+
- File uploads/downloads
115+
- Peer join/leave events
116+
- Permission changes
117+
- Share link usage
118+
- **Version History** (`versioning.rs`): File versioning system
119+
- Automatic version creation on changes
120+
- Version comparison and restore
121+
- Conflict resolution strategies
122+
123+
##### Frontend Components (`clients/wraith-share/src/`)
124+
- **React 18 + TypeScript**: Modern frontend with strict typing
125+
- **File Browser** (`components/FileBrowser.tsx`): Grid/list view file browser
126+
- **File Card** (`components/FileCard.tsx`): File display with actions
127+
- **Group List** (`components/GroupList.tsx`): Group management UI
128+
- **Activity Feed** (`components/ActivityFeed.tsx`): Real-time activity display
129+
- **Share Dialog** (`components/ShareDialog.tsx`): Link and group sharing UI
130+
- **Settings Panel** (`components/Settings.tsx`): Application configuration
131+
132+
##### State Management
133+
- **Zustand Stores**: 4 dedicated stores for state management
134+
- `fileStore`: File and folder state
135+
- `groupStore`: Group membership and permissions
136+
- `activityStore`: Activity feed state
137+
- `uiStore`: UI state (modals, selections, views)
138+
139+
##### Wayland Compatibility
140+
- **Display Server Handling**: Automatic X11/Wayland detection
141+
- **WebKit Workarounds**: WEBKIT_DISABLE_COMPOSITING_MODE for Wayland
142+
- **GDK Backend Selection**: Configurable display backend
143+
144+
### Changed
145+
146+
- **Test Count**: Increased from 1,695 to 1,712 tests (+17)
147+
- **Code Volume**: Increased from ~72,400 to ~80,000 lines Rust, ~14,100 to ~22,000 lines client code
148+
- **Client Count**: 6 production applications (was 5)
149+
- **Story Points Delivered**: 2,460 total (was 2,257)
150+
- **Documentation**: 130+ files (was 120+)
151+
152+
### Technical Details
153+
154+
#### Phase 18 Statistics
155+
- **Voice Call Module**: 920+ lines
156+
- **Video Call Module**: 576+ lines
157+
- **Group Protocol**: 642+ lines
158+
- **Database Extensions**: 162+ lines
159+
- **State Management**: 149+ lines
160+
- **Command Handlers**: 451+ lines
161+
- **Total Phase 18**: ~2,900 lines
162+
163+
#### Phase 19 Statistics
164+
- **DNS Resolution**: 278+ lines
165+
- **ICE Enhancements**: 88+ lines
166+
- **Total Phase 19**: ~366 lines
167+
168+
#### Phase 20 Statistics
169+
- **Backend Modules**: 15+ Rust modules (~4,500 lines)
170+
- **Frontend Components**: 12+ React components (~2,800 lines)
171+
- **Zustand Stores**: 4 stores (~600 lines)
172+
- **Total Phase 20**: ~7,900 lines
173+
174+
#### Combined Release
175+
- **New Files**: 79+ source files
176+
- **Modified Files**: 10+ existing files
177+
- **Total New Code**: ~11,000+ lines
178+
179+
### File Manifest
180+
181+
#### New Files (Phase 20 - WRAITH-Share)
182+
```
183+
clients/wraith-share/
184+
├── src-tauri/
185+
│ ├── src/
186+
│ │ ├── lib.rs
187+
│ │ ├── main.rs
188+
│ │ ├── commands.rs
189+
│ │ ├── state.rs
190+
│ │ ├── error.rs
191+
│ │ ├── database.rs
192+
│ │ ├── file_transfer.rs
193+
│ │ ├── swarm.rs
194+
│ │ ├── link_share.rs
195+
│ │ ├── access_control.rs
196+
│ │ ├── group.rs
197+
│ │ ├── activity.rs
198+
│ │ ├── versioning.rs
199+
│ │ └── tests.rs
200+
│ ├── Cargo.toml
201+
│ ├── tauri.conf.json
202+
│ └── capabilities/
203+
├── src/
204+
│ ├── App.tsx
205+
│ ├── main.tsx
206+
│ ├── components/
207+
│ │ ├── FileBrowser.tsx
208+
│ │ ├── FileCard.tsx
209+
│ │ ├── GroupList.tsx
210+
│ │ ├── ActivityFeed.tsx
211+
│ │ ├── ShareDialog.tsx
212+
│ │ ├── Settings.tsx
213+
│ │ └── ...
214+
│ ├── stores/
215+
│ │ ├── fileStore.ts
216+
│ │ ├── groupStore.ts
217+
│ │ ├── activityStore.ts
218+
│ │ └── uiStore.ts
219+
│ └── styles/
220+
├── package.json
221+
├── vite.config.ts
222+
└── tsconfig.json
223+
```
224+
225+
#### Modified Files (Phases 18-19)
226+
```
227+
clients/wraith-chat/src-tauri/src/
228+
├── voice_call.rs (+920 lines)
229+
├── video_call.rs (+576 lines)
230+
├── group.rs (+642 lines)
231+
├── commands.rs (+451 lines)
232+
├── database.rs (+162 lines)
233+
├── state.rs (+149 lines)
234+
├── audio.rs (enhanced)
235+
├── video.rs (enhanced)
236+
└── lib.rs (module registration)
237+
238+
crates/wraith-discovery/src/
239+
├── manager.rs (+278 lines)
240+
└── nat/ice.rs (+88 lines)
241+
```
242+
243+
---
244+
245+
## [1.7.2] - 2026-01-21 - Version Bump
246+
247+
### Version Alignment
248+
249+
Minor version bump to align with UI/UX standardization work.
250+
251+
### Changed
252+
253+
- Version number updated to 1.7.2 across all configuration files
254+
255+
---
256+
14257
## [1.7.1] - 2026-01-21 - WRAITH-Chat UI Redesign & UI/UX Standardization
15258

16259
### WRAITH-Chat Comprehensive UI Redesign & Cross-Client UI/UX Standardization

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ members = [
1818
"clients/wraith-transfer/src-tauri",
1919
"clients/wraith-chat/src-tauri",
2020
"clients/wraith-sync/src-tauri",
21+
"clients/wraith-share/src-tauri",
2122
"xtask",
2223
"tests",
2324
]
@@ -27,7 +28,7 @@ members = [
2728
exclude = ["crates/wraith-xdp", "fuzz"]
2829

2930
[workspace.package]
30-
version = "1.7.2"
31+
version = "1.8.0"
3132
edition = "2024"
3233
rust-version = "1.85"
3334
license = "MIT"

0 commit comments

Comments
 (0)