fix(memory): prefix memory routes with /api/v1 and add image preview#42
Merged
Conversation
- Fix memory page 404 by aligning controller route with /api/v1 prefix used by web client - Add inline image preview in workspace via new ImagePreview component and inline=true download mode - Map common file extensions to specific MIME types so served images render correctly - Drop redundant close button in FullPreviewDialog (Dialog already provides one) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cch-gh
approved these changes
May 20, 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.
Summary
MemoryControllerroute from/memoryto/api/v1/memoryso it matches the web client paths inpackages/web/src/lib/api/memory.ts.ImagePreviewcomponent fetches the file via the workspace download endpoint withAuthorizationheader and a newinline=truequery, then renders it from an object URL.WorkspaceController.downloadFileacceptsinlinequery and setsContent-Disposition: inline|attachmentaccordingly.WorkspaceService.downloadFileresolvesContent-Typevia an extension → MIME map (e.g..png→image/png) instead of genericimage/*, so browsers render images correctly.FullPreviewDialog(Dialog already renders one) and adjust header padding.Test plan
workspace.controller.test.tspasses including newinline=truecase.🤖 Generated with Claude Code