Commit graph

102 commits

Author SHA1 Message Date
boojack
a6024eebf1
perf: lazy load heavy first-screen dependencies (#5947) 2026-05-12 20:11:39 +08:00
boojack
c268551a16
feat(memos): choose created or updated time for memos (#5894) 2026-04-26 11:50:26 +08:00
Steven
c0d6224155 chore: enable compact mode for list view 2026-01-22 22:52:14 +08:00
Johnny
0735c11d75 feat: implement memo map in user profile 2025-12-30 20:41:44 +08:00
Johnny
f87f728b0f
feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
Steven
be7ef74698 fix: eliminate duplicate API requests by deduplicating user fetch calls
- Add request deduplication to getOrFetchUser using RequestDeduplicator
- Consolidates multiple simultaneous calls for same user into single API request
- Prevents duplicate 401 errors and wasted network traffic
- Matches pattern already used by fetchUsers and fetchUserStats
- Remove backwards compatibility aliases (getOrFetchUserByName, getOrFetchUserByUsername)
- Update all call sites to use canonical getOrFetchUser method

Fixes issue where PagedMemoList, useMemoViewState, MainLayout, and UserProfile
were making duplicate user fetch requests when loading user data.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-22 20:12:44 +08:00
Johnny
edd3ced9bf
refactor: migrate to connect-rpc (#5338) 2025-12-11 19:49:07 +08:00
Steven
8f0658e90d feat(web): enhance inbox notifications and user profile layouts
- Polish inbox notification items with improved visual hierarchy
  - Add original memo snippet with left border indicator
  - Redesign comment preview with gradient background and primary accent
  - Increase spacing and improve typography with consistent sizing
  - Add ring borders to avatars and refined icon badges
  - Enhance loading and error states with better skeleton designs
  - Improve hover states and transitions throughout

- Redesign user profile header layout
  - Create full-width centered header with avatar and user info
  - Add horizontal layout for profile actions
  - Improve responsive design with proper flex wrapping
  - Allow memo list to use full width for masonry layout

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 08:41:30 +08:00
Steven
1d7efb1580 refactor(web): unify memo stats/filters with context-aware MainLayout
Create unified architecture for memo statistics, filters, and sorting
across all pages (Home, Explore, Archived, Profile) with proper
visibility filtering and consistent data flow.

Key changes:
- Rename HomeLayout → MainLayout to reflect broader usage
- Create useFilteredMemoStats hook for unified stats computation
- Create useMemoFilters/useMemoSorting hooks to eliminate duplication
- Refactor all pages to use unified hooks (~147 lines removed)
- Move Explore route under MainLayout (was sibling before)
- Fix masonry column calculation threshold (1024px → 688px+)

Architecture improvements:
- MainLayout computes filter/stats per route context
- Stats/tags based on same filter as memo list (consistency)
- Proper visibility filtering (PUBLIC/PROTECTED) on Explore
- MemoExplorer/StatisticsView accept stats as required props
- Eliminated optional fallbacks and redundant data fetching

Benefits:
- Single source of truth for stats computation
- Stats remain static (don't change with user filters)
- Reduced code duplication across 4 pages
- Better maintainability and type safety
- Proper security (no private memo leakage on Explore)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 08:46:52 +08:00
Steven
e915e3a46b refactor(web): refactor MemoFilters component and add comprehensive filter support
- Refactored MemoFilters.tsx for better maintainability:
  * Centralized filter configuration with FILTER_CONFIGS object
  * Added TypeScript interfaces for type safety
  * Removed separate FactorIcon component
  * Extracted handleRemoveFilter function
  * Improved imports organization

- Polished MemoFilters UI styles:
  * Changed to modern pill/badge design with rounded-full
  * Enhanced spacing and color schemes
  * Added smooth transitions and hover effects
  * Improved interactive remove button with destructive color hints
  * Better text readability with font-medium

- Added comprehensive filter support to all pages:
  * Explore page: Added full filter support (was missing)
  * Archived page: Enhanced from basic to full filter support
  * UserProfile page: Enhanced from basic to full filter support
  * All pages now support: content search, tag search, pinned, hasLink, hasTaskList, hasCode, and displayTime filters

- Consistency improvements:
  * All pages using PagedMemoList now have identical filter logic
  * Respects workspace settings for display time (created/updated)
  * Unified filter behavior across Home, Explore, Archived, and UserProfile pages
2025-10-30 22:52:58 +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
b4ea7d843f feat: enhance memo sorting functionality to support multiple fields 2025-10-20 23:41:58 +08:00
Steven
435cc7b177 feat: implement masonry layout with responsive columns and memo height tracking 2025-10-14 19:46:09 +08:00
johnnyjoy
db63b1949a chore: fix creator id format 2025-07-23 22:18:47 +08:00
johnnyjoy
ed23cbc011 refactor: memo filter 2025-07-23 22:10:16 +08:00
johnnyjoy
6e45e9f8b6 refactor: deprecate old filter 2025-07-22 21:25:57 +08:00
johnnyjoy
7481fe10bf chore: remove order by pinned 2025-07-21 21:45:10 +08:00
Johnny
f907619752 chore: move frontend store 2025-07-07 22:44:08 +08:00
Johnny
db4b1f5fde chore: tweak styles 2025-07-05 11:26:59 +08:00
Johnny
91be2f68d1
feat: variant colors (#4816) 2025-07-04 23:03:13 +08:00
Johnny
493832aeb4 refactor: unify components 2025-07-01 19:29:48 +08:00
Steven
9972a77d9e refactor: memo service 2025-06-18 19:58:38 +08:00
Steven
c9ab03e1a0 refactor: user service 2025-06-16 21:49:38 +08:00
Johnny
f5c64849d2 chore: upgrade tailwindcss to v4 2025-06-07 10:15:12 +08:00
Steven
c23aebd648 refactor: memo filter store 2025-05-27 21:14:18 +08:00
Johnny
34ab88348e chore: sort by pinned 2025-03-13 19:57:12 +08:00
Johnny
fc5962f6a4 feat: show pinned count 2025-03-12 23:33:51 +08:00
Johnny
7123a2cf51 chore: remove sort by pinned 2025-03-10 21:32:17 +08:00
Johnny
56ad8ab3bd refactor: view store 2025-03-06 21:38:54 +08:00
Johnny
d6be20b917 feat: implement masonry view 2025-03-02 23:27:12 +08:00
Johnny
012405f7fd refactor: user stats state 2025-02-26 22:58:22 +08:00
Johnny
8e4e745ba9 chore: update navigation 2025-02-25 23:13:48 +08:00
johnnyjoy
7a685d6435 fix: fetch user by username 2025-02-20 20:43:28 +08:00
Johnny
7a57b5c6e7 refactor: user store 2025-02-11 21:29:16 +08:00
johnnyjoy
be5e24c0eb refactor: renovate list memos endpoint 2025-02-02 18:43:26 +08:00
johnnyjoy
57014e392f feat: get user by username 2025-02-01 18:00:22 +08:00
johnnyjoy
2a861ea430 refactor: tweak resource state in api 2025-01-10 22:20:23 +08:00
Steven
963706aebd refactor: update button source 2024-10-26 21:36:05 +08:00
johnnyjoy
04d6329d0f feat: use hash router to sub-setting pages 2024-10-19 20:46:57 +08:00
johnnyjoy
339c38750f refactor: paged memo list container 2024-09-22 19:30:39 +08:00
Michel Heusschen
2dbf92f7f1
perf: reduce bundle size by 21% with direct icon imports (#3844) 2024-08-28 22:55:28 +08:00
Steven
9a27fdf855 chore: tweak load more button 2024-08-12 23:52:23 +08:00
Steven
158745704e feat: add memo display setting menu 2024-08-03 01:22:40 +08:00
Steven
26fa172641 chore(frontend): add order by time asc 2024-07-31 23:51:20 +08:00
Steven
a50f3b9382 chore: fix memos sorting 2024-07-27 22:15:47 +08:00
Steven
b9006f8ce0 chore: tweak date utils 2024-07-27 17:21:22 +08:00
Steven
edc3b578d6 feat: implement search multi tags 2024-07-26 08:40:40 +08:00
Steven
cd38ec93ed feat: implement memo filters 2024-07-26 00:46:48 +08:00
Steven
b3b4aa9ddb chore: remove unused code 2024-07-24 23:53:07 +08:00
Steven
076aa2f8aa chore: remove memo filter 2024-06-05 23:18:14 +08:00