Skip to content

Commit fc25573

Browse files
Antigravity Agentclaude
andcommitted
feat(depin): add bootstrap discovery, persistence, and live training monitor
Bootstrap node discovery (bootstrap.zig): - Directed UDP discovery to known bootstrap nodes - BootstrapPeer health tracking (trust score, failures, last_seen) - Railway API discovery fallback (deferred) - DNS seed resolver (deferred) Cluster state persistence (persistence.zig): - .tri-cluster.json with atomic writes (temp + rename) - Backup rotation (.bak, .bak2) - Peer quality scores for routing decisions - NodeRole (coordinator/worker/storage) and NodeTier (free/staker/power/whale) Live training monitor (train_live.zig): - Real-time status via Railway logs API (not stale cache!) - Detects real errors (DatasetNotFound, OOM, panic) - Parses latest step and PPL from logs - Action recommendations ONLY for workers with real errors DePIN CLI (tri_depin.zig): - `tri depin bootstrap` - bootstrap node management - `tri depin peers` - peer discovery and health - `tri depin cluster` - cluster state operations Network layer (network.zig): - UDP discovery socket with broadcast support - Peer message protocol (ping/pong/discover/peer_list) - GossipManager for peer propagation Queen UI: - ChatScreen: keyboard toolbar improvements - CommentSidebar: minor fixes φ² + 1/φ² = 3 = TRINITY | DePIN Phase 1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d82be49 commit fc25573

File tree

9 files changed

+1936
-198
lines changed

9 files changed

+1936
-198
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ src/vibeec/bitnet_inference_test
7878
zig-macos-*/
7979
zig-linux-*/
8080
zig-windows-*/
81+
zig/
8182
*.tar.xz
8283

8384
# Ralph logs (keep config)

apps/queen/QueenUI/Screens/Brain/ChatScreen.swift

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -308,21 +308,20 @@ struct ChatScreen: View {
308308
}
309309
}
310310

311-
// MARK: - Body Content (ZStack)
311+
// MARK: - Body Content
312312

313313
private var bodyContent: some View {
314-
ZStack {
315-
HStack(spacing: 0) {
316-
if !focusMode { sidebarSection }
317-
mainChatArea
318-
if !focusMode { commentSidebarSection }
319-
}
320-
.animation(reduceMotion ? nil : .easeInOut(duration: 0.2), value: commentingMessage != nil)
321-
.animation(reduceMotion ? nil : .easeInOut(duration: 0.3), value: focusMode)
322-
314+
HStack(spacing: 0) {
315+
if !focusMode { sidebarSection }
316+
mainChatArea
317+
if !focusMode { commentSidebarSection }
318+
}
319+
.animation(reduceMotion ? nil : .easeInOut(duration: 0.2), value: commentingMessage != nil)
320+
.animation(reduceMotion ? nil : .easeInOut(duration: 0.3), value: focusMode)
321+
.overlay {
323322
if !focusMode { overlaysLayer }
324-
325-
// Focus mode exit pill
323+
}
324+
.overlay(alignment: .topTrailing) {
326325
if focusMode {
327326
VStack {
328327
HStack {
@@ -350,8 +349,8 @@ struct ChatScreen: View {
350349
}
351350
.transition(.opacity)
352351
}
353-
354-
// Share copied toast
352+
}
353+
.overlay(alignment: .bottom) {
355354
if showShareCopied {
356355
VStack {
357356
Spacer()
@@ -373,8 +372,8 @@ struct ChatScreen: View {
373372
.transition(.opacity.combined(with: .move(edge: .bottom)))
374373
.allowsHitTesting(false)
375374
}
376-
377-
// Multi-select floating action bar
375+
}
376+
.overlay(alignment: .bottom) {
378377
if isSelecting, !selectedMessageIDs.isEmpty {
379378
VStack {
380379
Spacer()
@@ -1133,7 +1132,11 @@ struct ChatScreen: View {
11331132
NetworkDashboard(client: client, modelManager: modelManager, store: store)
11341133
.frame(maxHeight: 220)
11351134
}
1136-
.frame(width: LayoutConstants.sidebarIdealWidth)
1135+
.frame(
1136+
minWidth: LayoutConstants.sidebarMinWidth,
1137+
idealWidth: LayoutConstants.sidebarIdealWidth,
1138+
maxWidth: LayoutConstants.sidebarMaxWidth
1139+
)
11371140
.background(TrinityTheme.bgSidebar)
11381141
.transition(reduceMotion ? .opacity : .move(edge: .leading))
11391142

apps/queen/QueenUI/Screens/Brain/CommentSidebar.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ struct CommentSidebar: View {
117117
.padding(.vertical, 10)
118118
.background(Color(hex: 0x111111))
119119
}
120-
.frame(width: 280)
120+
.frame(
121+
minWidth: LayoutConstants.commentSidebarMinWidth,
122+
idealWidth: LayoutConstants.commentSidebarIdealWidth,
123+
maxWidth: LayoutConstants.commentSidebarMaxWidth
124+
)
121125
.background(Color(hex: 0x0A0A0A))
122126
.transition(.move(edge: .trailing).combined(with: .opacity))
123127
.onAppear { commentFocused = true }

build.zig

Lines changed: 176 additions & 148 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)