Commit graph

622 commits

Author SHA1 Message Date
Steven
d1b2c0308b chore: add demo user access token for testing purposes 2025-11-11 08:31:05 +08:00
boojack
21d31e3609
fix(security): implement security review recommendations (#5228)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-06 23:32:27 +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
Steven
5e47f25bf5 feat(store): add hierarchical tag filtering support
Tag filters now support hierarchical matching where searching for a tag (e.g., "book") will match both the exact tag and any tags with that prefix (e.g., "book/fiction", "book/non-fiction"). This applies across all database backends (SQLite, MySQL, PostgreSQL) with corresponding test updates.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 00:21:53 +08:00
Steven
f635d85bcf chore: fix reactions seed data
- Add comprehensive inline documentation for auth services
- Document session-based and token-based authentication flows
- Clarify authentication priority and validation logic
- Add detailed comments for JWT token structure and claims
- Fix reactions seed data to use memo UIDs instead of numeric IDs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 20:27:27 +08:00
Claude
f241b590a2 chore: update demo data 2025-10-27 09:20:26 +08:00
Steven
e0b1153269 fix(web): resolve MobX observable reactivity issue in filter computation
Fixes filtering functionality that was broken due to improper use of
useMemo with MobX observables. The issue occurred because useMemo's
dependency array uses reference equality, but MobX observable arrays
are mutated in place (reference doesn't change when items are added/removed).

Changes:
- Remove useMemo from filter computation in Home, UserProfile, and Archived pages
- Calculate filters directly in render since components are already MobX observers
- Fix typo: memoFitler -> memoFilter in Archived.tsx

This ensures filters are recalculated whenever memoFilterStore.filters changes,
making tag clicks and other filter interactions work correctly.

Fixes #5189

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 06:59:13 +08:00
Steven
46ce0bc62e fix(store): correct PostgreSQL placeholder generation in IN clauses
Fixes a regression introduced in v0.25.2 where PostgreSQL IN clause
placeholders were not properly incremented, causing all parameters to
use the same placeholder index (e.g., $1, $1, $1 instead of $1, $2, $3).

This bug affected:
- ListReactions (ContentIDList) - caused "failed to list reactions" errors
- ListAttachments (MemoIDList)
- ListMemos (IDList and UIDList)

The fix combines placeholder generation and argument appending into a
single loop to ensure proper incrementing.

Fixes #5188

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 06:47:06 +08:00
Claude
e35f16306e feat: add id as final tie-breaker in ListMemos 2025-10-23 19:44:41 +08:00
Steven
2d4361d5fe chore: update memo content formatting and enhance link styling 2025-10-22 08:50:09 +08:00
Steven
d8f7a4e739 chore: tweak demo data 2025-10-21 23:41:46 +08:00
Steven
b19e736f10 chore: tweak demo data 2025-10-20 23:58:49 +08:00
Steven
b4ea7d843f feat: enhance memo sorting functionality to support multiple fields 2025-10-20 23:41:58 +08:00
Steven
95de5cc700 refactor: update migration history methods 2025-10-20 23:05:50 +08:00
Johnny
bc7decf642 refactor: remove unused constants 2025-10-16 20:40:46 +08:00
Copilot
b685ffacdf refactor: memo filter
- Updated memo and reaction filtering logic to use a unified engine for compiling filter expressions into SQL statements.
- Removed redundant filter parsing and conversion code from ListMemoRelations, ListReactions, and ListAttachments methods.
- Introduced IDList and UIDList fields in FindMemo and FindReaction structs to support filtering by multiple IDs.
- Removed old filter test files for reactions and attachments, as the filtering logic has been centralized.
- Updated tests for memo filtering to reflect the new SQL statement compilation approach.
- Ensured that unsupported user filters return an error in ListUsers method.
2025-10-16 09:22:52 +08:00
Steven
c3d4f8e9d1 feat: implement user-specific SQL converter for filtering in user service 2025-09-10 21:05:26 +08:00
Johnny
7cc2df9254 chore: fix linter 2025-08-31 20:22:32 +08:00
varsnotwars
4eb5b67baf
feat: attachments by id (#5008) 2025-08-15 22:02:29 +08:00
varsnotwars
f4bdfa28a0
feat: filter/method for reactions by content_id (#4969) 2025-08-08 00:00:51 +08:00
Colin Holzman
8319516d1a
fix: boolean filters (#4966) 2025-08-06 21:06:15 +08:00
johnnyjoy
506b477d50 fix: get user by username 2025-08-04 19:56:12 +08:00
varsnotwars
fa2fa8a5d7
refactor: remove call to db for parent memo name (#4947) 2025-08-04 19:39:52 +08:00
johnnyjoy
34fb3f1514 chore: fix linter 2025-08-03 19:55:04 +08:00
Colin Holzman
aae7ec8d1f
fix: calendar filter (#4942) 2025-08-03 19:11:09 +08:00
Maximilian Krauß
4d6042e35f
fix(tags): ensure JSON array elements are properly formatted in SQL queries (#4944) 2025-08-03 19:10:59 +08:00
Andrea Marchetta
71464779dd
fix: change itemCount into an Int64 (#4945) 2025-08-03 19:07:17 +08:00
johnnyjoy
ed23cbc011 refactor: memo filter 2025-07-23 22:10:16 +08:00
Steven
1a75d19a89 fix: memo filter for sqlite 2025-07-22 23:39:52 +08:00
johnnyjoy
7098721617 chore: fix linter 2025-07-22 21:15:23 +08:00
johnnyjoy
e24f92b719 fix: tests 2025-07-22 21:13:24 +08:00
johnnyjoy
b55904a428 feat: support more filter factors 2025-07-22 19:18:08 +08:00
johnnyjoy
6d9770b9c8 chore: move filter to filters 2025-07-21 21:52:00 +08:00
johnnyjoy
7481fe10bf chore: remove order by pinned 2025-07-21 21:45:10 +08:00
Johnny
40130350c5 fix: args offset for postgres 2025-07-17 00:05:07 +08:00
Steven
834f92f67c chore: fix linter 2025-07-16 22:24:50 +08:00
Steven
0398df1d21 chore: update migrator comments 2025-07-16 21:59:37 +08:00
Johnny
3e24f8cf62
fix: seed data 2025-06-25 10:07:24 +08:00
Steven
42d1650c6d chore: tweak auth service 2025-06-24 23:31:37 +08:00
Steven
6e1b01cb68 chore: bump version 2025-06-24 23:06:57 +08:00
johnnyjoy
d6a75bba4c refactor: webhook service 2025-06-24 21:28:21 +08:00
jinjingroad
03399a6007
refactor: use the built-in max/min to simplify the code (#4781)
Signed-off-by: jinjingroad <jinjingroad@sina.com>
2025-06-24 07:12:02 +08:00
Johnny
e6e460493c refactor: general user setting 2025-06-23 23:23:57 +08:00
Johnny
9b15936873 refactor: clean unused fields 2025-06-23 22:55:14 +08:00
Johnny
778a5eb184 refactor: memo filter 2025-06-23 22:38:44 +08:00
Johnny
77b7fc4441 feat: implement user session 2025-06-22 12:46:13 +08:00
Steven
9972a77d9e refactor: memo service 2025-06-18 19:58:38 +08:00
Steven
a4920d464b refactor: attachment service part2 2025-06-18 00:09:19 +08:00
Steven
8e8e246ab2 chore: add server tests 2025-06-17 00:29:42 +08:00