Skip to content

Commit 00f54f8

Browse files
feat(Common/SCM): Extend SCM provider DTO with input box state
Added the `InputBox` field of type `SourceControlInputBoxDTO` to the `SourceControlManagementProviderDTO` in the `Common` crate. This field represents the state of the SCM input box (commit message area) and is optional. Additionally, optimized serialization by adding `#[serde(skip_serializing_if = "Option::is_none")]` to the `Count`, `CommitTemplate`, and new `InputBox` fields to omit `None` values. This change completes the SCM provider DTO definition in `Common`, enabling full representation of SCM state for the `Vine` gRPC layer. The `InputBox` field allows `Cocoon` to transmit input box state to `Mountain`, which can then propagate it to `Wind` for UI rendering. The serialization optimizations reduce payload size for gRPC communications between `Mountain` and `Cocoon`, improving performance for SCM workflows. Refs: 4c0cc70
1 parent 4c0cc70 commit 00f54f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Source/SourceControlManagement/DTO/SourceControlManagementProviderDTO.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
use serde::{Deserialize, Serialize};
66
use serde_json::Value;
77

8+
use crate::SourceControlManagement::DTO::SourceControlInputBoxDTO::SourceControlInputBoxDTO;
9+
810
/// A serializable struct representing the metadata for a source control
911
/// provider.
1012
#[derive(Serialize, Deserialize, Debug, Clone)]
@@ -16,7 +18,12 @@ pub struct SourceControlManagementProviderDTO {
1618
/// `UriComponents`.
1719
pub RootURI:Option<Value>,
1820
/// An optional count of changed resources, often displayed as a badge.
21+
#[serde(skip_serializing_if = "Option::is_none")]
1922
pub Count:Option<u32>,
2023
/// The template for the commit message input box.
24+
#[serde(skip_serializing_if = "Option::is_none")]
2125
pub CommitTemplate:Option<String>,
26+
/// The state of the SCM input box (commit message area).
27+
#[serde(skip_serializing_if = "Option::is_none")]
28+
pub InputBox:Option<SourceControlInputBoxDTO>,
2229
}

0 commit comments

Comments
 (0)