Replace Mac app with Tahoe Liquid Glass flight deck

This commit is contained in:
saymrwulf 2026-04-28 16:35:01 +02:00
parent 9750530b63
commit fd9e7df350
9 changed files with 855 additions and 1151 deletions

View file

@ -2,7 +2,7 @@
Monitor-only research scaffold for optimizing a manual "buy hashpower on Braiins, mine through OCEAN" strategy.
The first implementation is deliberately conservative:
The current implementation is monitor-only by design:
- The code never places, modifies, or cancels Braiins orders.
- The default strategy emits recommendations only.
@ -10,7 +10,7 @@ The first implementation is deliberately conservative:
- The Braiins integration accepts a watcher-only token only.
- All mutable runtime state stays inside this repository under `data/`.
- The Git branch is `master`.
- The project uses Python standard library only.
- The lifecycle engine uses Python standard library only; the native Mac app is SwiftUI.
## Quick Start
@ -18,7 +18,7 @@ The first implementation is deliberately conservative:
./scripts/ratchet app
```
This builds and opens the native macOS control room. Use the app for normal operation; terminal commands are advanced fallback tools.
This rebuilds the native macOS control room, replaces any stale app window, and opens the fresh bundle. Use the app for normal operation; terminal commands are advanced fallback tools.
The lifecycle state persists in `data/ratchet.sqlite`. If the app or Mac restarts, open the app again and it reads the same state.
@ -42,9 +42,9 @@ For the native macOS app:
./scripts/ratchet app
```
This builds `macos/build/Braiins Ratchet.app` and opens the real app bundle. Do not use `swift run` for normal operation.
This builds `macos/build/Braiins Ratchet.app`, closes any stale `BraiinsRatchetMac` UI process, and opens the real app bundle. Do not use `swift run` for normal operation.
The app is a native visual control room: Mission Control, Mining Stack, Ratchet, Strategy Lab, Manual Exposure, and Evidence Vault. The design rationale is in `docs/APP_DESIGN_RESEARCH.md`.
The app is a native Tahoe Flight Deck: animated hashfield background, real SwiftUI Liquid Glass controls, Hashflow, Ratchet, Bid Lab, Exposure, and Evidence. The design rationale is in `docs/APP_DESIGN_RESEARCH.md`.
Advanced fallback for a 6-hour CLI monitoring session:

View file

