UX phase 2 — Home, Inbox, Agents, Settings#13
Merged
Merged
Conversation
… 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
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.
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-stateresolves the path to aviewdiscriminator (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)./settingsand/<project>/agents;settings/agentsreserved as project names.Server additions (2.1) — all read-only, create nothing
GET /api/projects/:p/docs→{path, title, modified}per document (breaking; MCPlist_documentsstill 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/peerslists peers in a project's already-open rooms (RoomRegistry.openRooms()enumerates settled rooms only).POST …/docsaccepts an optionalcontentseed.Surfaces
/) — greeting + live counts, project cards (doc count, last edit, present peers) with ghost cards, inbox block, recents, first-run welcome (optionalwelcome.mdseed). No auto-teleport into a doc./<project>/agents) — Tailscale-style connect flow (install command, live-renderedmdio 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) — identity (live rename + reconnect, color override honored inwithColors), editor prefs (default mode / font / reading width — persisted + applied), server & CLI info, project management, logout.Tests & docs
/api/mentionsincl. suggestions array,/api/peersempty/unknown-project, content seed) and e2e for each surface including deep-link reloads. Full suite green (164 tests).api.tsroute 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