Skip to content

Commit 60a1451

Browse files
Copilottikazyq
andcommitted
Improve code comments and add logging for UI server startup
Co-authored-by: tikazyq <[email protected]>
1 parent 84197d6 commit 60a1451

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

packages/desktop/src-tauri/src/commands.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,16 @@ fn build_payload(app: &AppHandle, state: &DesktopState) -> Result<DesktopBootstr
177177
// Native SPA mode (spec 169 Phase 5) - no Node.js server needed
178178
// UI server only used if explicitly enabled via environment variable
179179
let ui_url = std::env::var("LEANSPEC_ENABLE_UI_SERVER").ok().and_then(|_| {
180-
state
181-
.ui_server
182-
.ensure_running(app, active_project.as_ref())
183-
.ok()
180+
match state.ui_server.ensure_running(app, active_project.as_ref()) {
181+
Ok(url) => {
182+
eprintln!("Legacy UI server started at: {}", url);
183+
Some(url)
184+
}
185+
Err(e) => {
186+
eprintln!("Failed to start legacy UI server (this is normal in native SPA mode): {}", e);
187+
None
188+
}
189+
}
184190
});
185191

186192
Ok(DesktopBootstrapPayload {

packages/desktop/src-tauri/src/specs/reader.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,10 @@ impl SpecReader {
190190
format!("specs/{}/README.md", spec_name)
191191
};
192192

193-
// TODO: Add sub-specs tracking in the future if needed
194-
// (currently we just load individual spec files)
193+
// TODO: Implement sub-specs tracking feature
194+
// Sub-specs are additional .md files in a spec directory beyond README.md
195+
// This would allow specs to be broken into multiple documents
196+
// Track in a future spec once the use case is validated
195197

196198
Some(Spec {
197199
id,

packages/desktop/src-tauri/src/specs/validation.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ pub fn validate_spec(spec: &Spec) -> ValidationResult {
111111

112112
// Check for required sections
113113
let has_overview = body.contains("## Overview") || body.contains("## overview");
114-
// TODO: Add validation for Design, Plan, Test sections in the future if needed
114+
// Note: Validation for Design, Plan, Test sections was removed as these are
115+
// optional sections per LeanSpec philosophy (minimal required structure).
116+
// Only Overview section check remains as it's the core requirement.
115117

116118
if !has_overview {
117119
issues.push(ValidationIssue {

0 commit comments

Comments
 (0)