merge: integrate project settings plugin workspace

# Conflicts:
#	src/components/layout/MainLayout.tsx
#	src/pages/ProjectConfiguration/index.tsx
This commit is contained in:
inman
2026-09-07 10:16:19 +08:00
18 changed files with 362 additions and 76 deletions

View File

@@ -0,0 +1,86 @@
# Project Configuration owns Plugin navigation
## Status
Proposed for integration; implemented and verified in task
`20260906-move-plugins-project-settings-7c91a4e2`.
## Date
2026-09-06
## Context
The integrated product exposed one reviewed unified Plugin workspace at
`/plugins` through a standalone Code sidebar entry. Project Configuration no
longer contained its predecessor Plugin Services sheet. The user first directed
that Plugins belong in Project Settings, then clarified that the workspace must
live on the same project page used to configure Agents and Skills rather than
replace that page after navigation.
The navigation change must not collapse the existing independent lifecycles for
Marketplace acquisition, device installation, project enablement, Agent Skill
assignment, runtime authorization, and billing. It also must not restore the
retired duplicate sheet or move Main-owned Plugin authority into Renderer code.
## Decision
- The Agent/Skill Project Configuration page is the visible owner of the single
unified Plugin workspace.
- Its `插件` resource card opens the workspace in a wide same-page drawer. The
Project Configuration page remains mounted behind it.
- `/project-config/plugins` is the canonical deep link for the drawer-open state;
it renders Project Configuration rather than a standalone Plugin page.
- `/plugins` preserves query and navigation state while redirecting to the
canonical URL. `/plugin-marketplace`, `/my-plugins`, and `/project-plugins`
remain deterministic filtered compatibility redirects.
- The Code sidebar has no standalone Plugin entry.
- The canonical workspace remains accessible before Code Provider initialization
and when no project is active, so Marketplace and account/device views do not
incorrectly depend on local project selection.
- The existing unified controller, data sources, mutation semantics,
authentication, and lifecycle separation remain unchanged.
## Rationale
Plugin installation and activation configure resources that projects may use, so
Project Configuration is the clearer navigation owner. Reusing the unified
workspace avoids competing product surfaces and preserves one authoritative view
across Marketplace, Account Library, device packages, and project status.
Compatibility redirects protect existing deep links and authenticated return
flows while establishing an unambiguous canonical location.
## Consequences
- Project Configuration gains a Plugin card beside models, Skills, and knowledge,
with access retained in the no-active-project state.
- Closing the Plugin drawer returns to the already-mounted Project Configuration
page; Agent assignment actions close the drawer to expose that same page.
- Existing bookmarks continue to work, but tests and new product links should use
`/project-config/plugins`.
- Canonical project memory that names the Code sidebar or `/plugins` as the sole
current entry must be superseded during Integration Mode.
- No backend contract, package trust boundary, runtime permission, billing rule,
or native Web Search behavior changes.
## Supersedes
- The navigation-only claim that the Code sidebar owns the single `插件` entry and
`/plugins` is the canonical product route.
- It does not supersede the retirement of the duplicate Project Configuration
Plugin Services sheet; that implementation remains retired.
## Evidence
- User direction: “插件应该在项目设置中”, clarified as “是放在配置agent、skill那个项目页”.
- Focused unit verification: 62/62 passed.
- Electron Plugin journeys: 4/4 passed.
- Full unit, typecheck, lint, and Vite production build passed.
## Related
- `.project-docs/10-decisions/adr-008-interactive-ai-app-scaffold.md`
- `.project-docs/30-worklog/tasks/20260906-move-plugins-project-settings-7c91a4e2.md`
- `src/pages/ProjectConfiguration/index.tsx`
- `src/pages/Plugins/index.tsx`
- `src/pages/Plugins/legacy-plugin-redirect.tsx`

View File

