Skip to content

Implement SetObjectPosition and sequence requests and Fix some handling processes#4

Merged
anosatsuk124 merged 7 commits intodevelopmentfrom
1-implementing-some-features-to-handle-objects
May 22, 2025
Merged

Implement SetObjectPosition and sequence requests and Fix some handling processes#4
anosatsuk124 merged 7 commits intodevelopmentfrom
1-implementing-some-features-to-handle-objects

Conversation

@anosatsuk124
Copy link
Copy Markdown
Contributor

Close #3

@anosatsuk124 anosatsuk124 added this to the v0.1 milestone May 22, 2025
@anosatsuk124 anosatsuk124 requested a review from Copilot May 22, 2025 17:57
@anosatsuk124 anosatsuk124 linked an issue May 22, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements the SetObjectPosition functionality and introduces support for handling sequence requests, while refactoring the object spawn process. Key changes include:

  • Renaming protocol fields (e.g., "type" to "shape" in ObjectProperties and "uuid" to "bytes" in Uuid messages).
  • Updating the RPC service to handle object position requests (including sequences), mapping errors, and queuing internal requests via a unified REQUEST_LIST.
  • Removing the obsolete spawn module and introducing new request plugins for object-related events.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
proto/viewer/v1/object.proto Renamed field "type" to "shape" for clarity.
proto/viewer/v1/math.proto Renamed field "uuid" to "bytes" in the Uuid message.
components/viewer/src/rpc/service.rs Added implementation for SetObjectPosition and sequence request handling.
components/viewer/src/manage_objects/spawn.rs Removed the outdated spawn module.
components/viewer/src/manage_objects/request/object.rs Introduced new request types and event handlers for object requests.
components/viewer/src/manage_objects/request.rs Added an internal request plugin and processing system.
components/viewer/src/manage_objects/mod.rs Removed spawn module usage and updated plugin configuration.
components/viewer/src/manage_objects/global.rs Updated to use a unified REQUEST_LIST for managing internal requests.
Comments suppressed due to low confidence (1)

components/viewer/src/manage_objects/mod.rs:6

  • The struct name 'ManageObejctsPlugin' appears to contain a typographical error; consider renaming it to 'ManageObjectsPlugin' for improved clarity and consistency.
pub struct ManageObejctsPlugin;

@anosatsuk124 anosatsuk124 requested a review from Copilot May 22, 2025 17:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Implements object positioning APIs, unifies the request queue, and updates field names for consistency.

  • Adds SetObjectPosition and SetObjectPositionSequence RPC handlers with internal mapping and queueing
  • Replaces SPAWN_OBJECT_REQUEST_LIST with a generic REQUEST_LIST and centralizes request processing
  • Renames typeshape in object.proto and uuidbytes in math.proto

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
proto/viewer/v1/object.proto Renamed field type to shape
proto/viewer/v1/math.proto Renamed field uuid to bytes
components/viewer/src/rpc/service.rs Implemented gRPC methods, error mapping, and queue pushes
components/viewer/src/manage_objects/* Moved spawn and set-position logic into event-based modules
components/viewer/src/manage_objects/mod.rs Cleaned up plugin naming and module structure
components/viewer/src/manage_objects/global.rs Unified global request queue
Comments suppressed due to low confidence (4)

proto/viewer/v1/math.proto:33

  • [nitpick] Field name bytes is ambiguous; consider using a more descriptive name like value or data.
bytes bytes = 1;

components/viewer/src/rpc/service.rs:117

  • [nitpick] The error message format Index {index}; {} may be unclear to clients; consider using a clearer pattern like At sequence index {index}: {error_message}.
tonic::Status::new(e.code(), format!("Index {index}; {}", e.message()))

components/viewer/src/rpc/service.rs:163

  • Consider adding unit tests for set_position_request_to_internal_request to verify both successful mappings and error conditions.
pub fn set_position_request_to_internal_request(

components/viewer/src/rpc/service.rs:207

  • Consider adding unit tests for spawn_object_request_to_internal_request to cover shape conversion, default size handling, and error cases.
pub fn spawn_object_request_to_internal_request(

Comment thread components/viewer/src/rpc/service.rs Outdated
@anosatsuk124 anosatsuk124 merged commit aa71e98 into development May 22, 2025
@anosatsuk124 anosatsuk124 linked an issue May 22, 2025 that may be closed by this pull request
1 task
@anosatsuk124 anosatsuk124 deleted the 1-implementing-some-features-to-handle-objects branch May 22, 2025 18:07
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.

Implementing some features to handle objects Implementing SetObjectPosition rpc

2 participants