Repository navigation
Stage J finish, step 3: character catalogue and online source as services - #125
Merged
Merged
Conversation
…hanged Before the catalog moves out of the Online page: in Chinese and English the sample category's rail lists Sample Hero Aster, Briar and Cobalt in wiki order, choosing one filters the results, and the catalog is cached in the local index. StartOnline takes the interface language. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lag leave the page - The Online page's view model and its workspace preferences now live in AppServices.Online (OnlineState); the page, the window and the workspace page read them there. Same objects, same lifetime (made with AppServices, just before the window). - "The window is closing" was a field of the Online page that the window and both pages read; it is AppServices.IsClosing now, set by the window as before. - UI-Structure-Plan.md: the user chose option 1, so step 3 does the character catalog, the online source and this state; creating the Online page on demand moves to step 5, after the download, install and tracking flow leaves the page. A new UI test, written first and passing on the build before this step, checks the character catalog's result in Chinese and English: the same characters in the same order, filtering by a character, and the local index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Which online source a repository uses (its site, game name and GameBanana category, or the defaults, and whether it is Arknights: Endfield) moved from the Online page into OnlineSourceRules (Core, unit tested with the page's own cases first) behind OnlineSourceService in AppServices. The Online page, the workspace page and the window (dashboard, settings, tray, Shortcuts) call the service; the page's six helpers are gone. The defaults (GameBanana, 42770, the Endfield wiki) and the Endfield operator list are read from Core, the same values the window held. IOnlineHost 42 -> 38 (DefaultOnlineCategoryId, DefaultOnlineSourceSite, EndfieldOfficialWikiUrl, EndfieldCharacters); IWorkspaceHost 70 -> 69 (EndfieldCharacters). No request, cache or result changes; the Online UI tests, including the catalog result test, pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The catalog code moves unchanged from the Online page into CharacterCatalogService (AppServices.CharacterCatalog): catalog key, cache read and write, wiki, Endfield and GameBanana fetches, official English names and translation. The page shows a loaded catalog through the service's Loaded event; the catalog key the page shows lives in OnlineState. IOnlineHost loses BuiltInRepositoryPresets and IsRepositoryForPreset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Step 3 of finishing stage J (
docs/development/UI-Structure-Plan.md). The maintainer chose option 1 for this step: the character catalogue and online source become services, and the Online page's state leaves the page. Creating the Online page on demand moves to step 5, because the download, install and tracking pipeline still lives in the page and has to move first.a73ed52: a UI test written first, checking that the character catalogue result is unchanged in Chinese and English.It passes on both the step 2 build and this one.
e5a6cea: the Online page's view model, preferences and the "window is closing" flag move out of the page intoAppServices(Online,IsClosing). The step 3 and step 5 notes in the plan are updated.ec82692: an online source service; its rules are in Core (OnlineSourceRules) with 25 new unit tests.592e9d4: a character catalogue service (CharacterCatalogService). The catalogue code moved out of the page unchanged, and the page gets results through the service'sLoadedevent.Online requests, their frequency and caching, and the catalogue results (names, avatars, Chinese and English name matching) are unchanged.
Interfaces
IOnlineHost42 → 36: removedDefaultOnlineCategoryId,DefaultOnlineSourceSite,EndfieldOfficialWikiUrl,EndfieldCharacters,BuiltInRepositoryPresets,IsRepositoryForPreset.IWorkspaceHost70 → 69: removedEndfieldCharacters.MainWindow*.cs: 10,339 → 10,334 lines. This step mainly shrinks the Online page.Startup is not slower (median of 7 runs, step 2 build → this build)
Test plan
scripts\test-all.ps1: Release build 0 warnings, Core coverage 94.0% line / 88.2% branch🤖 Generated with Claude Code