docs: integrate unified plugin workspace

This commit is contained in:
2026-09-03 15:55:58 +08:00
parent d7058e6383
commit fcdc1b2f6e
10 changed files with 120 additions and 1222 deletions

View File

@@ -1,88 +0,0 @@
# Task: Design unified MakeLore plugin navigation
## Identity
- Task ID: 20260903-plugin-navigation-design-7c4e2a91
- Mode: Feature
- Branch: codex/20260903-plugin-navigation-design-7c4e2a91-plugin-navigation-design
- Worktree: D:\Datas\OthersProjects\makelore-plugin-navigation-design-7c4e2a91
- Base commit: e9875145b41a2cb1827de10d27a4fc6a352704ea
- Owner: codex-root-plugin-nav
- Status: Ready for Integration
## Scope
- Product and architecture assessment of the current Plugin Marketplace, My Plugins,
Project Plugins, local Device Package, and sidebar/router surfaces.
- Compare the current navigation model with OpenAI's documented Codex Plugins
directory and propose one unified MakeLore Plugin surface.
- Write the task-owned implementation proposal
`10-decisions/proposals/20260903-plugin-navigation-design-7c4e2a91__unified-plugin-workspace-spec.md`.
- No product, route, state, server contract, package, or canonical shared-memory
changes.
## Intent And Constraints
- Preserve the independent authorities for catalog, Account Library, device bytes,
project enablement, Agent assignment, runtime admission, and billing even though
their user interface is consolidated.
- Keep local npm/Git/Plugin/loose-Skill installation conversation-only; the unified
page may manage installed Device Packages but must not add an install picker.
- Treat selected-model Web Search as a model tool, not a Marketplace Plugin.
- Avoid semantic overlap with concurrent task
`20260903-design-message-send-client-8d3f2a71`, whose owner confirmed it does not
touch Plugin navigation, pages, sidebar, or router.
## Outcome
- Recommend one sidebar entry and canonical `/plugins` page.
- The page should use one searchable list with source/status/scope filters rather
than three destination tabs: official catalog and locally installed packages are
source projections; acquired/installed/enabled are status filters; the active
project is a scope filter.
- One Plugin detail panel should compose description, capabilities, Token Point
summary, account/device state, current-project enablement, Agent assignments, and
plugin-specific settings while dispatching each mutation to its existing owner.
- Legacy `/plugin-marketplace`, `/my-plugins`, and `/project-plugins` routes should
redirect to deterministic `/plugins` query states during the navigation cutover.
- Official Data Service and Game Resource remain Plugin entries. Model Web Search
belongs in selected-model capabilities and should not appear as a Plugin card.
- A unified projection must tolerate partial backend failure: cached official data
and local Device Packages remain visible independently.
- The accepted direction is now frozen as Spec `ML-PLUGIN-NAV-001`, including the
pure Renderer projection Interface, source-qualified item identity, action matrix,
exact legacy redirects, partial-failure behavior, accessibility contract, file
ownership, tests, four implementation stages, and Definition of Done.
## Verification
- Concurrent Task Gate PASS after the peer owner confirmed disjoint scope.
- Planning Gate PASS after reading the required project memory, architecture,
domain rules, and current integrated state.
- Inspected current sidebar/router and all three Renderer Plugin pages on exact base
`e9875145b41a2cb1827de10d27a4fc6a352704ea`.
- Reviewed official OpenAI Plugins documentation for the single directory,
marketplace-source grouping, Installed projection, enable/disable behavior, and
new-session activation semantics.
- Re-ran the Concurrent and Planning Gates before writing the implementation Spec;
the AI Design peer still has disjoint file and semantic ownership.
- Re-inspected current Renderer stores, DTO projections, page actions, route/module
guards, sidebar entries, unit tests, E2E seams, and canonical Device Package/model
tool rules on the recorded base.
- No executable tests were run because this task makes no product changes; tests
would not alter the design conclusion.
## Follow-ups
- Implement `PN-01` through `PN-04` serially in an isolated client task after explicit
implementation authorization.
- Run fresh Standards and Spec review over the implementation range before promotion
to `main`.
## Promotion Candidates
- If accepted, promote the single-Plugin-surface navigation and state-as-filter
distinction into the architecture/module map during the later Integration Gate.
- Promote the explicit distinction between native selected-model tools and Plugin
entries into the user-facing glossary if future UI work makes that distinction
visible outside Code.

View File

