fix: add missing CLAUDE.md REST API routes in web server#445
Open
greasematic wants to merge 1 commit intowinfunc:mainfrom
Open
fix: add missing CLAUDE.md REST API routes in web server#445greasematic wants to merge 1 commit intowinfunc:mainfrom
greasematic wants to merge 1 commit intowinfunc:mainfrom
Conversation
When Tauri invoke fails (e.g., paths with spaces/special chars on iCloud Drive), the frontend falls back to REST API mode. The CLAUDE.md endpoints were mapped in apiAdapter.ts but had no corresponding handlers in web_server.rs, causing the fallback to also fail with "Failed to load CLAUDE.md files". Adds three GET route handlers: - /api/claude-md?projectPath=... (find CLAUDE.md files) - /api/claude-md/read?filePath=... (read a CLAUDE.md file) - /api/claude-md/save?filePath=...&content=... (save a CLAUDE.md file) Fixes winfunc#444 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
web_server.rsfor CLAUDE.md file operations that were mapped inapiAdapter.tsbut never implemented server-sideinvoke()fails (e.g., for projects in iCloud Drive paths with spaces/tildes), the frontend silently falls back to REST API mode — but the missing endpoints caused the fallback to also failChanges
src-tauri/src/web_server.rs— 3 new GET handlers + route registrations:GET /api/claude-md?projectPath=...find_claude_md_files_handlerGET /api/claude-md/read?filePath=...read_claude_md_file_handlerGET /api/claude-md/save?filePath=...&content=...save_claude_md_file_handlerThe handlers call the existing
pub async fnfunctions fromcommands::claude(no changes needed there). Follows the same pattern as all other endpoints in the file.Fixes #444
Test plan
cargo checkpasses (CI will verify)🤖 Generated with Claude Code