dee013c7eb
refactor: remaining MEDIUM — CQRS splits, DI Deps, profile dedup, event Value, response enum
...
M1: MovieRepository→MovieCommand/MovieQuery, WatchEventRepository→
WatchEventCommand/WatchEventQuery
M2: goals/ and import/ use Deps structs
M7: extract upload_image helper in update_profile
M8: FederationDeliveryRequested activity_json String→serde_json::Value
M11: UserProfileResponse uses ProfileViewData enum
2026-07-10 03:50:43 +02:00
12da356a40
refactor: fix HIGH+MEDIUM architectural violations from code review
...
HIGH: fix watch_medium data-loss bug, standardize error handling on
ApiError, fix dep direction (rss/template-askama no longer dep on
application), extract ImageFetcher port (remove reqwest from app layer),
move event construction from save_review to use case, extract
infra-wiring crate (DbPool/EventBusBackend dedup), deduplicate
presentation helpers (encode_error, export streaming, multipart parsing)
MEDIUM: split LocalApContentQuery god-trait 10→3 methods, dedup movie
resolution orchestration, add RemoteActorDto/PersonDto mappers, move
AppConfig to infra-wiring, fix SocialQueryPort Uuid→UserId, replace
stringly-typed api-types with domain enums, move count_reviews_in_year
to StatsRepository, dedup event publisher cfg blocks, extract
should_enrich, move group_by_month to application, dedup
count_local_posts, add FederationFlags Default, TUI input helper +
ShowError rename + typed auth errors, api-types cleanup
(UserSettingsDto/UserProfileBase/PreviewRowData)
102 files changed, -681 lines net
2026-07-10 02:08:39 +02:00
5ae38c834a
making it AP complaint
CI / Check / Test (push) Has been cancelled
2026-06-30 02:25:42 +02:00
9c06fbd33e
refactor
2026-06-29 23:54:59 +02:00
6d4c70553a
fix: remove unused UserFederationSettingsQuery import in worker/db.rs
2026-06-12 02:28:02 +02:00
ca7ca51949
feat: per-entity federation privacy toggles for reviews and watchlist
...
- add federate_reviews + federate_watchlist to UserSettings (default true)
- new UserFederationSettingsQuery port with FederationFlags struct
- remove get_user_federate_goals from LocalApContentQuery
- gate ReviewLogged, ReviewUpdated, WatchlistEntryAdded, on_poster_synced on flags
- goals gating migrated to UserFederationSettingsQuery
- ReviewDeleted and WatchlistEntryRemoved ungated (tombstones always fire)
- sqlite + postgres migrations and adapter impls
- settings API and SPA toggles
2026-06-12 02:26:01 +02:00
57520c00f3
refactor: move AppContext to presentation crate, structurally enforce boundary
CI / Check / Test (push) Successful in 39m33s
2026-06-11 23:18:28 +02:00
9ca5ada924
refactor(auth): LoginDeps, RegisterDeps, RefreshDeps, RegisterAndLoginDeps, RefreshSessionCleanupJob
2026-06-11 22:58:42 +02:00
ddf100cfc2
refactor(wrapup): scoped deps — HandleWrapUpRequestedDeps, flat-Arc jobs
2026-06-11 22:29:30 +02:00
1e62f12903
refactor(movies): EnrichMovieDeps, ReindexSearchDeps, SyncPosterDeps, SearchReindexHandler, EnrichmentStalenessJob
2026-06-11 22:13:25 +02:00
66bd138927
refactor(person): EnrichPersonDeps + GetPersonDeps, PersonEnrichmentHandler
2026-06-11 22:05:38 +02:00
b29f3020e6
refactor(integrations): IngestWatchEventDeps, scoped Arc deps, WatchEventCleanupJob
2026-06-11 22:01:15 +02:00
b5ff43d9dc
refactor(import): scoped Arc deps, ImportSessionCleanupJob
2026-06-11 21:49:15 +02:00
8ac87a3735
refactor: split jobs.rs into per-context modules
2026-06-11 14:44:23 +02:00
55feaa353f
app: refresh/logout use cases, update login with refresh token
2026-06-11 14:35:53 +02:00
3a3f3b3889
db: refresh_sessions migration + SQLite/Postgres adapters
2026-06-11 14:31:46 +02:00
ef9ecbae06
domain: add RefreshSession model + repository port
2026-06-11 14:29:43 +02:00
b09ef4686a
fmt
2026-06-11 14:03:05 +02:00
2074a2244e
refactor: move person enrichment staleness check to application layer
2026-06-11 14:01:44 +02:00
53b7f730cb
refactor: drop EnrichmentHandler alias, use MovieEnrichmentHandler directly
2026-06-11 13:46:30 +02:00
9b932cde8e
feat: wire person enrichment handler, update API DTOs
2026-06-11 13:40:16 +02:00
371a3cdc46
app: person enrichment use case + staleness checks
2026-06-11 13:36:43 +02:00
d867a14b28
add 400+ unit tests for domain and application layers
...
CI / Check / Test (push) Has been cancelled
Extract ReviewLogger trait to decouple import/integrations
from diary::log_review (cross-module coupling smell).
Add in-memory fakes for all repository ports, enabling
isolated testing of every use case module without a database.
Coverage: domain+application 22% → 80%, 427 tests.
2026-06-09 02:07:26 +02:00
30a6200b5b
remove wrapup video rendering (ffmpeg)
...
CI / Check / Test (push) Successful in 15m34s
SPA handles wrapup visuals client-side; server-side
renderer was dead code pulling in ffmpeg + image crates.
2026-06-09 00:36:44 +02:00
fff5f4af2f
feat: goals — "watch N movies in YEAR" with progress bar
...
Domain: Goal entity, UserSettings (federation toggle), RemoteGoalEntry.
Ports: GoalRepository, UserSettingsRepository, RemoteGoalRepository.
Adapters: sqlite + postgres repos, migrations, AP content query extensions.
Application: CRUD use cases (create/update/delete/get/list), settings use cases.
API: 7 endpoints (/goals CRUD, /users/{id}/goals, /settings) with utoipa docs.
Federation: GoalObject (Note + goal discriminator), outbound broadcast with
per-user toggle, inbound GoalObjectHandler in CompositeObjectHandler.
SPA: API client + hooks, GoalCard (shadcn Card+Progress+DropdownMenu),
GoalSheet (Drawer), profile integration (editable own, read-only others),
federation toggle in settings (Switch).
Classic HTML: glassmorphic goal card on profile, Frutiger Aero styling.
Progress computed from existing reviews — backwards compatible.
2026-06-08 22:37:52 +02:00
bd7dc648c4
feat: search reindex, worker improvements, person IDs, user display names
...
- add admin POST /api/v1/admin/reindex-search endpoint + event-driven handler
- backfill persons from movie_cast/movie_crew into persons table
- paginate person list_page/backfill_from_credits_batch to cap memory
- concurrent worker event dispatch with semaphore (max 8)
- graceful worker shutdown (drain in-flight tasks on SIGINT)
- always ack events, log handler errors as warnings (no infinite retry)
- NATS ack_wait 600s, AtomicBool guard against concurrent reindex
- add username/display_name to UserSummaryDto and users list
- add person_id to CastMemberDto/CrewMemberDto via get_movie_profile use case
- add movie_id to wrapup MovieRef, person_id to wrapup PersonStat
- thread tmdb_person_id through wrapup cast pipeline
- add is_federated to FeedEntryDto
- cap orphaned persons query with LIMIT 500
- add SPA link to classic site footer
2026-06-04 14:43:28 +02:00
430fbb21ea
refactor: rename image-storage crate to object-storage
CI / Check / Test (push) Failing after 44s
2026-06-03 01:37:14 +02:00
f262417971
refactor: rename ImageStorage → ObjectStorage
CI / Check / Test (push) Failing after 46s
2026-06-03 01:33:08 +02:00
3cec726e3d
refactor: move VideoRenderConfig from domain to adapter, inject at construction
CI / Check / Test (push) Failing after 44s
2026-06-03 01:18:52 +02:00
e8e83d3f16
assets + fmt
CI / Check / Test (push) Has been cancelled
2026-06-03 01:13:06 +02:00
241063c914
feat: wrapup date validation, delete endpoint, failed record cleanup
CI / Check / Test (push) Failing after 41s
2026-06-03 00:54:08 +02:00
c842ad6a55
feat: download top-5 cast photos during TMDb enrichment
CI / Check / Test (push) Failing after 41s
2026-06-03 00:42:25 +02:00
cb611bcc7d
fix: wire FfmpegWrapUpRenderer into worker when ffmpeg available
CI / Check / Test (push) Failing after 41s
2026-06-03 00:06:04 +02:00
bf0350c87a
fmt
CI / Check / Test (push) Failing after 6m39s
2026-06-02 23:50:20 +02:00
490bd97a40
feat: wire video renderer pipeline + download endpoint
CI / Check / Test (push) Failing after 41s
2026-06-02 22:34:55 +02:00
ea43911984
feat: wire real wrapup adapters into presentation + worker
2026-06-02 22:19:29 +02:00
7ef8912d69
feat: wrapup worker handler + auto-generate job
2026-06-02 22:13:08 +02:00
b171d2d1e2
feat(application): wrapup generate/get/list use cases
2026-06-02 22:09:08 +02:00
4c75113c4f
chore: wire WrapUpStatsQuery panic stub into binaries
CI / Check / Test (push) Failing after 44s
2026-06-02 21:49:54 +02:00
28170c95d4
chore: fmt + remove dead federation module
CI / Check / Test (push) Failing after 5m58s
2026-06-02 20:44:08 +02:00
ac7edd6953
WIP: federation + integrations
CI / Check / Test (push) Failing after 5m56s
2026-06-02 19:50:19 +02:00
aadad3cfb0
feat: Jellyfin/Plex auto-import via watch queue
...
CI / Check / Test (push) Failing after 6m5s
Webhook ingestion from media servers — movies land in a pending
watch queue, user rates and confirms to create diary entries.
- domain: WatchEvent, WebhookToken models, MediaServerParser port
- adapters: jellyfin + plex parser crates, SQLite + Postgres repos
- application: ingest/confirm/dismiss/cleanup use cases, token mgmt
- presentation: webhook endpoints (bearer + query param auth),
watch queue + integrations settings HTML pages, OpenAPI docs
- worker: WatchEventCleanupJob (daily, 30d retention)
Movie resolution deferred to confirm — single canonical path
through log_review for enrichment, poster fetch, federation.
2026-06-02 17:34:16 +02:00
c3b89f6dc6
refactor: extract business logic from handlers to application layer
...
CI / Check / Test (push) Has been cancelled
CI / Release build (push) Has been cancelled
Move domain logic out of 7 handlers into use cases:
- activity feed: FollowingFilter construction
- user profile: social counts + pending followers
- users list: parallel local+remote actor loading
- watchlist page: local-vs-remote branching
- sync_poster: movie lookup + validation
- get_profile: avatar URL construction
- post_register: register+login orchestration
Add SocialQueryPort.{count_following,count_accepted_followers,
get_pending_followers} to AppContext behind federation feature gate.
2026-05-29 11:41:16 +02:00
2355f89bed
refactor: fix all clippy warnings properly
...
- UserProfile struct groups display_name/bio/avatar/banner/also_known_as/profile_fields
- User::from_persistence takes UserProfile (6 args, was 11)
- PersistedReview struct for Review::from_persistence (1 arg, was 8)
- WatchlistApInput struct for watchlist_to_ap_object (1 arg, was 8)
- ActivityPubDeps struct for activitypub::wire (1 arg, was 11)
- FederationRepos type alias for wire() return types
- FeedSortBy: impl std::str::FromStr instead of inherent from_str
- postgres users.rs: row_to_user takes &PgRow like sqlite
- collapse nested ifs in multipart handlers
- type alias for complex return types (image-converter, worker)
- tui: allow large_enum_variant at crate level (pre-existing, unrelated)
2026-05-29 11:19:02 +02:00
68a939f6c4
Refactor code for improved readability and consistency
...
- Simplified error handling in `PostgresApContentQuery` and `SqliteApContentQuery` by aligning the formatting of `try_get` calls.
- Removed unnecessary line breaks and improved formatting in various repository implementations for better readability.
- Consolidated imports in `lib.rs` and `factory.rs` to maintain a cleaner structure.
- Enhanced consistency in async function signatures across multiple files.
- Updated test helpers and use cases to streamline code and improve clarity.
- Refactored `InMemory` repositories to enhance readability by aligning method implementations.
2026-05-29 10:58:44 +02:00
36d15e1344
fix: AP bugs — backfill mapping, review activity type, also_known_as parse
...
- BackfillRequested now maps to BackfillFollower domain event (not FollowAccepted);
worker calls run_backfill_for_follower to send LOCAL content to new follower inbox,
instead of incorrectly trying to import from an inbox URL as if it were an outbox
- reviews broadcast as Create activity instead of Add (semantically correct)
- also_known_as JSON parse failure logs warning + preserves raw string as single-element
vec instead of silently returning empty
2026-05-29 10:54:11 +02:00
624cfe5799
feat: migrate k-ap 0.1.10→0.3.1, fix AP gaps
...
- split FederationRepository into FollowRepository, ActorRepository, BlocklistRepository, ActivityRepository
- RemoteActor: 5 new fields (bio, banner_url, followers_url, following_url, also_known_as)
- ApObjectHandler split: get_local_objects_page/count_local_posts → ApContentReader trait
- builder API: positional args → named setters
- broadcast_create_note/update_note: add ApVisibility + mentioned_inboxes params
- backfill_outbox → import_remote_outbox
- ApUser: also_known_as Option<String> → Vec<String>, new fields
AP gaps fixed:
- add GET /users/{id}/followers + /following with content negotiation
- wire EventPublisher into builder via FederationEventBridge adapter
- add display_name field full stack (domain→DB→API→AP)
- DB-side outbox pagination (get_local_reviews_page)
- set featured_url on ApUser
2026-05-29 10:42:53 +02:00
51bd580a04
watchlist backfill
CI / Check / Test (push) Failing after 57s
CI / Release build (push) Has been skipped
2026-05-28 03:52:38 +02:00
6efc47a891
chore: replace local activitypub-base with k-ap git dep
2026-05-17 23:06:20 +02:00
19171806b9
fmt
CI / Check / Test / Build (push) Has been cancelled
2026-05-13 23:38:57 +02:00