@@ -0,0 +1,100 @@
# Task: Move plugins into project settings
## Identity
- Task ID: 20260906-move-plugins-project-settings-7c91a4e2
- Mode: Feature
- Branch: codex/20260906-move-plugins-project-settings-7c91a4e2-move-plugins-project-settings
- Worktree: /Users/inmanx/Documents/makelore-task-move-plugins-project-settings-7c91a4e2
- Base commit: f8eee430f4f4167dc2ecc682ece96c652cdde14b
- Owner: codex
- Status: Ready for integration
## Scope
- Move the single user-visible Plugin workspace from the Code sidebar directly
into the same Project Configuration page used to configure Agents, Skills,
models, and knowledge.
- Make `/project-config/plugins` the canonical Plugin URL while retaining
deterministic compatibility redirects from `/plugins`, `/plugin-marketplace`,
`/my-plugins`, and `/project-plugins`.
- Update focused unit and Electron E2E coverage, the packaged-product marker, and
README current-state wording for the navigation change.
## Intent And Constraints
- Preserve the existing unified Plugin workspace and its projections of
Marketplace, Account Library, official-device state, Device Packages, current
project state, and retained IDs; do not restore the retired duplicate Plugin
Services sheet.
- Keep acquisition, device installation, project enablement, Agent Skill
assignment, runtime authorization, and billing as separate lifecycles.
- Preserve Main-owned Host API, authentication, package verification, and runtime
authority. Renderer navigation must not introduce direct IPC or local-runtime
HTTP access.
- Keep Project Configuration and its nested Plugin route available before Code
Provider initialization, including the no-active-project state.
- Render the nested route as a same-page Project Configuration drawer, not as a
replacement standalone Plugin page.
- Preserve legacy deep-link query/state and authenticated return paths.
- Keep the single Makelore light visual system and Chinese product copy.
## Outcome
- Added a `插件` ResourceCard alongside models, Skills, and knowledge in Project
Configuration, retained access in the no-active-project state, and removed the
standalone Code sidebar Plugin entry.
- Changed `/project-config/plugins` to render the Project Configuration page with
its wide Plugin drawer open. The Agent/Skill project page remains mounted behind
the drawer; closing it returns to the same page. Query/state-preserving
`/plugins` compatibility and existing filtered legacy redirects remain intact.
- Reused the unified Plugin controller and view inside the drawer without
restoring the retired duplicate Plugin Services implementation.
- Kept the unified Plugin controller, data sources, mutations, authentication,
and lifecycle semantics unchanged.
- Updated initialization gates, login return path, README, packaged Marketplace
artifact assertion, focused unit tests, and Electron E2E journeys.
## Verification
- Focused navigation, layout, embedded Plugin, controller, login, and artifact
verification — 6 files, 62 tests passed; the embedded-view regression failed
before implementation and passed afterward.
- `corepack pnpm run typecheck` — passed.
- Scoped ESLint across all changed source and test files — passed with no output.
- `corepack pnpm run build:vite` — Renderer, Main, Preload, and utility builds passed;
only existing Browserslist, mixed-import, and chunk-size warnings remained.
- `node ./node_modules/@playwright/test/cli.js test tests/e2e/project-plugins.spec.ts tests/e2e/plugin-marketplace.spec.ts` — 4/4 passed, including assertions that the Project Configuration page remains mounted behind the Plugin drawer.
- `corepack pnpm test` — 221 regular files (1861 passed, 3 skipped) and the pressure suite (1 passed).
- `corepack pnpm run lint:check` — passed with 0 errors and 5 pre-existing warnings.
- `git diff --check` — passed.
## Follow-ups
- Integration should reconcile the navigation wording in canonical project memory
and review overlap with planning task `20260906-remove-project-gate-7c31` before
merging. No product-semantic conflict was found in the current peer-task audit.
## Promotion Candidates
- Target: `.project-docs/30-worklog/current-state.md`,
`.project-docs/20-architecture/system-overview.md`, and
`.project-docs/40-domain/business-rules.md`.
- Proposal: record the Agent/Skill Project Configuration page as the visible
owner of the single unified Plugin workspace. Its `插件` card opens a same-page
wide drawer; `/project-config/plugins` is the canonical deep link for that
state, and old public URLs remain deterministic compatibility redirects. This
rehomes the reviewed unified workspace and does not restore the superseded
duplicate Plugin Services implementation.
- Evidence: explicit user direction in this task, focused unit coverage, 4/4
Electron E2E, full unit/typecheck/lint/build verification, and the task-owned
proposal `20260906-move-plugins-project-settings-7c91a4e2__project-settings-plugin-navigation.md`.
- Future impact: new Plugin navigation must originate in Project Configuration,
while Plugin lifecycle boundaries, Web Search exclusion, and Main-owned
authority remain unchanged.
- Semantic conflict: this supersedes canonical statements that the Code sidebar
owns the only Plugin entry and `/plugins` is canonical; it does not conflict
with ADR-008 or the Plugin lifecycle boundaries.
- Human confirmation: already supplied and clarified by the user: Plugins belong
on the same project page used to configure Agents and Skills, not on a separate
page. No additional product-direction approval is required during integration.