@@ -1,162 +0,0 @@
# Task: Implement unified plugin workspace ML-PLUGIN-NAV-001
## Identity
- Task ID: 20260903-plugin-navigation-implementation-a4c7e291
- Mode: Feature
- Branch: codex/20260903-plugin-navigation-implementation-a4c7e291-plugin-navigation-implementation
- Worktree: C:\Users\7brot\.codex\worktrees\1721\makelore
- Base commit: 959e2faf03dfacb3c8e2035e44774436c752d4b0
- Owner: codex
- Status: Ready for Integration
## Scope
- Implement approved Spec `ML-PLUGIN-NAV-001` serially as PN-01 through PN-04:
a pure source-qualified Renderer projection, one `/plugins` workspace and detail
surface, a hard route/sidebar cutover with exact replace redirects, removal of the
three superseded page implementations, and focused/full/Electron verification.
- Own only the Spec-listed Renderer page/navigation/tests/artifact-marker/README
paths plus this task record. Preserve the existing Marketplace, Device Package,
Coding Plugin, Agent assignment, runtime admission, and billing authorities.
## Intent And Constraints
- Concurrent Task Gate passed for the exact identity/base/worktree above. The
superseded exact-overlap task `20260903-plugin-navigation-implementation-6b4d9e21`
was released from the registry after source-thread adjudication; its worktree,
branch, and record were not removed or modified by this task.
- Planning Gate passed after reading repository guidance, the complete Spec, startup
project memory, architecture/domain rules, relevant indexes, and the completed AI
Design peer record. That peer explicitly excludes plugin pages, navigation,
Sidebar, and router, so no semantic overlap remains.
- Confirmed public test seams are `buildPluginWorkspaceProjection`, the unified
Renderer page/local dispatcher/detail dialog, route/sidebar/module guards, and the
targeted Renderer-to-Main Electron flows. Work vertically red -> green at those
seams rather than mocking internal modules.
- Use `official:`, `local:`, and `retained:` identity without inferred cross-source
merging. Keep local installation conversation-only, native selected-model Web
Search out of the projection, system-included actions restricted, and local package
state explicitly device-global.
- Do not change Server, Electron Main/plugin contracts, the three existing stores,
Package Store/runtime/billing authority, app identity/global paths, or add a
persistent Zustand authority, compatibility layer, feature flag, or visible local
installation picker.
- Do not write or clean `D:\\Datas\\OthersProjects\\makelore`; do not push, create a
PR, deploy, publish, install a package, or merge `main`.
## Project Context Loaded
- Project goal: present official, acquired, local-device, project, and Agent Plugin
state through one understandable UI while preserving each existing authority.
- Current integrated focus: curated Marketplace Release A, system-included Data
Service, code-owned bundled Game Resource, conversation-only Device Packages, and
selected-model native Web Search are already integrated contracts.
- Decisions affecting this task: acquisition/device delivery/project enablement/Agent
assignment/runtime admission/billing remain independent; Device Packages are
device-global and child workers remain empty; Renderer access stays behind typed
Host API facades.
- Relevant evidence: the integrated Marketplace and Device Package suites establish
the current DTO/authority behavior; installed-client Device Package activation is a
separate release gate and is not claimed by this UI task.
- Likely modules: `src/pages/{PluginMarketplace,MyPlugins,ProjectPlugins,Plugins}`,
`src/App.tsx`, layout navigation/guards, `src/lib/ai-modules.ts`, their unit/E2E and
artifact marker tests, and `README.md`.
- Unknown to verify before implementation: whether the current public Renderer DTOs
express every Spec field without contract changes. A real interface conflict blocks
that range rather than authorizing a wrapper or compatibility path.
- Non-blocking stale context: canonical `module-map.md` still names the old three-page
UI and must be proposed for later Integration Gate promotion, not edited in feature
mode.
## Outcome
- `PN-01` added the pure `buildPluginWorkspaceProjection` interface, canonical
query parser/serializer, and a local command dispatcher. The projection keeps
`official:`, `local:`, and `retained:` identities separate; preserves
catalog/Library/project-only/local/retained entries under partial failures;
excludes only the native selected-model `makelore_web_search`; and derives the
Spec action matrix without writing a store.
- `PN-02` replaced the three page-specific views with one `/plugins` workspace and
one detail dialog. It independently loads Catalog, Library, Device Packages, and
current-project projection; exposes URL-backed scope/source/state/search/detail
state; keeps source errors local; dispatches every action to its existing owner;
embeds the existing Data Service settings surface; resets project-scoped
confirmation on project change; and provides dialog focus, Escape, focus-return,
status, alert, and destructive-scope semantics.
- `PN-03` reduced the Code sidebar to `sidebar-nav-plugins`, registered the
initialization-safe and non-provider-gated canonical route, added the three exact
replace redirects, and deleted the old Marketplace, My Plugins, and Project
Plugins implementations and their superseded page tests. No hidden fallback
implementation remains.
- `PN-04` updated the targeted Electron flows, product artifact markers, and
`README.md`. The E2E authenticated fixture now starts a fresh Renderer document
against a Main-owned session and `/api/auth/me` identity; this removed a measured
reload/localStorage setup race without changing product authentication code.
- Actual changed scope is limited to `src/pages/Plugins/**`, the listed route/layout
files, deletion of the three old page directories, focused unit/Electron tests,
`scripts/lib/pi-product-artifact.mjs`, `README.md`, and this task record. No
Server, Electron Main, Marketplace/Device/Coding store, Package Store, runtime,
billing, or persistence authority was changed; no fourth Zustand authority was
added.
## Verification
- `corepack pnpm run typecheck` — passed after the final E2E fixture edit.
- `corepack pnpm run lint:check` — passed with 0 errors. Five pre-existing warnings
remain in untouched files: one `react-hooks/exhaustive-deps` warning in
`src/pages/Home/index.tsx` and four `react-refresh/only-export-components`
warnings in `src/pages/Makelore/index.tsx`.
- `corepack pnpm test` — passed: 225 regular test files with 1821 passed and 2
skipped tests, followed by the isolated pressure file with 1 passed test.
- `corepack pnpm run build:vite` — passed for Renderer, Electron Main, Preload, and
utility worker. Existing warnings remain for stale Browserslist data,
static/dynamic imports, and the existing large Renderer chunk.
- `corepack pnpm run test:e2e -- tests/e2e/plugin-marketplace.spec.ts
tests/e2e/project-plugins.spec.ts --reporter=line` — passed after its production
build with all 4 targeted Renderer-to-Main flows.
- `corepack pnpm exec playwright test tests/e2e/plugin-marketplace.spec.ts -g
"keeps system, bundled, and local actions" --repeat-each=10 --workers=1
--reporter=line` — 10/10 passed after stabilizing the authenticated fixture.
- `corepack pnpm exec vitest run tests/unit/pi-product-artifact.test.ts
--maxWorkers=1` — passed: 15/15 artifact proof tests.
- Focused projection/query/controller/page/navigation/Main-layout suites passed;
the final page suite passed 5/5, including project-switch confirmation reset and
dialog initial-focus/Escape/focus-return behavior.
- Existing parent/child/worker lifecycle coverage passed in the full suite through
`coding-plugin-effective-resolver`, `pi-managed-worker-opener`,
`device-package-manager`, and `device-package-routes` tests.
- `check_doc_drift.py --task-id
20260903-plugin-navigation-implementation-a4c7e291` — passed the feature-task
ownership boundary check.
- `git diff --check` passed before Task Documentation Gate finalization.
- One full-suite run transiently failed the untouched Marketplace client temp
Package Store install case; its exact isolated rerun passed 1/1 and the subsequent
full suite passed as recorded above. An earlier targeted E2E run exposed the
test-only auth reload race; trace inspection showed no Library request and a
signed-out persisted fixture, after which the clean-document Main-session fixture
passed 10/10 and the formal targeted command passed 4/4.
## Follow-ups
- No implementation follow-up or product deviation is known. The canonical module
map promotion below remains intentionally deferred to an Integration Gate.
## Promotion Candidates
- Target: `.project-docs/20-architecture/module-map.md`.
- Proposal: replace the three legacy Renderer plugin pages with the pure unified
projection, `/plugins` workspace/detail surface, canonical query state, and exact
legacy redirects; keep Catalog, Library, official Package Store, Device Packages,
project enablement, Agent assignment, admission, and billing under their existing
owners.
- Evidence: approved Spec `ML-PLUGIN-NAV-001`, this task's single implementation
commit, pure projection/action tests, route/page tests, artifact proof, full unit
suite, production build, and 4/4 targeted Electron flows.
- Future impact: architecture readers will use `/plugins` and
`src/pages/Plugins/plugin-workspace-model.ts` as the Renderer aggregation seam and
will not extend the deleted page implementations.
- Semantic conflicts: none known; the concurrent AI Design task owns no plugin
navigation or plugin authority surface.
- Human confirmation: no new product-direction decision is required, but promotion
must still occur only in an exclusively owned Integration Gate.

