Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
src/ui/video-pane.js chooses H.264 or the frame feed for a camera and builds a labelled 44 px quality select - module and test only #410
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
I added src/ui/video-pane.js and src/ui/video-pane.test.ts and pushed them. The new test passes, but I couldn't run bun x tsc --noEmit. bun x failed here with "unable to write files to tempdir: ReadOnlyFileSystem", and there is no local tsc to run directly.
shipped merged
I added src/ui/video-pane.js and src/ui/video-pane.test.ts and pushed them. The new test passes, but I couldn't run bun x tsc --noEmit.
bun x failed here with "unable to write files to tempdir: ReadOnlyFileSystem", and there is no local tsc to run directly. I also didn't run the full bun --cwd Software/so101 test suite, only the new test file. The forge's check will run both.
choose(camera, canDecode): returns'h264'only whencamera.h264 === trueandcanDecode === true, otherwise'frames'. A truthy but non-booleanh264, such as the string"true", gets'frames'.qualitySelect(doc, options, onChange): builds a<select aria-label="Video quality">withmin-widthandmin-heightof 44px. Each option's text is set throughtextContent, andonChangeis called with the selected value.
The issue didn't say what options looks like, so I used { value, label }[]. If the caller will pass something else, that is the line to change.
The test covers the choose cases and the select's label, size, options and change callback, using a fake document. Option text containing <b> stays literal text.
Nothing imports the module, so viewer.html and the first-visit gzip budget are unchanged.
🤖 Generated with Claude Code
Module and test only, as titled. choose() is strict (=== true on both inputs), so a string "true" falls back to frames. qualitySelect is a native select with an aria-label, 44px min size, and option text set via textContent, so it is keyboard and screen-reader reachable and escaped. The test would fail without each behaviour. Nothing imports it, so there is no preview surface, no new dependency and no gzip change.
Two things next: 1) when it is wired into the viewer, mark the selected option from current state (selected/value) and add a visible text label for the select, not only aria-label; 2) the 44px min is on the select only, so check the real tap row on a 360px phone once it is mounted.
I added
src/ui/video-pane.jsandsrc/ui/video-pane.test.tsand pushed them. The new test passes, but I couldn't runbun x tsc --noEmit.bun xfailed here with "unable to write files to tempdir: ReadOnlyFileSystem", and there is no localtscto run directly. I also didn't run the fullbun --cwd Software/so101 testsuite, only the new test file. The forge's check will run both.choose(camera, canDecode): returns'h264'only whencamera.h264 === trueandcanDecode === true, otherwise'frames'. A truthy but non-booleanh264, such as the string"true", gets'frames'.qualitySelect(doc, options, onChange): builds a<select aria-label="Video quality">withmin-widthandmin-heightof 44px. Each option's text is set throughtextContent, andonChangeis called with the selected value.The issue didn't say what
optionslooks like, so I used{ value, label }[]. If the caller will pass something else, that is the line to change.The test covers the
choosecases and the select's label, size, options and change callback, using a fake document. Option text containing<b>stays literal text.Nothing imports the module, so
viewer.htmland the first-visit gzip budget are unchanged.🤖 Generated with Claude Code
Closes #382