memos/web/src
Steven 06a0f8d618 fix(web): convert visibility enum values to string names in filter expressions
Problem:
The Explore page filter was sending visibility filter as:
  visibility in ["3", "2"]
when it should send:
  visibility in ["PUBLIC", "PROTECTED"]

The backend CEL filter parser expects string enum names, not numeric values.
This caused the Explore page to return no memos even when public memos existed.

Solution:
- Added getVisibilityName() helper to convert Visibility enum values to string names
- Updated useMemoFilters to use getVisibilityName() when building visibility filter
- Follows same pattern as existing getInstanceSettingKeyName() and getUserSettingKeyName()
- Added validation to warn on invalid enum values

Files changed:
- web/src/store/common.ts: Add getVisibilityName() helper with validation
- web/src/hooks/useMemoFilters.ts: Use getVisibilityName() in visibility filter

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 08:03:25 +08:00
..
components fix(web): convert enum values to string names in API resource paths 2025-12-11 20:08:11 +08:00
helpers chore: streamline MemoEditor components and remove unused code 2025-11-30 12:30:00 +08:00
hooks fix(web): convert visibility enum values to string names in filter expressions 2025-12-12 08:03:25 +08:00
layouts fix(web): resolve tag sidebar filtering and reactivity issues 2025-11-25 22:17:01 +08:00
lib chore(web): migrate from ESLint+Prettier to Biome 2025-11-14 23:58:07 +08:00
locales chore: add 'all' translation to zh-Hans and zh-Hant (#5333) 2025-12-11 07:53:20 +08:00
pages refactor: migrate to connect-rpc (#5338) 2025-12-11 19:49:07 +08:00
router chore(web): migrate from ESLint+Prettier to Biome 2025-11-14 23:58:07 +08:00
store fix(web): convert visibility enum values to string names in filter expressions 2025-12-12 08:03:25 +08:00
themes fix(theme): improve text contrast in default dark mode (#5323) 2025-12-11 07:53:02 +08:00
types refactor: migrate to connect-rpc (#5338) 2025-12-11 19:49:07 +08:00
utils refactor: migrate to connect-rpc (#5338) 2025-12-11 19:49:07 +08:00
App.tsx refactor(web): improve locale/theme preference initialization 2025-12-11 07:59:52 +08:00
grpcweb.ts refactor: migrate to connect-rpc (#5338) 2025-12-11 19:49:07 +08:00
i18n.ts feat: add norwegian bokmål (nb) translation (#4561) 2025-03-27 13:14:12 +08:00
index.css fix(web): refactor task list styles to follow GitHub standard (#5253) 2025-11-14 23:37:00 +08:00
main.tsx refactor(web): improve locale/theme preference initialization 2025-12-11 07:59:52 +08:00