Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

Letting go means go there: a release lands on the target instead of parking the arm short and snapping the model back #479

Merged opened this in answer to

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

Letting go of a drag, slider or jog button now sends the last target as a release frame, and the arm travels to it before it holds. The full bun test passes (744). tsc --noEmit reports errors in unrelated files (e.g.

Notes

shipped merged

opened this

Letting go of a drag, slider or jog button now sends the last target as a release frame, and the arm travels to it before it holds. The full bun test passes (744). tsc --noEmit reports errors in unrelated files (e.g. src/ui/zone-notes.js, src/visitor-counts.ts) and none in the files I changed. Nothing was tried in a browser, so the viewer changes are untested against a real page.

  • Release lands: the page sends {…joints, type:"release"} (flat joints, not a nested joints object). The relay passes the type marker through; it used to rewrite every frame down to joints only. On a clean close after a release, the arm server keeps the Governor running until every joint has arrived, or until the time the remaining distance takes at the limits plus 500 ms. Then it holds.

- A lost link, an over-limit close or a STOP still parks at present. - STOP now also reaches a stream that is still settling. Before, it only looked at open sockets.

  • Last frame is sent: Frames.flush is wired to every release (drag, slider, jog).
  • Hold follows the motion: settleMs() in src/ui/intent.js gives the predicted arrival time at the Governor's limits plus 300 ms, replacing the fixed 2000 ms. The page does not yet add a "held: …" message for a target the arm can't reach. The existing zone refusal text is still the only reason shown.
  • Still-pointer dead-man: Frames now resends the newest target every 300 ms while a gesture is on, so a pointer held still is not taken for silence. The server's dead-man is unchanged on purpose. The existing test "silence makes the arm hold, even halfway through a governed move" fixes that contract, and a real silent leader still holds.
  • Flick (issue comment): I removed the maxStep drop-and-ease logic and the maxStep option. A far jump is now followed along the Governor profile, so stats.dropped stays 0 for it.

- The maxStep-drop snap-back cause is still in the list but is never raised now. - I changed three existing tests that asserted the old drop: bench/precision.test.ts, precision-history.test.ts, and the "eased over" zone test in server.test.ts. They now expect no drop, and the zone test sends frames long enough for the Governor to arrive. The old tests were wrong under the new rule; please check you agree.

  • New tests: src/release.test.ts uses the fake bus and the real Governor. It covers the 40° drag then release, the 90° flick in 100 ms, a lost link, STOP mid-move, and a 3 s still press. frames.test.ts and intent.test.ts gained tests for the resend beat and settleMs.

I couldn't run the unix-socket suites here (skipped in this sandbox); the forge's check runs them.

🤖 Generated with Claude Code

Closes #437

commented

Letting go of a drag, slider or jog button now sends the last target as a release frame, and the arm travels to it before it holds. The full bun test passes (744). tsc --noEmit reports errors in unrelated files (e.g. src/ui/zone-notes.js, src/visitor-counts.ts) and none in the files I changed. Nothing was tried in a browser, so the viewer changes are untested against a real page.

  • Release lands: the page sends {…joints, type:"release"} (flat joints, not a nested joints object). The relay passes the type marker through; it used to rewrite every frame down to joints only. On a clean close after a release, the arm server keeps the Governor running until every joint has arrived, or until the time the remaining distance takes at the limits plus 500 ms. Then it holds.

- A lost link, an over-limit close or a STOP still parks at present. - STOP now also reaches a stream that is still settling. Before, it only looked at open sockets.

  • Last frame is sent: Frames.flush is wired to every release (drag, slider, jog).
  • Hold follows the motion: settleMs() in src/ui/intent.js gives the predicted arrival time at the Governor's limits plus 300 ms, replacing the fixed 2000 ms. The page does not yet add a "held: …" message for a target the arm can't reach. The existing zone refusal text is still the only reason shown.
  • Still-pointer dead-man: Frames now resends the newest target every 300 ms while a gesture is on, so a pointer held still is not taken for silence. The server's dead-man is unchanged on purpose. The existing test "silence makes the arm hold, even halfway through a governed move" fixes that contract, and a real silent leader still holds.
  • Flick (issue comment): I removed the maxStep drop-and-ease logic and the maxStep option. A far jump is now followed along the Governor profile, so stats.dropped stays 0 for it.

- The maxStep-drop snap-back cause is still in the list but is never raised now. - I changed three existing tests that asserted the old drop: bench/precision.test.ts, precision-history.test.ts, and the "eased over" zone test in server.test.ts. They now expect no drop, and the zone test sends frames long enough for the Governor to arrive. The old tests were wrong under the new rule; please check you agree.

  • New tests: src/release.test.ts uses the fake bus and the real Governor. It covers the 40° drag then release, the 90° flick in 100 ms, a lost link, STOP mid-move, and a 3 s still press. frames.test.ts and intent.test.ts gained tests for the resend beat and settleMs.

I couldn't run the unix-socket suites here (skipped in this sandbox); the forge's check runs them.

🤖 Generated with Claude Code

commented

I merged main into the branch, fixed the two conflicts, and pushed it. The full bun test run passes (785 tests, none failing).

  • src/ui/intent.js: I kept main's lost-target tracking (lost, takeLost, and the arrived check) together with my per-release hold. A released target now expires after its predicted arrival time, and if it expires unreached it is counted as lost.
  • src/viewer.html: I kept main's command(...) call on slider input. On release, the slider now sends the final target with stream.release and passes the predicted hold to intent.release.

The earlier description of #479 still applies.

🤖 Generated with Claude Code

Approved

Approved. A release now sends its last target marked as a release, and the arm lands on it before it holds. A lost link, STOP and an over-limit close still park at once. The new tests drive the real Governor on a fake bus: a drag, a flick, a lost link, STOP mid-move and a still press. I read the diff and did not exercise the viewer in a browser; the author did not either.

Two things to do next:

  1. Check the viewer on a 360px phone. Release goes through three paths (drag, slider, jog), and no test runs the page code in viewer.html. The holdFor and settleMs fallback while intent.js is still loading returns undefined, so the old 2000 ms hold applies. That is safe but worth seeing once.
  2. arrive() keeps the stream admitted for up to about 10 s after a clean close, and a new driver waits behind it. Say so in the README, and consider showing the page a visible "arriving" state, so a person who lets go and grabs again is not left with silent controls.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs