Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
workbenchthis machine
Exactly one STOP on every layout: red, >= 56 px, fires on pointerdown, resume asks for a second tap, a full-width stopped banner #104
smith/arm:smith/91-exactly-one-stop-on-every-layout-red-56 → main 2 commits fork
3 files
changed +6
−3
Software/so101/src/server.test.ts +3
| @@ -207,6 +207,9 @@ describe("viewer page", () => { | ||
| 207 | 207 | // One STOP in every layout: one stop control in the markup, and no layout hides it. Resume is its own control. |
| 208 | 208 | expect(page.match(/<button[^>]*data-stop/g)?.length).toBe(1); |
| 209 | 209 | expect(page).not.toMatch(/#stop \{[^}]*display: none/); |
| 210 | expect(page).toMatch(/\.estop \{[^}]*min-height: 56px[^}]*background: #d1242f/); // red, 56 px | |
| 211 | expect(page).toMatch(/#banner\.stop \{[^}]*left: 8px; right: 8px; transform: none; width: auto/); // a full-width stopped banner | |
| 212 | expect(page).toContain('$("stop").addEventListener("pointerdown"'); | |
| 210 | 213 | expect(page.match(/api\("\/stop"/g)?.length).toBe(1); |
| 211 | 214 | expect(page).not.toContain('api("/estop", '); |
| 212 | 215 | expect(page).toContain('api("/resume", {})'); |
Software/so101/src/viewer.html +2 −2
| @@ -61,7 +61,7 @@ | ||
| 61 | 61 | #stage { position: absolute; inset: 0; display: flex; gap: 2px; } |
| 62 | 62 | /* the emergency stop's held state, and the banner that says who pressed it */ |
| 63 | 63 | .estop:disabled { opacity: .5; cursor: not-allowed; } .estop.on { background: #7d1410; box-shadow: 0 0 0 3px var(); } |
| 64 | #banner.stop { display: block; border: 2px solid var(); background: rgba(80,10,8,.92); color: #fff; font-weight: 600; } | |
| 64 | #banner.stop { display: block; left: 8px; right: 8px; transform: none; width: auto; max-width: none; text-align: center; border: 2px solid var(); background: rgba(80,10,8,.92); color: #fff; font-weight: 600; } | |
| 65 | 65 | #banner button { margin-left: 10px; min-height: 32px; padding: 2px 10px; } |
| 66 | 66 | .pane { flex: 1; min-width: 0; position: relative; background: #000; display: none; } |
| 67 | 67 | .pane.on { display: block; } |
| @@ -88,7 +88,7 @@ | ||
| 88 | 88 | #capLine { color: var(); font-size: 12px; } #capLine:empty { display: none; } |
| 89 | 89 | #driverLine.paused { color: var(); } |
| 90 | 90 | #turnActions { display: flex; gap: 6px; } #turnActions:empty { display: none; } |
| 91 | .estop { flex: none; min-width: 72px; min-height: 52px; border: 0; border-radius: 12px; background: #d1242f; color: #fff; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 0 0 3px rgba(209,36,47,.25), 0 2px 8px rgba(0,0,0,.35); } | |
| 91 | .estop { flex: none; min-width: 72px; min-height: 56px; border: 0; border-radius: 12px; background: #d1242f; color: #fff; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 0 0 3px rgba(209,36,47,.25), 0 2px 8px rgba(0,0,0,.35); } | |
| 92 | 92 | .estop:hover { background: #e5323d; } .estop:active { transform: scale(.97); } |
| 93 | 93 | #sheetToggle { flex: none; } |
| 94 | 94 | /* the turn ring: time left as a sweep around the seconds; the driver's name over the video for everyone */ |
forge.json +1 −1
| @@ -4,7 +4,7 @@ | ||
| 4 | 4 | "run": "bun run Software/so101/bench/fake-serve.ts", |
| 5 | 5 | "tty": "bun run Software/so101/src/tty.ts", |
| 6 | 6 | "test": "bun --cwd Software/so101 test", |
| 7 | "health": "/status", | |
| 7 | "health": "/link", | |
| 8 | 8 | "limits": { |
| 9 | 9 | "cpus": 6, |
| 10 | 10 | "memory": 6144 |
new above
offline