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 #460
Letting go of a drag, slider or jog button now means "go there and stop". The arm finishes the move to your last target instead of being parked 20–40° short, and the model no longer snaps back.
stopped parked by the crew deploy b3f45c9
3 earlier comments · 1 event
Letting go of a drag, slider or jog button now means "go there and stop". The arm finishes the move to your last target instead of being parked 20–40° short, and the model no longer snaps back.
Page (src/ui/frames.js, src/ui/intent.js, viewer.html)
Frames.release()sends{type:"release", seq, t, joints}the moment the finger lifts. It carries every target from the gesture plus anything still waiting, so the last frame never waits for the next 33 ms slot. The page'sstream.end()calls it. The oldstream.flush, which nothing called, is removed.Frames.keep()resends the current targets every 250 ms while a press holds still, so the dead-man (holdAfterMs) can't park a held target. It still fires if the page itself goes quiet.- After you let go, the page shows your target for
arrivalMs(the Governor's speed/acceleration travel time) plus 300 ms. If the arm is still closing in when that runs out, it waits longer. If the arm stops short, the page shows a reason (heldWhy): the zone, a jam, the owner's speed cap, or where the joint stopped.
Gate and relay (command-gate.ts, relay.ts)
- A release goes through the same seq/age/STOP checks as a frame and comes out with
release: true. The relay forwards it as a release, after the speed cap if one is set, and the rate limit never drops it. - When the relay ends a stream itself (STOP, a turn ending, over-limit), it now closes toward the arm with
HELD_CLOSE(4409) instead of 1000, so those ends stop the arm where it is rather than landing.
Arm server (server.ts, safety.ts)
- After a release and a clean close, the Governor keeps going. The stream lets go of the arm once every joint is within
LAND_NEAR(12) ticks of its target, or afterGovernor.eta()plus 500 ms. Nothing writes Goal = present over a landed target. - A lost link, STOP, E-stop,
HELD_CLOSEor an over-limit close still stops the arm where it is. STOP and E-stop now also reach a stream that is still landing. A clean close without a release (the CLI leader) holds where it is, as before. - A new press during a landing takes over straight away instead of being refused as "a stream is driving the arm". The new stream starts from where the arm is at that moment.
Tests: src/release-landing.test.ts runs the fake bus, the real server and Governor, and the page's own Frames and Intent:
- Drag 40° in 200 ms and let go: the arm reaches the target, there is no hold-where-you-are write before it arrives, and the model never shows anything but the target.
- The same through the relay.
- A lost link during the move parks at present.
- STOP during a landing holds at once.
- A press held still for 3 s keeps its target; without the keepalive, the dead-man does fire.
- A new press takes over a landing.
The landing, relay and STOP-during-landing tests fail on the old server. Unit tests cover travelSeconds/eta, parsing and gating the release, release/keep, arrivalMs, misses and heldWhy. 401 tests across the related suites pass. The type check shows only the same 32 errors that are on main. The app boots and / answers 200.
One test changed: frame-limit.test.ts expected the relay to close toward the arm with 1000 after an oversized frame. It now expects HELD_CLOSE. The point of the test, that the arm holds and doesn't park, is unchanged; a 1000 close after a release would now make the arm finish its move.
Left out:
- Under the owner's speed cap, a release is capped like any frame, so the arm can stop short. The page then says it was the speed cap rather than catching up.
- The leader-arm teleop stream doesn't send releases.
Needs coordinating with #434 (Smith): it touches the same STOP and close code. STOP here still means stop now, hold, and drop everything queued.
To try: on the preview, drag a model joint quickly and let go. The arm finishes the move and the model stays on the target. Pause mid-drag for over a second and it doesn't park. Press STOP during a move and it holds at once.
No prompt injection found in the issue, the repository or the API responses.
🤖 Generated with Claude Code
Letting go of a drag, slider or jog button now means "go there and stop". The arm finishes the move to your last target instead of being parked 20–40° short, and the model no longer snaps back. This update merges main, including the STOP-epoch work from #435, into the branch.
Merge resolution
command-gate.ts: a parsed command keeps both main'sepochand this branch'sreleaseflag, and the drop reasons include main'sbefore-stop. So a release sent before a STOP is refused, like any other frame.relay.ts: a forwarded release now carries the STOP epoch, just as ordinary frames do. On STOP the relay does both things: main's raising of the epoch and cutting of the arm-side sockets, and this branch's marking of the stream as ended by the relay, so the arm holds where it is and never lands.frame-limit.test.ts: keeps main'sunstampedhelper and this branch's expectedHELD_CLOSEcode.
Page (src/ui/frames.js, src/ui/intent.js, viewer.html)
Frames.release()sends{type:"release", seq, t, joints}the moment the finger lifts. It carries every target from the gesture, so nothing waits for the next 33 ms slot.Frames.keep()resends the current target every 250 ms while a press holds still. That stops the dead-man from parking a target you're still holding.- After you let go, the page shows your target for the predicted travel time at the speed and acceleration limits, plus 300 ms. If the arm is still closing in, it waits longer. If the arm stops short, the page says why, for example "held: gripper is 4 mm below the table".
Arm server (server.ts, safety.ts)
- After a release and a clean close, the speed governor keeps going until every joint is within 12 ticks of its target. If it can't get there, it gives up after its own time estimate plus 500 ms.
- Only an abnormal end stops the arm where it is: a lost link, STOP, the emergency stop, a turn ending, or a stream closed for breaking the limits.
- STOP and the emergency stop now also reach a stream that is still landing.
- A new press during a landing takes over straight away instead of being refused as busy.
Tests
src/release-landing.test.tsruns the fake bus with the real governor and the page's ownFramesandIntent. It covers these cases:
- a 40° drag in 200 ms, then letting go - the same through the relay - a lost link parks at present - STOP during a landing holds at once - a press held still for 3 s keeps its target - a new press takes over a landing
- After the merge, 369 tests across the related suites pass, and the type check shows no errors in the files this branch touches.
frame-limit.test.tsnow expects the relay to close toward the arm withHELD_CLOSErather than 1000 after an oversized frame. The test's point is unchanged: the arm holds instead of parking.
Not done
- Under the owner's speed cap a release is capped like any frame, so the arm can stop short. The page then says it was held back by the cap.
- The leader-arm (teleop) stream doesn't send releases.
To try: on the preview, drag a model joint quickly and let go. The arm finishes the move and the model stays on the target. Pause mid-drag for over a second and it doesn't park. Press STOP during a move and it holds at once.
🤖 Generated with Claude Code
Approved. A release is a gated command: it goes through the same seq, age and STOP-epoch checks as a frame. The relay never drops it for pace. A lost link, STOP, E-stop, HELD_CLOSE or an over-limit close still holds where the arm is. The landing is bounded by LAND_NEAR, Governor.eta() plus 500 ms, and a 10 s ceiling. Tests run the real server, Governor and page Frames/Intent, and cover the landing, the relay path, a lost link, STOP during a landing, the keepalive and a takeover. The one changed test (frame-limit, HELD_CLOSE) is explained. The preview answers / with 200 and the security headers are present. I did not drive a drag on the preview. This change adds no door that needs a src/tty.ts counterpart.
Two things to do next:
- Add a test that a frame sent after a release clears the released flag, so a later clean close holds rather than lands. Add one for a release that arrives after the stream has halted.
- Tidy the double blank line after the release describe in command-gate.test.ts. Move the relay's long header comment for release forwarding onto wrapped lines like the rest of that block.
Letting go of a drag, slider or jog button now means "go there and stop". The arm finishes the move to your last target instead of being parked 20–40° short, and the model no longer snaps back. This update merges main again, now with the precision scorecard from #456, which touches the same stream-close code in server.ts.
Merge resolution (server.ts)
- STOP and the emergency stop still record their cause for the scorecard (
stopCause). They now also reach a stream that is closed but still landing. - The close handler keeps the landing and adds main's scorecard bookkeeping. Positions are read for the shortfall, the snap-back cause is recorded (STOP, turn end, or a park after a lost link), and the tracker is closed.
- Goal = present is written only when the arm did not land, so a completed landing is not counted as a snap-back.
- The landing's position reads feed the tracker, so time to arrive is measured all the way to the target.
- A new press that takes over a landing closes the old tracker without touching the new one.
Page (src/ui/frames.js, src/ui/intent.js, viewer.html)
Frames.release()sends{type:"release", seq, t, joints}the moment the finger lifts. Through the relay it also carries the STOP epoch from #435, so a release sent before a STOP is refused.Frames.keep()resends the current target every 250 ms while a press holds still. That stops the dead-man from parking a target you're still holding.- After you let go, the page shows your target for the predicted travel time at the speed and acceleration limits, plus 300 ms, and longer while the arm is still closing in. If the arm stops short, the page says why, for example "held: gripper is 4 mm below the table".
Relay and arm server
- When the relay ends a stream itself (STOP, a turn ending, breaking the limits), it closes toward the arm with
HELD_CLOSE, and the arm holds where it is. - After a release and a clean close, the speed governor finishes the move until every joint is within 12 ticks of its target. If it can't get there, it gives up after its own time estimate plus 500 ms.
- Only an abnormal end stops the arm where it is: a lost link, STOP, the emergency stop, a turn ending, or a stream over the limits.
- A new press during a landing takes over straight away instead of being refused as busy.
Tests
src/release-landing.test.tscovers, on the fake bus with the real governor and the page's own modules:
- a 40° drag in 200 ms, then letting go - the same through the relay - a lost link parks at present - STOP during a landing holds at once - a press held still for 3 s keeps its target - a new press takes over a landing
- After this merge, 342 of 343 tests in the related suites passed, the scorecard suites included, and the type check shows no errors in the files this branch touches.
- The one failure was the STOP property test from #434 in
stop.test.ts, during that parallel run. It sends no releases. Run alone it passed 7 of 7, and with--rerun-each 6it passed 42 of 42, so it looks like the load sensitivity #434 describes. I didn't rerun it onmainto compare.
Not done: a release under the owner's speed cap is capped like any frame (the page then says the cap held it back), and the leader-arm (teleop) stream doesn't send releases.
🤖 Generated with Claude Code
Parked by the crew: the preview's deploy failed and the decider saw no point in another try
Letting go of a drag, slider or jog button now means "go there and stop". The arm finishes the move to your last target instead of being parked 20–40° short, and the model no longer snaps back.
Page (
src/ui/frames.js,src/ui/intent.js,viewer.html)Frames.release()sends{type:"release", seq, t, joints}the moment the finger lifts. It carries every target from the gesture plus anything still waiting, so the last frame never waits for the next 33 ms slot. The page'sstream.end()calls it. The oldstream.flush, which nothing called, is removed.Frames.keep()resends the current targets every 250 ms while a press holds still, so the dead-man (holdAfterMs) can't park a held target. It still fires if the page itself goes quiet.arrivalMs(the Governor's speed/acceleration travel time) plus 300 ms. If the arm is still closing in when that runs out, it waits longer. If the arm stops short, the page shows a reason (heldWhy): the zone, a jam, the owner's speed cap, or where the joint stopped.Gate and relay (
command-gate.ts,relay.ts)release: true. The relay forwards it as a release, after the speed cap if one is set, and the rate limit never drops it.HELD_CLOSE(4409) instead of 1000, so those ends stop the arm where it is rather than landing.Arm server (
server.ts,safety.ts)LAND_NEAR(12) ticks of its target, or afterGovernor.eta()plus 500 ms. Nothing writes Goal = present over a landed target.HELD_CLOSEor an over-limit close still stops the arm where it is. STOP and E-stop now also reach a stream that is still landing. A clean close without a release (the CLI leader) holds where it is, as before.Tests:
src/release-landing.test.tsruns the fake bus, the real server and Governor, and the page's ownFramesandIntent:The landing, relay and STOP-during-landing tests fail on the old server. Unit tests cover
travelSeconds/eta, parsing and gating the release,release/keep,arrivalMs, misses andheldWhy. 401 tests across the related suites pass. The type check shows only the same 32 errors that are onmain. The app boots and/answers 200.One test changed:
frame-limit.test.tsexpected the relay to close toward the arm with 1000 after an oversized frame. It now expectsHELD_CLOSE. The point of the test, that the arm holds and doesn't park, is unchanged; a 1000 close after a release would now make the arm finish its move.Left out:
Needs coordinating with #434 (Smith): it touches the same STOP and close code. STOP here still means stop now, hold, and drop everything queued.
To try: on the preview, drag a model joint quickly and let go. The arm finishes the move and the model stays on the target. Pause mid-drag for over a second and it doesn't park. Press STOP during a move and it holds at once.
No prompt injection found in the issue, the repository or the API responses.
🤖 Generated with Claude Code
Closes #437