Repository navigation
feat: hub client + SSE + version compat + HubLauncher (UI-1b) - #1
Merged
Merged
Conversation
- src/hub/errors.ts: HubError {code, message, userAction?, details?} —
the only error type UI components catch
- src/hub/client.ts: fetch-based HubClient covering all 16 routes
(14 existing + filesRead/filesWrite), PUT support, AbortController timeouts
- src/hub/sse.ts: EventSource wrapper for /v1/events with auto-reconnect
- src/hub/capabilities.ts: version-compat policy (≥0.7.0 supported,
≥0.8.0 full features, missing version = legacy reject)
- src/hub/HubContext.ts: React Context for client + caps
- src/components/HubLauncher.tsx: hub detection dialog (Tauri check_hub
command + guided startup with one-click copy)
- src/App.tsx: caps state machine; HubLauncher gates the app until
hub is reachable and version-supported
- src/components/{Frame,LayerNav}.tsx: prop-driven status (no hardcode)
- src-tauri/src/lib.rs: #[tauri::command] check_hub via std::net::TcpStream
tsc --noEmit and cargo check both green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
窗口 UI-1b — UI 联通(tts-desktop 侧)
蓝本
新增(src/hub 五件套 + HubLauncher + Rust 探测)
版本兼容矩阵(实测 4 场景全对)
自检
tsc --noEmit✅cargo check✅联通验收
tts-toolkit#4 落地后,
npm run tauri dev启动会经 HubLauncher → capabilities 判定 → 进入主界面(五面骨架已 prop 化接入真实状态)。🤖 Generated with CreateWorkflow + GLM-5.3-Flash × 3 (concurrent)