Skip to content

feat(phase62): markdown editor for project instruction files (Plan 062) - #91

Merged
SuperLogicAI merged 1 commit into
mainfrom
feat/phase-62-markdown-editor
Oct 11, 2026
Merged

SuperLogicAI merged 1 commit into
mainfrom
feat/phase-62-markdown-editor

Conversation

@SuperLogicAI

Copy link
Copy Markdown
Owner

Summary

Quick edits to a project's instruction and notes files from the dashboard project view, plus a header regroup. Plan: plans/062-markdown-editor.md. PHASE 62 ACCEPTED 2026-10-10.

  • Overview | Markdown toggle beside the project title. The header stays in both views and only the body swaps. Session actions (Continue control, New session tab) sit top-right; housekeeping (Copy update, Pin, Archive) is on the path row.
  • File list: CLAUDE.md, AGENTS.md, .claude/CLAUDE.md, .logic-loop/board.md first, then root *.md, then docs/*.md (one level). Files over 1 MB and symlinks pointing outside the project are excluded.
  • Editor: plain textarea with a syntax-colour layer behind it (headings by level, list markers, bold, code, links, @imports, fences, quotes, rules). ⌘S saves. Open in editor (Plan 061) sits beside the filename. Agent memory files carry a note that running agents pick up edits on /clear, /compact or a new session.
  • Unsaved drafts are kept in memory (marked ●) when you switch files or tabs, instead of a discard prompt that can't catch leaving via a terminal tab. Quitting the app drops them.

Safety

  • md_read / md_write accept a name only if it's in a fresh md_list result, then re-check it with pty::resolve_inside, so callers can't reach ../, nested or absolute paths.
  • Saves are compare-and-swap against the exact text loaded. If the file changed on disk (e.g. an agent edited it), a banner offers Reload or Overwrite; nothing is clobbered silently. There is a small TOCTOU window between the compare and the write; accepted, and commented in the code.
  • No preview: file content is only ever React text, never HTML (invariant 5).
  • CRLF files round-trip byte for byte. UTF-8 only.

Verification

  • cargo test --lib: 185 passed, 1 ignored (5 new in markdown.rs: list order/exclusions, outside symlink, unlisted/path names, CAS, non-UTF-8/oversize)
  • npm run check (new markdown-editor:check: CRLF round-trip and highlighter alignment), npm run opencode:check, npx tsc --noEmit, npm run build, cargo clippy --all-targets -- -D warnings, git diff --check
  • Built-app checks 111–120 passed (Codex computer use, plus maintainer confirmation of the /clear reload in 116). Results in docs/TESTING.md.

Not verified: Windows (CRLF default, editor launch); tracked in the ROADMAP Windows gap table.

Also in this PR: IDEAS entry "Half 1c" (diff pop-out falls back to unstaged changes), found during testing. Not implemented.

🤖 Generated with Claude Code

https://claude.ai/code/session_014UA3Dk8XywNUyaR3MV5tzP

Quick edits to CLAUDE.md, AGENTS.md, .claude/CLAUDE.md, the board, root
*.md and docs/*.md from the dashboard project view, behind a new
Overview | Markdown toggle. The header is regrouped: session actions
top-right, housekeeping on the path row.

Names must be in a fresh md_list result and then pass resolve_inside, so
callers can't pick arbitrary paths. Saves are compare-and-swap against
the exact text loaded, so an agent's edit is never clobbered silently.
Plain textarea with a syntax-colour layer behind it; agent text only
ever renders as React text, never HTML. CRLF files round-trip intact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014UA3Dk8XywNUyaR3MV5tzP
@SuperLogicAI
SuperLogicAI merged commit b81d5d2 into main Oct 11, 2026
3 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