feat: add IsHoldingSomething status to gripper widget (#64)#65
Conversation
Add a new IsHoldingSomething component that polls the gripper's
isHoldingSomething API and displays a status pill ("Holding" / "Empty")
in the gripper widget sidebar alongside IsMoving.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 10de688 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…nto claude/gripper-is-holding-something
mattmacf98
left a comment
There was a problem hiding this comment.
Code looks fine, not sure why we put those functions in their own files now is all
| 'rdk:service:video': [clientMap['rdk:service:video'], undefined, true], | ||
| } as const | ||
|
|
||
| export const getResourceAPI = ({ namespace, type, subtype }: ResourceName) => |
There was a problem hiding this comment.
Nit: why move these out into their own files?
There was a problem hiding this comment.
they were causing circular dependencies as we were importing them from sibling files. We recently started exporting all of this in the bundle so we don't have to maintain the same client map in app.
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| '@viamrobotics/test-widgets': patch | |||
There was a problem hiding this comment.
The patch? I had to fix the circular dep referenced in the other issue. It was from a previous pr but broke things in the playground and is one of the blockers for bumping in app.
|
Claude finished @DTCurrie's task in 2m 31s —— View job PR Review
Overall the PR is well-structured. The Medium —
|
|
Claude finished @DTCurrie's task in 2m 20s —— View job PR Review
Code is clean and follows existing patterns well. No correctness issues. What's good
Circular dep fix — clean solution. Extracting Two changesets — correctly separates the patch (circular dep fix) from the minor (new widget), which was the right call. Tests — cover holding, not-holding, and the query configuration. Since NitTest file naming — |

Adds an
IsHoldingSomethingstatus indicator to the gripper test widget so users can see whether the gripper is currently holding an object, surfacing theisHoldingSomethingAPI that was previously not exposed in the UI.Closes #64
Frontend
is-holding-something.svelte— new component that pollsisHoldingSomethingon theGripperClientevery 500ms viacreateResourceQueryand renders aStatusPillshowing "Holding" (active/green) or "Empty" (idle/default).gripper.svelte— adds theIsHoldingSomethingcomponent to the right sidebar, belowIsMoving.Testing
src/lib/components/widgets/gripper/__tests__/is-holding-something.spec.tsthat verify the component renders the correct status text for both holding and empty states, and that it creates the query with the correct method name and polling interval.pnpm lint,pnpm check, andpnpm test(208 tests passing).DRI
@DTCurrie is the responsible engineer for this PR.