Skip to content

Conversation

@wu-hui
Copy link
Contributor

@wu-hui wu-hui commented Jun 20, 2025

No description provided.

@gemini-code-assist
Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

@google-oss-bot
Copy link

1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

@wu-hui wu-hui force-pushed the wuandy/RealPpl_9 branch from 676dc22 to 01df95f Compare June 30, 2025 18:37
@wu-hui wu-hui force-pushed the wuandy/RealPpl_10 branch 2 times, most recently from 54eee56 to 791e43a Compare July 3, 2025 17:38
@wu-hui wu-hui force-pushed the wuandy/RealPpl_9 branch from 01df95f to c33f64a Compare July 3, 2025 17:38
@wu-hui wu-hui force-pushed the wuandy/RealPpl_10 branch from 791e43a to 938245c Compare July 7, 2025 17:19
@wu-hui wu-hui force-pushed the wuandy/RealPpl_9 branch from c33f64a to 020bfbc Compare July 7, 2025 17:19
@wu-hui wu-hui force-pushed the wuandy/RealPpl_10 branch from 938245c to b56136a Compare July 8, 2025 14:42
@wu-hui wu-hui force-pushed the wuandy/RealPpl_10 branch 2 times, most recently from 8bf06b3 to 605acf7 Compare September 12, 2025 17:30
@wu-hui wu-hui force-pushed the wuandy/RealPpl_9 branch 2 times, most recently from fb16f96 to f85881b Compare September 12, 2025 18:25
@wu-hui wu-hui force-pushed the wuandy/RealPpl_10 branch 2 times, most recently from 6bcc2a2 to a1ad8f9 Compare September 12, 2025 18:30
@wu-hui wu-hui force-pushed the wuandy/RealPpl_9 branch 2 times, most recently from 3c2fbf7 to b9d0d1a Compare September 15, 2025 15:42
@wu-hui wu-hui requested a review from ehsannas September 17, 2025 15:08
@wu-hui wu-hui force-pushed the wuandy/RealPpl_10 branch 2 times, most recently from 47dd5cb to 5cd8b2a Compare September 19, 2025 16:45
@wu-hui wu-hui force-pushed the wuandy/RealPpl_10 branch 5 times, most recently from 854b6bb to 0654174 Compare October 2, 2025 14:59
@cherylEnkidu
Copy link
Contributor

/gemini review

@cherylEnkidu cherylEnkidu assigned wu-hui and cherylEnkidu and unassigned ehsannas and wu-hui Nov 20, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds comprehensive support for handling server-generated timestamps within the Realtime Pipeline API. The changes span across the C++, Objective-C, and Swift layers, introducing the necessary logic to evaluate server timestamps based on the specified ServerTimestampBehavior (.estimate, .previous, or .none). The implementation is well-structured, propagating listen options down to the expression evaluation context. The inclusion of extensive integration and unit tests is excellent and covers the new functionality well.

I've found one potential bug in the Swift PipelineResult initializer that could lead to incorrect data types, and a minor typo in a test function name. Once these are addressed, the PR should be in great shape.

Comment on lines +37 to +45
init(_ bridge: __PipelineResultBridge, _ behavior: ServerTimestampBehavior) {
self.bridge = bridge
serverTimestamp = behavior
ref = self.bridge.reference
id = self.bridge.documentID
data = self.bridge.data(with: serverTimestamp)
createTime = self.bridge.create_time
updateTime = self.bridge.update_time
}
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The new initializer appears to be missing the conversion from Objective-C objects to Swift Sendable types for the data dictionary. The self.bridge.data(with: serverTimestamp) method returns an [String: Any] dictionary where the values are still Objective-C objects (like NSString, NSNumber). Without this conversion, consumers of the data property might encounter unexpected types at runtime.

The other initializer correctly uses .mapValues { Helper.convertObjCToSwift($0) } for this purpose, and the same should be applied here to ensure type consistency.

Suggested change
init(_ bridge: __PipelineResultBridge, _ behavior: ServerTimestampBehavior) {
self.bridge = bridge
serverTimestamp = behavior
ref = self.bridge.reference
id = self.bridge.documentID
data = self.bridge.data(with: serverTimestamp)
createTime = self.bridge.create_time
updateTime = self.bridge.update_time
}
init(_ bridge: __PipelineResultBridge, _ behavior: ServerTimestampBehavior) {
self.bridge = bridge
serverTimestamp = behavior
ref = self.bridge.reference
id = self.bridge.documentID
data = self.bridge.data(with: serverTimestamp).mapValues { Helper.convertObjCToSwift($0) }
createTime = self.bridge.create_time
updateTime = self.bridge.update_time
}

Copy link
Contributor

@cherylEnkidu cherylEnkidu Nov 20, 2025

Choose a reason for hiding this comment

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

+1

// enableNetwork()
}

func testSamePipelineWithDifferetnOptions() async throws {
Copy link
Contributor

Choose a reason for hiding this comment

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

low

There's a typo in the function name. It should be testSamePipelineWithDifferentOptions.

Suggested change
func testSamePipelineWithDifferetnOptions() async throws {
func testSamePipelineWithDifferentOptions() async throws {

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

virtual ~QueryListener() = default;

const QueryOrPipeline& query() const {
QueryOrPipeline& query() {
Copy link
Contributor

Choose a reason for hiding this comment

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

why the const is removed here?

@cherylEnkidu cherylEnkidu assigned wu-hui and unassigned cherylEnkidu Nov 20, 2025
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.

4 participants