Add port mappings feature, update app icon, and enhance default instructions
- Add per-project port mapping configuration (host:container port pairs with TCP/UDP protocol) stored in project config and applied as Docker port bindings at container creation. Port changes trigger automatic container recreation via fingerprint detection. - Create PortMappingsModal UI component following the same pattern as EnvVarsModal, integrated into ProjectCard config panel. - Inject port mapping details into CLAUDE_INSTRUCTIONS so Claude inside the container knows which ports are available for testing services. - Update default global instructions for new installs to encourage use of subagents for long-running and parallel tasks. - Replace app icons with new v2 sun logo design for better visibility at small sizes (taskbar/dock). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,18 @@ pub struct ProjectPath {
|
||||
pub mount_name: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
pub struct PortMapping {
|
||||
pub host_port: u16,
|
||||
pub container_port: u16,
|
||||
#[serde(default = "default_protocol")]
|
||||
pub protocol: String,
|
||||
}
|
||||
|
||||
fn default_protocol() -> String {
|
||||
"tcp".to_string()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Project {
|
||||
pub id: String,
|
||||
@@ -30,6 +42,8 @@ pub struct Project {
|
||||
#[serde(default)]
|
||||
pub custom_env_vars: Vec<EnvVar>,
|
||||
#[serde(default)]
|
||||
pub port_mappings: Vec<PortMapping>,
|
||||
#[serde(default)]
|
||||
pub claude_instructions: Option<String>,
|
||||
pub created_at: String,
|
||||
pub updated_at: String,
|
||||
@@ -114,6 +128,7 @@ impl Project {
|
||||
git_user_name: None,
|
||||
git_user_email: None,
|
||||
custom_env_vars: Vec::new(),
|
||||
port_mappings: Vec::new(),
|
||||
claude_instructions: None,
|
||||
created_at: now.clone(),
|
||||
updated_at: now,
|
||||
|
||||
Reference in New Issue
Block a user