One plugin-bar button and one tabbed window, as the original

Live in 0.1.19 the plugin put three buttons on the plugin bar (MM, Mossy
Tracker, Metas), the tracker carried the icon that belongs to the main
window, and the metas downloads were in a window of their own.

Now only the main window has a bar button: "MM" with the original
window's icon (7735, 0x06001E37). Its tabs follow the original's notebook:
Main, Settings, Statistics, Mossy Tracker, Metas, Tools. The Mossy Tracker
tab is the original page, one "Open Mossy Tracker" button that opens the
tracker window; that window is registered without a bar button and
opened through the host's ShowPanel. The Metas tab holds everything the
metas window had (list with search, refresh, check, download outdated,
download one file, last check, status), plus the repository address and
the two folders the files land in. The main window forwards those
bindings to the meta sync's view model, since markup binds one object.

Downloads already went to the host's VTank profile storage, the one
MossTank reads, under mosstank/metas and mosstank/navs with each file's
own name and extension; the tab now shows those full folder paths
instead of the storage root. Backend frames are untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-09-26 06:56:10 +02:00
parent 360300a1ee
commit 336c5cfdf5
15 changed files with 459 additions and 124 deletions

View file

@ -289,6 +289,35 @@ public sealed class MetaSyncTests
}
}
[Fact]
public async Task Downloads_land_in_the_shared_profile_storage_the_automation_plugin_loads_from()
{
using var harness = new PluginHarness();
harness.Login();
MemoryStorage profiles = harness.Host.VtankProfiles;
// The plugin's own sync writes to the shared profile storage, not to
// the plugin's private storage.
Assert.Equal(profiles.RootPath, harness.Feature<MetaSyncFeature>().Manager.StorageRoot);
Assert.NotEqual(harness.Host.Storage.RootPath, harness.Feature<MetaSyncFeature>().Manager.StorageRoot);
var server = new FakeGitServer();
server.Text(TreeUrl, TreeJson);
server.Text(RawBase + "/hunting/Colo.met", ColoMet);
server.Text(RawBase + "/navs/Colo%20Loop.nav", LoopNav);
server.Text(RawBase + "/x.MET", XMet);
using var feature = new MetaSyncFeature(harness.Context, profiles, server);
harness.Context.Commands.Dispatch("metaspull");
await Settle(feature);
// Each file under its own name and extension, metas and navs apart,
// where a bare name in the automation plugin finds it.
Assert.Equal(ColoMet, profiles.ReadText("mosstank/metas/Colo.met"));
Assert.Equal(XMet, profiles.ReadText("mosstank/metas/x.MET"));
Assert.Equal(LoopNav, profiles.ReadText("mosstank/navs/Colo Loop.nav"));
Assert.Null(harness.Host.Storage.ReadText("mosstank/metas/Colo.met"));
}
[Fact]
public void A_headless_host_gets_the_verbs_but_no_window()
{
@ -310,8 +339,8 @@ public sealed class MetaSyncTests
using (feature)
{
MetasViewModel panel = feature.Panel!;
Assert.False(panel.IsVisible);
Assert.Equal("VTank Path: C:/profiles", panel.PathText);
Assert.Equal($"Metas: {Path.Combine("C:/profiles", "mosstank", "metas")}", panel.MetaFolderText);
Assert.Equal($"Navs: {Path.Combine("C:/profiles", "mosstank", "navs")}", panel.NavFolderText);
Assert.Equal(["No files loaded"], panel.FilePaths);
storage.Seed("mosstank/metas/x.MET", "stale");