Skip to content

UX phase 2 — Home, Inbox, Agents, Settings#13

Merged
plosson merged 3 commits into
mainfrom
ux-phase-2
Jul 15, 2026
Merged

UX phase 2 — Home, Inbox, Agents, Settings#13
plosson merged 3 commits into
mainfrom
ux-phase-2

Conversation

@plosson

@plosson plosson commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Implements phase 2 of the UX rework (docs/plans/ux-rework/phase-2-surfaces.md): the app grows from one document surface into five, behind a small plain-DOM router.

Routing (2.0)

  • url-state resolves the path to a view discriminator (home | project | doc | agents | settings); doc-view state (mode/comment/resolved) stays in the hash.
  • navigate() is a plain-DOM router mounting one surface renderer per view; the sidebar became global chrome (wordmark + ⚙ settings, Home & Inbox items with a live badge, per-project section shown only inside a project).
  • Server SPA fallback also serves /settings and /<project>/agents; settings/agents reserved as project names.

Server additions (2.1) — all read-only, create nothing

  • GET /api/projects/:p/docs{path, title, modified} per document (breaking; MCP list_documents still returns plain paths; client + every test updated).
  • GET /api/mentions?who= aggregates open @mentions + per-doc pending-suggestion counts across all projects.
  • GET /api/projects/:p/peers lists peers in a project's already-open rooms (RoomRegistry.openRooms() enumerates settled rooms only).
  • POST …/docs accepts an optional content seed.

Surfaces

  • Home (/) — greeting + live counts, project cards (doc count, last edit, present peers) with ghost cards, inbox block, recents, first-run welcome (optional welcome.md seed). No auto-teleport into a doc.
  • Inbox — part of Home's URL space: unhandled mentions + pending suggestions, show-handled toggle, rows deep-link to the focused thread; sidebar badge refreshes on focus/after actions.
  • Agents (/<project>/agents) — Tailscale-style connect flow (install command, live-rendered mdio mcp install + raw .mcp.json, ~3s peers poll → "connected"), connected-agents list. Replaces the MCP-config modal (mcp-config.ts + overlay deleted, e2e rewritten).
  • Settings (/settings) — identity (live rename + reconnect, color override honored in withColors), editor prefs (default mode / font / reading width — persisted + applied), server & CLI info, project management, logout.

Tests & docs

  • New API tests (docs metadata shape, /api/mentions incl. suggestions array, /api/peers empty/unknown-project, content seed) and e2e for each surface including deep-link reloads. Full suite green (164 tests).
  • CHANGELOG, CLAUDE.md, and the api.ts route table updated.

Screenshots of Home (populated + first-run), Inbox, Agents, and Settings were captured during verification.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gnrgu8jdLx12jkWY1B8vb3

plosson and others added 3 commits July 15, 2026 19:00
… APIs

Phase 2 server groundwork (2.0 reservation + 2.1 additions):
- Reserve `settings`/`agents` as project names (claimed by client routes).
- GET /api/projects/:p/docs now returns {path, title, modified} per document
  (title = first heading, modified = mtime). Breaking: client api.ts, the MCP
  runtime (list_documents still maps back to plain paths), and every test
  asserting the old string[] shape are updated in lockstep. The sidebar shows
  document titles (deferred phase-1 item).
- GET /api/mentions?who= aggregates open @mentions and per-doc pending-suggestion
  counts across every project, in one document sweep, for the Inbox.
- GET /api/projects/:p/peers lists peers in a project's already-open rooms
  (RoomRegistry.openRooms() enumerates settled rooms only — never opens one).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gnrgu8jdLx12jkWY1B8vb3
Turn the single doc-view app into five surfaces behind a plain-DOM router:

- Routing (2.0): url-state now resolves the path to a `view` discriminator
  (home | project | doc | agents | settings); the hash keeps doc-view state.
  navigate() mounts a surface renderer; the sidebar is global chrome (Home,
  Inbox, ⚙ Settings, and a per-project section with the Agents item). The
  server SPA fallback serves /settings and /<project>/agents.
- Home (2.2): greeting + live counts, project cards (doc count, last edit,
  present peers) with ghost cards, the inbox block, recents, and a first-run
  welcome. Creating the first project optionally seeds a plain welcome.md.
- Inbox (2.3): unhandled @mentions + pending-suggestion tallies across projects
  (GET /api/mentions), rows deep-link to the focused thread (comment= hash),
  a show-handled toggle, and a sidebar badge refreshed on focus/after actions.
- Agents (2.4): Tailscale-style connect flow (install command, live-rendered
  `mdio mcp install`, raw .mcp.json disclosure, ~3s peers poll that flips to
  "connected"), plus a connected-agents list. Replaces the MCP-config modal —
  mcp-config.ts and its overlay are deleted, the e2e test rewritten.
- Settings (2.5): identity (live rename + reconnect, color override honored in
  withColors), editor prefs (default mode, prose/monospace font, reading width —
  persisted in localStorage and applied), server & CLI info, project management,
  logout.

Shared ui.ts (element builder, relative time, avatar, command block) and
prefs.ts keep the surfaces consistent. New e2e coverage for each surface incl.
deep-link reloads; all suites green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gnrgu8jdLx12jkWY1B8vb3
Document the five-surface architecture, the new read-only surface APIs
(docs metadata, /api/mentions, /api/projects/:p/peers) and the optional
POST-docs content seed, in the CHANGELOG and CLAUDE.md. Add a server test
for the welcome.md content seed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gnrgu8jdLx12jkWY1B8vb3
@plosson
plosson merged commit 71fddb3 into main Jul 15, 2026
2 checks passed
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.

1 participant