Commit graph

25 commits

Author SHA1 Message Date
Steven
8f29db2f49 fix(server): prevent memory exhaustion in thumbnail generation
Address high memory usage when opening resource tab (fixes #5183) by implementing:

1. Concurrency control: Limit thumbnail generation to 3 concurrent operations using semaphore to prevent memory exhaustion when many images are requested simultaneously

2. S3 optimization: Skip server-side thumbnail generation for S3-stored images by default. S3 images now use presigned URLs directly, avoiding:
   - Downloading large images from S3 into server memory
   - Decoding and resizing images on the server
   - High memory consumption during batch requests

3. Memory management improvements:
   - Explicitly clear blob and decoded image from memory after use
   - Restructure thumbnail cache check to avoid unnecessary semaphore acquisition
   - Double-check pattern to prevent duplicate generation while waiting

This restores the original S3 behavior before commit e4f6345 while maintaining thumbnail support for local/database storage.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 09:04:21 +08:00
Steven
4c1d1c70d1 refactor: rename workspace to instance throughout codebase
Remove work-related terminology by renaming "workspace" to "instance"
across the entire application. This change better reflects that Memos
is a self-hosted tool suitable for personal and non-work use cases.

Breaking Changes:
- API endpoints: /api/v1/workspace/* → /api/v1/instance/*
- gRPC service: WorkspaceService → InstanceService
- Proto types: WorkspaceSetting → InstanceSetting
- Frontend translation keys: workspace-section → instance-section

Backend Changes:
- Renamed proto definitions and regenerated code
- Updated all store layer methods and database drivers
- Renamed service implementations and API handlers
- Updated cache from workspaceSettingCache to instanceSettingCache

Frontend Changes:
- Renamed service client: workspaceServiceClient → instanceServiceClient
- Updated all React components and state management
- Refactored stores: workspace.ts → instance.ts
- Updated all 32 locale translation files

All tests pass and both backend and frontend build successfully.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 23:35:35 +08:00
Steven
bc1550e926 refactor(api): migrate inbox functionality to user notifications
- Remove standalone InboxService and move functionality to UserService
- Rename inbox to user notifications for better API consistency
- Add ListUserNotifications, UpdateUserNotification, DeleteUserNotification methods
- Update frontend components to use new notification endpoints
- Update store layer to support new notification model

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-31 08:33:09 +08:00
Claude
596b894ca0 chore: remove unused syntax
- Removed the wikilink extension from markdown services in test and API service.
- Deleted the DefaultLink and WikiLink components, simplifying link handling.
- Updated ConditionalComponent to remove wikilink checks.
- Adjusted MemoContent to exclude wikilink handling in markdown rendering.
- Refined markdown styles for compact rendering, enhancing readability.
- Added a Markdown Styling Guide to document the new compact styling approach.
2025-10-27 08:31:57 +08:00
Claude
739fd2cde6 refactor: update markdown parser
- Removed the `nodes` field from the `Memo` interface in `memo_service.ts`.
- Updated the `createBaseMemo` function and the `Memo` message functions to reflect the removal of `nodes`.
- Cleaned up the serialization and deserialization logic accordingly.

chore: remove code-inspector-plugin from Vite configuration

- Deleted the `codeInspectorPlugin` from the Vite configuration in `vite.config.mts`.
- Simplified the plugins array to include only `react` and `tailwindcss`.
2025-10-26 11:28:40 +08:00
Liu Chao
3427ae75ba
fix: resolve gRPC Gateway connection issue when server address is empty (#4968)
Signed-off-by: ChaoLiu <chaoliu719@gmail.com>
2025-08-05 19:42:20 +08:00
johnnyjoy
c5d497a1f0 chore: update user settings 2025-07-27 23:12:42 +08:00
Steven
bb5809cae4 refactor: attachment service 2025-06-17 22:15:19 +08:00
Steven
1ea4cc453c refactor: workspace setting service 2025-06-16 22:51:26 +08:00
Steven
f1b365f928 refactor: clean packages 2025-05-29 21:44:43 +08:00
Steven
46be6b0ff6 fix: missing service handler 2025-05-26 23:22:10 +08:00
Sergey Gorbunov
e23ade1f8b
feat: support listening on a UNIX socket (#4654) 2025-05-07 22:12:05 +08:00
Amir Ehsandar
e75ef0964d
feat: implement grpc health service checking database connection (#4499) 2025-03-14 08:43:01 +08:00
Steven
69ad5178b3 chore: update MaxCallRecvMsgSize 2024-09-29 22:00:15 +08:00
Ryo
a09c669865
fix: allow cors for grpc gateway handler (#3574) 2024-06-21 18:13:59 +08:00
Steven
b5d2ff6e28 chore: fix linter 2024-05-21 00:08:57 +08:00
Steven
811c0757c4 chore: fix linter 2024-05-21 00:03:30 +08:00
Lincoln Nogueira
f45f673aec
chore: respect supplied listening address (#3338) 2024-05-11 06:50:22 +08:00
Steven
942052b1ea chore: update grpc options 2024-05-09 20:08:18 +08:00
Steven
d0655ece53 refactor: update memo tags 2024-05-08 20:03:01 +08:00
Steven
2c270438ec chore: update default service config 2024-05-08 06:57:53 +08:00
Steven
05f73a2236 chore: tweak linter 2024-05-02 21:46:47 +08:00
Steven
26545c855c refactor: implement s3 storage 2024-05-02 21:28:06 +08:00
Steven
144269fbbc chore: fix router 2024-05-01 12:44:18 +08:00
Steven
20dd3e17f7 chore: rename router package 2024-05-01 10:28:32 +08:00
Renamed from server/route/api/v1/v1.go (Browse further)