Commit Graph

73 Commits

Author SHA1 Message Date
4b1e7565ac feat(bootstrap): wire ApiKeyServiceImpl + PgEngagementRepository 2026-05-16 11:21:19 +02:00
5618da7d37 refactor(presentation): replace impl FromAppState boilerplate with deps_struct! macro in remaining handlers 2026-05-16 11:19:04 +02:00
e9f7851400 refactor(presentation/feed): call ports directly — remove shallow use case wrappers 2026-05-16 11:16:57 +02:00
d701a40e61 feat(presentation/thoughts): use enrichment use cases — real engagement stats, no hardcoded zeros 2026-05-16 11:16:54 +02:00
eea1d3fe24 feat(presentation): add deps_struct! macro; add api_key_auth + engagement to AppState; use ApiKeyService in extractor 2026-05-16 11:10:45 +02:00
ca35e8e774 feat(domain): add DomainError::UniqueViolation {field} 2026-05-16 10:55:58 +02:00
98e96b306a fix(postgres): accept_note returns ThoughtId via SELECT after INSERT 2026-05-16 02:48:52 +02:00
29e4af26d8 fix(api): top-friends endpoint returns full UserResponse — eliminates frontend N+1 2026-05-16 02:08:22 +02:00
0592861edd refactor: 5 architectural improvements (Tasks 2-5 + Task 6 fix)
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 5m2s
test / unit (pull_request) Successful in 16m19s
test / integration (pull_request) Failing after 17m15s
- feat(domain): Hashtag value object with canonical extract() — unifies two
  divergent private implementations; fields pre-compute raw/normalized/url_slug/ap_name

- feat(presentation): Deps<S: FromAppState> extractor — each handler now
  declares its exact dependency surface; AppState unchanged; handlers
  become unit-testable without mocking all 20 deps

- refactor(feed): replace 5 flat FeedRepository methods with FeedQuery/FeedScope
  — single query() method; SQL shared logic lives once; adding feed types
  no longer requires 5 edits

- refactor(activitypub): ActivityPubRepository + OutboundFederationPort moved
  out of domain::ports into activitypub-base::ap_ports — domain crate no
  longer knows about AP IDs, inboxes, or actor URLs

- fix(outbox): OutboxRelay now opens a per-row transaction so FOR UPDATE
  SKIP LOCKED actually holds the lock during publish + mark_delivered
