diff --git a/docs/DEMO.md b/docs/DEMO.md index 6420368..84c20b2 100644 --- a/docs/DEMO.md +++ b/docs/DEMO.md @@ -2,6 +2,12 @@ All commands in `~/Developer/hacka/Tagwerk`, with `export PYTHONPATH=$PWD`. +## Seeded state (Hörsaal, data date 26.11.2026) +The seed is on plan so that one sentence flips it: Ist 81.7 % / Soll 80 %, SPI 1.02, forecast = baseline 01.12.2026, +no activity late. Bestuhlung neu (A1080) runs 23.-30.11., AV-Technik (A1060) 20.-27.11., Abnahme (A1090) on 01.12. +"Stuhlreihe A ist montiert. Zwei Mann vom Trockenbau sind krank. Kratzer an der Bühne." gives: A1080 52.3 -> 57.8 %, +finish 30.11. -> 02.12., Abnahme 01.12. -> 03.12. (+2 AT), cause "2 of 3 Trockenbau absent today", 2 open defects. + ## Before the slot 1. Plug in, disable suspend (a resume can break CUDA: `cuInit 999`; fix = stop gnome-remote-desktop, `sudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm`). diff --git a/docs/design-brief/Tagwerk-Pitch-7.pdf b/docs/design-brief/Tagwerk-Pitch-7.pdf new file mode 100644 index 0000000..f4099ef Binary files /dev/null and b/docs/design-brief/Tagwerk-Pitch-7.pdf differ diff --git a/mobile/scripts/cors-proxy.mjs b/mobile/scripts/cors-proxy.mjs index d11a38b..0676d04 100644 --- a/mobile/scripts/cors-proxy.mjs +++ b/mobile/scripts/cors-proxy.mjs @@ -1,5 +1,6 @@ // Dev-only: lets the Expo web build call the laptop API (which sends no CORS headers). Not used by the phone. import http from "node:http"; +import net from "node:net"; const target = process.argv[2] || "http://100.118.181.69:8082"; http.createServer((req, res) => { const cors = { "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Headers": "*", "Access-Control-Allow-Methods": "GET,POST,OPTIONS" }; @@ -10,4 +11,13 @@ http.createServer((req, res) => { }); p.on("error", (e) => { res.writeHead(502, cors); res.end(JSON.stringify({ detail: String(e) })); }); req.pipe(p); +}).on("upgrade", (req, socket, head) => { + // the app's live channel (websocket /events: pipeline steps, refresh on update) goes through the same address + const u = new URL(target); + const up = net.connect(Number(u.port) || 80, u.hostname, () => { + const h = Object.entries({ ...req.headers, host: u.host }).map(([k, v]) => `${k}: ${v}`).join("\r\n"); + up.write(`${req.method} ${req.url} HTTP/1.1\r\n${h}\r\n\r\n`); up.write(head); + up.pipe(socket); socket.pipe(up); + }); + up.on("error", () => socket.destroy()); socket.on("error", () => up.destroy()); }).listen(8099, () => console.log("proxy :8099 ->", target)); diff --git a/mobile/src/screens/Capture.tsx b/mobile/src/screens/Capture.tsx index fdc95ae..04761ec 100644 --- a/mobile/src/screens/Capture.tsx +++ b/mobile/src/screens/Capture.tsx @@ -10,7 +10,7 @@ import { RecordingPresets, requestRecordingPermissionsAsync, setAudioModeAsync, import * as ImagePicker from "expo-image-picker"; import { Camera, Images, Mic, Send, Square, Video, WifiOff, X } from "lucide-react-native"; import React, { useState } from "react"; -import { Pressable, ScrollView, View } from "react-native"; +import { Platform, Pressable, ScrollView, View } from "react-native"; import { MediaFile, Zone } from "../api"; import { JobCard } from "../JobCard"; import { Job, enqueue, newId } from "../queue"; @@ -125,7 +125,8 @@ export function Capture({ zones, jobs, names, toast, online, openSettings }: { Aus Galerie wählen -