From b3b8fa361c3497a20f38e96a62154b2b583ff380 Mon Sep 17 00:00:00 2001 From: Dan Knauss Date: Sun, 5 Jul 2026 19:53:38 -0600 Subject: [PATCH 1/2] =?UTF-8?q?docs(planning):=20add=20v1.5=20research=20t?= =?UTF-8?q?odo=20=E2=80=94=20analyze=20Admin=20Menu=20Editor=20prior=20art?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Capture a first-class research spike to study Jānis Elsts' Admin Menu Editor (w-shadow, 300k+ installs) for how it handles Maestro's tricky parts — menu identity/slug drift, replay against the live $menu/$submenu globals, submenu targeting without a stable id, per-role/per-user cosmetic hiding, separators, and third-party menu items. Framed as an adopt/avoid/differentiate analysis feeding v1.5 scoping; pairs with the two existing AME-referencing todos. Co-Authored-By: Claude Opus 4.8 --- ...05-research-admin-menu-editor-prior-art.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .planning/todos/pending/2026-07-05-research-admin-menu-editor-prior-art.md diff --git a/.planning/todos/pending/2026-07-05-research-admin-menu-editor-prior-art.md b/.planning/todos/pending/2026-07-05-research-admin-menu-editor-prior-art.md new file mode 100644 index 0000000..061a46d --- /dev/null +++ b/.planning/todos/pending/2026-07-05-research-admin-menu-editor-prior-art.md @@ -0,0 +1,52 @@ +--- +created: 2026-07-05T00:00:00.000Z +title: Research Admin Menu Editor (Jānis Elsts) for prior art on the tricky parts +area: research +files: + - includes/class-replay.php (apply overrides against the live $menu/$submenu globals — the seam AME also has to solve) + - includes/class-ordering.php (reorder resilience contract for missing/moved items) + - includes/class-slug.php (v1.3.0 Slug::normalize — menu-identity drift) + - .planning/compat/ (R1 third-party compatibility survey — same problem space) +--- + +## Problem / why + +Maestro keeps hitting the same hard edges — menu-item **identity** and slug/URL +drift, **replaying** overrides against the live `$menu`/`$submenu` globals, +**submenu targeting** without a stable id (our DOM-join weak spot, per +TESTING.md), **per-role (and future per-user) cosmetic hiding**, separators, and +third-party menu items that don't behave. Admin Menu Editor by **Jānis Elsts** +(w-shadow, 300k+ installs, ~10+ years) is the deepest prior art in exactly this +space and has almost certainly solved — or documented the sharp corners of — +most of these. Two existing todos already did partial AME prior-art checks; +this captures a focused, first-class research spike. + +## Task (research/analysis — no plugin code) + +Analyze how AME handles Maestro's tricky parts and capture reusable ideas + +pitfalls, framed as **adopt / avoid / differentiate**: + +- **Menu identity** — how does it key items (slug vs URL vs generated id) and + survive slug/URL drift? Compare to our `Slug::normalize()` + `Ordering` + resilience contract. +- **Apply model** — full menu rebuild vs sparse delta over the live globals; + `admin_menu` hook ordering; how it coexists with other plugins that also + filter the menu. +- **Submenu targeting** without a stable id (our index-based `.wp-submenu` + DOM-join is the fragile part today). +- **Visibility model** — per-role / per-user hiding, and how (or whether) it + stays cosmetic vs real access control (ties to Phase 19 / Phase 21). +- **Edge cases** — separators, custom/added items, icon handling; mine their + changelog + support forum for recurring-bug patterns worth pre-empting. +- **Free vs Pro split** — what's gated behind Pro (market-gap signal; already + partly noted in the presets todo). + +**Deliverable:** a short findings note in `.planning/` (or `.planning/compat/`) +with adopt/avoid/differentiate bullets feeding v1.5 scoping — not a feature. + +Candidate for **v1.5** (research spike). Pairs with +[[2026-07-03-config-presets-export-import]] and +[[2026-07-03-declutter-switch-non-core-menu-items]], which already touched AME +prior art. + +Source: Dan's request 2026-07-05. From a61da1d25fde68a67d844f71212e7ce30290934d Mon Sep 17 00:00:00 2001 From: Dan Knauss Date: Sun, 5 Jul 2026 20:02:22 -0600 Subject: [PATCH 2/2] docs(planning): index the AME research todo in STATE.md pending list Addresses Codex P2 on PR #97: the new v1.5 research spike was not surfaced in STATE.md's `Pending Todos` session-continuity index, so planning could miss or duplicate it. Add it alongside the two existing 2026-07-03 v1.5 candidates. Co-Authored-By: Claude Opus 4.8 --- .planning/STATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.planning/STATE.md b/.planning/STATE.md index c61a70e..54e693c 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -189,6 +189,7 @@ Recent decisions affecting current work: - **Named config presets + JSON export/import** — v1.5 candidate; supersedes/extends V2-06 (SPEC.md Roadmap item 6). Research captured in `todos/pending/2026-07-03-config-presets-export-import.md` - **Declutter switch (non-core menu items → bottom section)** — v1.5 candidate; needs discuss/feasibility pass (top_order precedence, CPT handling). Research captured in `todos/pending/2026-07-03-declutter-switch-non-core-menu-items.md` +- **Research Admin Menu Editor (Jānis Elsts) prior art** — v1.5 candidate; research spike on how AME handles Maestro's tricky parts (menu identity/slug drift, replay against live globals, submenu targeting, per-role/per-user hiding, separators). Research captured in `todos/pending/2026-07-05-research-admin-menu-editor-prior-art.md` - **V2-15 (backlog)** — role cloning for per-user menu hiding: superseded by ROLE-01/ROLE-02 in the v1.4 roadmap (Phases 19/21); no longer separately deferred - **COMPAT-04, COMPAT-07, COMPAT-10, DEMO-01** — no longer deferred; mapped to v1.4 Phases 20 and 22