0eb56c2be6
fmt
CI / Check / Test (push) Has been cancelled
2026-07-10 05:45:44 +02:00
c224cc6bd2
refactor: extract adapter-common crate — shared sqlx error mapping,
...
row-to-domain conversions, date/uuid utils
Eliminates 39 map_err copies, consolidates parse_uuid/parse_datetime/
datetime_to_str/format_year_month, extracts 7 shared row-to-domain
conversion functions (movie, review, watchlist, stats, user_summary).
Row structs stay per-adapter (FromRow is db-specific), only conversion
logic is shared. Net -281 lines.
2026-07-10 05:44:42 +02:00
6a9b4e5c00
refactor: LOW+MEDIUM cleanups — CQRS DiaryQuery/GoalCommand+GoalQuery,
...
test-helpers out of production, decompose get_user_profile_html,
dedup secure_flag, remove vestigial social_query, drop
PersistedImportSession, LoginCommand rename, DeleteAccountDeps,
PersonId macro, ReviewSortBy rename, TUI Command for fs::read,
generic PaginatedResponse<T>, noop ports for production fallbacks
2026-07-10 05:29:02 +02:00
5e0dde656c
refactor: LOW cleanups — dedup secure_flag, remove vestigial social_query,
...
drop PersistedImportSession, rename LoginQuery→LoginCommand, own
DeleteAccountDeps, PersonId via uuid_id! macro, rename SortDirection→
ReviewSortBy, TUI fs::read→Command, generic PaginatedResponse<T>
2026-07-10 05:04:35 +02:00
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
2e2adef5e0
fix: profile shows only own reviews, federation display name in community
...
- diary API accepts user_id filter, profile page passes it
- movie social feed joins ap_remote_actors for handle resolution
- COALESCE prefers actor handle for remote reviews, email for local
2026-07-10 00:19:23 +02:00
29cc68b07c
feat: add WatchMedium field, general review editing, configurable deploy
...
CI / Check / Test (push) Failing after 27m0s
- WatchMedium enum (cinema/streaming/tv/physical_media/download/media_server/other)
- PATCH /api/v1/reviews/:id partial update (rating, comment, watched_at, watch_medium)
- edit_review use case w/ ownership + remote review guard, best-effort AP Update broadcast
- SPA: icon picker, edit sheet (long-press mobile / pencil desktop), watch medium badge
- shared ReviewFormFields, EditableContextMenu, parse_watched_at/format_watched_at
- deploy.sh parameterized (--features, --tag), CORS allows PATCH
- CONTEXT.md glossary, ADR-0001 general review editing
2026-07-10 00:01:14 +02:00
9794babe06
feat: implement federated profile handling with support for remote actor URLs across multiple components
CI / Check / Test (push) Successful in 1h7m53s
2026-07-01 00:13:28 +02:00
d7fbf8d9e2
feat: enhance review handling by adding actor URL support across multiple components
CI / Check / Test (push) Successful in 1h3m53s
2026-06-30 03:34:52 +02:00
9f6ba55afc
fix: update SQL queries to filter reviews with null remote_actor_url
2026-06-30 02:57:58 +02:00
5ae38c834a
making it AP complaint
CI / Check / Test (push) Has been cancelled
2026-06-30 02:25:42 +02:00
bb17beb80d
restructure
2026-06-29 23:38:53 +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
b844339795
fix(domain): ImportSession::new() generates own ID, add from_persistence()
2026-06-12 01:41:03 +02:00
aec5f6b058
feat(dependencies): add async-stream and bytes to Cargo.toml and Cargo.lock
...
CI / Check / Test (push) Has been cancelled
refactor(adapters): update diary.rs to use BoxStream from futures
2026-06-12 01:20:45 +02:00
9c44330f14
feat(adapters): stream_user_history in SQLite and Postgres diary adapters
2026-06-12 01:10:21 +02:00
40cb15e7cb
refactor(postgres): split fat PostgresRepository into per-port structs
CI / Check / Test (push) Has been cancelled
2026-06-12 00:00:15 +02:00
06ab5c8df1
refactor(sqlite): split fat SqliteMovieRepository into per-port structs
2026-06-11 23:49:55 +02:00
8ac87a3735
refactor: split jobs.rs into per-context modules
2026-06-11 14:44:23 +02:00
3a3f3b3889
db: refresh_sessions migration + SQLite/Postgres adapters
2026-06-11 14:31:46 +02:00
0fdc79af23
fix: add enrichment columns to test schema
2026-06-11 13:51:14 +02:00
517a18da8a
db: person enrichment migrations + adapter updates
2026-06-11 13:34:10 +02:00
7df24a19ee
domain: add person enrichment fields, event, port
2026-06-11 13:30:19 +02:00
d389e26e39
fix: broadcast goal progress on review log, fix goal handler security gaps
...
CI / Check / Test (push) Has been cancelled
- Broadcast GoalUpdated AP note after ReviewLogged so federated goal
progress reflects the new review count without requiring a manual goal edit
- Add attribution check in GoalObjectHandler::on_update (mirrors
review_handler) to prevent any remote actor from overwriting another's goal
- Implement on_actor_removed in GoalObjectHandler via new
RemoteGoalRepository::remove_all_by_actor — remote goals were never
cleaned up when an actor unfollowed or was deleted
- Add remove_all_by_actor to SQLite, Postgres, Noop, and test Panic impls
2026-06-10 02:40:25 +02:00
6d3182525f
fmt
CI / Check / Test (push) Has been cancelled
2026-06-09 02:16:18 +02:00
7bcbc59587
fix: implement get_all_reviews_for_user, add crate metadata
...
CI / Check / Test (push) Failing after 43s
Replace todo!() stubs in sqlite/postgres adapters with
actual queries. Add description+license to presentation crate.
2026-06-09 02:12:35 +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
f4fd915e35
refactor: replace sqlx compile-time macros with runtime queries
...
CI / Check / Test (push) Failing after 44s
No longer requires DATABASE_URL at build time.
2026-06-09 00:19:02 +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
886f26c7dc
fix: broadcast AP Update after poster sync to fix missing posters on remote instances
...
CI / Check / Test (push) Has been cancelled
New movies had no poster at AP broadcast time (race between poster sync
and ReviewLogged handler). PosterSynced event now fires after sync
completes, triggering Update notes so remote apps get the poster URL.
2026-06-04 23:12:27 +02:00
237f1e7d32
style: fmt persons test
CI / Check / Test (push) Successful in 16m49s
2026-06-04 17:59:05 +02:00
c647f4c13b
fix: clippy 1.96 lints — map_or, duplicate_mod, needless_borrows, slice_refs
CI / Check / Test (push) Failing after 44s
2026-06-04 17:58:01 +02:00
dacc057af6
fix: lazy-load wrapup backgrounds, cap sqlite pool to 4 connections
...
CI / Check / Test (push) Failing after 6m32s
backgrounds were decoded to RGBA at startup (~173MB for 9 images).
now only store paths, decode on demand during video generation.
2026-06-04 14:57:47 +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
4206bb4b06
fix: diary sort_by rating_desc/rating_asc in all/movie queries
2026-06-04 01:28:35 +02:00
d94ccbe057
refactor: store typed WrapUpReport in domain, serialize in adapters
CI / Check / Test (push) Failing after 45s
2026-06-03 01:25:16 +02:00
e8e83d3f16
assets + fmt
CI / Check / Test (push) Has been cancelled
2026-06-03 01:13:06 +02:00
fc086de7f7
refactor: move DateRange validation to value object, add delete/cleanup
CI / Check / Test (push) Failing after 40s
2026-06-03 00:58:07 +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
bf0350c87a
fmt
CI / Check / Test (push) Failing after 6m39s
2026-06-02 23:50:20 +02:00
5a6abdcc23
feat(adapters): WrapUpStatsQuery + WrapUpRepository for postgres/sqlite
2026-06-02 22:04:46 +02:00
b9210b6c4e
fix: batch N+1 queries in import duplicate check and watch event dismiss
...
CI / Check / Test (push) Failing after 5m54s
apply_mapping: 2 batch queries instead of up to 2N per-row lookups
dismiss: single fetch + single update instead of 2N per-event queries
2026-06-02 20:05:15 +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
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
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