Skip to content

feat: integrate omnibus-ts library for DAQ communication#8

Draft
danielcwq wants to merge 9 commits intomainfrom
danielc/omnibus-ts-port
Draft

feat: integrate omnibus-ts library for DAQ communication#8
danielcwq wants to merge 9 commits intomainfrom
danielc/omnibus-ts-port

Conversation

@danielcwq
Copy link
Collaborator

@danielcwq danielcwq commented Nov 26, 2025

Summary

Refactors the WebSocket integration to use the official @waterloorocketry/omnibus-ts library instead of direct Socket.IO implementation.

Key changes:

  • Replace raw Socket.IO with communicator() API from omnibus-ts
  • Add onReceiveDAQ callback for processing DAQ messages
  • Display connection status (connected/connecting/disconnected/error) in NavBar
  • Update mock backend to use Omnibus protocol (msgpack + channel-as-event-name)
  • Update Zustand store with subscribeWithSelector for efficient graph updates

Technical Details

  • Uses allowExposeSocket: true temporarily for connection status events (to be removed when library exposes these natively)
  • Mock backend now uses socket.io-msgpack-parser for proper Omnibus protocol
  • Channel names are lowercase due to omnibus-ts toCamelCase() conversion

Test Plan

  • Unit tests pass (10/10)
  • Build succeeds
  • Manual testing with mock backend (npm run dev:backend + npm run dev)
  • Verify connection status indicator updates correctly
  • Verify graphs populate with live data
image

ChrisYx511 and others added 9 commits November 10, 2025 16:24
  - Rename channels → series, useOmnibusStore → useLastDatapointStore
  - Change timeRangeMs → timeRangeSec (use seconds instead of milliseconds)
  - Split useEffect to clear data only on channelName change
  - Rewrite tests: use real store, test behavior not implementation
  - Remove unnecessary mocks and comments
  - Add ResizeObserver mock, delete redundant vitest-env.d.ts
  Use useRef to prevent data loss when timeRangeSec changes.
  Previously, both effects ran when timeRangeSec changed, causing
  setData([]) to discard the filtered data.
@coderabbitai
Copy link

coderabbitai bot commented Nov 26, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch danielc/omnibus-ts-port

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ChrisYx511
Copy link
Contributor

@danielcwq is this still being worked on?

@danielcwq
Copy link
Collaborator Author

hey @ChrisYx511 i apologize, i've dropped the ball on this one and am rather swamped right now unfortunately, should i hand it off to someone else to do?

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.

2 participants