Interactive joint/gripper dragging is fixed. Do not restore the v1.4 “smooth manual motion” design. Resume from this file plus AGENTS.md.
Codex treated jerky slider dragging as a motion-planning problem and added a critically damped filter (ManualMotion, ~100 ms to 90% of a step, ~50 ms trail while dragging). Slider events only updated a target. RealityKit frames chased that target. The 3D arm lagged the thumb, which the user correctly read as lost FPS.
That was the wrong diagnosis. Applying six joint quaternions in RealityKit is cheap. The hitch was main-thread SwiftUI work on every pointer tick, plus intentional lag:
- Lag by design.
setJoint/setGripcalledManualMotion.retargetinstead ofapplyPose. The arm could not keep up with the control. - SwiftUI rebuilt the sliders being dragged.
JointControlsViewobservedPoseControls. Every tick published the whole pose, so all sixSliders plus the gripper were reconstructed mid-drag. - Full simulator invalidation. Drag start published
AppModel(manualMoving,status = "Adjusting pose"), which rebuiltSimulatorViewandRobotScene.updateNSView. - The tests encoded the bug. Smoke required
movingFrames > 8(arm behind the slider) and copy in README/PERFORMANCE advertised the 100 ms trail. A later agent that made dragging immediate would “fail” those checks.
Playback FPS was measured (~38 scene updates/s in v1.1). Slider-drag FPS was not. The filter made the metric look sophisticated while the actual interaction stayed jerky.
Presets, IK, MCP pose commands, and sequence playback were never the problem. Those should stay on MotionPlayer (quintic interpolation).
- Slider/text input writes
AppModel.currentand callsRobotViewport.applyPoseon the same event. - Joint/gripper controls use
LiveSlider(NSSliderrepresentable). Do not pushdoubleValueback while the mouse is down. manualMovingmeans “a slider is tracking,” is not@Published, and must not rebuild the scene.RobotScenedoes not observeAppModel. Overlays (grid/axes/camera) go throughupdateNSView; pose does not.- Smoke expects
currentto match the requested value, lowmain_model_notifications, and must not require lagging frames. - Packaged-app slider sample: 100 native slider events, ~60 scene updates/s, 0 lagging frames, 0 main-model notifications.
- Reintroduce
ManualMotionor any chase/damp/lerp on interactive sliders. - Bind SwiftUI
Sliderto anObservableObjectthat publishes every tick. - Publish
AppModel(status,manualMoving, etc.) on pointer-move. - “Fix” immediate tracking by changing the app to satisfy an old lagging-frame assertion. Change the test.
Accent color is lime labAccent (0.76, 0.91, 0.35). System-blue Link / .buttonStyle(.link) falls out of the scheme; use labLinkStyle() and NSSlider.trackFillColor = .labAccent.