refactor: persist_profile takes ProfileFormData; pin journal author key#55
Merged
lance0 merged 1 commit intoJun 21, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two future-maintenance cleanups, no behavior change.
1.
persist_profilepositional-arg fragilityCollapsed 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 (nowCopy, sopersist_profiledestructures it without moves) and drops the#[allow(clippy::too_many_arguments)].2. Journal contract minimal key set
journal_view_shape_is_pinnedonly asserted[created, kind, comments]because the fixture omittedcreated_by— so a drop/rename of the skip-if-noneauthorfield slipped through. The fixture now carriescreated_byand pins the full[created, kind, author, comments]set plus the resolvedauthorlabel.Gate
fmt ✓ · clippy
--all-features✓ · clippy--no-default-features✓ · tests ✓ (948 / 853).