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
This commit is contained in:
2026-07-10 05:29:02 +02:00
parent 5e0dde656c
commit 6a9b4e5c00
52 changed files with 405 additions and 298 deletions

View File

@@ -2,7 +2,7 @@ use std::sync::Arc;
use anyhow::Context;
use domain::ports::{
DiaryRepository, GoalRepository, ImageRefCommand, ImageRefQuery, ImportSessionRepository,
DiaryQuery, GoalCommand, GoalQuery, ImageRefCommand, ImageRefQuery, ImportSessionRepository,
LocalApContentQuery, MovieCommand, MovieDeduplicator, MovieProfileRepository, MovieQuery,
PersonCommand, PersonQuery, ReviewRepository, SearchCommand, StatsRepository, UserRepository,
WatchEventCommand, WatchEventQuery,
@@ -14,9 +14,10 @@ pub struct WorkerDbOutput {
pub movie_command: Arc<dyn MovieCommand>,
pub movie_query: Arc<dyn MovieQuery>,
pub review: Arc<dyn ReviewRepository>,
pub diary: Arc<dyn DiaryRepository>,
pub diary: Arc<dyn DiaryQuery>,
pub stats: Arc<dyn StatsRepository>,
pub goal: Arc<dyn GoalRepository>,
pub _goal_command: Arc<dyn GoalCommand>,
pub goal_query: Arc<dyn GoalQuery>,
pub user: Arc<dyn UserRepository>,
pub import_session: Arc<dyn ImportSessionRepository>,
pub movie_profile: Arc<dyn MovieProfileRepository>,
@@ -55,7 +56,8 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<Worker
review: w.review,
diary: w.diary,
stats: w.stats,
goal: w.goal,
_goal_command: w.goal_command,
goal_query: w.goal_query,
user: w.user,
import_session: w.import_session,
movie_profile: w.movie_profile,
@@ -94,7 +96,8 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<Worker
review: w.review,
diary: w.diary,
stats: w.stats,
goal: w.goal,
_goal_command: w.goal_command,
goal_query: w.goal_query,
user: w.user,
import_session: w.import_session,
movie_profile: w.movie_profile,

View File

@@ -53,7 +53,7 @@ async fn main() -> anyhow::Result<()> {
Arc::clone(&db.movie_query),
Arc::clone(&db.review),
Arc::clone(&db.diary),
Arc::clone(&db.goal),
Arc::clone(&db.goal_query),
Arc::clone(&db.stats),
Arc::clone(&db.user),
app_config.base_url.clone(),