Skip to content

fix(mobile): make usePoseStream read-only#274

Open
Gujiassh wants to merge 1 commit intoruvnet:mainfrom
Gujiassh:fix/use-pose-stream-passive
Open

fix(mobile): make usePoseStream read-only#274
Gujiassh wants to merge 1 commit intoruvnet:mainfrom
Gujiassh:fix/use-pose-stream-passive

Conversation

@Gujiassh
Copy link

Summary

  • remove the duplicate wsService.subscribe() / connect() side effects from usePoseStream
  • keep the hook as a pure selector over the pose store, leaving WebSocket lifecycle ownership in App.tsx
  • add a focused hook test proving rendering usePoseStream no longer subscribes or reconnects

Validation

  • cd ui/mobile && npm test -- --runInBand src/__tests__/hooks/usePoseStream.test.ts
  • compatibility lint attempt via ESLINT_USE_FLAT_CONFIG=false npx -y eslint@8 -c .eslintrc.js ... still fails on the repo’s pre-existing ESLint/@typescript-eslint rule mismatch, not on this patch

Notes

  • this PR is independent from the open RuView lines #151, #236, and #240; it only touches the passive hook layer under src/hooks/usePoseStream.ts

Keep WebSocket ownership in App-level wiring so screens stop subscribing and reconnecting again every time  mounts.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant