Skip to content

refactor: persist_profile takes ProfileFormData; pin journal author key#55

Merged
lance0 merged 1 commit into
masterfrom
refactor/persist-profile-args-and-journal-contract
Jun 21, 2026
Merged

refactor: persist_profile takes ProfileFormData; pin journal author key#55
lance0 merged 1 commit into
masterfrom
refactor/persist-profile-args-and-journal-contract

Conversation

@lance0

@lance0 lance0 commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Two future-maintenance cleanups, no behavior change.

1. persist_profile positional-arg fragility

Collapsed the 12 positional args (mixed &str/Option/enum, and two call sites since the Settings connection knobs landed in #54 — transposition-prone) into (path, original, &ProfileFormData). Reuses the struct from #51 (now Copy, so persist_profile destructures it without moves) and drops the #[allow(clippy::too_many_arguments)].

2. Journal contract minimal key set

journal_view_shape_is_pinned only asserted [created, kind, comments] because the fixture omitted created_by — so a drop/rename of the skip-if-none author field slipped through. The fixture now carries created_by and pins the full [created, kind, author, comments] set plus the resolved author label.

Gate

fmt ✓ · clippy --all-features ✓ · clippy --no-default-features ✓ · tests ✓ (948 / 853).

Two future-maintenance cleanups, no behavior change.

persist_profile: collapse the 12 positional args (mixed &str/Option/enum, two
call sites since the Settings connection knobs landed — transposition-prone)
into (path, original, &ProfileFormData). Reuses the struct from #51 (now Copy so
it destructures without moves) and drops the #[allow(too_many_arguments)].

journal contract: journal_view_shape_is_pinned only asserted the minimal
[created, kind, comments] key set because the fixture omitted created_by, so a
drop/rename of the skip-if-none author field slipped through. The fixture now
carries created_by and pins the full [created, kind, author, comments] set plus
the resolved author label.
@lance0 lance0 merged commit bb61d08 into master Jun 21, 2026
4 checks passed
@lance0 lance0 deleted the refactor/persist-profile-args-and-journal-contract branch June 21, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant