Files
MD.ai/CLAUDE.md
0x8664b2 a3e8b09a8f Add recent files menu functionality
Implemented comprehensive recent files tracking system:
- Created RecentFilesManager singleton with UserDefaults persistence
- Added Recent Files submenu to File menu with up to 10 recent files
- Automatic file validation that removes deleted files from list
- Smart file tracking that adds files when opened and moves to top
- Clear Recent Files option for user control
- User-friendly display showing filename and relative path
- Error handling for missing files with user notification

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 10:48:11 -07:00

60 lines
2.3 KiB
Markdown

# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
This repository contains a macOS markdown viewer application built with SwiftUI. The app allows users to open markdown files and render them with HTML preview in individual windows.
## Development Commands
- Build: `xcodebuild -project MarkdownViewer.xcodeproj -scheme MarkdownViewer -configuration Debug`
- Clean: `xcodebuild clean -project MarkdownViewer.xcodeproj`
- Open in Xcode: `open MarkdownViewer.xcodeproj`
## Architecture & Structure
- **MarkdownViewerApp.swift**: Main app entry point with Settings scene and File menu integration
- **ContentView.swift**: Contains MarkdownDocumentView for displaying markdown content
- **MarkdownRenderer.swift**: NSViewRepresentable wrapper for WKWebView with markdown-to-HTML conversion
- **MarkdownViewer.entitlements**: App entitlements with sandbox disabled for WebView functionality
## Getting Started
1. Open the project: `open MarkdownViewer.xcodeproj`
2. Build and run the application in Xcode (⌘R)
3. Use File → Open Markdown File (⌘O) to open markdown files
4. Each file opens in its own window with rendered HTML preview
## TODO - Feature Ideas
*Add new feature ideas here that can be worked on in future development sessions*
### Markdown Viewer Enhancements
- [ ] Add syntax highlighting for code blocks
- [ ] Support for markdown tables
- [ ] Add print functionality
- [ ] Export to PDF feature
- [ ] Dark mode support
- [ ] Custom CSS themes
- [x] Live preview while editing
- [ ] Search within document
- [ ] Zoom in/out functionality
- [x] Recent files menu
- [ ] Drag and drop file support
- [ ] Support for math equations (LaTeX)
- [ ] Image paste support
- [ ] Full-screen reading mode
- [ ] Support for markdown extensions (strikethrough, task lists, etc.)
- [ ] Auto-save functionality for edited files
- [ ] Split view with source and preview
- [ ] Outline/table of contents sidebar
- [ ] Word count and reading time estimation
### Technical Improvements
- [ ] Add unit tests for markdown parsing
- [ ] Implement proper error handling and user feedback
- [ ] Add app icon and proper branding
- [ ] Optimize performance for large markdown files
- [ ] Add preferences/settings window
- [ ] Implement proper document state management