0.9.17: mods outside the game folder, search, empty-start profiles, interface size, and the Code Cleanup milestone #227
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ethan-hann/SavePoint!227
Loading…
Reference in a new issue
No description provided.
Delete branch "integration-0917"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Features (1.0): mods folder outside the game folder as a third tracked folder (#202, D61); file links refused on Windows and snapshots holding links refused before writing (#207, #215, D62); search over games, profiles and History (#177, D64); new profiles that start with no saves or mods, only when the folder is safe in a snapshot (#206, D65); open game/mods/saves folders from the profile menu and a right-click menu (#204, #205); interface size 100-200% (#199, D63); chips edit in place (#203); the after-snapshot tidy is its own task, "Compacting snapshot files" (#201, D13.17); header snapshot button follows the row's run (#209).
Fixes: Linux process start times dated from the exact boot instant and the session start taken before launch (#216); space judged for all folders together on a snapshot and on a launch (#169, #171, D13.16); stopped-switch finish waits longer for a held note, handles read-only files and folder links, and names the step that failed (#196, #197, #198, D31.6); Activity keeps finished tasks across restarts (#160, D44.5); History filter and Sidebar/Library toggle keyboard and screen-reader fixes (#175, #176).
Code Cleanup: #173 #178 #179 #180 #181 #182 #183 #184 #185 #186 #187 #188 #190 #191 #210 #211 #212 #213 #214; the local Linux gate and Linux packaging run on the Linux VM, WSL and test retries retired (#195, #210, #211, D60).
Each feature was implemented test-first and reviewed; review findings were fixed in follow-up rounds on this branch. Docs: decisions D60-D65 and amendments, architecture, developer guide, ui-guide, user guide, standards' known violations, regenerated screenshots.
A gap analysis against the 40 issues closed the Medium gaps on this branch (discard never blocked by links, an empty-folder switch always asks, reachable reasons for the start-empty boxes, size choice keys, copy); the Low ones are filed as #221-#226.
Local gates on
386a9160: Windows gate passed (18496 tests, 0 failed, 73 listed skips); Linux gate on the VM passed (18480 tests, 0 failed, 145 listed skips).Closes #160 #169 #171 #173 #175 #176 #177 #178 #179 #180 #181 #182 #183 #184 #185 #186 #187 #188 #190 #191 #195 #196 #197 #198 #199 #201 #202 #203 #204 #205 #206 #207 #209 #210 #211 #212 #213 #214 #215 #216
A chip's text is now focusable. Enter or F2 on it, or a double-click, turns it into a field holding its text (selected). Enter or leaving the field keeps the change, Escape drops it, and focus returns to the chip after Enter or Escape. A blank, repeated or unchanged edit leaves the chip as it was, with no message, as an add does. The chip is named "Edit {value} in {list}", its field "Change {value} in {list}", and its help text says how to edit it; all three are catalog strings. ChipItem becomes a small view model (editing state, own commands, and a text that can change) instead of a record. Observed reds before the code: - Each_chip_is_named_for_editing_and_so_is_the_field_it_becomes: expected "Edit **/*.log in Files to leave out", actual "". - Editing_a_chip_opens_its_text_as_a_field: Assert.True failed on IsEditing. - Committing_an_edit_changes_that_chip_in_place_and_says_so_once: collections differ at index 1, expected "b2", actual "b". - A_chip_is_focusable_and_named_for_editing_and_says_how: expected 3 chips, actual 0. The other view tests failed for the same missing chip target (index out of range finding the chip to focus). Mutation checks: dropping the blank/repeated/unchanged guard and the not-editing guard failed 6 view model tests; the focus-return tests failed until the key handler listened for handled keys.A game can name a third folder outside its install that holds its mods: GameDefinition.Mods (JSON "mods"), RepoRole.Mods and ModsLocation. The key is additive, so a catalog that holds one still reads in the previous release, and a games.json from that release loads unchanged. The saves role is never widened to "mods". The validator requires a mods path when the folder is present and refuses any nesting of the mods folder with the install or saves folder, placed on mods.path. Normalize trims the path, Equals and GetHashCode cover it, and the folder gets only the game-wide leave-out rules. Templates carry it like the saves folder: "mods" for Windows and libraryHints.modsByOs for Linux and macOS; 7 Days to Die names {appData}\7DaysToDie\Mods, its Linux and macOS folders, and the Mods hint. Observed reds (assertion failures): - ModsFolderCatalogTests.Two_definitions_that_differ_only_in_the_mods_folder_are_not_equal: "Values are equal" - ModsFolderCatalogTests.A_mods_folder_with_no_path_is_reported_on_the_mods_field: expected [mods.path modsPathRequired], actual [] - ModsFolderCatalogTests.Normalizing_trims_the_mods_path...: expected "D:\Mods", actual " D:\Mods " - ModsFolderCatalogTests.A_mods_folder_that_nests_with_another_folder_is_reported_on_the_mods_field (7 cases): issues empty - ModsFolderTemplateTests (4 tests, with the draft and the template file reverted): a draft has no mods folder Mutation checks on tests that passed first: ExternalRole gaining "mods", IgnorePathsFor giving mods the install-only rules, and a defaulted Mods property each failed the matching test.D53.1 checked saves paths only. The same check now runs over every template's mods paths on all systems. Passed on first run, so mutation-checked: pointing the 7 Days to Die mods path at a Terraria folder made No_mods_folder_is_another_games_folder(7-days-to-die) fail with "'{appData}\Terraria\Mods' (windows) is a folder of 'Terraria', not of '7 Days to Die'." The template was restored.The editor gets a third folder field between the install and saves sections with the saves section's parts: field, Browse, confirmed line, full location, error, missing-folder card, common locations. An empty field shows a strip saying most games keep mods in the game folder and SavePoint already snapshots those. Clearing the field removes the folder. The consent dialog lists the mods folder and NeedsConsent covers it, so a template-drafted game no longer writes a mods marker without naming that folder. Errors with role mods land under the mods field, template drafts carry the mods folder, and pathsNested and modsPathRequired read right for three folders. error.path.missing and error.gameService.folderMismatch name the mods folder. Observed reds (before the VM and view were written, with the new properties declared as empty stubs): 23 of 24 GameEditorModsFolderTests failed on assertions, for example "Assert.Equal() Failure: Strings differ Expected: {appData}\7DaysToDie\Mods Actual: ''" (A_game_with_a_ mods_folder_opens_with_it_in_the_mods_field...), and "Collections differ Expected [Game install folder, Mods folder, Saves folder] Actual [Game install folder, Saves folder]" (A_new_game_with_a_mods_folder_ confirms_the_game_mods_and_saves_folders...). The view tests passed on their first run; mutation check: pointing the empty-strip visibility at HasNoSavesFolder failed An_empty_mods_field_shows_the_strip... with "Assert.False() Failure Expected: False Actual: True"; asking consent for the mods folder on every edit made the unchanged-folder tests fail (the save waited on a consent dialog nobody answered).A run that is exiting could delete or rewrite the note of a newer SavePoint that had already started: the single-instance guard is released before the exit handlers run. An update now leaves the note as it is when its owner is another process that is still running (matched by process id plus start time). A part of the note whose key is null, missing or not an id used to throw on the timer thread (ending the process) or drop every part; only that part is now skipped. Also covers that closing one registry keeps the other registry's part. Observed reds: - An_update_leaves_a_note_alone_when_another_process_that_still_runs_owns_it (with and without gits): the note was deleted or rewritten, assertion failed. - A_part_with_a_key_that_is_not_an_id_is_skipped_and_the_others_stay("null"): Assert.Null failed, ArgumentNullException thrown from Update. - A_part_with_a_key_that_is_not_an_id_is_skipped_and_the_others_stay("not-a-guid" and 42): Assert.Contains failed, the good part was dropped. Mutation checks: An_update_replaces_a_note_whose_owner_has_ended fails when the IsRunning check is removed; Closing_one_registry_leaves_the_gits_of_the_other_registry_on_the_note fails when Close clears the whole note.The launch dialog treats the mods folder as a third folder: its unsaved and half-switched blocks, replaced-file note, discard and save-first actions, held-file check and the "unsaved changes ask even when only the saves differ" rule all cover it, in the order a switch writes the folders (game, mods, saves). The version card shows when only the mods differ and adds the mods switch to the size and time. The banner lists the mods folder in its checks. After play, changed mods files get their own note ("N files in your mods folder are new or changed") instead of the update note. The partial-save card is rebuilt per folder, with one sentence for each folder that is or is not in the snapshot, three rows in folder order and one retry that names the folder or says "what didn't save"; kept-as-new and left-alone copy name "your mods". FolderRoles gives the catalog's select value for each folder, and PartialSnapshotText holds the partial-save wording both cards share. Every catalog message that selects on role, folder or part gets a mods branch (Activity steps, error copy, launch dialog), enforced by a new FolderCopyTests lint, and ErrorCopyTests renders the errors the Api raises for the mods folder. Observed reds: LaunchDialogModsFolderTests failed 9 of 9 on assertions before the dialog change (for example "Dirty_folders_get_their_blocks_ in_the_order_the_switch_writes_them: Expected [Install, Mods, External] Actual [Install, External]" and "A_stopped_switch_in_the_mods_folder_ says_how_many_files_the_finish_replaces: Expected '4 files in your mods folder...' Actual ''"); FolderCopyTests.Every_message_that_words_itself_ by_folder_has_a_mods_branch listed 36 messages without a mods branch. The flow, banner and post-play tests were first run with the code in place, so each was checked by mutation: dropping the mods folder from LaunchPreviewFolders failed the held-file, unsaved-asks, switch-again, banner and block tests ("Assert.Empty() Failure: Collection was not empty [StartAsync]" in Unsaved_changes_in_the_mods_folder_still_ask...); making the mods note require more than 1000 files failed both PostPlayModsNoteTests facts ("Expected 7 files in your mods folder..." Actual ''); mapping Mods to "external" in FolderRoles.Name failed the partial, kept-as-new and left-alone card tests.The wizard's "What goes in the first snapshot" panel lists the mods folder between the game and the saves with its file count and size. The partial-snapshot card uses the same per-folder wording as the launch card (shared PartialSnapshotText): one sentence for each folder, three outcome rows in folder order, and a retry that names the one folder that did not save or says "Retry what didn't save". The retry label for the game folder is now the same as the launch card's. The "snapshots from before" dialog says which folders hold the old snapshots ("Found in the game folder, the mods folder, the saves folder."). The library picker row and confirmation name a template's mods folder when it exists; one that does not exist yet is shown as left out, and the add result says so ("added without a mods folder, because ... doesn't exist yet"), the way a missing saves folder is. The fake backend lists the mods folder in folder status, capture preview and the delete preview, adds a library game with or without its mods folder, and takes a changed-mods count for the exit of a session. Observed reds: LibraryModsFolderTests failed 4 of 6 on assertions ("Expected 'Mods folder: C:\...\Mods' Actual ''"; "Assert.Single() Failure: The collection did not contain any matching items" for the left-out result line); ReconnectDialogModsFolderTests failed both facts ("Expected 'Found in the mods folder.' Actual ''"). The wizard tests were first run with the code in place, so they were checked by mutation along with the shared launch wording (see the launch commit); the two older wizard tests that asserted the two-folder partial wording now assert the per-folder wording.SnapshotFolderNames.PartOf("mods.git") returned "other", so the move and clear jobs showed the full engine path for a mods store. It now returns "mods", and Describe gives the game folder with that part. The engine-folder tests cover a three-folder game: the move reports the mods folder by part, a clear that cannot remove an old mods store names the game folder and the mods part, and the every-kind-of-job lint runs against a game with a mods folder as well. Observed red: SnapshotFolderNamesTests failed on assertions before the change ("A_folder_name_is_one_of_the_three_plain_parts_or_other(name: mods.git): Expected 'mods' Actual 'other'" and "A_path_inside_a_mods_ store...: Expected 'storage\alpha-1' Actual 'storage\alpha-1\mods.git\ objects\pack'"). The job-line tests passed on their first run because they go through PartOf; the unit red above is the mutation check for them.A search row under the History header narrows the cards, the timeline, the Saves column and the Recently removed section. A snapshot is found by its name, its profile, what it holds (version, mods, "Saves only"), and its date: ISO ("2026-09"), the month and weekday names in the player's language, and the shown form ("Sat Jul 4"), all read in the player's time zone, with the same word matching, case and accent folding as the other lists. A choice group beside the box, All, Saves or Game and mods, narrows by kind the way the two columns split them; the profile filter flyout keeps picking a profile. Snapshots have no notes of their own, so there is nothing more to search. Everything is formatted once per read and typing only picks from it; a history longer than 250 entries waits 250 ms for a pause in the typing so a word is one redraw, not one per letter. A search nothing matches says so with a Clear search button; Recently removed keeps its section and says "(1 of 2)" or that none match. The count ("2 of 10 snapshots") is announced once typing pauses. The search and kind choice last while the screen follows the same game and clear when another game opens. UiFormatter gains DateSearchText. Observed reds (assertion failures against a stub that listed every snapshot): - HistorySearchTests.Typing_keeps_the_snapshots_with_every_typed_word_in_their_name_in_the_cards_and_both_lists: Collections differ - HistorySearchTests.The_Saves_choice_keeps_the_snapshots_that_hold_saves_and_Game_and_mods_those_that_hold_the_game: Collections differ - UiFormatterDateSearchTests.A_date_is_found_by_the_name_of_its_month_in_full_or_short_in_any_case: Expected True, Actual False View and long-history tests passed on first run and were mutation checked: the kind group's two-way binding, the points region binding, the removed no-match line, the instant limit, and the search row's visibility each broke a test. TabOrderTests gains "Search snapshots" and the kind group; the closed explanation test now measures from the search row.A template can name a mods folder the player never made (a player with no mods). Adding the game then failed with "can't find the mods folder anymore" on a game with no snapshots, while a library add already leaves the folder out. The editor now asks the new IGamesApi.FolderExistsAsync after a template fills the mods field (and when it opens on a template draft), leaves the field empty when the folder is missing, and shows a note saying it can be added in Edit game once there are mods. The contract story gains a three-folder game so the fake and the real backend are compared for the mods folder: add, folder status, first snapshot of all three folders, and the new folder check. The one place the fake is simpler (the real backend refuses to add a game whose mods folder is missing) is pinned in the gaps test. Observed reds (assertion failures): - BackendContractTests.The_real_backend_tells_the_same_first_run_story_as_the_fake (real check stubbed true): fake "a mods folder that is not there yet: exists=False", real "exists=True". - GameEditorModsFolderTests.Choosing_a_template_whose_mods_folder_does_not_exist_yet...: expected "" got "{appData}\7DaysToDie\Mods"; same for the opens-on-a-template case. - GameEditorModsFolderViewTests note line: No Grid named ModsLeftOutLine. - Mutations: dropping the clear in OnModsPathChanged fails Typing_a_mods_folder_takes_the_left_out_note_away; treating any template mods path as filled fails A_mods_folder_the_player_typed_stays_when_a_template_is_chosen...Observed red (gate log, Linux and Windows): AppearanceUiScaleTests.A_size_the_screen_has_no_room_for_is_switched_off_with_the_reason failed with Expected "175%, Your screen is too small for this size." Actual "175%. Your screen is too small for this size." The catalog's settings.scale.unavailableName reads "{size}. {reason}" on purpose; the test carried the old comma.Observed red (gate log): LaunchUnfinishedSwitchFlowTests.A_switch_again_refused_for_changes_in_its_way_is_reviewed_with_discarding_as_the_only_way_out failed with Assert.Contains() Failure: Sub-string not found; the body now says "not in any snapshot" instead of "not saved". Observed red (Linux gate log): GameEditorModsFolderTests.Choosing_a_template_fills_the_mods_field_and_choosing_another_without_one_clears_what_the_first_put_there expected {appData}\7DaysToDie\Mods and got empty; ...Choosing_a_template_whose_mods_folder_does_not_exist_yet_leaves_the_mods_field_empty_and_says_why expected {appData}\7DaysToDie\Saves and got empty. A template draft takes savesByOs/modsByOs on Linux and nothing from the Windows default, and the test template named no per-system folders. The test template now names the same folders for all three systems. The product is right: the real 7 Days to Die template names {userHome}/.local/share/7DaysToDie/Mods for Linux.