Add the Collect page
The collector becomes usable. The page is a close copy of the parse page's shape - same proxy gate, same batched flush to the observable collection, same truncation cap that reports rather than truncates silently - because that shape was built for streaming outcomes and the collector produces exactly those. Two differences that are not cosmetic. The batch drops from 512 to 64: items arrive at network speed, roughly one a second, and a batch of five hundred would mean the list never visibly moved. And progress is explicitly indeterminate until a source finishes listing, because a paginated listing genuinely does not know its total until the last page - a bar pretending otherwise would be lying. The input swaps shape with the source: an endpoint source wants one address, a pasted-list source wants many lines. The proxy gate is unchanged in substance - only network sources are gated, and the banner keeps its x:Name because the headless tests find it that way. Rendering the page caught a defect the tests could not: IsVisible sat on the caption inside the header border rather than on the border, so hiding the text left its padding and divider behind as an empty bar above the input. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
6909884851
commit
70fb3a1df3
@@ -1,3 +1,4 @@
|
||||
using AvParser.Core.Collecting;
|
||||
using AvParser.Core.Parsing;
|
||||
using AvParser.Core.Proxies;
|
||||
using AvParser.Core.Settings;
|
||||
@@ -46,6 +47,14 @@ public static class UiServiceCollectionExtensions
|
||||
sp.GetRequiredService<IProxyPool>(),
|
||||
sp.GetRequiredService<ILocalizationService>()
|
||||
));
|
||||
services.AddSingleton<CollectViewModel>(static sp => new CollectViewModel(
|
||||
sp.GetRequiredService<IMediaSourceCatalog>(),
|
||||
sp.GetRequiredService<ISettingsService>(),
|
||||
sp.GetRequiredService<IProxyPool>(),
|
||||
sp.GetRequiredService<ICollectRunner>(),
|
||||
sp,
|
||||
sp.GetRequiredService<ILogger<CollectViewModel>>()
|
||||
));
|
||||
services.AddSingleton<ProxiesViewModel>(static sp => new ProxiesViewModel(
|
||||
sp.GetRequiredService<IProxyPool>(),
|
||||
sp.GetRequiredService<IMutableProxySource>(),
|
||||
@@ -57,6 +66,7 @@ public static class UiServiceCollectionExtensions
|
||||
// Order here is the order of the navigation rail; the first entry is the landing page.
|
||||
services.AddSingleton<PageViewModel>(static sp => sp.GetRequiredService<DashboardViewModel>());
|
||||
services.AddSingleton<PageViewModel>(static sp => sp.GetRequiredService<ParseViewModel>());
|
||||
services.AddSingleton<PageViewModel>(static sp => sp.GetRequiredService<CollectViewModel>());
|
||||
services.AddSingleton<PageViewModel>(static sp => sp.GetRequiredService<ProxiesViewModel>());
|
||||
services.AddSingleton<PageViewModel>(static sp => sp.GetRequiredService<SettingsViewModel>());
|
||||
services.AddSingleton<PageViewModel>(static sp => sp.GetRequiredService<AboutViewModel>());
|
||||
|
||||
Reference in New Issue
Block a user