2026-05-15 18:54:20 +02:00
6024a65060 feat(infra): transactional outbox — OutboxWriter port, PgOutboxWriter, OutboxRelay, TestOutbox; update create_thought + delete_thought 2026-05-15 18:31:57 +02:00
fd9e526b81 fix(search): use to_thought_response in search handler — was returning snake_case partial data
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m24s
test / unit (pull_request) Successful in 16m42s
test / integration (pull_request) Failing after 17m1s
2026-05-15 15:44:59 +02:00
48b57abf92 refactor(adapters): update FeedEntry construction to use EngagementStats + ViewerContext 2026-05-15 15:21:48 +02:00
1a77e15d70 refactor(application): remove pass-through search use cases — call SearchPort directly 2026-05-15 13:59:30 +02:00
a902154777 refactor(domain): remove FetchRemoteActorPosts/FetchActorConnections from DomainEvent; add FederationSchedulerPort 2026-05-15 13:28:19 +02:00
e935c8973e refactor(domain): remove ap_id/inbox_url from User and Thought; use ActivityPubRepository lookups 2026-05-15 13:21:21 +02:00
314dad5451 Refactor database error handling across repositories to use IntoDbResult for improved error management
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m30s
test / unit (pull_request) Successful in 16m10s
test / integration (pull_request) Failing after 16m44s
- Updated PgNotificationRepository to utilize IntoDbResult for error handling in various methods.
- Refactored PgRemoteActorRepository to replace manual error mapping with IntoDbResult.
- Modified PgRemoteActorConnectionRepository to implement IntoDbResult for error handling.
- Adjusted PgTagRepository to use IntoDbResult for consistent error management.
- Introduced test_helpers module for seeding users and thoughts in tests.
- Enhanced PgThoughtRepository to leverage IntoDbResult for error handling.
- Updated PgTopFriendRepository to utilize IntoDbResult for error management.
- Refactored PgUserRepository to implement IntoDbResult for error handling.
- Added constants for pagination defaults in requests.
- Introduced MAX_TOP_FRIENDS constant for top friends validation.
- Refactored JWT expiration time to use a constant.
- Improved rate limiter configuration with constants for better readability.
- Added utility methods for FollowState and Visibility enums for string conversions.
- Introduced maximum length constants for Username, Email, and Content value objects.
- Cleaned up test modules by removing redundant code and utilizing a shared testing state.
2026-05-15 12:31:25 +02:00
6273635aeb feat: implement unread notification count and enhance user listing with pagination
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m33s
test / unit (pull_request) Successful in 16m24s
test / integration (pull_request) Failing after 16m52s
2026-05-15 12:04:00 +02:00
f946239757 feat(api): expose replyToUrl in ThoughtResponse for remote reply context 2026-05-15 05:50:59 +02:00
ca1ebc4b68 feat(ap): broadcast Update(Actor) when user updates their profile 2026-05-15 05:32:25 +02:00
a8fbfcf49e feat(presentation): federation management endpoints 2026-05-15 04:10:36 +02:00
706d7389ed refactor: replace inline find_by_id calls with get_user use case in presentation handlers 2026-05-15 03:14:09 +02:00
6e9b1596d8 refactor: move UUID/username routing to application use case — fix handler boundary leak 2026-05-15 03:12:52 +02:00
bbf6c97379 fix: UUID fallback in GET /users/{id} so AP actor URLs resolve for signature verification 2026-05-15 03:11:33 +02:00
031a22514d feat: implement remote unfollow — wire FederationActionPort through delete_follow handler 2026-05-15 02:46:24 +02:00
9757ebdabf refactor(application): move local/remote follow routing out of presentation handler 2026-05-15 01:58:40 +02:00
344bcf34af refactor(domain): move DB string conversions out of domain enums 2026-05-15 01:54:32 +02:00
c536cc2cd4 feat(presentation): followers/following list endpoints for remote actors 2026-05-15 00:48:42 +02:00
8b3dfffd3b feat: followers/following links on remote profile; render remote post content as HTML
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m39s
test / unit (pull_request) Failing after 10m48s
test / integration (pull_request) Failing after 16m54s
2026-05-15 00:04:54 +02:00
7bbc702e85 debug: add INFO logging to ensure_stream and remote_actor_posts_handler
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m42s
test / unit (pull_request) Failing after 10m52s
test / integration (pull_request) Failing after 17m20s
2026-05-14 22:59:12 +02:00
f3c3637ade feat(presentation): remote actor posts endpoint + extended RemoteActorResponse 2026-05-14 22:19:23 +02:00
00b369c6ad feat(bootstrap): add ap_repo to AppState 2026-05-14 22:16:20 +02:00
908789e639 fix: content negotiation for followers/following — resolve AP router conflict
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m28s
test / unit (pull_request) Failing after 11m39s
test / integration (pull_request) Failing after 17m5s
2026-05-14 21:42:38 +02:00
e64404cf40 refactor(routes): clean RESTful route table; content negotiation at /users/{username} 2026-05-14 21:31:02 +02:00
fbc02bc2f8 refactor(social): unified follow handler; remove federation handler module 2026-05-14 21:28:33 +02:00
d1f72c8308 refactor(users): content negotiation at GET /users/{username}; move lookup_handler; rename get_me_following 2026-05-14 21:25:49 +02:00
abc5f2b936 refactor(api): notification state changes use PATCH with JSON body 2026-05-14 21:05:30 +02:00
31487882e0 feat(presentation): /federation/lookup and /federation/follow endpoints 2026-05-14 20:06:55 +02:00
a08bb3d698 feat(bootstrap): wire ActivityPubService as FederationActionPort in AppState 2026-05-14 20:03:49 +02:00
82f8772104 feat(domain): FederationActionPort trait + avatar_url on RemoteActor 2026-05-14 19:55:10 +02:00
171cfe4373 fix: follow/block handlers accept username string — was parsing as UUID
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m38s
test / unit (pull_request) Successful in 16m13s
test / integration (pull_request) Failing after 17m31s
2026-05-14 18:03:16 +02:00
24bfda8458 feat: extract and save hashtags on thought creation
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m18s
test / unit (pull_request) Successful in 16m4s
test / integration (pull_request) Failing after 17m16s
2026-05-14 18:01:07 +02:00
c67371231e fix(thoughts): thought_to_json uses camelCase — POST/GET responses now match ThoughtSchema
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m33s
test / unit (pull_request) Successful in 16m22s
test / integration (pull_request) Failing after 17m18s
2026-05-14 17:49:22 +02:00
8ef3a300bc fix(users): return camelCase from GET /users list — UserSummary was snake_case
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m34s
test / unit (pull_request) Successful in 16m5s
test / integration (pull_request) Failing after 18m6s
2026-05-14 17:44:59 +02:00
ec0e24db8d fix: add GET /users/{username}/profile REST endpoint — AP actor owns /users/{username} 2026-05-14 17:39:19 +02:00
7110f30e16 fix: top-friends returns usernames not UUIDs
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m40s
test / unit (pull_request) Successful in 16m13s
test / integration (pull_request) Failing after 17m12s
2026-05-14 17:08:12 +02:00
aadd876994 feat: camelCase JSON responses, isFollowedByViewer, customCss, GET /users/me/following-list
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m15s
test / unit (pull_request) Successful in 16m3s
test / integration (pull_request) Failing after 17m19s
2026-05-14 17:04:42 +02:00
550865bad4 fix: resolve all clippy warnings — redundant closures, dead code, collapsible_if, needless borrow
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m25s
test / unit (pull_request) Successful in 16m57s
test / integration (pull_request) Failing after 17m29s
2026-05-14 16:33:34 +02:00
10c4a66de5 Refactor handlers and OpenAPI documentation for improved readability and consistency
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 6m49s
test / unit (pull_request) Successful in 16m24s
test / integration (pull_request) Failing after 17m7s
- Reorganized imports in health, notifications, social, thoughts, and users handlers for clarity.
- Updated function signatures in handlers to improve readability by aligning parameters.
- Enhanced JSON response formatting in notifications and thoughts handlers.
- Improved error handling in user-related functions.
- Refactored OpenAPI documentation to maintain consistent formatting and structure.
- Cleaned up unnecessary code and comments across various files.
- Ensured consistent use of `Arc` for shared state in AppState and WorkerHandlers.
2026-05-14 16:28:57 +02:00
d50c13a2db refactor: wrap direct port calls behind use cases — notifications, search, popular_tags
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 5m7s
test / unit (pull_request) Successful in 15m51s
test / integration (pull_request) Failing after 17m3s
2026-05-14 16:13:34 +02:00
004f3cd4d2 fix(arch): move AP router assembly to bootstrap — presentation no longer depends on activitypub-base 2026-05-14 16:09:21 +02:00