Get rid of unneeded DateTimeExt.#11976
Merged
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced May 31, 2026
ba90a52 to
4330f49
Compare
Contributor
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
Contributor
There was a problem hiding this comment.
Overview
This PR removes the DateTimeExt helper and replaces its call sites with direct chrono::Local::now() or .fixed_offset() usage.
Concerns
- No blocking correctness, security, or spec concerns found in the annotated diff.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
bnavetta
approved these changes
Jun 1, 2026
vorporeal
added a commit
that referenced
this pull request
Jun 2, 2026
… crate. (#11977) ## Description This PR is the authentication slice of a broader effort to move server API client traits and implementations out of the `warp` application crate and into `warp_server_client`. It completes the intended extraction of `AuthClient` and reusable authentication-session behavior for this phase: shared server clients can now consume auth functionality without depending on app-owned `ServerApi` implementation details, while UI/model reactions and app-specific conversions remain in `warp`. This PR is stacked on #11976 (`david/get-rid-of-unneeded-datetime-ext`). It intentionally changes ownership rather than behavior; extraction of non-auth server clients is left to future PRs. ### Architectural decisions - `warp_server_client::auth` now owns `AuthClient`, its implementation, and the reusable authentication-session mechanics used by server clients. - `AuthSession` represents the stateful mechanics of authenticating requests: exchanging login credentials, fetching or refreshing Firebase tokens (including proxy fallback), completing OAuth device authorization, and producing usable access tokens. It owns mechanics, not product reactions. - `AuthEvent` is the lower-crate event vocabulary for authentication and authenticated-transport conditions observed while making requests. The app continues to decide what those events mean for models/UI, such as setting reauth state, rotating remote-server tokens, showing staging access feedback, logging out disabled users, or responding to IAP challenges. - `AuthClientImpl` is constructed directly by `ServerApiProvider` around the shared app transport adapter and `AuthSession`; the app no longer implements a forwarding `AuthClient` wrapper. - `BaseClient` supplies the app-owned transport/platform capabilities still required by the extracted client (HTTP setup, GraphQL request options, ambient workload token behavior, and notification hooks), rather than owning token/OAuth lifecycle operations. - `UserProperties` conversion remains in `warp` because it maps protocol user output into app models, server experiment state, and app LLM preferences rather than describing reusable server authentication behavior. - The shared GraphQL request helper and its behavior tests now live in `warp_server_client`, so authentication rejection/event behavior is tested at the owning layer. - The `skip_login` build-time behavior is forwarded into `warp_server_client` because authenticated-request rejection is now implemented by `AuthSession`. ### Reviewer notes - This is the completed auth extraction slice of an incremental server-client boundary migration; non-auth `ServerApi` methods intentionally remain app-owned for later work. - Network-log client instrumentation is installed before the HTTP client is shared with `AuthSession`, preserving the existing initialization invariant while allowing the extracted session to reuse that client. - Existing comments associated with moved behavior were restored at their new ownership locations; app-specific comments that no longer describe the extracted code were not carried over. - A follow-up review pass restored operation-specific settings error diagnostics, added focused extracted-auth tests, and moved the app's remaining direct Firebase dependency to test-only usage. ## Linked Issue N/A — internal refactor in a stacked extraction series. ## Testing - `./script/format` - `cargo check -p warp_server_client -p warp --tests` - `cargo nextest run -p warp_server_client --no-tests=pass` - `cargo nextest run -p warp -E 'test(/auth_manager|server_api::auth|server_api::ai|settings::privacy|settings_view::platform|terminal::shared_session::viewer/)' --no-tests=pass` - `cargo nextest run -p warp --features skip_login -E 'test(access_token_skip_login_rejects_bearer_token)' --no-tests=pass` - `cargo nextest run --no-fail-fast --workspace --exclude command-signatures-v2` - `cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings` - `PATH="$(brew --prefix llvm)/bin:$PATH" cargo clippy --locked --target wasm32-unknown-unknown --profile release-wasm-debug_assertions -- -D warnings -A clippy::large_digit_groups` - `git --no-pager diff --check` - [ ] I have manually tested my changes locally with `./script/run` ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode CHANGELOG-NONE Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This extension trait adds a pretty low-value helper function; I've replaced it with the slightly-more-verbose-but-more-explicit equivalents using
chronofunctions.I double-checked that some of these conversions were truly equivalent by using assertions in the Rust playground.