View File

@@ -0,0 +1,92 @@
# Task: Integrate unified plugin workspace into client main
## Identity
- Task ID: 20260903-plugin-navigation-integration-4f7c2a96
- Mode: Integration
- Branch: main
- Worktree: D:\Datas\OthersProjects\makelore
- Base commit: e9875145b41a2cb1827de10d27a4fc6a352704ea
- Owner: codex-root
- Status: Ready for Integration
## Scope
- Fast-forward client `main` from exact base
`e9875145b41a2cb1827de10d27a4fc6a352704ea` through the approved unified Plugin
workspace design and reviewed product head
`d7058e6383f1e9dd72c32570cf83b9f439d91033`.
- Promote only the accepted Integration-Gate memory changes: record the unified
`/plugins` surface in current state and replace the stale three-page entry in the
architecture module map.
- Preserve the three pre-existing untracked task records in the client root exactly;
do not stash, reset, clean, delete, move, or adopt them.
- Run bounded integration verification, complete the task documentation gate, and
release the root integration lock.
## Intent And Constraints
- The fixed product range is
`959e2faf03dfacb3c8e2035e44774436c752d4b0...d7058e6383f1e9dd72c32570cf83b9f439d91033`.
R4 task `20260903-plugin-navigation-acceptance-r4-9c2f6a41` independently passed
Standards and Spec with zero findings.
- Preserve the existing Catalog, Account Library, official Package Store, Device
Package, project enablement, Agent assignment, runtime admission, and billing
authorities. This integration changes only the already-reviewed Renderer product
and canonical project memory.
- Keep local Skill/extension installation conversation-only and keep selected-model
native Web Search outside the Plugin projection.
- Related task `20260903-design-message-send-client-8d3f2a71` is Ready for Integration
and explicitly excludes Plugin pages, navigation, Sidebar, and router code; no
semantic or file ownership conflict exists.
- Do not push, open a PR, deploy, publish, package, or install a client.
## Project Context Loaded
- Startup memory, integrated current state, decisions, system overview, module map,
data flow, business rules, success criteria, glossary, evidence, commitments, and
stale-item registry were read from the exact client base.
- The approved `ML-PLUGIN-NAV-001` specification and the implementation, three
remediation, and final R4 acceptance records were read in full.
- `main` at `e9875145b41a2cb1827de10d27a4fc6a352704ea` is an exact ancestor of the
reviewed product head, so the product integration is eligible for `--ff-only`.
- Concurrent Task Gate: Passed. Planning Gate: Passed.
## Outcome
- Fast-forwarded local client `main` from
`e9875145b41a2cb1827de10d27a4fc6a352704ea` to the exact reviewed product head
`d7058e6383f1e9dd72c32570cf83b9f439d91033`; no merge conflict or product
rewrite occurred.
- The canonical Code Plugin surface is now one sidebar entry and one `/plugins`
workspace. The three old routes remain replace-only redirects and the deleted old
page implementations do not remain as fallbacks.
- Promoted the implementation task's architecture candidate into `module-map.md`,
recorded the integrated product and R4 evidence in `current-state.md`, and corrected
the obsolete My Plugins wording in the durable Device Package rule.
- Preserved all three pre-existing untracked client-root task records exactly. No
push, PR, deployment, publication, package, or user-machine installation occurred.
## Verification
- Pre-integration ancestry check proved the root base is an ancestor of the reviewed
product head; `git merge --ff-only` advanced through exactly five commits (approved
design plus implementation and three remediations).
- Final R4 acceptance record reports Standards PASS and Spec PASS with zero findings
over `959e2faf03dfacb3c8e2035e44774436c752d4b0...d7058e6383f1e9dd72c32570cf83b9f439d91033`.
- Post-merge focused verification passed: 8 files / 83 tests.
- Post-merge `corepack pnpm run typecheck` passed.
- Source evidence retained by R4: full unit 1842 passed / 2 skipped plus pressure 1
passed; lint 0 errors with 5 pre-existing warnings; all Vite targets passed; targeted
Electron Plugin E2E passed 4/4.
- `check_project_docs`, task-aware document drift, staged diff check, exact branch/HEAD,
and final root-status checks are part of the closing gate.
## Follow-ups
- A rebuilt and installed client smoke remains a separate release activity; it was not
authorized or required by this source integration.
## Promotion Candidates
- None recorded.

