Skip to content

fix(memory): prefix memory routes with /api/v1 and add image preview#42

Merged
enkizan merged 1 commit into
mainfrom
fix/memory-page
May 20, 2026
Merged

fix(memory): prefix memory routes with /api/v1 and add image preview#42
enkizan merged 1 commit into
mainfrom
fix/memory-page

Conversation

@enkizan

@enkizan enkizan commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix memory page 404s by changing MemoryController route from /memory to /api/v1/memory so it matches the web client paths in packages/web/src/lib/api/memory.ts.
  • Add inline image preview in the workspace: new ImagePreview component fetches the file via the workspace download endpoint with Authorization header and a new inline=true query, then renders it from an object URL.
  • WorkspaceController.downloadFile accepts inline query and sets Content-Disposition: inline|attachment accordingly.
  • WorkspaceService.downloadFile resolves Content-Type via an extension → MIME map (e.g. .pngimage/png) instead of generic image/*, so browsers render images correctly.
  • Drop the redundant close button in FullPreviewDialog (Dialog already renders one) and adjust header padding.

Test plan

  • Memory page loads list, read, create, update, delete without 404.
  • In workspace, clicking an image file shows inline preview in side panel and full-preview dialog.
  • Non-image binary files still show the "preview not available" message.
  • Downloading a non-image file still works (attachment disposition).
  • workspace.controller.test.ts passes including new inline=true case.

🤖 Generated with Claude Code

- 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>
@enkizan enkizan merged commit 13325dd into main May 20, 2026
1 check passed
@enkizan enkizan deleted the fix/memory-page branch May 21, 2026 02:30
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.

3 participants