Repository navigation
Stage J6: move the Online page out of the window, with a new drawer, toolbar and states - #118
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For screenshots and UI tests of the Online page only. With the variable set to a folder, every request of the app's HTTP client is answered from the synthetic samples listed in its fixtures.json (longest URL prefix); a request without a sample fails, is logged as "Online test fixture mode (测试样例模式)", and nothing is sent to the network. The folder is only read. Without the variable the client is the plain one it always was, so requests, frequency and caching are unchanged (OnlineHttpClientFactory; unit tests for both cases, the read-only folder and a sample outside it). tests/TestData/OnlineFixtures holds made-up samples: three characters, twelve Mods with details, files and translations, and generated placeholder images, written by tools/online-fixtures/make_fixtures.py. TESTING.md documents the variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ImageService now owns the image cache (cache\online-images): download with retry and the size limit, decoding through the load coordinator, local decoding, the existing-file lookup and trimming. The window attaches the HTTP client and the log at startup instead of handing the service a loader; the Online page, the workspace, avatars, the image viewer and the Updates page load through it. Same requests, cache files and limits as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DownloadService now holds the download scheduler (how many downloads run at once) and restores and saves the task journal; it stops using the journal once it could not be read, as before. The window keeps the threading, logging and the warning notification. Same limits and same journal files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Online XAML (with its two styles) moves to Pages/OnlinePage.xaml and the 15 Online partial files to Pages/Online/OnlinePage.*.cs. The page reaches the window only through IOnlineHost (47 members in 8 commented groups); it never references the MainWindow type. The window creates the page and calls the members it used before through it. No behaviour change: online requests, caching, downloads, installs and tracking are untouched. The 30 Online screenshots match the baseline pixel for pixel; test-all and all 60 UI tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every character switch faded the old cards out and waited 135 ms before anything changed. The new cards already fade in when they arrive, so the switch now starts at once. Measured with the Online samples at 1400x900 (median of 5, through UI Automation): 282 ms before, 157 ms after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before -> after:
- Refresh button: a text-only button that Russian cut off at 1000 px
("Обновить он") -> icon plus label; the label drops (icon, tooltip and
name stay) only when the status beside it would keep under 120 px.
- Header status: fixed 460 px pill, its tooltip lost after a language
change -> takes the room that is left, trims, always has the full text as
a tooltip; hides when under 120 px instead of showing one letter.
- Toolbar at about 670x530: search box squeezed to nothing and the buttons
clipped -> the search box gets its own row when it would drop below
240 px; sort and filters go on the second row.
- Character rail below 720 px of content: a 152 px side rail -> folds into
the existing character list in the toolbar.
The rules live in OnlineLayoutPolicy (Core) with unit tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before -> after: - Shadow: a hand-drawn 24 px gradient strip, grey in dark mode -> the system ThemeShadow (Translation Z 32) on a transparent receiver. - Surface: opaque elevated colour -> in-app acrylic with the flyout stroke; the sticky action area uses the layer fill. - Width: 34 % of the window (480-760) or window - 150 -> 45 % of the page, 400-600 px (OnlineLayoutPolicy.DetailDrawer, unit tested); below 900 px of content it covers the results area and its close button becomes "Back to results" (new string in zh-CN, en-US, ru-RU). The close button now has a tooltip and an automation name. - Actions: three equal buttons (open page, select file, download) -> download as the one accent button with "Select file" beside it, and the source page as a hyperlink below. The drawer still opens over the results without leaving the page; previous, next and Esc work as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before -> after: - Loading: a ring over three fake text bars -> the ring over placeholder cards shaped like the current view (rows in the list, tiles at the tile size in the grid). - No results / waiting / unsupported source: a hand-built card with a third status line -> the shared EmptyState with an icon; "no matching Mods" offers "Clear filters" (which also clears the search). The four status lines it no longer shows (OnlineFeed.NotStarted, ReadyToRefresh, NoResults, Loading) are removed from all three languages. - A failed list load: a modal dialog with the error -> an inline error InfoBar under the toolbar with the error and "Retry" (the same action as Refresh); a later successful load closes it. Requests, retries and cooldowns are unchanged. - Paging buttons: 84 -> 96 px minimum, so "Назад"/"Далее" never clip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The list opens details and closes them with Esc, a character shows only its Mods, a narrow window folds the rail into the toolbar and the drawer's close button reads "Back to results", and a failed load shows an inline error with Retry instead of a dialog. They run in sample mode (IMM_ONLINE_FIXTURES), so nothing goes to the network. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 10, 2026
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
Stage J6 (move the Online page out of
MainWindow) and J6-b (its appearance and usage flow), done in one pass (docs/development/UI-Structure-Plan.md, J6;docs/development/UI-Fluent-Design-Plan.md, "在线(J6)").Structure
86d8112: inventory: 15 files, 5,414 lines plusBrowseSessions.cs; about 50 references from the window into the page and about 100 the other way.2f667e5: a test-only sample mode,IMM_ONLINE_FIXTURES.tests/TestData(JSON and generated placeholder images). Anything not in the samples fails, nothing goes to the network, and the log says it's in sample mode.3f4ac10: the online image cache moves intoImageService(Attach,LoadCachedAsync,LoadOnlineBitmapAsync,GetCachedUriAsync,TrimCache).9ffdf7a: the download scheduler and journal move intoDownloadService(Scheduler,JournalAvailable,Restore(),Save()).58f2e75: pure move intoPages/OnlinePage.xamlandPages/Online/.IOnlineHost: 47 members in 8 commented groups. The page never referencesMainWindow.fdbece5: a follow-up inUI-Structure-Plan.mdto splitIOnlineHostinto character catalogue, online source and install flow services.MainWindow: code 20,094 → 14,428 lines;MainWindow.xaml1,199 → 705 lines.Appearance and usage (before → after)
34dba1bCharacter switch: paused on a 135 ms fade-out every time → starts at once.1c04721Header and toolbar:868cf4cDetails drawer (option A):d12e2b6States:OnlineLayoutPolicy) with unit tests.Online requests, their frequency, caching, and download, install and tracking results are unchanged.
Timings (median of 5, two runs each; about 35 ms of each figure is the UI-automation check itself)
Not done
ItemsViewgrid withUniformGridLayout;Note for #15: any unhandled exception in a XAML event handler ends the app with 0xc000027b. The real exception is written to
startup.logas "Unhandled UI exception: …", so an affected user's log should name the cause.Test plan
scripts\test-all.ps1: 1,779 Core tests, Release build 0 warnings, Core coverage 94.0% line / 88.1% branch🤖 Generated with Claude Code