@ -15,11 +15,11 @@ Your job is not to understand every metric.
Your job is:
1. Open the app with `./scripts/ratchet app`.
2. Stay on `Mission Control` unless you intentionally need another tab.
3. Read `Current Decision` first.
4. Read `Who Owns Control` second.
2. Stay on `Flight Deck` unless you intentionally need another tab.
3. Read the giant decision word first.
4. Read the glass `control` and `next` pucks second.
5. Prefer `Start Forever Engine` when you want the app to keep the monitor-only lifecycle moving without babysitting.
6. If you manually place a Braiins canary, record it in `Manual Exposure` immediately.
6. If you manually place a Braiins canary, record it in `Exposure` immediately.
Do not start extra terminal watches while the app says a watch, cooldown, or manual exposure owns control.
@ -66,14 +66,16 @@ Build and open the real app bundle:
This creates `macos/build/Braiins Ratchet.app`. After that, you can open that app bundle directly from Finder or pin it in the Dock.
The launcher rebuilds the app and replaces any already-running `BraiinsRatchetMac` UI process before opening the bundle. That prevents macOS from simply focusing an old window after a redesign.
The app is organized as:
1. `Mission Control`: current decision, control ownership, forever engine controls, cooldown progress, and evidence.
2. `Mining Stack`: the Umbrel, Knots, Datum, OCEAN, and Braiins interplay.
1. `Flight Deck`: giant decision word, glass control pucks, reactor lens, engine controls, and key instruments.
2. `Hashflow`: the Umbrel, Knots, Datum, OCEAN, and Braiins interplay.
3. `Ratchet`: the observe, price, watch, mature, adapt learning loop.
4. `Strategy Lab`: shadow order, expected net, breakeven, and loss boundary.
5. `Manual Exposure`: record or close manually executed Braiins exposure.
6. `Evidence Vault`: raw cockpit, report, and ledger artifacts for diagnostics.
4. `Bid Lab`: shadow order, expected net, breakeven, and loss boundary.
5. `Exposure`: record or close manually executed Braiins exposure.
6. `Evidence`: raw cockpit, report, and ledger artifacts for diagnostics.
## Research Pathway
@ -107,7 +109,7 @@ Each completed watch creates one run report:
reports/run-*.md
```
Use the app's `Evidence Vault` tab when you need raw artifacts. Mission Control intentionally hides raw logs during normal operation.
Use the app's `Evidence` tab when you need raw artifacts. Flight Deck intentionally hides raw logs during normal operation.
## Advanced Fallback Commands

View file

@ -50,14 +50,16 @@ The native app now treats the Python engine as a structured state provider, not
- Cockpit text for audit/debug.
- Latest OCEAN, Braiins, and strategy proposal payloads.
The SwiftUI app turns that into native surfaces:
The SwiftUI app turns that into native Tahoe surfaces:
- `Mission Control`: current decision, control ownership, forever engine, cooldown, and evidence.
- `Mining Stack`: Umbrel, Knots, Datum, OCEAN, Braiins, and block-luck interplay.
- `Flight Deck`: giant decision word, glass control pucks, reactor lens, engine controls, and key instruments.
- `Hashflow`: Umbrel, Knots, Datum, OCEAN, Braiins, and block-luck interplay.
- `Ratchet`: the observe, price, watch, mature, adapt pathway.
- `Strategy Lab`: shadow order, expected net, breakeven, and loss boundary.
- `Manual Exposure`: the ledger for real manually placed Braiins exposure.
- `Evidence Vault`: raw artifacts kept available but no longer primary.
- `Bid Lab`: shadow order, expected net, breakeven, and loss boundary.
- `Exposure`: the ledger for real manually placed Braiins exposure.
- `Evidence`: raw artifacts kept available but no longer primary.
The UI uses real Tahoe SwiftUI APIs where available in the local SDK: `glassEffect`, `GlassEffectContainer`, `.glass`, `.glassProminent`, `backgroundExtensionEffect`, and toolbar search. These are intentionally concentrated on the shell, action controls, and reactor instruments instead of coating every paragraph in glass.
## The Ratchet UX Rule

View file

@ -1,11 +1,11 @@
// swift-tools-version: 6.0
// swift-tools-version: 6.2
import PackageDescription
let package = Package(
name: "BraiinsRatchetMac",
platforms: [
.macOS(.v15)
.macOS(.v26)
],
products: [
.executable(name: "BraiinsRatchetMac", targets: ["BraiinsRatchetMac"])

View file

@ -2,7 +2,7 @@
Native SwiftUI control room for the durable Braiins Ratchet lifecycle engine.
The Python lifecycle engine remains the source of truth. This app reads the same repository-local SQLite state through structured app state, not by making Mission Control a terminal transcript.
The Python lifecycle engine remains the source of truth. This app reads the same repository-local SQLite state through structured app state, not by making the Flight Deck a terminal transcript.
## Normal Run
@ -10,18 +10,18 @@ The Python lifecycle engine remains the source of truth. This app reads the same
./scripts/ratchet app
```
This builds `macos/build/Braiins Ratchet.app` and opens the packaged app. Use this path for normal operation.
This builds `macos/build/Braiins Ratchet.app`, closes any stale `BraiinsRatchetMac` UI process, and opens the fresh packaged app. Use this path for normal operation.
## Current Scope
- Native macOS SwiftUI control room.
- Mission Control with one explicit decision and control owner.
- Mining Stack view for Umbrel, Knots, Datum, OCEAN, and Braiins interplay.
- Native macOS Tahoe SwiftUI Flight Deck.
- Real Liquid Glass APIs: `glassEffect`, `GlassEffectContainer`, `.glass`, `.glassProminent`, toolbar search, and `backgroundExtensionEffect`.
- Hashflow view for Umbrel, Knots, Datum, OCEAN, and Braiins interplay.
- Ratchet view for the full autoresearch pathway.
- Strategy Lab for shadow orders and loss boundaries.
- Bid Lab for shadow orders and loss boundaries.
- Forever Engine controls for the monitor-only background lifecycle.
- Manual exposure recording and closing controls.
- Evidence Vault for raw artifacts and backend diagnostics.
- Evidence view for raw artifacts and backend diagnostics.
- Monitor-only. It never places Braiins orders.
## Product Direction

