UserList now uses useInfiniteQuery with offset pagination (20 per page) and an IntersectionObserver scroll sentinel for infinite scroll. Users sorted by username. Follows same pattern as Feed/UserFeed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
1.3 KiB
Markdown
29 lines
1.3 KiB
Markdown
# Fix Plan
|
|
|
|
## Completed
|
|
|
|
- [x] `tweet_like` tests: `user_fixture` missing `authorize?: false`, `Ash.Query.filter` needed `require Ash.Query`, `Ash.ForbiddenField.forbidden?/1` doesn't exist (use `match?`), `like` noop returned stale tweet struct → fixed all
|
|
|
|
## In Progress / Next
|
|
|
|
- [x] `unlike` noop returns stale tweet struct — same issue as `like` noop; reload from DB
|
|
- [x] `decrement_likes` can go below 0 — use `GREATEST(likes - 1, 0)` via SQL fragment
|
|
|
|
## Backlog
|
|
|
|
- [x] Self-follow validation used `get_attribute(:follower_id)` which is nil at validation time (relate_actor runs after) — fixed to use `context.actor.id`
|
|
- [x] Follow/unfollow test coverage (9 tests)
|
|
- [x] User list pagination — useInfiniteQuery + scroll sentinel, USERS_PAGE_SIZE=20, sorted by username
|
|
- [ ] No CHECK constraint on `likes >= 0` at DB level (low priority, app logic prevents it)
|
|
- [ ] `read :following_feed` — nil actor returns empty list (not a bug)
|
|
- [ ] No search for users or tweets
|
|
- [x] Tweet creation, update, delete, comment tests (13 tests)
|
|
- [ ] Missing test coverage: auth flows
|
|
|
|
## Notes
|
|
|
|
- Stack: Elixir/Phoenix + Ash Framework + React/TypeScript
|
|
- Tests: `mix test` — 10 tests, all should pass
|
|
- Build: `mix precommit` alias runs compile + test + format checks
|
|
- No ClickHouse in test env (expected, non-fatal errors in test output)
|