Skip to content

feat: enhance Elem message with additional fields and define Face, Tr…#10

Merged
Redmomn merged 1 commit intomasterfrom
elem
Mar 11, 2026
Merged

feat: enhance Elem message with additional fields and define Face, Tr…#10
Redmomn merged 1 commit intomasterfrom
elem

Conversation

@Redmomn
Copy link
Collaborator

@Redmomn Redmomn commented Mar 11, 2026

…ansElem, and MarketFace messages

Copilot AI review requested due to automatic review settings March 11, 2026 14:33
@Redmomn Redmomn merged commit e8459e2 into master Mar 11, 2026
2 checks passed
@Redmomn Redmomn deleted the elem branch March 11, 2026 14:33
@github-actions
Copy link

github-actions bot commented Mar 11, 2026

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed⏩ skippedMar 11, 2026, 2:34 PM

Copy link

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 enhances the Elem protobuf by adding support for additional element types and introducing new message definitions to represent them.

Changes:

  • Added face, trans_elem, and market_face fields to message Elem.
  • Introduced new protobuf messages: Face, TransElem, and MarketFace.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

optional int32 media_type = 9;
optional int32 image_width = 10;
optional int32 image_height = 11;
optional bytes mobileparam = 12;
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

mobileparam breaks the established snake_case pattern used by other fields in MarketFace (e.g., face_name, tab_id). Consider renaming it to mobile_param for consistency and clearer generated API naming.

Suggested change
optional bytes mobileparam = 12;
optional bytes mobile_param = 12;

Copilot uses AI. Check for mistakes.

message Face {
optional int32 index = 1;
optional bytes old = 2;
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

Face.buf uses tag 11, skipping tags 3..10. If this gap is intentional for wire-compatibility with an upstream schema, it would help to add reserved 3 to 10; (or a comment) to prevent accidental reuse later. If it's not intentional, consider using the next available sequential tag to reduce confusion.

Suggested change
optional bytes old = 2;
optional bytes old = 2;
reserved 3 to 10;

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +67
message TransElem {
optional int32 elem_type = 1;
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

elem_type is a raw int32, which makes the set of supported values unclear in generated APIs. Consider introducing an enum for elem_type (even if incomplete) and adding a brief comment describing the encoding/format of elem_value for each type to make the contract self-describing.

Suggested change
message TransElem {
optional int32 elem_type = 1;
enum TransElemType {
// Default / unknown transport element type. When used, elem_value is opaque bytes.
TRANS_ELEM_TYPE_UNSPECIFIED = 0;
// Additional element types can be added here as they become known.
}
message TransElem {
// Logical type of elem_value. See TransElemType for known values.
optional TransElemType elem_type = 1;
// Payload whose encoding depends on elem_type. For UNSPECIFIED or unknown types,
// this field contains opaque bytes as defined by the upstream service.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants