feat: move plugin center into project configuration

This commit is contained in:
inman
2026-08-31 16:57:26 +08:00
parent b3f4166f21
commit e237941399
13 changed files with 260 additions and 103 deletions

View File

@@ -12,51 +12,51 @@
## Scope
- Replace the separate global “插件中心” and “我的插件” navigation entries with one plugin hub that exposes “发现插件” and “我的插件” as tabs.
- Remove the sidebar “项目插件” entry and embed project plugin enablement/configuration in the existing Project Configuration resource area beside models, skills, and knowledge.
- Remove all plugin entries from the programming sidebar and make Project Configuration’s “插件服务” resource the single user-facing plugin surface.
- Combine Marketplace discovery, account/device plugin management, and current-project enablement/configuration as URL-backed “发现插件”, “我的插件”, and “项目启用” tabs.
- Preserve account acquisition, device installation, project enablement, Agent skill assignment, runtime authorization, and billing as independent lifecycle states.
- Keep `/my-plugins` and `/project-plugins` as compatibility redirects to the consolidated destinations.
- Keep `/plugin-marketplace`, `/my-plugins`, and `/project-plugins` as compatibility redirects into the appropriate Project Configuration tab.
- Update focused unit tests, Electron E2E coverage, and README product-state documentation.
## Intent And Constraints
- Reduce navigation duplication without changing Main-owned plugin contracts or `.makelore/project.json` authority.
- Reuse the existing light visual system, Radix tabs/sheets, stores, and Host API clients; add no dependency or alternate backend path.
- Keep plugin discovery/account/device management global, while project enablement and Agent assignment remain project-scoped.
- Keep discovery/account/device data global even though its user-facing surface is nested under the active project’s configuration; project enablement and Agent assignment remain project-scoped.
- Do not silently acquire, download, enable, assign, authorize, or bill as a side effect of another action.
- Preserve unavailable/removed plugin IDs and explicit status messaging rather than inventing metadata or hiding retained configuration.
## Outcome
- Consolidated the two global plugin destinations into one `/plugin-marketplace`
hub. “发现插件” and “我的插件” are URL-backed tabs, and the sidebar now exposes
only the single “插件中心” entry.
- Removed the project plugin sidebar entry and added “项目插件” beside models,
Skills, and knowledge files in Project Configuration. The resource card reports
enabled/available counts and opens the existing project plugin projection in a
wider configuration sheet.
- Removed the remaining global Plugin Center from the programming sidebar. Project
Configuration now exposes one “插件服务” resource beside models, Skills, and
knowledge files.
- Added one wider Plugin Services sheet with URL-backed “发现插件”, “我的插件”, and
“项目启用” tabs. The resource card defaults to current-project enablement, while
compatibility and in-product links can deep-link directly to discovery or the
account/device library.
- Reused the existing Marketplace, Library, device installation, project plugin,
and Agent Skill stores. Enabling a project plugin refreshes the Skill projection,
but does not acquire, download, configure a backend, or assign a Skill.
- Preserved compatibility for saved/deep links: `/my-plugins` redirects to the
“我的插件” tab and `/project-plugins` redirects to the Project Configuration
plugin sheet. My Plugins project actions now target the consolidated routes.
- Kept the standalone view variants available for focused rendering tests while
adding semantic embedded `section` variants for the tab and configuration sheet.
- Preserved compatibility for saved/deep links: `/plugin-marketplace`,
`/my-plugins`, and `/project-plugins` redirect to their corresponding Plugin
Services tab. My Plugins discovery and project actions now target those tabs.
- Reused semantic embedded `section` variants for all three tabs and removed the
routed standalone Plugin Center container.
- Updated README product-state copy and focused unit/Electron E2E coverage.
## Verification
- Exact `pnpm@10.33.4` was used for repository commands.
- `pnpm run typecheck`: passed.
- Focused Vitest: 2 files / 17 tests passed.
- `pnpm test`: 212 files / 1,728 tests passed; 3 existing conditional tests skipped.
- Focused Vitest: 3 files / 19 tests passed.
- `pnpm test`: 213 test files / 1,730 tests passed; 3 existing conditional tests skipped.
- `pnpm run lint:check`: passed with zero errors and five pre-existing warnings
(`Home/index.tsx` hook dependency and four `Makelore/index.tsx` Fast Refresh warnings).
- `pnpm run build:vite`: passed for Renderer, Electron Main, Preload, and utility
worker; existing dynamic-import and large-chunk warnings remain non-fatal.
- Focused Electron E2E: 3/3 passed across unified plugin discovery/account-device
management and Project Configuration plugin enablement.
- Focused Electron E2E: 3/3 passed across Plugin Services discovery/account-device
management, sidebar removal, and current-project enablement.
- `git diff --check`: passed.
## Follow-ups
@@ -68,14 +68,15 @@
- Target canonical documents: `.project-docs/30-worklog/current-state.md` and
`.project-docs/20-architecture/module-map.md`.
- Proposal: record that Renderer now exposes a single global Plugin Center with
discovery/account-device tabs, while project enablement/configuration is embedded
in Project Configuration beside models, Skills, and knowledge.
- Evidence: this task's source diff, 17 focused unit tests, the 1,728-test full unit
- Proposal: record that Renderer exposes no standalone plugin sidebar destination;
Project Configuration’s single Plugin Services sheet owns discovery,
account/device management, and current-project enablement tabs beside models,
Skills, and knowledge.
- Evidence: this task's source diff, 19 focused unit tests, the 1,730-test full unit
suite, three focused Electron E2E flows, typecheck, lint, and production build.
- Future impact: new navigation, documentation, and E2E work should target
`/plugin-marketplace` and `/project-config?resource=plugins`; the legacy routes are
compatibility redirects only.
`/project-config?resource=plugins&pluginTab=discover|mine|project`; all standalone
plugin routes are compatibility redirects only.
- Semantic conflicts: none identified. The existing independent lifecycle and
Main-owned trust boundaries remain unchanged.
- Human confirmation: not required for the factual promotion; the user explicitly