Commit Graph

56 Commits

Author SHA1 Message Date
00af2350f4 some ralph changes that i tried i guess 2026-04-12 21:37:18 -04:00
df013731be feat: add user list pagination
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>
2026-04-12 20:00:59 -04:00
c3ccab5fc5 test: add tweet creation + comment tests (13 tests)
Covers: create, blank content validation, guest restriction, read,
owner edit, non-owner edit forbidden, owner delete, non-owner delete
forbidden, reply creation, comment_count aggregate, tweet owner
deletes comment, third party forbidden, guest comment forbidden.

Key learnings:
- Tweet :destroy is not primary; use Ash.Changeset.for_destroy(:destroy)
- relate_actor fails with Invalid (not Forbidden) when no actor
- Ash.get returns NotFound error on miss; pass not_found_error?: false for nil

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 19:57:35 -04:00
d7345ba234 fix: self-follow validation + add follow/unfollow tests
Self-follow check used get_attribute(:follower_id) which is nil at
validation time because relate_actor runs after validations in Ash.
Fixed to use context.actor.id directly.

Added 9 tests covering: follow, follow idempotency, self-follow
prevention, guest restriction, unfollow, unfollow noop,
guest unfollow, follower/following counts, and am_i_following.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 19:54:43 -04:00
df8bc97bd2 fix: unlike noop stale struct + likes floor at 0
- unlike noop now reloads tweet from DB (same fix as like noop from prev loop)
- decrement_likes uses GREATEST(likes - 1, 0) to prevent negative counts
- add fix_plan.md to track remaining work

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 19:51:56 -04:00
4c67f38fa3 fix: make tweet_like tests pass
- Add authorize?: false to user_fixture so register_with_password
  bypasses policy check in test context
- Add require Ash.Query so Ash.Query.filter macro works in count_likes
- Replace nonexistent Ash.ForbiddenField.forbidden?/1 with match?/2
- Fix stale tweet struct in :like noop case by reloading from DB

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 19:48:23 -04:00
88e84fcec5 fixed ts compile warnings 2026-04-12 19:19:42 -04:00
7c34323ff4 Merge branch 'dev' 2026-04-10 19:34:35 -04:00
0e4e46824c claude refactor of index.tsx so its humanly editable 2026-04-10 19:33:56 -04:00
56a4ee6c77 Updated README 2026-04-09 18:15:46 -04:00
d194834110 claude fix for making the avatars properly get re-fetched if they are newer than the old avatars 2026-04-09 17:44:13 -04:00
2130d85be5 claude generated code for adding tweet viewership to users pages 2026-04-09 17:10:05 -04:00
f37d554399 fixed auth userflow 2026-04-09 15:24:26 -04:00
2d5914c970 some not working changes trying to fix user login to include a username 2026-04-08 04:34:16 -04:00
31a8f03ab2 gemini fixed it but its ux does not work and lowkey idc 2026-04-08 02:27:52 -04:00
90d7eab7d0 some ai generated code from claude that does not work 2026-04-08 02:03:43 -04:00
3c9910a723 Working metrics for all forms of interactions and updated .env.example 2026-04-07 00:09:10 -04:00
76a8acc731 Adjusted to properly type each of the database interactions 2026-04-06 23:31:17 -04:00
a33ec14c5f Integrating clickhouse for metrics. 2026-04-06 23:05:04 -04:00
109ef398ee paginating comments and letting tweet authors delete comments on their post 2026-04-06 14:15:36 -04:00
faa96d88f5 added comments to tweets 2026-04-06 14:11:10 -04:00
6927f6eb9b Login with password now requires email to be confirmed 2026-04-06 13:18:00 -04:00
cc6586587f Added some meta tags for "SEO" (fake ass concept for this) but hopefully works for embeds 2026-04-05 15:19:47 -04:00
315b108fa1 Added page titles and proper favicon 2026-04-05 15:15:07 -04:00
4ec41ad4b3 Added /profile to see your profile 2026-04-05 14:50:50 -04:00
4b36131183 Added following page to see posts from yourself and people you follow 2026-04-05 14:41:29 -04:00
8077e570f4 changed feed page to paginate requests 2026-04-05 14:32:51 -04:00
33c83e188e fixed mobile ui and ux 2026-04-04 13:02:10 -04:00
193ff815a1 Mobile nav and drafting setup 2026-04-04 12:38:40 -04:00
1ed136e637 fixed tweet time display to show when the tweet was actually posted 2026-04-04 12:29:54 -04:00
bd0f5d52c2 fixing auth login flow and making custom login flow 2026-04-03 19:54:18 -04:00
874fec835d some reformatting and adjusting so logged in users get moved directly to their feed 2026-04-03 19:40:17 -04:00
a926733f1b adding this to prevent a warning on startup of the app 2026-04-03 19:12:52 -04:00
a70ea18e56 added .env support for a systemd EnvironmentFile with an example and updated email sender 2026-04-03 17:00:38 -04:00
abe10922eb claude fixed up the ui 2026-04-02 21:46:15 -04:00
9c131b98a6 Working follow and unfollow interactions for users 2026-04-02 21:41:27 -04:00
f82bc223bb added right click context menu and did a static deployment test 2026-04-02 03:34:56 -04:00
580265bc51 Added users page and user viewing 2026-04-02 03:28:09 -04:00
0f41e86cf0 Individual tweets are now viewable in their own pages 2026-04-01 12:44:03 -04:00
0ac0b68029 Added timestamps to tweets and they organize by newest on top 2026-04-01 11:58:12 -04:00
ae35600822 Adding .agent support in addition to .claude 2026-04-01 11:29:13 -04:00
1ea0d232a4 moving some environment variables to be aquireable at runtime to generate a mix release 2026-04-01 00:32:16 -04:00
53467cd611 slightly changed how files are stored in the bucket and allows post deletion 2026-03-31 17:12:40 -04:00
1c1830b086 Adding likes to tweets 2026-03-31 15:18:46 -04:00
7e0d7d8888 some basic ui visibility changes 2026-03-31 13:31:32 -04:00
028d83b9cc Had to swap to minio to let it act as a cdn. Working file uploads. 2026-03-31 13:12:11 -04:00
db57ac843b Made file uploads display in drafts 2026-03-30 14:56:24 -04:00
830ee36f84 Working s3 compatible file uplaods! 2026-03-30 14:28:44 -04:00
6152dcdeea ash.codegen for media 2026-03-30 13:34:32 -04:00
63d91043e4 added waffle as the way to interact with s3 buckets 2026-03-30 13:30:01 -04:00