docs(#727): split docs/web-ui.md into shape / dashboard / agent
docs/web-ui.md (1315 lines) split into three sub-files: - docs/web-ui/shape.md — shared SPA skeleton, SSE multiplexing, Worker-death self-heal, terminal pane, listener bind, relative paths, atomic repaint, side panel - docs/web-ui/dashboard.md — SW4RM/Y3R/SYST3M/SCH3DUL3S/S3TT1NGS tabs, container row, topology tree, selection bar, approval card, dashboard endpoints + event channel - docs/web-ui/agent.md — header, terminal, composer, inbox, live view, slash commands, per-agent endpoints, stats page docs/web-ui.md replaced with a thin index linking all three. Section anchors in docs (gateway.md, gotchas.md), Rust doc comments (hive-ag3nt/src/web_ui.rs), and nix/templates/weston-vnc.nix updated to point at the correct sub-file. README and CLAUDE.md file-map updated with sub-file links. Inline // comments in frontend source left unchanged (they reference the index which redirects to the right sub-file).
This commit is contained in:
parent
e1e5195081
commit
c7360cf0bb
10 changed files with 1373 additions and 1319 deletions
|
|
@ -80,7 +80,7 @@ pub type Flavor = mcp::Flavor;
|
|||
///
|
||||
/// `HIVE_WEB_SOCKET` opt-in selects unix-socket vs TCP binding; the
|
||||
/// dual-mode transition + gateway-side consumer live in
|
||||
/// [`docs/web-ui.md::Listener bind`](../../../docs/web-ui.md) and
|
||||
/// [`docs/web-ui/shape.md::Listener bind`](../../../docs/web-ui/shape.md) and
|
||||
/// [`docs/gateway.md::Per-agent unix-socket upstream`](../../../docs/gateway.md).
|
||||
///
|
||||
/// # Errors
|
||||
|
|
@ -219,7 +219,7 @@ fn bind_unix(path: &Path) -> Result<tokio::net::UnixListener> {
|
|||
/// a long-held stale socket doesn't flood the journal.
|
||||
///
|
||||
/// Uncapped retry + dashboard-banner-on-real-collision rationale:
|
||||
/// see [`docs/web-ui.md::Listener bind`](../../../docs/web-ui.md).
|
||||
/// see [`docs/web-ui/shape.md::Listener bind`](../../../docs/web-ui/shape.md).
|
||||
async fn bind_with_retry(addr: SocketAddr, label: &str) -> Result<tokio::net::TcpListener> {
|
||||
let mut delay_ms = 250u64;
|
||||
let mut attempts = 0u32;
|
||||
|
|
@ -433,7 +433,7 @@ struct StateSnapshot {
|
|||
/// dashboard card's icon-only nav strip via hive-c0re's
|
||||
/// `GET /api/agent/{name}/links` same-origin passthrough proxy
|
||||
/// — single source of truth, no CORS. Per-agent page also reads
|
||||
/// this directly. See [`docs/web-ui.md::Container row`] for the
|
||||
/// this directly. See [`docs/web-ui/dashboard.md::Container row`] for the
|
||||
/// frontend resolver + which links appear in which conditions.
|
||||
links: Vec<AgentLink>,
|
||||
/// Human name of this hive instance (e.g. `"pr1ma"`). Sourced
|
||||
|
|
@ -595,7 +595,7 @@ async fn api_state(State(state): State<AppState>) -> axum::Json<StateSnapshot> {
|
|||
/// for `External`; the frontend resolves each against its `kind`
|
||||
/// against the right base so the backend never has to guess the
|
||||
/// operator's browser host. See
|
||||
/// [`docs/web-ui.md::Container row`](../../../docs/web-ui.md) for
|
||||
/// [`docs/web-ui/dashboard.md::Container row`](../../../docs/web-ui/dashboard.md) for
|
||||
/// the resolver + how `deployed:<sha>` ships alongside.
|
||||
fn agent_links(label: &str, gui_enabled: bool) -> Vec<AgentLink> {
|
||||
let mut links = Vec::new();
|
||||
|
|
@ -950,7 +950,7 @@ async fn post_new_session(State(state): State<AppState>) -> Response {
|
|||
/// only these (and not the rest of `~/.claude/`) preserves session
|
||||
/// history so `claude --continue` keeps working after a fresh login.
|
||||
/// Rationale + the previous wholesale-wipe shape we replaced live in
|
||||
/// [`docs/web-ui.md::Per-agent endpoints`](../../../docs/web-ui.md)
|
||||
/// [`docs/web-ui/agent.md::Per-agent endpoints`](../../../docs/web-ui/agent.md)
|
||||
/// (the `/api/logout` bullet).
|
||||
const CRED_FILE_NAMES: &[&str] = &[".credentials.json", "mcp-needs-auth-cache.json"];
|
||||
|
||||
|
|
@ -959,7 +959,7 @@ const CRED_FILE_NAMES: &[&str] = &[".credentials.json", "mcp-needs-auth-cache.js
|
|||
/// turn loop's next iteration parks into `wait_for_login` which
|
||||
/// resumes when a fresh credentials file appears via `/login/code`.
|
||||
/// Always returns 200 with a body describing what happened. See
|
||||
/// [`docs/web-ui.md::Per-agent endpoints`](../../../docs/web-ui.md)
|
||||
/// [`docs/web-ui/agent.md::Per-agent endpoints`](../../../docs/web-ui/agent.md)
|
||||
/// (the `/api/logout` bullet) for the three-step rationale +
|
||||
/// preservation invariants.
|
||||
async fn post_logout(State(state): State<AppState>) -> Response {
|
||||
|
|
|
|||
Loading…
Reference in a new issue