Extract CloudObject client and models to separate crates.#11166
Conversation
5e352da to
f5fc243
Compare
4a71dee to
06b3f2e
Compare
f5fc243 to
df91010
Compare
a241a1f to
705fc1d
Compare
|
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 |
There was a problem hiding this comment.
Overview
This PR extracts the CloudObject client interface and concrete cloud object models into new cloud_object_client and cloud_object_models crates, with app and warp_server_client compatibility re-exports.
Concerns
cloud_object_clientgenerates/usesMockObjectClientundercfg(test), butmockallis only an optional dependency enabled by thetest-utilfeature, so the crate's own test build without that feature will fail before running tests.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| drive::sharing::SharingAccessLevel, | ||
| ids::{FolderId, GenericStringObjectId, HashedSqliteId, ObjectUid, ServerId, SyncId}, | ||
| }; | ||
| #[cfg(any(test, feature = "test-util"))] |
There was a problem hiding this comment.
cfg(test) is true when this crate is compiled for its own tests, but mockall is optional and only enabled by test-util; cargo test -p cloud_object_client will fail to resolve this import unless mockall is also a dev-dependency or these gates only use the feature.
705fc1d to
b9503ba
Compare
df91010 to
5cfd599
Compare
b9503ba to
7744b13
Compare
3fd9cf9 to
9ba6eed
Compare
7744b13 to
9185c98
Compare
9ba6eed to
ba1e0b4
Compare
9185c98 to
e7f14b5
Compare
ba1e0b4 to
a9aa277
Compare
e7f14b5 to
8141bbe
Compare
a9aa277 to
b53fe9b
Compare
8141bbe to
26a2943
Compare
26a2943 to
35a57fd
Compare
b53fe9b to
17c9a2e
Compare
35a57fd to
2a5ea8f
Compare
Co-Authored-By: Oz <oz-agent@warp.dev>
c68784b to
8a6ce5b
Compare
| } | ||
|
|
||
| impl ActionPermission { | ||
| pub fn description(&self) -> &'static str { |
There was a problem hiding this comment.
Putting the UI strings in a separate crate feels a bit off, but guess it's not super avoidable with Rust's orphan rules
There was a problem hiding this comment.
yeah, and we could improve this with an extension trait, but i'm not really sure it's worth it
| } | ||
|
|
||
| #[derive(Debug, Clone, Copy)] | ||
| pub enum MCPServerState { |
There was a problem hiding this comment.
This probably belongs back in the app crate - doesn't seem to be used by any of the models?
There was a problem hiding this comment.
fair. i've got a PR stacked on this one where i'm moving a bunch of the MCP stuff to the mcp crate (and some of the code being moved depends on this); i'll update that PR to move this into mcp instead of here.

Description
Extracts the concrete cloud object model layer and object client interface into dedicated crates so future cloud sync work can depend on them without depending on the full app crate.
This PR adds
cloud_object_modelsfor concrete server/model types andcloud_object_clientforObjectClient, object update messages, initial load responses, permissions/action result types, and related client-facing surfaces. The app andwarp_server_clientretain compatibility shims/re-exports while call sites are updated to use the extracted crates where appropriate.The PR also moves model-only tests into
cloud_object_modelsand restores docs/comments that were accidentally dropped during the migration.Linked Issue
None.
Testing
cargo fmt --manifest-path /Users/david/src/warp/Cargo.toml --allcargo check --manifest-path /Users/david/src/warp/Cargo.toml -p cloud_object_models -p cloud_object_clientcargo check --manifest-path /Users/david/src/warp/Cargo.toml -p cloud_object_models -p warp --testscargo nextest run --manifest-path /Users/david/src/warp/Cargo.toml -p cloud_object_modelsHOME=$(mktemp -d) cargo nextest run --manifest-path /Users/david/src/warp/Cargo.toml -p warpNo manual app testing; this is a crate-boundary refactor with no intended product behavior changes.
Agent Mode
CHANGELOG-NONE
Co-Authored-By: Oz oz-agent@warp.dev