Skip to content

Commit 4c0cc70

Browse files
feat(Common/SCM): Add DTO for SCM input box state
Introduce `SourceControlInputBoxDTO` to represent the commit message input box state in the SCM workflow. This DTO includes: - `Value` for current text content - Optional `Placeholder` for empty state hint - `Visible` flag for UI state (defaulting to `false`) As part of the Common crate, this serializable struct enables type-safe communication between Mountain's SCM handlers and Wind's UI services via Tauri events. It completes the foundational DTO set for SCM operations (building on recent commits) and directly supports the implemented SCM workflow where Mountain manages git operations and provides UI state updates. Refs #SCM-workflow
1 parent f9c37e8 commit 4c0cc70

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//! # SourceControlInputBoxDTO
2+
//!
3+
//! Defines the DTO for the SCM input box (commit message box).
4+
5+
use serde::{Deserialize, Serialize};
6+
7+
/// A serializable struct representing the state of the commit message input box
8+
/// associated with a source control provider.
9+
#[derive(Serialize, Deserialize, Debug, Clone)]
10+
#[serde(rename_all = "PascalCase")]
11+
pub struct SourceControlInputBoxDTO {
12+
/// The current text content of the input box.
13+
pub Value:String,
14+
/// Placeholder text to show when the input box is empty.
15+
#[serde(skip_serializing_if = "Option::is_none")]
16+
pub Placeholder:Option<String>,
17+
/// Whether the input box is currently visible.
18+
#[serde(default)]
19+
pub Visible:bool,
20+
}

0 commit comments

Comments
 (0)