View file

@ -66,7 +66,7 @@ cat > "$CONTENTS_DIR/Info.plist" <<'PLIST'
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>15.0</string>
<string>26.0</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>

View file

@ -134,6 +134,7 @@ cmd_app() {
local app_path
app_path="$("$ROOT_DIR/scripts/build_mac_app" | tail -n 1)"
echo "Opening $app_path"
pkill -x BraiinsRatchetMac 2>/dev/null || true
open "$app_path"
}

View file

@ -16,6 +16,7 @@ class MacAppPackagingTest(unittest.TestCase):
self.assertIn("cmd_app", text)
self.assertIn("app-state", text)
self.assertIn("engine", text)
self.assertIn("pkill -x BraiinsRatchetMac", text)
self.assertNotIn("swift run BraiinsRatchetMac", text)
def test_python_cli_exposes_structured_app_state(self):
@ -35,8 +36,17 @@ class MacAppPackagingTest(unittest.TestCase):
self.assertIn("CFBundlePackageType", text)
self.assertIn("APPL", text)
self.assertIn("CFBundleIconFile", text)
self.assertIn("<key>LSMinimumSystemVersion</key>", text)
self.assertIn("<string>26.0</string>", text)
self.assertIn("iconutil -c icns", text)
def test_native_app_targets_tahoe_sdk(self):
manifest = ROOT / "macos" / "BraiinsRatchet" / "Package.swift"
text = manifest.read_text()
self.assertIn("swift-tools-version: 6.2", text)
self.assertIn(".macOS(.v26)", text)
def test_native_app_docs_use_packaged_launcher(self):
docs = [
ROOT / "README.md",
@ -55,11 +65,12 @@ class MacAppPackagingTest(unittest.TestCase):
self.assertIn("This project now has one normal operator entry point", text)
self.assertIn("./scripts/ratchet app", text)
self.assertIn("The app is the control room", text)
self.assertIn("Flight Deck", text)
self.assertIn("Who Owns Control", text)
self.assertIn("Start Forever Engine", text)
self.assertIn("Mining Stack", text)
self.assertIn("Strategy Lab", text)
self.assertIn("Evidence Vault", text)
self.assertIn("Hashflow", text)
self.assertIn("Bid Lab", text)
self.assertIn("Evidence", text)
self.assertNotIn("Controlled Automation", text)
self.assertNotIn("./scripts/ratchet pipeline", text)
@ -68,19 +79,28 @@ class MacAppPackagingTest(unittest.TestCase):
text = source.read_text()
self.assertIn("NavigationSplitView", text)
self.assertIn("MissionControlView", text)
self.assertIn("MiningStackView", text)
self.assertIn("RatchetPathView", text)
self.assertIn("StrategyLabView", text)
self.assertIn("FlightDeckApp", text)
self.assertIn("FlightDeckView", text)
self.assertIn("HashfieldBackdrop", text)
self.assertIn("ReactorLens", text)
self.assertIn("HashflowView", text)
self.assertIn("RatchetMapView", text)
self.assertIn("BidLabView", text)
self.assertIn("EvidenceVaultView", text)
self.assertIn("AppStatePayload", text)
self.assertIn("EngineStatusPayload", text)
self.assertIn("loadAppState", text)
self.assertIn("Start Forever Engine", text)
self.assertIn("Who Owns Control", text)
self.assertIn("Mining Stack", text)
self.assertIn("Strategy Lab", text)
self.assertIn("Current Decision", text)
self.assertIn("glassEffect", text)
self.assertIn("GlassEffectContainer", text)
self.assertIn(".buttonStyle(.glass", text)
self.assertIn("backgroundExtensionEffect", text)
self.assertIn("searchable", text)
self.assertIn("Flight Deck", text)
self.assertIn("Bid Lab", text)
self.assertNotIn("MissionControlView", text)
self.assertNotIn("MiningStackView", text)
self.assertNotIn("StrategyLabView", text)
self.assertNotIn("Do This Now", text)
self.assertNotIn("Automation Gate", text)
self.assertNotIn("confirmationDialog", text)