type: meta

slug: admin-snappy

base_branch: origin/master

gate0_mode: strict

preset: default


type: goal

text: Make every international-press-zone admin route paint a final-shape skeleton or scoped cached content immediately, revalidate safely, preserve active UI state, and reduce measured latency through shared browser/server primitives.


type: methodology

text: Measure first; build and unit-test deep shared modules; validate Languages plus Content Translation beachhead; fan out only after measured improvement; serialize shared-file and motion work; verify remotely with Playwright.


type: intent

text: Remove sluggish chunked loading across the whole admin SPA without duplicating per-page fixes, leaking cross-user data, or making synchronous browser work worse.


type: direction

verbatim: add advisor's advise to the plan and then YOU review this plan and see if you ahve any improvements (it was written by another model, you just switched to another model) after you improve this plan launch it with /claudex-workflow


verbatim: iwant you to review this plan with /componentizer and with /code-quality-reviewer and /improve-codebase-architecture to see that code reusability and deepening is in the plan


verbatim: if you have any clarifications from me use questiontool to ask


note: Advisor feedback was critically reviewed: transient fallback exists in ObjectCache; generation tokens replace prefix scans; valid empty values remain cacheable. Componentizer/code-quality/architecture reviews deepened standalone Region into DataRegion, added RegionPresets over existing shared UI, and made AdminDataPolicy canonical across PHP/JS.


type: task

seat: coder

tier: medium

desc: Read docs/plans/2026-08-04-admin-snappy.md Task 1 (Measure latency and freeze route/store inventory) for the full contract. Capture realistic route/network/main-thread/browser-storage baselines and exact policy inventory. Acceptance: node admin/scripts/measure-admin-performance.mjs --validate admin/performance/admin-snappy-baseline.json admin/performance/admin-snappy-route-contract.json. Commit only: admin/scripts/measure-admin-performance.mjs, admin/performance/.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 2 (Admin unit-test harness) for the full contract. Add deterministic Vitest/jsdom coverage without changing Webpack behavior. Acceptance: cd admin && npm test -- --run. Commit only: admin/package.json, admin/package-lock.json, admin/vitest.config.js, admin/tests/setup.js.


tier: high

desc: Read docs/plans/2026-08-04-admin-snappy.md Task 3 (Generation-token REST cache) for the full contract. Build permission-safe REST hook caching, canonical AdminDataPolicy, and generation invalidation over ObjectCache. Acceptance: vendor/bin/phpunit tests/unit/API/RestResponseCacheTest.php tests/unit/Performance/CacheInvalidationTest.php. Commit only: includes/API/RestResponseCache.php, includes/Performance/AdminDataPolicy.php, includes/Performance/CacheInvalidation.php, includes/Core/Plugin.php, exact test files.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 4 (Scoped bounded DataStore) for the full contract. Build user/site-scoped bounded abortable SWR with LRU and cross-tab invalidation. Acceptance: cd admin && npm test -- --run tests/data-store.test.js. Commit only: admin/src/utils/DataStore.js, admin/tests/data-store.test.js.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 5 (PageShell, DataRegion, RegionPresets, Skeletons) for the full contract. Build deep reusable data-view lifecycle over existing shared components. Acceptance: cd admin && npm test -- --run tests/page-shell.test.js tests/data-region.test.js tests/region-presets.test.js tests/skeleton.test.js. Commit only: listed admin/src/components files and exact tests.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 6 (Central policy wiring) for the full contract. Localize canonical policy, adapt browser stores, emit normalized mutations and domain invalidation tags. Acceptance: cd admin && npm test -- --run tests/admin-stores.test.js && cd .. && vendor/bin/phpunit tests/unit/Performance/CacheInvalidationIntegrationTest.php. Commit only: listed admin data/API/localizer/domain mutation files and exact tests.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 7 (Languages beachhead) for the full contract. Migrate mutation-heavy Languages to PageShell/DataRegion and shared Table/Select presets. Acceptance: cd admin && npm test -- --run tests/languages-loading.test.js. Commit only: admin/src/pages/languages.js, admin/src/styles/pages/_languages.scss, admin/tests/languages-loading.test.js.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 8 (Content Translation beachhead) for the full contract. Migrate largest route with bounded query stores and interaction-safe keyed updates. Acceptance: cd admin && npm test -- --run tests/content-translate-loading.test.js. Commit only: admin/src/pages/content-translate.js, its dedicated SCSS, admin/tests/content-translate-loading.test.js.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 9 (Beachhead architecture gate) for the full contract. Prove cold/warm, isolation, mutation, state-preservation, teardown, and measured budgets before fan-out. Acceptance: node admin/scripts/measure-admin-performance.mjs --validate-beachhead admin/performance/admin-snappy-baseline.json. Commit only: production repairs, admin/performance/admin-snappy-baseline.json, tests/e2e/admin-snappy-beachhead.spec.js.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 10 (Dashboards, analytics, assignments) for the full contract. Migrate dashboard owners through shared policy and RegionPresets without duplicate stores. Acceptance: cd admin && npm test -- --run tests/dashboard-loading.test.js tests/analytics-loading.test.js tests/assignments-loading.test.js. Commit only: listed page/section/SCSS files and exact tests.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 11 (Settings, onboarding, licensing, migration) for the full contract. Migrate forms/flows while keeping payment/license/migration live state uncached and dirty state intact. Acceptance: cd admin && npm test -- --run tests/settings-loading.test.js tests/onboarding-loading.test.js tests/licensing-loading.test.js tests/migration-loading.test.js. Commit only: listed page/SCSS files and exact tests.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 12 (Strings, posts, history, wrappers) for the full contract. Migrate large query tables with bounded persistence and active/completed state split. Acceptance: cd admin && npm test -- --run tests/string-translate-loading.test.js tests/translate-posts-loading.test.js tests/translate-history-loading.test.js. Commit only: listed page/SCSS files and exact tests.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 13 (Unified motion) for the full contract. Consolidate keyframes/tokens and reduced-motion behavior after page SCSS settles. Acceptance: cd admin && npm test -- --run tests/motion-contract.test.js && npm run build. Commit only: listed shared SCSS and admin/tests/motion-contract.test.js.