View File

@@ -1,148 +0,0 @@
# Task: Plugin navigation remediation
## Identity
- Task ID: 20260903-plugin-navigation-remediation-c5e8a731
- Mode: Feature
- Branch: codex/20260903-plugin-navigation-remediation-c5e8a731-plugin-navigation-remediation
- Worktree: C:\Users\7brot\.codex\worktrees\plugin-nav-remediation-c5e8a731\makelore
- Base commit: 1b1f206dd8aeb7bf69e61b0cd684f70accce9e26
- Owner: codex-01a0656d
- Status: Ready for Integration
## Scope
- Remediate the five fixed-range Spec failures reported by task
`20260903-plugin-navigation-acceptance-5e8b3c72` on implementation head
`1b1f206dd8aeb7bf69e61b0cd684f70accce9e26`.
- Own only `src/pages/Plugins/**`, their focused unit/page tests, and this task
record. No store, Electron Main, server, runtime, billing authority, sidebar,
module guard, or legacy redirect change is in scope.
- Deliver one remediation commit for a fresh fixed-range Standards + Spec review;
do not merge `main`, push, create a PR, deploy, publish, package, or install.
## Intent And Constraints
- Concurrent Task Gate passed for the exact identity/base/worktree above. The
prior implementation and acceptance tasks are Ready for Integration and are
read-only. The AI Design peer explicitly excludes Plugin pages/navigation, so
no file or semantic ownership overlap exists.
- Planning Gate passed after reading the exact project-memory tree, authoritative
Spec `ML-PLUGIN-NAV-001`, ADR-006, prior implementation/acceptance records, and
the current Renderer projection/page/controller plus Marketplace DTO/store
contracts.
- Confirmed public TDD seams are the pure projection/query resolver, the local
command dispatcher, and `PluginsView`/route composition. Tests must fail before
each production correction and observe URL, commands, copy, and detail output
rather than private implementation calls.
- Continuously canonicalize invalid URL state without a one-shot ref or replace
loop, while preserving one visible no-project fallback notice.
- Preserve a source-qualified `retained:` project selection even when Catalog or
Library recognizes the same ID; it may use those sources only for display
metadata and may dispatch only disable for the projection's original project ID.
- Treat `status=unavailable` plus retained version/channel/reason as an existing
device package for cleanup and same-channel update semantics. Show its reason,
mark retained snapshots stale after refresh failure, and distinguish suspended
from retired without inferring state across sources.
- Render operation-level pricing only from Marketplace detail or current project
policy, deduplicated by capability/operation identity and without client-side
price calculation.
- Distinguish signed-out acquisition from authenticated Library failure. Signed-out
users receive an explicit login command; authenticated unknown Library state
remains fail-closed.
- Existing DTOs already expose every required field, so no authority/interface
conflict is present. If later evidence contradicts that conclusion, stop the
affected range rather than add a compatibility layer or broaden ownership.
- Preserve the root workspace and all peer worktrees; in particular do not write
or clean `D:\\Datas\\OthersProjects\\makelore`.
## Project Context Loaded
- Product goal: one understandable Plugin workspace that composes, but never
merges, Catalog, Library, device package, project, Agent, admission, and billing
authorities.
- Current state: official bundled Plugins, conversation-only Device Packages, and
selected-model native Web Search already have separate delivery/runtime rules;
the unified Renderer implementation is complete but failed five acceptance roots.
- Relevant decisions: Electron Main retains runtime/credential ownership; Device
Packages are device-global and child workers remain empty; account acquisition,
device delivery, project enablement, Agent assignment, admission, and billing do
not advance one another.
- Relevant evidence: the acceptance record identifies unreachable scope fallback,
lost recognized retained IDs, mishandled unavailable installations/stale status,
omitted detail operations/pricing, and missing signed-out action as exact failures.
- Canonical-memory candidate remains the prior implementation task's deferred
module-map promotion; this feature remediation does not edit integrated memory.
- Known documentation drift: `read-before-planning.md` names old locations for
`memory-index.md` and `current-state.md`; the exact existing files were resolved
with `rg --files` and read successfully, so this is non-blocking.
## Outcome
- Replaced one-shot URL normalization with a pure query resolution result and a
Router-location marker that carries the no-project fallback notice across the
canonical replace. Canonical URL and scope controls now remain aligned when the
active project changes or the same mounted route receives a new invalid query,
without a `setSearchParams` loop or effect-owned React state.
- Preserved catalog/Library-recognized `unknownPluginIds` as source-qualified
`retained:` rows in both project and all scopes. They reuse only recognizable
display metadata and expose exactly one mutation: disable against the project
ID recorded by the project projection.
- Treated `MarketplaceInstallation.status=unavailable` with a retained version
and channel as an existing device package for same-channel update and device
removal, while keeping runtime/project actions fail-closed. Cards and details
display the retained version reason, failed retained snapshots show `缓存`, and
suspended/retired states have distinct copy.
- Added a read-only detail operation projection. Marketplace detail operations
render without a project; the current project policy replaces a duplicate
operation as one complete server-owned billing projection, while detail-only
operations remain visible. No pricing is calculated or inferred locally.
- Added an explicit `sign_in` command for signed-out free catalog entries and
dispatch it to the existing `/login` route. Authenticated Library failure still
reports unknown delivery and exposes no acquisition mutation.
- No route, store, Electron Main, server, runtime, billing authority, sidebar, or
E2E file changed. No new authority, fallback, feature flag, compatibility layer,
or visible local-package installation entry was added.
- This task supplies a remediation candidate only. It does not claim the fresh
fixed-range Standards + Spec review has passed.
## Verification
- TDD URL RED: focused query/page tests failed because the production composition
erased `scope=project` before the fallback notice and only normalized the first
URL. GREEN: the final query + page run passed 2 files / 13 tests.
- TDD projection/action RED: focused model/controller/page tests produced the six
expected failures for retained unavailable installation semantics, stale and
lifecycle copy, recognized retained IDs, signed-out action, login dispatch, and
visible status copy. GREEN: the focused five-file suite passed 5 files / 34 tests.
- TDD detail RED: the two new page assertions failed because Marketplace detail
operations were absent without a project and a detail-only operation disappeared
when project policy existed. GREEN: `tests/unit/plugins-page.test.tsx` passed all
9 tests with server pricing output and duplicate identity coverage.
- `corepack pnpm run typecheck`: passed (`tsc --noEmit`).
- `corepack pnpm run lint:check`: passed with zero errors. Five pre-existing
warnings remain in `src/pages/Home/index.tsx` and `src/pages/Makelore/index.tsx`;
neither file is owned or changed by this task.
- `corepack pnpm test`: passed 225 files / 1830 tests with 2 skipped, followed by
the isolated pressure file passing 1 file / 1 test (aggregate 226 files / 1831
passed / 2 skipped).
- `corepack pnpm run build:vite`: passed all Renderer, Electron Main, Preload, and
release utility builds. Existing Browserslist-age, mixed dynamic/static import,
and large-chunk warnings remain non-blocking.
- `corepack pnpm run test:e2e -- tests/e2e/plugin-marketplace.spec.ts tests/e2e/project-plugins.spec.ts --reporter=line`:
passed the existing 4/4 Electron flows. The command also rebuilt all production
targets successfully. The E2E set was not expanded because the remediation is
covered at the production composition/pure projection seams and did not require
a route or Host API change.
- `git diff --check`: passed before documentation closeout.
## Follow-ups
- Run fresh fixed-range Standards + Spec review over
`959e2faf03dfacb3c8e2035e44774436c752d4b0...remediation HEAD`; do not integrate
or merge `main` before that independent acceptance completes.
## Promotion Candidates
- None. This remediation changes no durable authority or architecture decision;
the prior implementation task's module-map candidate remains the correct owner.

