Skip to content

feat(open-platform): switch plaza overview to segmented tabs with search - #240

Closed
JnyRoad wants to merge 2 commits into
OpenBMB:mainfrom
JnyRoad:feat/open-platform-tabs
Closed

feat(open-platform): switch plaza overview to segmented tabs with search#240
JnyRoad wants to merge 2 commits into
OpenBMB:mainfrom
JnyRoad:feat/open-platform-tabs

Conversation

@JnyRoad

@JnyRoad JnyRoad commented Aug 29, 2026

Copy link
Copy Markdown

Summary

  • Replace the five-column plaza overview (/enterprise/platform) with a segmented-pill tab bar over a single, wide content panel — one module (数字员工/知识库/技能/SOP/工具) shown at a time instead of five cramped columns.
  • The panel renders all items for the active module and scrolls internally, so the "查看全部" jump-to-detail-page button is no longer needed on this screen (the full-list detail route stays in place, just no longer linked from here).
  • Add a search box (shared row with the filter chips) that filters the active module's cards by title/description/meta/tags; it clears automatically when switching tabs.

Changes

  • Add PlatformTabBar (segmented pill tab switcher) and PlatformCategoryPanel (single-module header + filters/search + card grid), replacing PlatformColumn.
  • Move the shared PlatformKind union into a new components/openPlatform/types.ts so it isn't declared inside the page.
  • Update OpenPlatformPage.tsx to hold activeKind/searchText state and filter the active module's items client-side.
  • Give the search input an explicit aria-label (accessibility fix from review on the original PR).

Testing

  • tsc -b — passes.
  • vitest run src/components/openPlatform — passes (existing suite).
  • Manually verified in the browser against a running backend (admin login): all 5 tabs switch correctly with real data, search filters and clears on tab change, empty/no-match states render, and layout holds up at mobile width.

Risks

No obvious risks. Scoped to the plaza overview page and its two new sibling components; the full-list detail route and its data flow are untouched. Already reviewed and merged in a fork PR (JnyRoad/StaffDeck#9) before being rebased onto upstream main here.

The overview page showed all five plaza modules (agents, knowledge,
skills, SOPs, tools) side by side in five narrow columns, which got
cramped on smaller screens and left each column too shallow to browse
comfortably.

Replace it with a segmented-pill tab bar (PlatformTabBar) plus a single
wide content panel (PlatformCategoryPanel) that shows one module at a
time. The panel renders every item for the active module at once and
scrolls internally instead of gating extra items behind a "view all"
button, and adds a search box (shared row with the filter chips) that
filters by title/description/meta/tags — search resets on tab switch.

PlatformColumn is removed since its only caller was this overview grid.
The shared PlatformKind union moves to a new types.ts so the tab bar,
panel, and page can all import it without a page-to-component reverse
dependency.
The search box in PlatformCategoryPanel only relied on its placeholder
text for a label, which screen readers don't announce as the field's
name. Add aria-label bound to the same per-category placeholder text
(CodeRabbit review comment on PR #9).
@JnyRoad JnyRoad closed this by deleting the head repository Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant