feat(ui): ensure cross-platform one-click setup and default Showcase UI routing
- Add explicit root route (/) in server.py to guarantee Showcase UI is served by default, routing /admin to the Admin Debug Console - Enhance dynamic Angular dist detection across multiple standard output paths - Add automated Node.js/npm detection and installation fallbacks to start scripts and installers across macOS, Linux, and Windows - Automatically build Showcase UI when launching via start.sh, start.bat/start.ps1, or artemis ui if frontend artifacts are missing - Add Node.js / npm and Showcase UI status inspection rows to artemis doctor - Support artemis mcp --install for one-click IDE integration and add make build-ui target
This commit is contained in:
1 parent
6fa4768893
commit
fc6ddad655
15 files changed
+598
-64
No files matched your search
@@ -94,6 +94,29 @@ def ui_command(
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
base_dist = ROOT_DIR / "apps" / "showcase_ui" / "dist"
|
||||
candidates = [
|
||||
base_dist / "frontend" / "browser" / "index.html",
|
||||
base_dist / "browser" / "index.html",
|
||||
base_dist / "frontend" / "index.html",
|
||||
base_dist / "index.html",
|
||||
]
|
||||
if not any(p.exists() for p in candidates):
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
if shutil.which("npm"):
|
||||
console.print(
|
||||
" [yellow]🎨 Showcase UI build not found. Compiling Angular Showcase UI...[/yellow]"
|
||||
)
|
||||
showcase_dir = ROOT_DIR / "apps" / "showcase_ui"
|
||||
try:
|
||||
subprocess.run(["npm", "install", "--silent"], cwd=showcase_dir, check=True)
|
||||
subprocess.run(["npm", "run", "build"], cwd=showcase_dir, check=True)
|
||||
console.print(" [green]✓ Showcase UI built successfully.[/green]\n")
|
||||
except Exception as e:
|
||||
console.print(f" [red]⚠ Failed to auto-build Showcase UI: {e}[/red]\n")
|
||||
|
||||
stop_event = threading.Event()
|
||||
if open_browser:
|
||||
t = threading.Thread(
|
||||
|
||||
Reference in new issue
Block a user