feat(web): group plugin pages by plugin in sidebar with collapsible sections

- Group pages by plugin when a plugin has multiple pages, collapse under
  the plugin label; single-page plugins render directly without nesting
- Rename "Extension Pages" to "Plugin Pages" with tooltip explaining
  these are visual pages provided by installed plugins
- Add pluginLabel to PluginPageItem for display

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Junyan Qin
2026-04-25 20:06:03 +08:00
parent 12df9d6ee9
commit 5f3cecfbe2
4 changed files with 89 additions and 24 deletions
@@ -37,6 +37,7 @@ export interface PluginPageItem {
name: string; // display label
pluginAuthor: string;
pluginName: string;
pluginLabel: string; // human-readable plugin display name
pageId: string;
path: string; // asset path (HTML file)
icon?: string; // optional icon name
@@ -191,6 +192,7 @@ export function SidebarDataProvider({
const meta = plugin.manifest.manifest.metadata;
const author = meta.author ?? '';
const name = meta.name;
const label = meta.label ? extractI18nObject(meta.label) : name;
const spec = plugin.manifest.manifest.spec;
if (spec?.pages && Array.isArray(spec.pages)) {
for (const page of spec.pages) {
@@ -202,6 +204,7 @@ export function SidebarDataProvider({
name: page.label ? extractI18nObject(page.label) : page.id,
pluginAuthor: author,
pluginName: name,
pluginLabel: label,
pageId: page.id,
path: page.path,
icon: page.icon,