Skip to content

Stage J finish, step 3: character catalogue and online source as services - #125

Merged
uyujkk merged 4 commits into
mainfrom
claude/ui-j-finish-3
Nov 10, 2026
Merged

uyujkk merged 4 commits into
mainfrom
claude/ui-j-finish-3

Conversation

@uyujkk

@uyujkk uyujkk commented Nov 10, 2026

Copy link
Copy Markdown
Owner

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.

    • The rail lists the sample characters in order.
    • Choosing one filters the list.
    • The catalogue is cached in the local index.

    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 into AppServices (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's Loaded event.

Online requests, their frequency and caching, and the catalogue results (names, avatars, Chinese and English name matching) are unchanged.

Interfaces

  • IOnlineHost 42 → 36: removed DefaultOnlineCategoryId, DefaultOnlineSourceSite, EndfieldOfficialWikiUrl, EndfieldCharacters, BuiltInRepositoryPresets, IsRepositoryForPreset.
  • IWorkspaceHost 70 → 69: removed EndfieldCharacters.
  • 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)

Start page Window shown Fully loaded
Online 766 → 773 ms 912 → 916 ms
Workspace 771 → 772 ms 940 → 941 ms

Test plan

  • scripts\test-all.ps1: Release build 0 warnings, Core coverage 94.0% line / 88.2% branch
  • UI tests 66/66
  • Code-style check
  • 42 Online screenshots (zh/en/ru × light/dark × list, details, small window, empty and error states) match the step 2 build; at most 0.002% of pixels differ, at the title bar's right edge
  • Full package in sample mode, run twice: once starting on Online, once starting on the Dashboard and switching to Online.
    • Each run: 24 character switches, 24 opens and closes of details, 48 page switches, details in a narrow window.
    • Download reached the "choose download location" dialog and was cancelled, so nothing was downloaded.
    • No errors.

🤖 Generated with Claude Code

uyujkk and others added 4 commits November 10, 2026 16:39
…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>
@uyujkk
uyujkk merged commit 661b38b into main Nov 10, 2026
4 checks passed
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