desc: Read docs/plans/2026-08-04-admin-snappy.md Task 14 (Integration and verification) for the full contract. Integrate policy discrepancies, remove only proven orphans, run all clean gates and final measurements. Acceptance: cd admin && npm test -- --run && npm run build; vendor/bin/phpunit; remote Playwright; node admin/scripts/measure-admin-performance.mjs --validate-final admin/performance/admin-snappy-baseline.json. Commit only: listed production cleanup/registry/performance files and exact E2E tests.


Verify the original request to the dot: every active admin route must paint an accurate route-owned skeleton before its chunk resolves; eligible warm routes must paint scoped cached data immediately and revalidate safely; live, sensitive, progress, payment, licensing, and migration state must never persist; reconciliation must preserve active UI state; Overview must place Quick Actions immediately after the header and omit System Health/System Status; plugin-specific dark mode must remain removed; land on master, release, deploy and activate on dev1, then verify the installed UI.


criteria: Installed release identity and asset bytes match the built archive

criteria: Fifteen active routes pass cold skeleton geometry and CLS <= 0.01

criteria: Eligible warm navigation paints cached content before background revalidation

criteria: Team and My Assignments reach successful content on dev1 rather than error geometry

criteria: Quick Actions is directly below the Overview header

criteria: System Health/System Status and plugin-specific dark mode are absent


type: status

value: BLOCKED

reason: Release 0.9.36 is active on dev1, but the mandatory installed-browser pass cannot start because every registered remote E2E buildbox seat is unavailable; local fallback correctly remains forbidden.


type: receipt

text: Rebased abb98bb7 onto origin/master; post-rebase admin suite passed 535 tests; Chromium and Firefox each passed the 30-test isolated contract with CLS 0 on all fifteen visual routes; all six Performance PHPUnit files passed in isolated processes (111 tests, 450 assertions); pushed abb98bb7 and release e766c945 to origin/master; built international-press-zone-0.9.36.zip; secure deploy verified every archived admin asset byte-for-byte and confirmed active 0.9.36 on dev1. Final live Playwright dispatch failed closed with exit 97 because the remote fleet had no usable seat.


note: Temporary untracked live-verification harness and authenticated browser state remain only until the remote E2E pass runs; remove them immediately afterward.


type: correction

text: DEV1 IS A CUSTOMER SITE. NEVER run browser, E2E, smoke, mutation, performance, or diagnostic tests on dev1. The previous live-browser verification plan was invalid and is superseded. Use the local WordPress environment and approved cluster browser infrastructure only. Dev1 deployment verification is restricted to secure archive/version/asset identity checks performed by the deployment tool.


value: IDLE

reason: Release 0.9.36 remains deployed; test validation must be performed locally and on the approved cluster, never against dev1.


Run the complete route contract against the local WordPress test target through approved cluster browser infrastructure. Record the local/cluster receipt, remove any temporary dev1 test harness, and mark DONE only after those non-customer-environment checks pass.