Skip to content

feat(ui-web): move channels out of settings and beside agents under one rail row - #830

Merged
0xKT merged 4 commits into
mainfrom
feat/home_channel_entry
Sep 30, 2026
Merged

0xKT merged 4 commits into
mainfrom
feat/home_channel_entry

Conversation

@arelchan

Copy link
Copy Markdown
Contributor

Summary

Channels were a section of the settings dialog, so a reader who never opened settings never learned that Raven can be reached from a chat app. This moves them out of settings and puts them beside the agent hub, under one rail row.

  • One place, two modules. The rail row "Agent Connector" becomes "Connectors" in English (its Chinese label changes to match). Its page has two underlined tabs at the top, Agents / Channels, with no page title or counts above them (components/HubHead.tsx). Both are still their own module pages and islands; they share the rail button, the header, and state/hub.ts, which remembers the module the reader was last on so the rail row goes back to it.
  • The channel page is drawn like the agent hub. Filter tabs (All / Connected / Not connected) over a grid of fixed-height cards, and the picked channel in the shared detail drawer. The list's switches and search are gone: pressing a card only opens it, and connecting happens in the sheet.
  • Three states on a card, not five. Connected (green); connection problem (switched on, host up, adapter not running: red, sorted first, with a line saying what to do); not connected (everything else, including an adapter waiting on a scan). No host at all is one notice over the grid, not a reason on every card. The gateway's refusal from a write is kept on the row and shown in the sheet instead of a toast.
  • The sheet matches the agent sheet measure for measure (head, labels, inputs, white foot with a hairline). It also says where credentials come from in one guide box with the console link, says "leave blank to keep" once instead of in every box, counts what is missing only in its head, moves Disconnect to the far end of the foot, and lays a scan channel out as the code's frame beside its three steps.
  • Copy keys this leaves unused are removed from i18n/messages.json, and ui-tui's generated copy is regenerated. Two keys that were already unused on main (gui.conn.gw_live, gui.conn.close) are left alone.

Front end only: no backend, config or RPC change.

Known gap, not addressed here: a WeChat / WhatsApp pairing that expired reads as "not connected" rather than "connection problem", because channels.status cannot tell an expired pairing from one that never happened.

Type

  • Fix
  • Feature
  • Docs
  • CI / tooling
  • Refactor
  • Other

Verification

In ui-web/:

  • npx vitest run --maxWorkers=4: 212 files, 3118 tests passed. A plain npx vitest run passed too, apart from timing-sensitive session tests that time out when the machine is heavily loaded; they pass on their own.
  • npx tsc --noEmit -p tsconfig.json: clean.
  • npx eslint .: 0 errors. The 4 react-hooks/exhaustive-deps warnings are pre-existing (one in the untouched QR panel).
  • node scripts/check-class-namespace.mjs and node scripts/check-css.mjs: OK. Two pins in check-class-namespace.mjs are lowered because this change retires the debt they count (extAgents unprefixed 1 -> 0, .k shared 3 -> 2).
  • npm run build, then uv run --frozen python ui-web/build.py: both boot snapshots match their goldens (regenerated in this PR, and the live one was regenerated against a closed port).

At the repo root: make check-large-files passes, and npm run gen:i18n --prefix ui-tui is reflected in ui-tui/src/i18n/messages.generated.ts.

Manual: clicked through in a browser against an isolated raven serve (scratch RAVEN_HOME) and against the offline ?stub=1 page, in both languages and both themes. The flow: rail row, module tabs, return to last module, each card state, the credential and scan sheets.

  • Relevant tests pass locally
  • Relevant lint / type checks pass locally
  • User-facing docs or screenshots are updated when needed: no docs cover this page, and screenshots are not attached because the repo does not keep image assets.

Risk

User-visible changes:

  • Channels are no longer in the settings dialog.
  • The rail row is renamed from "Agent Connector" to "Connectors".
  • Channel rows no longer carry an on/off switch; switching off is Disconnect in the sheet.
  • The toasts for "adapter refused" and "gateway not receiving" are replaced by the sheet's state line and the page notice.

Rollback is reverting the squash commit; nothing outside the front end and its copy changes.

  • Security impact considered
  • Backward compatibility considered
  • Rollback path is clear for risky changes

Related Issues

N/A

…ne rail row

Channels were a section of the settings dialog, so a reader who never opened
settings never learned Raven can be reached from a chat app. They are a page
of their own now, and share one rail row ("Connections") with the agent hub:
two module pages, each still its own island, under one set of underlined
tabs (components/HubHead.tsx). state/hub.ts remembers the module the reader
was last on, so the rail row goes back to it.

