Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Aug 5, 2025

Resolves #17623

Summary by CodeRabbit

  • New Features

    • Added support for creating camera clips, custom footage seekpoints, and shared live video streams.
    • Introduced actions to play uploaded audio, reboot cameras, toggle audio gateway recording, and unlock access-controlled doors.
    • Added event sources for instant and polling-based detection of new audit records, camera clips, seekpoints, button events, door sensor events, environmental sensor events, and rule events.
    • Implemented a comprehensive Rhombus integration with UI property selectors and extensive API support.
  • Chores

    • Updated package version and added a new platform dependency.

@vercel
Copy link

vercel bot commented Aug 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Aug 5, 2025 10:20pm
pipedream-docs ⬜️ Ignored (Inspect) Aug 5, 2025 10:20pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Aug 5, 2025 10:20pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 5, 2025

Walkthrough

A comprehensive Rhombus integration was implemented, introducing a full-featured app client, a suite of polling and instant event sources, and a wide range of actions for camera, audio, access control, and streaming operations. Supporting modules for constants and event testing were added. The package was updated and dependencies declared.

Changes

Cohort / File(s) Change Summary
Rhombus App Client Implementation
components/rhombus/rhombus.app.mjs
Expanded from stub to full API client: added property definitions, generic request handler, and wrappers for all required Rhombus API endpoints.
Polling Sources
components/rhombus/sources/common/base-polling.mjs,
components/rhombus/sources/new-audit-record-created/new-audit-record-created.mjs,
components/rhombus/sources/new-camera-clip-created/new-camera-clip-created.mjs,
components/rhombus/sources/new-seekpoint-created/new-seekpoint-created.mjs
Implemented polling base source and three specific polling sources for audit records, camera clips, and seekpoints.
Instant Webhook Sources
components/rhombus/sources/common/base-webhook.mjs,
components/rhombus/sources/new-button-event-instant/new-button-event-instant.mjs,
components/rhombus/sources/new-door-sensor-event-instant/new-door-sensor-event-instant.mjs,
components/rhombus/sources/new-environmental-sensor-event-instant/new-environmental-sensor-event-instant.mjs,
components/rhombus/sources/new-rule-event-instant/new-rule-event-instant.mjs
Added webhook base and five instant event sources for button, door sensor, environmental sensor, rule, and door sensor events.
Sample/Test Event Data
components/rhombus/sources/new-button-event-instant/test-event.mjs,
components/rhombus/sources/new-door-sensor-event-instant/test-event.mjs,
components/rhombus/sources/new-environmental-sensor-event-instant/test-event.mjs,
components/rhombus/sources/new-rule-event-instant/test-event.mjs
Added static test event objects for each instant source to support event simulation and testing.
Actions
components/rhombus/actions/create-camera-clip/create-camera-clip.mjs,
components/rhombus/actions/create-custom-footage-seekpoints/create-custom-footage-seekpoints.mjs,
components/rhombus/actions/create-shared-live-video-stream/create-shared-live-video-stream.mjs,
components/rhombus/actions/play-audio-upload/play-audio-upload.mjs,
components/rhombus/actions/reboot-camera/reboot-camera.mjs,
components/rhombus/actions/toggle-audio-gateway-recording/toggle-audio-gateway-recording.mjs,
components/rhombus/actions/unlock-access-controlled-door/unlock-access-controlled-door.mjs
Implemented actions for unlocking doors, creating seekpoints, playing audio, toggling audio recording, creating camera clips, creating live streams, and rebooting cameras.
Constants
components/rhombus/common/constants.mjs
Added arrays for audit record actions and stream types, exported as constants.
Package Metadata
components/rhombus/package.json
Updated version to 0.1.0 and added dependency on @pipedream/platform.

Sequence Diagram(s)

Example: "Unlock Access Controlled Door" Action

sequenceDiagram
    participant User
    participant Action
    participant RhombusApp
    participant RhombusAPI

    User->>Action: Provide doorUuid
    Action->>RhombusApp: unlockAccessControlledDoor({ doorUuid })
    RhombusApp->>RhombusAPI: POST /api/v1/access/unlockAccessControlledDoor
    RhombusAPI-->>RhombusApp: Response
    RhombusApp-->>Action: Response
    Action-->>User: Summary, Response
Loading

Example: "New Audit Record Created" Polling Source

