Skip to content

feat(dashboard): filter plugin market by supported platforms - #11049

Open
mothieras wants to merge 1 commit into
AstrBotDevs:masterfrom
mothieras:feat/market-platform-filter
Open

mothieras wants to merge 1 commit into
AstrBotDevs:masterfrom
mothieras:feat/market-platform-filter

Conversation

@mothieras

@mothieras mothieras commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #10484.

The plugin market has no dedicated platform filter, so users must inspect individual plugins to find ones that support their bot platform. This adds a multi-select filter beside the category selector. For example, a QQ Official user can show plugins that declare QQ Official support and optionally include plugins with undeclared platform support.

Modifications / 改动点

  • Add a Supported platforms filter. Selecting multiple platforms matches any selected platform; clearing the selection shows all plugins.

  • Offer Undeclared platforms as a separate option, selectable on its own or alongside specific platforms. Missing metadata is not treated as unsupported.

  • Build options from the current market data, normalize known legacy aliases, and retain community adapter IDs.

  • Apply platform filtering together with search and categories, before sorting and pagination. Random recommendations follow the same filters. Filter changes reset pagination; switching sources clears the platform selection.

  • Add an empty-results message, translations for all four supported locales, and Chinese and English usage instructions.

  • This is NOT a breaking change.

Screenshots or Test Results / 运行截图或测试结果

The screenshots show the actual dashboard with fixture market data, not live marketplace entries.

Desktop: QQ Official and undeclared platforms selected

Desktop platform filter

Mobile layout at 390 px Platform filter menu at a 390 px viewport

Passed:

  • cd dashboard && node --test tests/*.test.mjs — 93 tests passed, including seven new tests covering platform matching, undeclared metadata, aliases, combined filters, pagination, source changes, and installed-plugin metadata backfill.
  • cd dashboard && pnpm run build
  • cd dashboard && pnpm run i18n:check
  • cd docs && pnpm run docs:build
  • ruff format .
  • ruff check .
  • git diff --check

Browser verification used fixture market data on the actual dashboard page at desktop and 390 px viewport widths. Checked filtering from page 2, combined platform selections, undeclared-only filtering, clearing selections, and empty search results. No horizontal overflow was observed at 390 px.

Browser checks used mocked API responses; a live AstrBot backend was not exercised.

Checklist / 检查清单

  • Discussed the implementation approach with the maintainers. The feature request and existing discussion are in [Feature] 插件市场支持按照支持的适配器分类 #10484.
  • Tested the changes and provided verification results above.
  • Updated the affected Chinese and English WebUI instructions. No existing navigation entries were renamed or moved.
  • No new dependencies were introduced.
  • No malicious code was introduced.

Summary by Sourcery

Add supported-platform filtering to the plugin market so users can find compatible plugins more efficiently.

New Features:

  • Add a multi-select supported-platform filter to the plugin market, including an option for plugins with undeclared platform metadata.
  • Support platform-aware filtering for search, categories, pagination, sorting, and random recommendations.

Bug Fixes:

  • Normalize legacy platform aliases while preserving community adapter identifiers and distinguish undeclared metadata from unsupported platforms.

Enhancements:

  • Reset pagination when market filters change and clear platform selections when switching market sources.
  • Display an empty state when no plugins match the active market filters and improve responsive filter controls.

Documentation:

  • Document supported-platform filtering behavior in the English and Chinese plugin market guides.
  • Add localized market filter and empty-state translations for all supported dashboard locales.

Tests:

  • Add coverage for platform matching, undeclared metadata, aliases, combined filters, pagination resets, source changes, and installed-plugin metadata backfill.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Linked issues

#10484 [Feature] 插件市场支持按照支持的适配器分类 · 2 of 2 met

# Requirement Status Notes
1 Add a supported-adapter platform filter beside the category filter. ✅ Met The market has a multi-select platform control next to the category selector, with options derived from current market data.
2 Help users find plugins for their platform and exclude plugins that do not declare support for it. ✅ Met Filtering matches plugins declaring any selected platform, so selecting QQ Official excludes plugins that declare only aiocqhttp support.

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Add multi-select platform filtering with an explicit undeclared option, composed with existing search and category filters. Reset pagination on filter changes and clear platform selections when switching sources.

Update four locales and the Chinese and English usage guides. Verified 140 dashboard tests, dashboard and docs builds, i18n checks, and desktop/mobile browser flows with fixture data.
@mothieras
mothieras force-pushed the feat/market-platform-filter branch from 3cdbc64 to bbfbc78 Compare November 26, 2026 15:30
@sourcery-ai

sourcery-ai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Linked issues

Checked at commit bbfbc78

#10484 [Feature] 插件市场支持按照支持的适配器分类 · 2 of 2 met

# Requirement Status Notes
1 Add a supported-adapter platform filter beside the category options. ✅ Met The market view adds a multi-select platform control in the category row.
2 Help users find plugins for their platform and exclude plugins that do not support it. ✅ Met Selecting a platform keeps plugins that declare support for it, filtering out plugins that declare only other platforms.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[Feature] 插件市场支持按照支持的适配器分类

1 participant