memos/web
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
..
public chore: enhance site.webmanifest in firefox (#4828) 2025-07-08 19:56:46 +08:00
src fix(web): convert visibility enum values to string names in filter expressions 2025-12-12 08:03:25 +08:00
.gitignore chore: update gitignore 2025-04-17 23:11:36 +08:00
biome.json chore(web): migrate from ESLint+Prettier to Biome 2025-11-14 23:58:07 +08:00
components.json feat: themes (#4824) 2025-07-07 20:13:22 +08:00
index.html chore: remove fixed theme color 2025-07-15 23:26:07 +08:00
package.json refactor: migrate to connect-rpc (#5338) 2025-12-11 19:49:07 +08:00
pnpm-lock.yaml refactor: migrate to connect-rpc (#5338) 2025-12-11 19:49:07 +08:00
tsconfig.json refactor: update import prefix with alias (#1433) 2023-04-01 16:03:14 +08:00
vite.config.mts refactor(web): improve MemoContent security and maintainability 2025-12-02 22:45:22 +08:00