The channel page is drawn the way the agent hub is: filter tabs over a grid
of fixed-height cards, and the picked one in the shared detail drawer, sized
and spaced like the agent sheet. The list's switches and search are gone:
a press on a card only opens it, and connecting happens in the sheet.

Cards say three things for the five states underneath: connected, not
connected, and a connection problem (switched on, host up, adapter not
running), which is red and sorted first with a line saying what to do. An
adapter waiting on a scan counts as not connected. No host at all is one
notice over the grid instead of a reason on every card. The gateway's refusal
from a write is kept on the row and shown in the sheet instead of a toast.

The sheet drops the mono captions, says where credentials come from in one
guide box with the console link, says "leave blank to keep" once instead of
in every box, counts what is missing only in its head, moves disconnect to
the far end of the foot, and lays a scan channel out as the code's frame
beside its three steps.

Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
…ing test

Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: update the canonical Web UI architecture documents for the new two-page connections hub.

I found one inline architecture-contract issue. I covered the full diff; the page, rail, hub, drawer, settings, mount, Escape, and data-source callers; relevant history; backward compatibility; test changes for weakening; and the rules in AGENTS.md, CLAUDE.md, CONTEXT-MAP.md, ui-web/CONTEXT.md, and ui-web/CONTRIBUTING.md.

Verification: npm test passed (212 files, 3,118 tests); npm run type-check passed; npm run lint completed with 0 errors and 4 warnings; the large-file check and git diff --check passed. The source-language gate failed on three newly added Chinese fixture lines in ConnectionsPage.test.tsx, matching the currently failing repository files CI job; I did not duplicate that machine-caught failure as an inline review finding. make is unavailable in this environment, so I ran the underlying Python gates directly.

Comment thread ui-web/src/state/pages.ts

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: update the canonical Web UI architecture documents for the new two-page connections hub.

The new commit correctly replaces the added Chinese source literals with escapes while preserving the runtime spacing test, so the source-language gate now passes. It does not address the open architecture-contract finding: ui-web/CONTEXT.md and ui-web/CONTRIBUTING.md still define channels as a settings section and the UI as having one module page, and the stale three-domain comments remain. I found no new defect in the delta and am leaving the existing thread open.

I rechecked the current full diff against the project rules and architecture, the affected callers and history, backward compatibility, and the changed tests for weakening. Verification on this head: npm test passed (212 files, 3,118 tests); npm run type-check passed; npm run lint completed with 0 errors and 4 existing warnings; the source-language gate, large-file gate, and git diff --check passed.

…re docs

CONTEXT.md now counts two module pages, defines the connections hub
(state/hub.ts and components/HubHead.tsx), and lists schedules and memory
as the only hosted settings sections. CONTRIBUTING.md sections 2.3 and 3.2
say the same, and name hub.onOpen as another slot a domain fills. Comments
in TwoPane.tsx, install.ts, settings.ts, catalogue.ts and page.css that
still counted channels among the settings sections are brought up to date.

Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers; this can merge as far as I am concerned.

The documentation update resolves my only finding, and I replied to the author and resolved the thread I opened. I found no new issue in the revision.

I checked the current diff and fix delta against AGENTS.md, CLAUDE.md, CONTEXT-MAP.md, the updated Web UI context/contributor contracts, affected callers and history, backward compatibility, architecture boundaries, and the changed tests for weakening. Verification: npm test passed (212 files, 3,118 tests); npm run type-check passed; npm run lint completed with 0 errors and 4 existing warnings; the source-language gate, large-file gate, and git diff --check passed.

Resolves the one conflict, the LEGACY_SHARED pins in
check-class-namespace.mjs, by keeping both sides' reductions: this branch
retires one shared use of k, and main retires h and one use of w.

Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers; this can merge as far as I am concerned.

This revision merges current main. After refreshing the local github/main ref, I rechecked the actual PR diff and the merge delta. The sole textual conflict was the LEGACY_SHARED ratchet, and the resolution correctly preserves both branches' independent reductions (k: 2, removal of h, and w: 2). The previously resolved review thread remains resolved, and I found no semantic integration regression.

I covered the current diff, merge history and conflict resolution, affected Web UI callers, backward compatibility, project architecture/rules, and tests for weakening. Verification on this head: npm test passed (213 files, 3,144 tests); npm run type-check passed; npm run lint completed with 0 errors and 4 existing warnings; the source-language gate, large-file gate, and git diff --check passed.

@0xKT
0xKT merged commit 342c52b into main Sep 30, 2026
23 checks passed
@0xKT
0xKT deleted the feat/home_channel_entry branch September 30, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants