feat: zen mode full-screen writing view with live TOC#12
Draft
abhi11verma wants to merge 6 commits into
Draft
Conversation
Adds a distraction-free writing overlay triggered from the sidebar Focus button or ⌘⇧Z shortcut. Features a live table of contents derived from # headings with collapsible dot view and scroll-to-heading navigation, a centered WYSIWYG Tiptap editor with larger serif-friendly typography, and auto-save to localStorage. https://claude.ai/code/session_01MVsAnPMSQPUcAGRZTfgHyU
Zen mode is now an inline upgrade of the existing thread note composer rather than a separate editor. Clicking the focus icon (or pressing Esc to exit) toggles a full-screen overlay that reuses the same Tiptap editor instance — no remount, no content loss, undo history preserved. - ThreadView: fixed-position overlay on zen toggle, TOC panel derived from heading lines in current draft text, collapsible to dot view, click-to-scroll via new scrollToHeading on MarkdownEditor ref - MarkdownEditor: adds scrollToHeading() to imperative handle - Removes ZenModeView standalone component and App/Sidebar wiring https://claude.ai/code/session_01MVsAnPMSQPUcAGRZTfgHyU
- X button is now position:absolute in the top-left corner (no header bar) - TOC panel has no borderRight — sits on the same background as the editor - Thread title flows as part of the document content (h1 above the composer) - Removed the flexDirection:column wrapper; layout is a flat flex row - TOC top padding (72px) clears the floating X button naturally https://claude.ai/code/session_01MVsAnPMSQPUcAGRZTfgHyU
…or, submit top-right - Submit button moves to position:absolute top-right; removed from bottom bar in zen mode - TOC panel: justifyContent:center + height:100% so headings float in the vertical middle of the viewport regardless of content scroll position - Composer box in zen mode: background transparent, no borderRadius, no padding — text sits directly on the page surface, no visual box - Editor minHeight: calc(100vh - 260px) gives a large open canvas feel - Bottom bar hidden in zen mode; only a subtle type indicator + decision toggle appear beneath the cursor line when text is present - Normal mode bottom bar unchanged https://claude.ai/code/session_01MVsAnPMSQPUcAGRZTfgHyU
- Dark canvas overlay (#1f1d1c bg, Cormorant Garamond serif 22px/1.55) - CSS grid layout with animated column transition (56px ↔ 220px) - TOC vertically centered via flex align-items: center on full-height aside - Collapsed TOC shows tick marks (h-lines: 28/20/14px wide) not dots - Expanded TOC shows Cormorant Garamond serif heading titles with accent border-left on hover - Hamburger toggle (top-left, ⌘\ shortcut) replaces X button - Crumb (top-right): "zen · filename · esc" in JetBrains Mono - Meta stats (bottom-right): "— h1·N · h2·N · h3·N — Nw · post ⌘↵" - TOC starts collapsed by default - Add Cormorant Garamond to Google Fonts import in index.html https://claude.ai/code/session_01MVsAnPMSQPUcAGRZTfgHyU
- MarkdownEditor: use a ref for onKeyDown to avoid stale closure in Tiptap's useEditor — previously the editor always called the initial handler which had zenMode=false captured, so Esc never exited zen mode - Zen canvas: maxWidth 720→900, horizontal padding 60→40px for more space https://claude.ai/code/session_01MVsAnPMSQPUcAGRZTfgHyU
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.
$(cat <<'EOF'
Summary
#,##,###headings live as you type and renders them as clickable links that scroll to the heading; a toggle collapses the panel to a compact dot view (dot size reflects heading level)⌘⇧Z; close with the × button orEscFiles changed
src/components/ZenModeView.jsxsrc/components/atoms/Icons.jsxIconFocus(maximize-corners icon)src/App.jsxshowZenstate,⌘⇧Zshortcut, render overlaysrc/components/Sidebar.jsxsrc/index.css.zen-editortypography overridesTest plan
# Heading 1,## Section,### Sub— TOC updates live‹collapse button — headings become dots; hover shows title tooltip; clicking dots still scrolls›to re-expand — text labels returnEsc— overlay dismisses, app state unchanged⌘⇧Ztoggles zen mode from any viewhttps://claude.ai/code/session_01MVsAnPMSQPUcAGRZTfgHyU
EOF
)
Generated by Claude Code