UX phase 1 — hierarchy & trust in the document view#11
Merged
Conversation
Rework the single document surface: three-zone header, view modes, in-app dialogs/toasts, prose ergonomics, empty states, and trust fixes. All client-side — no new routes or server APIs. Design tokens (CSS custom properties) now back every color. - Header: breadcrumb <project> / <title> (title from the doc's first heading, raw path in the tooltip) with a demoted connection status dot; overlapping presence avatar stack (round humans, squared agents); an Edit | Both | Read segmented mode toggle; and a ⋯ menu holding comment / history / versions / rename / move / delete (delete red, behind the menu). - View mode: the URL hash carries mode=edit|both|read, replacing the boolean preview=1 (no back-compat). Read mode is preview-only, editor hidden. - Prose: editor and preview cap at a 72ch centered column, render prose in a proportional font (fenced code stays monospaced), dim markdown syntax and enlarge headings via a CodeMirror HighlightStyle, and drop the gutter. - dialogs.ts (askText / askChoice / askConfirm / toast) replaces every native prompt/confirm/alert; move-doc is now a project picker. - Project bar: labeled + new + a ⋯ project menu (rename / connect an agent / delete); the MCP dialog's clipped command line now wraps. - Empty states for empty project and empty vault; login modal gained the wordmark and product context, rendered over the app background. - Trust: refetch the project list on window focus and after mutations; versions dialog toasts on restore and disables save while in flight. - e2e rewritten for the in-app dialogs, mode toggle, ⋯ menus, and avatars. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gnrgu8jdLx12jkWY1B8vb3
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gnrgu8jdLx12jkWY1B8vb3
This was referenced Jul 15, 2026
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 1 of the UX rework (
docs/plans/ux-rework/phase-1-hierarchy-and-trust.md). All client-side — no new routes or server APIs. Design tokens (CSS custom properties for ink / paper / accent / human / danger) now back every color.What changed
Header (1.1) — three zones replace the row of seven identical pills:
<project> / <title>, where the title is derived live from the document's first heading (raw path moved to the tooltip), with a demoted connection dot (green/grey/red) instead of a chip.owner/agentin the tooltip.Edit | Both | Readsegmented mode toggle.⋯menu holding+ comment, history, versions, rename, move, and a reddelete.View mode (1.1) — the URL hash now carries
mode=edit|both|read, replacing the booleanpreview=1(no back-compat). Read mode renders the preview full-width with the editor hidden.Prose ergonomics (1.2) — editor and preview cap at a 72ch centered column, prose renders in a proportional font (fenced code stays monospaced), markdown syntax marks are dimmed and headings enlarged via a CodeMirror
HighlightStyle, and the line-number gutter is gone.In-app dialogs & toasts (1.3) — new
src/client/dialogs.ts(askText/askChoice/askConfirm/toast) replaces every nativeprompt/confirm/alertinsrc/client/(verified by grep). Move-doc is now a clickable project picker; errors become error toasts, successes brief confirmations.Project bar (1.4) — labeled
+ newbutton plus a⋯project menu (rename / connect an agent / delete); the MCP dialog's clippedconfigurecommand line now wraps.Empty states & login (1.5) — centered CTAs for an empty project (create a document / connect an agent) and an empty vault (create your first project); the login modal gained the wordmark and one line of product context and renders over the
--paperbackground instead of the ghosted editor (#appis hidden until you join).Trust fixes (1.6) — the project list refetches on window
focusand after every own mutation; the versions dialog toasts on restore, refreshes the list, and disables save while a save is in flight.Before / after
doc/pathlabel, a "connected" chip, loose presence chips, and+ comment | preview | history | versions | rename | move | deleteall as identical pills. After:main / Welcome to mdiobreadcrumb + status dot, avatar stack,Edit|Both|Read, and a single⋯menu; destructive actions are red and one level down.previewtoggle button (preview=1in the hash). After: a three-way mode toggle with a full-width Read mode (mode=in the hash).prompt()/confirm()/alert(). After: themed in-app dialogs and bottom-center toasts; move-doc is a project picker.Testing
bun testis green (156 tests across 9 files, including the Playwright e2e suite and the compiled-CLI suite). The e2e tests that drove CRUD through nativepage.on('dialog')handlers were rewritten to DOM interactions against the new dialogs, and the mode-toggle /⋯-menu / avatar changes were threaded through the affected specs — all in this PR. Screenshots of the reworked header, dialogs, toasts, Read mode, empty states, and login were captured and reviewed.Deliberately deferred to phase 2: sidebar doc-list first-heading titles (1.6, "optional") — it needs a
GET /api/projects/:p/docsshape change to{path, title}, which phase 2's recents work needs anyway.🤖 Generated with Claude Code
https://claude.ai/code/session_01Gnrgu8jdLx12jkWY1B8vb3