View File

@@ -1,125 +0,0 @@
# Task: Plugin navigation R2 remediation
## Identity
- Task ID: 20260903-plugin-navigation-remediation-r2-b8e4d317
- Mode: Feature
- Branch: codex/20260903-plugin-navigation-remediation-r2-b8e4d317-plugin-navigation-remediation-r2
- Worktree: C:\Users\7brot\.codex\worktrees\plugin-nav-remediation-r2-b8e4d317\makelore
- Base commit: c5020ae22c9bef1b5bc8190469998127842c4513
- Owner: codex-01a0656d
- Status: Ready for Integration
## Scope
- Remediate the three R2 Spec findings against product base
`c5020ae22c9bef1b5bc8190469998127842c4513`.
- Preserve the exact canonical `/plugins?...` route through a successful login,
while accepting only safe internal return paths and retaining `/module-select`
as the default.
- Pass device/project refresh-failure provenance into the pure plugin workspace
projection so retained snapshots stay visible and are labelled as cached.
- Surface `CodingPluginProject.policyStatus` (`stale` or `unavailable`) beside
affected project policy/pricing; leave `current` unmarked.
- Add focused projection, page, controller, login/route regressions and run the
required unit, typecheck, lint, Vite, and relevant Electron verification.
- Produce one remediation commit and a clean READY_FOR_INTEGRATION handoff.
## Intent And Constraints
- Follow the authoritative unified plugin workspace Spec and the exact three
findings recorded by R2 review commit
`a698c41b39f11b4ebe15fd0f74b5fb8457ae3514`.
- Work test-first through public projection, page, controller, and router seams.
- Keep Catalog, Library, Package Store, Device Packages, project enablement,
Agent Skill assignment, runtime admission, and billing authorities unchanged.
- Do not modify stores, Electron Main, server/runtime/billing contracts, or add
a new cache/authority, compatibility layer, feature flag, or wrapper layer.
- Limit product edits to `src/pages/Plugins/**` and `src/pages/Login/index.tsx`;
a minimal existing route seam is permitted only if required by the login
regression. Corresponding unit/page/route tests and this task record are owned.
- Keep original R1 fixes covered and unchanged in semantics.
- Do not merge main, push, create a PR, deploy, publish, or install to a user
machine. Do not modify or clean any other worktree or the repository root.
## Project Context Loaded
- Product goal: finish ML-PLUGIN-NAV-001 R2 remediation without merging existing
backend or runtime authorities into the Renderer projection.
- Current state: base `c5020ae22c9bef1b5bc8190469998127842c4513`
contains the initial implementation and R1 remediation; R2 Standards passed
with zero findings and R2 Spec reported exactly three Medium roots.
- Relevant decisions: `/plugins` is the canonical Code-owned, initialization-safe
route; auth return uses router state; source-qualified identities and
fail-closed partial-source behavior remain intact; Renderer displays but does
not calculate or authorize project policy/billing state.
- Evidence: the authoritative Spec, R2 review record, current App/Login/Plugins
composition, device-package and coding-plugin snapshot-preservation stores,
and existing unit/Electron fixtures were inspected.
- Likely modules: `src/pages/Plugins/plugin-workspace-controller.ts`,
`src/pages/Plugins/plugin-workspace-model.ts`, `src/pages/Plugins/index.tsx`,
`src/pages/Plugins/PluginDetails.tsx`, `src/pages/Login/index.tsx`, and focused
tests under `tests/unit` (plus relevant existing Electron coverage if needed).
- Unknowns/risks: dependency availability in the fresh worktree must be checked;
the stable public route unit seam may be more appropriate than expanding the
Electron fixture for the login-return contract.
- Concurrent task assessment: the authoritative task owner exactly matches this
managed worktree, branch, and base. Same-topic implementation/remediation/review
tasks are READY_FOR_INTEGRATION; remaining planning peers declare no overlapping
ownership of the scoped Plugin/Login files or semantics.
- Concurrent Task Gate: Passed.
- Planning Gate: Passed.
## Outcome
- Plugin acquisition sign-in now carries the exact canonical workspace path
(including scope/source/state/search/selected-plugin query) in router state.
Login returns to that same path after successful credential and model sync.
- Login accepts only supported same-app absolute return paths with one leading
slash. Absolute external and protocol-relative targets fall back to
`/module-select`; the existing no-return default is unchanged.
- The pure workspace projection now receives bounded device/project refresh
failure provenance. Preserved local package, project-backed official, and
retained unknown rows stay visible and render as cached; project failure does
not mark catalog-only official rows.
- Project policy status is projected verbatim onto project-associated official
and retained rows. Details explain `stale` and `unavailable` beside billing,
while `current` remains unmarked. No status changes commands, admission, or
client-side pricing.
- No stores, Electron Main, server, runtime, billing authority, dependencies,
legacy routes, or unrelated product files were changed.
## Verification
- TDD login/controller RED: 2 expected failures (bare `/login`, fixed
`/module-select`); GREEN: 2 files, 18 tests passed.
- TDD refresh provenance RED: 2 expected failures (`stale=false` in model/page);
GREEN: 2 files, 26 tests passed.
- TDD policy status RED: 5 expected failures (missing projection and copy);
GREEN: 2 files, 32 tests passed.
- Focused plugin/login/route suite: 6 files, 58 tests passed.
- `pnpm run typecheck`: passed.
- `pnpm run lint:check`: passed with 0 errors and 5 pre-existing warnings in
`src/pages/Home/index.tsx` and `src/pages/Makelore/index.tsx`, outside this diff.
- `pnpm test`: 225 files / 1841 tests passed / 2 skipped, plus the isolated
coding-chat pressure file 1/1 passed.
- `pnpm run build:vite`: passed. Existing Browserslist age, mixed static/dynamic
import, and chunk-size warnings remained non-failing.
- Targeted Electron E2E (`plugin-marketplace.spec.ts` and
`project-plugins.spec.ts`): final combined rerun 4/4 passed. The first combined
run was 3/4: one case timed out waiting for the test fixture to observe
`/api/auth/me` before any plugin assertion. Playwright trace showed successful
Electron launch and reload with no console/renderer crash; the isolated rerun
passed 1/1, then the full targeted rerun passed 4/4.
- Public router Login regression covers exact canonical return plus rejected
external/protocol-relative targets and unchanged default behavior.
## Follow-ups
- Source task will run a fresh fixed-range Standards + Spec acceptance review.
- Do not merge to main before that independent acceptance.
## Promotion Candidates
- None. The changes implement the already-authoritative ML-PLUGIN-NAV-001 Spec
and do not introduce a new shared architecture or product decision.

