# Instant admin routes — request

Audience: AI coding agents first.

**Goal:** Remove duplicate standalone Fields navigation and make every eligible IPZ admin route paint instantly through canonical cached-loading primitives.

**Source request:** Remove `#/fields`; keep `#/translations/fields`; all admin pages use consistent skeleton/cache primitives; complete all work, push `origin/master`, build release, deploy dev1. Owner correction after 0.9.44: localStorage alone is insufficient. Every eligible page requires two cache layers before remote data: browser localStorage, then plugin cache backed by the local WordPress database, then deferred refresh from the remote data source.

**Status:** ACTIVE.

**Task IDs:** IPZ-INSTANT-ROUTES-01.

**Preserved WIP/ref/path:** `wt/acf-page-cache`; `/home/user/Projects/Press.zone/wordpress/wp-content/.worktrees/acf-page-cache`; start from current integrated `origin/master` history. Shared checkout WIP MUST remain untouched.

**Files:**
- Modify `admin/src/main.js` — remove duplicate sidebar/renderer; redirect legacy hash.
- Modify eligible `admin/src/pages/*.js` only where initial stable GET bypasses canonical stores/regions.
- Modify `includes/Performance/AdminDataPolicy.php` only for missing eligible descriptors or invalidation mappings.
- Modify `includes/API/RestResponseCache.php` only for missing bounded deferred-refresh routes.
- Modify focused admin/PHP/E2E tests proving route and loading matrix.
- Use `docs/specs/2026-08-12-instant-admin-routes-design.md` as architecture contract.

**Acceptance:**
- `#/fields` redirects to `#/translations/fields`; only one Fields navigation entry remains.
- Every registered route paints a route-owned skeleton before chunk resolution.
- Every eligible initial stable GET uses `getDataStore()` + `DataRegion`; valid memory/localStorage paints first, plugin cache from the local WordPress database paints second, and only then deferred remote-source revalidation runs.
- Cache identity partitions by site, user and effective permission context, locale, route, normalized query, plugin version, and schema version.
- Plugin-cache responses are served only after permission callbacks pass and expose `miss`, `hit`, or `stale` status.
- Soft expiry serves stale data while scheduling one bounded background refresh; hard expiry rejects old data.
- Successful mutations invalidate affected generations; failed mutations preserve the last valid snapshot.
- Duplicate background refreshes are suppressed; remote failures retain the last valid local snapshot.
- Durable cache records use non-autoloaded WordPress options/transients and never depend on optional Redis or Memcached.
- Existing stable pages already conforming remain surgically unchanged.
- Authentication, permissions/nonces, active jobs/progress, licensing, payments, migration execution/progress, and other live/sensitive fields remain live and nonpersistent.
- Focus, scroll, tabs, pagination, search, disclosure, selection, busy state, and cleanup remain correct.
- Full admin lint/build/tests and affected PHP suites pass cleanly.
- Canonical Chromium/Firefox route verification proves local database `miss` → `hit` → `stale`, remote-call suppression on hits, and deferred refresh without browser-testing dev1.
- Final tree pushed to `origin/master`; exact verified ZIP deployed to dev1; installed version/archive/admin assets verified.

**Constraints:** Use standard layered stale-while-revalidate only. No new cache service, page storage keys, polling, bypass headers, broad refactor, or subagents. Reuse canonical primitives only. Preserve unrelated WIP. Another session owns ACF UI/remodeling; this lane MUST NOT alter ACF page rendering, interaction, styling, or field-policy behavior. It may verify the existing ACF endpoint as one cache-safe route, but server-cache work must remain generic and independently landable.

**Execution steps:** Audit route/page matrix; add failing contract tests; remove duplicate route; migrate only uncovered eligible initial GETs; verify focused/full gates; browser verify; review; publish; build; deploy; verify identity.

**Current receipt:** Root cause confirmed: `RestResponseCache` previously inherited the optional Redis/Memcached driver and therefore did not guarantee the required WordPress-local database layer. It now explicitly owns a transient-backed `ObjectCache`, so REST envelopes and invalidation generations persist in the local WordPress options database independently of optional external object-cache services. Deferred stale refresh coverage now includes every cache-safe collection route. Cache identity now includes a stable fingerprint of effective granted capabilities. Focused proof passes: REST cache 63 tests/251 assertions, atomic cache 6/21, invalidation policy 35/181, localization policy 19/264; changed cache classes pass PHPStan and PHP syntax checks. Full admin gate passed cleanly with 34 files and 570 tests. Chromium/Firefox database-cache verification is running through the canonical remote browser runner; two earlier invocations failed before test execution because their package working directory was wrong, not because of product behavior.

**Next executable action:** Finish browser cache-header verification, review, publish, release 0.9.45, deploy dev1, verify installed identity.
