Remove the special cases for the old Browser package

A browser request now needs the session token of its window. Disabling
an old runestone.browser package no longer stops the engine. One list of
built-in modules starts the browser and the theme editor, and the plugin
menus skip their tools. The access rules no longer treat the browser ID
in a special way.
This commit is contained in:
Knotty Wyvern
2026-10-29 00:48:37 -07:00
parent 5dc53e4a5e
commit 48b8249ba6
13 changed files with 55 additions and 52 deletions
+6 -2
View File
@@ -15,10 +15,14 @@ test("plugin access separates settings, launchers, and commands without reading
test("installed RuneStone packages retain access before their next package update", () => {
assert.equal(pluginAccess("runestone.local-autocomplete", [], [view("settings")])[0].surface, "settings");
assert.deepEqual(pluginAccess("runestone.browser", [command("new-tab")], [view("tab-123")]).map(({ id, surface }) => [id, surface]), [["new-tab", "open"]]);
assert.equal(pluginAccess("org.example.test", [], [view("settings")])[0].surface, "open");
assert.equal(pluginAccess("runestone.local-autocomplete", [], [view("settings", { settings: false })])[0].surface, "open");
assert.equal(pluginAccess("runestone.browser", [command("new-tab", { category: "action" })], [])[0].surface, "commands");
});
test("the browser ID gets the same access rules as any other owner", () => {
// The built-in browser sets `category` and `launcher` itself. The old Browser package had no special rules left.
assert.deepEqual(pluginAccess("runestone.browser", [command("new-tab")], [view("tab-123")]).map(({ id, surface }) => [id, surface]), [["new-tab", "commands"], ["tab-123", "open"]]);
assert.deepEqual(pluginAccess("runestone.browser", [command("new-tab", { category: "open", icon: "globe" })], [view("tab-123", { launcher: false })]).map(({ id, surface, icon }) => [id, surface, icon]), [["new-tab", "open", "globe"]]);
});
test("command launchers retain the plugin action icon", () => {