View File

@@ -1,112 +0,0 @@
# Task: Plugin navigation R3 detail retry remediation
## Identity
- Task ID: 20260903-plugin-navigation-remediation-r3-f3a8c4d1
- Mode: Feature
- Branch: codex/20260903-plugin-navigation-remediation-r3-f3a8c4d1-plugin-navigation-remediation-r3
- Worktree: C:\Users\7brot\.codex\worktrees\plugin-nav-remediation-r3-f3a8c4d1\makelore
- Base commit: 0bfabc0df24fdd41c37af498f7a4e49bc00d31db
- Owner: codex-01a0656d
- Status: Ready for Integration
## Scope
- Remediate the R3 detail-loading retry loop against exact product base
`0bfabc0df24fdd41c37af498f7a4e49bc00d31db`.
- Make automatic official-detail loading selection-scoped: at most one automatic
request per detail open, a stable local error after rejection, and one new
attempt after explicitly closing and reopening the same detail.
- Add a public Renderer/page regression for reject/settle and close/reopen, while
preserving the existing A-to-B late-detail protection.
- Produce one remediation commit and a clean READY_FOR_INTEGRATION handoff.
## Intent And Constraints
- Follow the authoritative ML-PLUGIN-NAV-001 Spec, especially section 5.4 and
ERR-001/ERR-005 in section 7.2, plus the exact R3 acceptance finding supplied
by the source task.
- Work test-first through the public `Plugins` Renderer/page seam.
- Limit product edits to `src/pages/Plugins/index.tsx` and the necessary focused
plugin page test. This task record is the only project-document write owned by
the task.
- Do not modify stores, Electron Main, server, runtime, billing, router, Login,
dependencies, or any other worktree/root checkout.
- Do not add a cache, persistent authority, compatibility layer, feature flag,
broad retry framework, or speculative UI.
- Do not merge main, push, create a PR, deploy, publish, or install the app.
## Project Context Loaded
- Product goal: close the R3 P1 finding without changing the unified plugin
workspace's authority boundaries or its existing R1/R2 behavior.
- Current state: exact HEAD and merge-base are
`0bfabc0df24fdd41c37af498f7a4e49bc00d31db`; only this newly created task
record is untracked. Marketplace `loadDetail` sets `loading`, then `error` and
rejects on a supported request failure. The current page effect observes that
error and immediately calls it again.
- Relevant decisions: official detail is loaded on demand; source failures must
remain local and stable; Renderer must not create a second cache or retry
authority; stale A detail must never replace selected B.
- Evidence inspected: the complete ML-PLUGIN-NAV-001 Spec, current project
memory, the R2 task record, `src/pages/Plugins/index.tsx`, the Marketplace
store detail transition, and existing public page/model tests.
- Likely modules: `src/pages/Plugins/index.tsx` and
`tests/unit/plugins-page.test.tsx` only.
- Risks: an already-loading detail must count as the current open's automatic
attempt so a later failure cannot trigger a compensating request; changing or
clearing selection must reset the attempt boundary without weakening store
generation protection.
- Concurrent task assessment: task_context identity, worktree, branch, and base
match exactly. Remaining Planning peers are old Marketplace/ML-07 reviews or
unrelated modules and declare no ownership of this page/test or retry
semantic. Concurrent Task Gate: Passed. Planning Gate: Passed.
## Outcome
- `Plugins` now records the official detail selection's automatic attempt before
observing later `loading` or `error` state. A rejected request therefore
settles as one stable local detail failure instead of immediately starting an
unbounded retry loop.
- Clearing selection resets that local attempt boundary. Closing and reopening
the same official detail permits exactly one new automatic request; changing
A to B likewise establishes B's own attempt without changing Marketplace
store generation or late-result protection.
- The public page regression drives the real route composition, reproduces the
supported store `error` transition, proves one call while open, observes the
existing detail error surface, closes the dialog, and proves one additional
call only after reopening.
- No store, Electron Main, server, runtime, billing, router, Login, dependency,
or unrelated product file was changed.
## Verification
- TDD RED: `tests/unit/plugins-page.test.tsx` reported the new contract failure
exactly: `loadDetail` expected 1 call after the detail error settled but
received 2 (13 existing tests passed, 1 new test failed).
- TDD GREEN: `tests/unit/plugins-page.test.tsx` passed 14/14.
- Focused plugin suite (`plugins-page`, projection model, query, controller):
4 files / 39 tests passed, including the existing A-to-B late-detail model
regression and the prior R1/R2 behavior.
- `pnpm run typecheck`: passed.
- `pnpm run lint:check`: passed with 0 errors and 5 pre-existing warnings in
`src/pages/Home/index.tsx` and `src/pages/Makelore/index.tsx`, outside this
diff.
- `pnpm test`: 225 files / 1842 tests passed / 2 skipped; the separately run
coding-chat pressure test passed 1/1.
- `pnpm run build:vite`: Renderer, Electron Main, Preload, and utility worker
builds passed. Existing Browserslist age, mixed static/dynamic import, and
large-chunk warnings remained non-failing.
- Targeted Electron E2E (`plugin-marketplace.spec.ts` and
`project-plugins.spec.ts`): 4/4 passed after the script's production rebuild.
- `git diff --check`: passed; the product diff is limited to
`src/pages/Plugins/index.tsx` and `tests/unit/plugins-page.test.tsx`.
## Follow-ups
- Source task will run a fresh fixed-range R4 Standards + Spec review. Do not
merge to main before that independent acceptance.
## Promotion Candidates
- None recorded.