sequenceDiagram
    participant PollingSource
    participant RhombusApp
    participant RhombusAPI
    participant EventConsumer

    PollingSource->>RhombusApp: getAuditFeed({ actions, sinceTs })
    RhombusApp->>RhombusAPI: POST /api/v1/audit/getAuditFeed
    RhombusAPI-->>RhombusApp: Audit Events
    RhombusApp-->>PollingSource: Events
    PollingSource-->>EventConsumer: Emit event(s)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Assessment against linked issues

Objective Addressed Explanation
Polling Sources: New Audit Record, New Camera Clip, New Custom Footage Seekpoint (#17623)
Instant Sources: New Door Sensor Event, New Rule Event, New Button Event, New Environment Sensor Event (#17623)
Actions: Unlock Access Controlled Door, Create Custom Footage Seekpoint, Play Audio Clip with Audio Gateways, Toggle Audio Gateway Recording, Create Camera Clip, Create Shared Live Video Stream, Reboot Camera (#17623)
Action: Toggle Camera Privacy Mode (#17623) No implementation found for toggling camera privacy mode in actions.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Addition of components/rhombus/common/constants.mjs (entire file) The constants file is a supporting module for audit actions and stream types; while useful, it is not explicitly required by the objectives but does not introduce unrelated functionality.
Addition of test event modules (e.g., components/rhombus/sources/new-button-event-instant/test-event.mjs, etc.) These are supporting test data for instant sources. While not directly specified in objectives, they are standard for event-driven components and not functionally out of scope.

Poem

In Rhombus fields where cameras blink,
The rabbits code, they rarely shrink!
Doors unlock and streams arise,
Audio plays, events surprise.
Seekpoints marked, alerts in hand—
A bunny’s work across the land!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c10a207 and 5773f22.

📒 Files selected for processing (2)
  • components/rhombus/actions/create-camera-clip/create-camera-clip.mjs (1 hunks)
  • components/rhombus/actions/create-shared-live-video-stream/create-shared-live-video-stream.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • components/rhombus/actions/create-shared-live-video-stream/create-shared-live-video-stream.mjs
  • components/rhombus/actions/create-camera-clip/create-camera-clip.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-17623

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (5)
components/rhombus/package.json (1)

15-17: Double-check the dependency range for @pipedream/platform

Using a caret (^3.1.0) means any future 4.x major release—potentially containing breaking changes—will be picked up automatically. If the Rhombus components rely on v3 APIs, consider pinning with ~3.1.0 or an exact version to avoid surprise breakages, and schedule manual upgrades when v4 ships.

components/rhombus/sources/new-rule-event-instant/test-event.mjs (1)

1-12: Remove unnecessary quotes from object property keys

JavaScript object keys don't require quotes unless they contain special characters or reserved words.

 export default {
-  'summary': 'Movement detected at Headquarters', 
-  'deviceUuid': 'XXXXXXXXXXXXXXXXXX',
-  'clipLocationMap': {'XXXXXXXXXXXXXXXXXX': 'us-west-2'}, 
-  'alertUuid': 'XXXXXXXXXXXXXXXXXXX', 
-  'activityTrigger': 'MOTION',
-  'location': 'XXXXXXXXXXXXXXXX', 
-  'durationSec': 8, 
-  'version': '2', 
-  'timestampMs': 1646942680190, 
-  'thumbnailLocation': 'us-west-2'
+  summary: 'Movement detected at Headquarters',
+  deviceUuid: 'XXXXXXXXXXXXXXXXXX',
+  clipLocationMap: {'XXXXXXXXXXXXXXXXXX': 'us-west-2'},
+  alertUuid: 'XXXXXXXXXXXXXXXXXXX',
+  activityTrigger: 'MOTION',
+  location: 'XXXXXXXXXXXXXXXX',
+  durationSec: 8,
+  version: '2',
+  timestampMs: 1646942680190,
+  thumbnailLocation: 'us-west-2'
 }
components/rhombus/rhombus.app.mjs (1)

117-121: Remove unnecessary empty data objects

Several methods pass empty data: {} objects when the API likely doesn't require any request body.

     findAccessControlledDoors(opts = {}) {
       return this._makeRequest({
         path: "/component/findAccessControlledDoors",
-        data: {},
         ...opts,
       });
     },

Apply similar changes to getMinimalAudioGatewayStateList, getAudioUploadMetadataForOrg, and getMinimalDoorbellCameraStateList.

components/rhombus/sources/new-door-sensor-event-instant/test-event.mjs (1)

1-12: Make test data more specific to door sensor events

The test data should clearly indicate it's for a door sensor event.

 export default {
-  'summary': 'Movement detected at Headquarters', 
-  'deviceUuid': 'XXXXXXXXXXXXXXXXXX',
-  'clipLocationMap': {'XXXXXXXXXXXXXXXXXX': 'us-west-2'}, 
-  'alertUuid': 'XXXXXXXXXXXXXXXXXXX', 
-  'activityTrigger': 'MOTION',
-  'location': 'XXXXXXXXXXXXXXXX', 
-  'durationSec': 8, 
-  'version': '2', 
-  'timestampMs': 1646942680190, 
-  'thumbnailLocation': 'us-west-2'
+  summary: 'Door sensor triggered at Headquarters entrance',
+  deviceUuid: 'XXXXXXXXXXXXXXXXXX',
+  clipLocationMap: {'XXXXXXXXXXXXXXXXXX': 'us-west-2'},
+  alertUuid: 'XXXXXXXXXXXXXXXXXXX',
+  activityTrigger: 'DOOR_MOTION',
+  location: 'XXXXXXXXXXXXXXXX',
+  durationSec: 8,
+  version: '2',
+  timestampMs: 1646942680190,
+  thumbnailLocation: 'us-west-2'
 }
components/rhombus/actions/play-audio-upload/play-audio-upload.mjs (1)

36-51: LGTM with minor enhancement suggestion.

The action implementation follows the established pattern and correctly calls the Rhombus API. The error handling is delegated to the underlying API client, which is appropriate.

Consider adding basic input validation for optional numeric parameters:

 async run({ $ }) {
+  if (this.loopDurationSec !== undefined && this.loopDurationSec < 0) {
+    throw new ConfigurationError("Loop duration must be non-negative");
+  }
+  if (this.playCount !== undefined && this.playCount < 1) {
+    throw new ConfigurationError("Play count must be at least 1");
+  }
+
   const response = await this.rhombus.playAudioUpload({
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 17fbcad and c10a207.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (23)
  • components/rhombus/actions/create-camera-clip/create-camera-clip.mjs (1 hunks)
  • components/rhombus/actions/create-custom-footage-seekpoints/create-custom-footage-seekpoints.mjs (1 hunks)
  • components/rhombus/actions/create-shared-live-video-stream/create-shared-live-video-stream.mjs (1 hunks)
  • components/rhombus/actions/play-audio-upload/play-audio-upload.mjs (1 hunks)
  • components/rhombus/actions/reboot-camera/reboot-camera.mjs (1 hunks)
  • components/rhombus/actions/toggle-audio-gateway-recording/toggle-audio-gateway-recording.mjs (1 hunks)
  • components/rhombus/actions/unlock-access-controlled-door/unlock-access-controlled-door.mjs (1 hunks)
  • components/rhombus/common/constants.mjs (1 hunks)
  • components/rhombus/package.json (2 hunks)
  • components/rhombus/rhombus.app.mjs (1 hunks)
  • components/rhombus/sources/common/base-polling.mjs (1 hunks)
  • components/rhombus/sources/common/base-webhook.mjs (1 hunks)
  • components/rhombus/sources/new-audit-record-created/new-audit-record-created.mjs (1 hunks)
  • components/rhombus/sources/new-button-event-instant/new-button-event-instant.mjs (1 hunks)
  • components/rhombus/sources/new-button-event-instant/test-event.mjs (1 hunks)
  • components/rhombus/sources/new-camera-clip-created/new-camera-clip-created.mjs (1 hunks)
  • components/rhombus/sources/new-door-sensor-event-instant/new-door-sensor-event-instant.mjs (1 hunks)
  • components/rhombus/sources/new-door-sensor-event-instant/test-event.mjs (1 hunks)
  • components/rhombus/sources/new-environmental-sensor-event-instant/new-environmental-sensor-event-instant.mjs (1 hunks)
  • components/rhombus/sources/new-environmental-sensor-event-instant/test-event.mjs (1 hunks)
  • components/rhombus/sources/new-rule-event-instant/new-rule-event-instant.mjs (1 hunks)
  • components/rhombus/sources/new-rule-event-instant/test-event.mjs (1 hunks)
  • components/rhombus/sources/new-seekpoint-created/new-seekpoint-created.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📚 Learning: the `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, an...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.

Applied to files:

  • components/rhombus/sources/new-rule-event-instant/test-event.mjs
  • components/rhombus/sources/new-button-event-instant/test-event.mjs
  • components/rhombus/sources/common/base-webhook.mjs
  • components/rhombus/sources/new-rule-event-instant/new-rule-event-instant.mjs
  • components/rhombus/sources/new-door-sensor-event-instant/new-door-sensor-event-instant.mjs
  • components/rhombus/sources/common/base-polling.mjs
  • components/rhombus/sources/new-button-event-instant/new-button-event-instant.mjs
  • components/rhombus/sources/new-seekpoint-created/new-seekpoint-created.mjs
  • components/rhombus/sources/new-environmental-sensor-event-instant/new-environmental-sensor-event-instant.mjs
  • components/rhombus/sources/new-audit-record-created/new-audit-record-created.mjs
  • components/rhombus/sources/new-camera-clip-created/new-camera-clip-created.mjs
  • components/rhombus/rhombus.app.mjs
📚 Learning: in `components/the_magic_drip/sources/common.mjs`, when processing items in `getandprocessdata`, `sa...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.

Applied to files:

  • components/rhombus/sources/new-rule-event-instant/test-event.mjs
  • components/rhombus/sources/new-button-event-instant/test-event.mjs
  • components/rhombus/sources/common/base-webhook.mjs
  • components/rhombus/sources/new-rule-event-instant/new-rule-event-instant.mjs
  • components/rhombus/sources/new-door-sensor-event-instant/test-event.mjs
  • components/rhombus/sources/new-environmental-sensor-event-instant/test-event.mjs
  • components/rhombus/sources/new-door-sensor-event-instant/new-door-sensor-event-instant.mjs
  • components/rhombus/sources/common/base-polling.mjs
  • components/rhombus/sources/new-button-event-instant/new-button-event-instant.mjs
  • components/rhombus/sources/new-seekpoint-created/new-seekpoint-created.mjs
  • components/rhombus/sources/new-environmental-sensor-event-instant/new-environmental-sensor-event-instant.mjs
  • components/rhombus/sources/new-audit-record-created/new-audit-record-created.mjs
  • components/rhombus/sources/new-camera-clip-created/new-camera-clip-created.mjs
📚 Learning: when developing pipedream components, do not add built-in node.js modules like `fs` to `package.json...
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.

Applied to files:

  • components/rhombus/package.json
📚 Learning: source names in monday.com components don't need to start with "new" if they emit events for updated...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.

Applied to files:

  • components/rhombus/sources/new-rule-event-instant/new-rule-event-instant.mjs
  • components/rhombus/sources/new-door-sensor-event-instant/new-door-sensor-event-instant.mjs
  • components/rhombus/sources/new-button-event-instant/new-button-event-instant.mjs
  • components/rhombus/sources/new-seekpoint-created/new-seekpoint-created.mjs
  • components/rhombus/sources/new-environmental-sensor-event-instant/new-environmental-sensor-event-instant.mjs
  • components/rhombus/sources/new-audit-record-created/new-audit-record-created.mjs
  • components/rhombus/sources/new-camera-clip-created/new-camera-clip-created.mjs
📚 Learning: the `processtimerevent` method in the `components/salesforce_rest_api/sources/common.mjs` file is in...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common.mjs:97-98
Timestamp: 2024-07-24T02:05:59.531Z
Learning: The `processTimerEvent` method in the `components/salesforce_rest_api/sources/common.mjs` file is intentionally left unimplemented to enforce that subclasses must implement this method, similar to an abstract class in object-oriented programming.

Applied to files:

  • components/rhombus/sources/common/base-polling.mjs
📚 Learning: in the salesloft api integration (components/salesloft/salesloft.app.mjs), the _makerequest method r...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.

Applied to files:

  • components/rhombus/rhombus.app.mjs
📚 Learning: the salesloft api list endpoints (listpeople, listcadences, listusers, listaccounts) return arrays d...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: The Salesloft API list endpoints (listPeople, listCadences, listUsers, listAccounts) return arrays directly in the response body, not wrapped in a metadata object with a nested data property. The _makeRequest method correctly returns response.data which contains the arrays that can be mapped over directly in propDefinitions.

Applied to files:

  • components/rhombus/rhombus.app.mjs
📚 Learning: "dir" props in pipedream components are hidden in the component form and not user-facing, so they do...
Learnt from: js07
PR: PipedreamHQ/pipedream#17375
File: components/zerobounce/actions/get-validation-results-file/get-validation-results-file.mjs:23-27
Timestamp: 2025-07-01T17:07:48.193Z
Learning: "dir" props in Pipedream components are hidden in the component form and not user-facing, so they don't require labels or descriptions for user clarity.

Applied to files:

  • components/rhombus/rhombus.app.mjs
🧬 Code Graph Analysis (4)
components/rhombus/actions/create-custom-footage-seekpoints/create-custom-footage-seekpoints.mjs (4)
components/rhombus/actions/play-audio-upload/play-audio-upload.mjs (1)
  • response (37-47)
components/rhombus/actions/reboot-camera/reboot-camera.mjs (1)
  • response (19-24)
components/rhombus/actions/toggle-audio-gateway-recording/toggle-audio-gateway-recording.mjs (1)
  • response (34-43)
components/rhombus/actions/unlock-access-controlled-door/unlock-access-controlled-door.mjs (1)
  • response (19-24)
components/rhombus/actions/create-shared-live-video-stream/create-shared-live-video-stream.mjs (5)
components/rhombus/actions/create-custom-footage-seekpoints/create-custom-footage-seekpoints.mjs (1)
  • response (35-47)
components/rhombus/actions/play-audio-upload/play-audio-upload.mjs (1)
  • response (37-47)
components/rhombus/actions/reboot-camera/reboot-camera.mjs (1)
  • response (19-24)
components/rhombus/actions/toggle-audio-gateway-recording/toggle-audio-gateway-recording.mjs (1)
  • response (34-43)
components/rhombus/actions/unlock-access-controlled-door/unlock-access-controlled-door.mjs (1)
  • response (19-24)
components/rhombus/actions/play-audio-upload/play-audio-upload.mjs (4)
components/rhombus/actions/create-custom-footage-seekpoints/create-custom-footage-seekpoints.mjs (1)
  • response (35-47)
components/rhombus/actions/reboot-camera/reboot-camera.mjs (1)
  • response (19-24)
components/rhombus/actions/toggle-audio-gateway-recording/toggle-audio-gateway-recording.mjs (1)
  • response (34-43)
components/rhombus/actions/unlock-access-controlled-door/unlock-access-controlled-door.mjs (1)
  • response (19-24)
components/rhombus/actions/reboot-camera/reboot-camera.mjs (4)
components/rhombus/actions/create-custom-footage-seekpoints/create-custom-footage-seekpoints.mjs (1)
  • response (35-47)
components/rhombus/actions/play-audio-upload/play-audio-upload.mjs (1)
  • response (37-47)
components/rhombus/actions/toggle-audio-gateway-recording/toggle-audio-gateway-recording.mjs (1)
  • response (34-43)
components/rhombus/actions/unlock-access-controlled-door/unlock-access-controlled-door.mjs (1)
  • response (19-24)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Lint Code Base
  • GitHub Check: Ensure component commits modify component versions
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
🔇 Additional comments (39)
components/rhombus/package.json (1)

3-3: SemVer bump looks correct

Moving from 0.0.1 to 0.1.0 reflects the introduction of multiple new, non-breaking features—perfect use of semantic versioning.

components/rhombus/sources/new-rule-event-instant/new-rule-event-instant.mjs (4)

1-2: LGTM!

The import statements correctly reference the common base webhook and the test event file with appropriate relative paths.


4-11: LGTM!

The source metadata is well-structured and follows consistent naming conventions. The key, name, description with documentation link, version, type, and deduplication strategy are all appropriately configured for an instant webhook source.


12-17: LGTM!

The methods correctly extend the common base and implement the required getEventType method, following the abstract class pattern. The return value "RULE_EVENTS" appropriately identifies the webhook event type this source handles.


18-18: LGTM!

The sampleEmit assignment correctly provides test event data for the source.

components/rhombus/sources/new-door-sensor-event-instant/new-door-sensor-event-instant.mjs (1)

1-19: Excellent consistency across instant webhook sources!

This source follows the exact same pattern as the rule event source, with only the appropriate differences:

  • Key: rhombus-new-door-sensor-event-instant
  • Name: "New Door Sensor Event (Instant)"
  • Event type: "DOOR_SENSOR_EVENTS"

The consistent structure across webhook sources demonstrates good architectural design and maintainability.

components/rhombus/actions/create-custom-footage-seekpoints/create-custom-footage-seekpoints.mjs (3)

1-8: LGTM!

The imports and action metadata are well-structured, following established conventions with appropriate key naming, clear description, and documentation link.


9-33: LGTM!

The props are well-defined with appropriate types, clear labels, and helpful descriptions. The use of propDefinition for cameraUuid ensures consistency across Rhombus actions, and the timestamp in milliseconds provides the precision needed for footage seekpoints.


34-51: LGTM!

The run method correctly implements the seekpoint creation with proper API call structure. The seekpoint data is appropriately wrapped in the footageSeekpoints array, and the summary export provides clear feedback about the operation.

components/rhombus/actions/toggle-audio-gateway-recording/toggle-audio-gateway-recording.mjs (3)

1-8: LGTM!

The imports and action metadata are properly structured with clear naming and appropriate documentation reference to the update endpoint.


9-23: LGTM!

The props are well-structured with appropriate types and clear descriptions. The enableRecording boolean with a default of true provides a sensible default for the toggle functionality.


24-50: Excellent configuration update pattern!

The implementation correctly follows a two-step approach: first fetching the current configuration to preserve existing settings, then updating only the audioRecord property using the spread operator. This ensures no other configuration settings are lost during the update. The summary message provides clear feedback about the action performed.

components/rhombus/sources/new-camera-clip-created/new-camera-clip-created.mjs (1)

1-19: LGTM! Correct use of polling pattern for audit feed events.

The source properly extends the base polling module and implements the required getActions method to listen for "SAVED_CLIP_CREATE" events. This is the appropriate pattern for audit feed-based events, as opposed to the webhook pattern used for instant events. The structure is consistent with other polling sources in the Rhombus integration.

components/rhombus/sources/common/base-polling.mjs (5)

6-16: LGTM!

The props section follows standard polling source patterns with appropriate app reference, database persistence, and timer configuration.


44-46: Abstract method pattern correctly implemented.

The getActions() method follows the established pattern for abstract methods in base classes, requiring subclasses to implement this method.


48-51: Good practice for initial deployment.

The deploy hook appropriately limits the initial fetch to 25 events, preventing overwhelming processing of historical events on first deployment.


53-55: LGTM!

The run method correctly processes all available events without limit for regular polling intervals.


24-43: Confirm audit event ordering before updating lastTs.

I didn’t find any guarantees in the codebase that getAuditFeed returns auditEvents sorted by timestamp. Since we set lastTs to auditEvents[0].timestamp, please verify whether the Rhombus API always returns events in descending (newest-first) order. If not, update the logic to avoid skipping events:

• File: components/rhombus/sources/common/base-polling.mjs
Lines: 24–43

Suggested adjustments if ordering isn’t guaranteed:

  • Sort the fetched events by timestamp (descending) before slicing and emitting.
  • Or compute lastTs as the maximum timestamp in the batch (e.g., Math.max(...auditEvents.map(e => e.timestamp))).
components/rhombus/sources/new-button-event-instant/new-button-event-instant.mjs (2)

1-19: Well-structured instant source component.

The component properly extends the base webhook module with appropriate metadata, documentation reference, and deduplication strategy. The structure follows established patterns for instant sources.


12-17: Correct implementation of abstract method.

The getEventType() method properly implements the abstract method from the base webhook class, returning the appropriate event type identifier.

components/rhombus/sources/new-seekpoint-created/new-seekpoint-created.mjs (2)

1-10: Clean polling source implementation.

The component properly extends the base polling module with appropriate metadata and follows established patterns for polling sources.


11-19: Action Constant Verified

The CREATE_SEEKPOINT action is defined in components/rhombus/common/constants.mjs, and getActions() correctly implements the abstract method by returning this constant.

• components/rhombus/common/constants.mjs: contains "CREATE_SEEKPOINT".

components/rhombus/common/constants.mjs (2)

1-381: Comprehensive and well-organized audit action constants.

The AUDIT_RECORD_ACTIONS array is well-structured with consistent naming conventions and logical organization by domain. The inclusion of "UNKNOWN" as a fallback is good practice.


383-396: Clean stream types and export structure.

The STREAM_TYPES array includes appropriate stream categories with a fallback, and the export structure cleanly provides access to both constant arrays.

components/rhombus/actions/unlock-access-controlled-door/unlock-access-controlled-door.mjs (2)

1-17: Well-structured action with proper prop definitions.

The action follows standard patterns with appropriate metadata and uses propDefinition for the door selection, which will provide a user-friendly dropdown interface.


18-28: Clean action implementation with proper API integration.

The run method correctly implements the action logic with appropriate summary export and response handling. The parameter mapping from doorUuid prop to accessControlledDoorUuid API parameter appears intentional for API compatibility.

components/rhombus/actions/play-audio-upload/play-audio-upload.mjs (1)

40-42: Confirm playAudioUpload payload format

At components/rhombus/actions/play-audio-upload/play-audio-upload.mjs:40

audioGatewayUuids: [
  this.audioGatewayUuid,
],

Please verify against the official Rhombus API docs whether the /audioplayback/playAudioUpload endpoint expects a single UUID (audioGatewayUuid) or an array of UUIDs (audioGatewayUuids), and adjust the request payload (and prop definitions) accordingly.

components/rhombus/actions/reboot-camera/reboot-camera.mjs (1)

1-28: LGTM! Clean and consistent implementation.

The action follows the established pattern perfectly. The implementation is straightforward, properly structured, and includes appropriate error handling through the underlying API client.

components/rhombus/actions/create-camera-clip/create-camera-clip.mjs (2)

88-88: Property reference matches the typo.

This line correctly references this.durationSec, which will work once the property name typo is fixed in line 44.


72-113: Excellent validation and error handling logic.

The conditional logic properly validates required fields based on clip type and provides clear error messages. The different API calls for splice vs policy alert clips are handled correctly.

components/rhombus/sources/common/base-webhook.mjs (3)

11-27: Excellent webhook lifecycle management.

The activate and deactivate hooks properly manage webhook creation and cleanup. The webhook ID persistence ensures proper cleanup even across deployments.


43-45: Appropriate abstract method implementation.

The getEventType method is intentionally abstract, requiring subclasses to implement it. This follows the established pattern for base classes and ensures proper event type specification.


47-54: Robust event processing logic.

The run method includes appropriate null checking and follows the standard pattern for event emission with metadata generation.

components/rhombus/sources/new-environmental-sensor-event-instant/new-environmental-sensor-event-instant.mjs (1)

1-19: LGTM! Perfect implementation of the base webhook pattern.

This source correctly extends the base webhook module, implements the required getEventType method, and follows all established conventions. The event type "ENVIRONMENTAL_SENSOR_EVENTS" is appropriate for this source.

components/rhombus/actions/create-shared-live-video-stream/create-shared-live-video-stream.mjs (2)

1-11: LGTM!

The imports, component structure, and metadata are properly configured. The documentation link follows the expected Rhombus API documentation pattern.


68-75: LGTM!

The validation logic, API call patterns, error handling, and response processing are well implemented. The conditional logic properly handles different device types, and the response augmentation provides useful additional data.

Also applies to: 81-110, 112-127

components/rhombus/sources/new-audit-record-created/new-audit-record-created.mjs (3)

1-11: LGTM!

The component structure, imports, and metadata are properly configured. The naming follows the convention for sources emitting new items, and the deduplication strategy is appropriate for audit records.


12-20: LGTM!

The props extension pattern is correct, and the actions property provides good filtering capability using centralized constants. This allows users to specify which audit record types they want to monitor.


21-27: LGTM!

The methods extension follows the correct pattern, and the getActions() method provides a clean interface for the base polling module to access the configured audit actions. This enables proper filtering in the base implementation.

Copy link
Collaborator

@jcortes jcortes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @michelle0927 lgtm! Ready for QA!

@vunguyenhung vunguyenhung merged commit 414b8ab into master Aug 6, 2025
11 checks passed
@vunguyenhung vunguyenhung deleted the issue-17623 branch August 6, 2025 02:23
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.

[Components] rhombus

4 participants