-
Notifications
You must be signed in to change notification settings - Fork 0
Add display name to common service #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughA new optional string field named Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
common/messages.pb.gois excluded by!**/*.pb.gogen/kotlin/border0/common/v1/ServiceKt.ktis excluded by!**/gen/**gen/swift/messages.pb.swiftis excluded by!**/gen/**
📒 Files selected for processing (1)
common/messages.proto(1 hunks)
| string display_name = 13; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
optional keyword missing – current field has no presence tracking
The PR description and AI summary both state that display_name should be an optional field.
In proto3, presence tracking for singular scalars (so that you can tell unset vs empty string) is only available when the field is declared with the optional keyword:
optional string display_name = 13;Declaring it without optional (as in the current diff) turns it into a regular scalar with no presence information; clients cannot distinguish "" from not provided, which is often undesirable for UI-facing “display name” semantics.
- string display_name = 13;
+ optional string display_name = 13;Confirm that all language targets used in your tool-chain are on protobuf ≥ 3.15 (released 2020-12) where optional is supported; otherwise code-gen will fail.
Add optional to display_name for presence tracking
The display_name field in common/messages.proto needs the optional keyword so that clients can distinguish “unset” from an empty string. Without it, proto3 treats the field as a regular scalar with no presence information.
File: common/messages.proto (around line 114)
Suggested change:
- string display_name = 13;
+ optional string display_name = 13;• After updating, ensure your proto compiler and all language generators are using protobuf >= 3.15 (optional fields were introduced in v3.15.0) to avoid code-gen failures.
🤖 Prompt for AI Agents
In common/messages.proto around line 114, the string field display_name lacks
the optional keyword, which is needed for presence tracking to distinguish unset
from empty string values. Modify the field declaration to include the optional
keyword before string, making it "optional string display_name = 13;". After
this change, verify that the protobuf compiler and all language generators used
are version 3.15 or higher to support optional fields and prevent code
generation errors.
th3wingman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Description
Add display name to services common package
Summary by CodeRabbit