Skip to content

docs(roadmap): correct stale Phase 1/2 status; drop dead result-view plumbing (#266) - #267

Merged
HugoFara merged 2 commits into
developfrom
docs/roadmap-phase1-status
Aug 5, 2026
Merged

docs(roadmap): correct stale Phase 1/2 status; drop dead result-view plumbing (#266)#267
HugoFara merged 2 commits into
developfrom
docs/roadmap-phase1-status

Conversation

@HugoFara

@HugoFara HugoFara commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Closes part of #266. Two commits: a documentation correction that motivated the
cleanup, and the cleanup itself.

1. ROADMAP.md was two months stale

ROADMAP.md was last edited at 21:46 on 2026-06-10. The review-surface bundling
(f1f062c24, 22:18) and the navbar de-coupling (d6e6a5203, 22:58) landed the
same evening and it never caught up, so it still claimed the global navbar was
PHP-rendered and that Model B was missing the review surface. Both shipped in
3.2.0.

Verified before rewriting: PageLayoutHelper::buildNavbar() no longer exists,
PHP emits only <div id="navbar-root">, mountNavbar() is called
unconditionally from main.ts:169, and grepping
navbar-item|navbar-menu|navbar-brand|navbar-burger across src/**/*.php
returns zero hits.

Phase 1 is therefore complete apart from the legacy-fragment cleanup, which is
the second commit. Phase 2's Model B remaining list drops from three items to
on-device QA only.

2. Dead legacy result-view plumbing

Audited the *_result.php mechanism by matching each config element the
TypeScript dispatches on against the views that emit it. Four had no emitter:

Config element PHP emitters
data-lwt-delete-result-config 0
data-lwt-insert-wellknown-result-config 0
data-lwt-insert-ignore-result-config 0
data-lwt-delete-multi-result-config 0

word_status_ajax.ts is dead for the same reason: its only entry point is an
onDomReady hook reading #word-status-config, and neither that element nor
the #status_change_log it writes to exists anywhere in src/. Its docblock
still pointed at status_result.php, a view that is already gone.

Checked this was dead code rather than a missing feature — the modern reader
deletes through word_store.deleteWord()TermsApi.delete(), an entirely
separate path.

Removed: the four handlers with their interfaces and dispatch blocks;
word_status_ajax.ts plus its barrel export and test; and
deleteWordFromDOM / deleteMultiWordFromDOM / updateHoverSaveInDOM, which
lost their last callers. markWordWellKnownInDOM / markWordIgnoredInDOM stay
text_keyboard.ts and simple_interactions.ts still use them, so each
helper was checked individually rather than deleted by association.

A real bug fell out of it

The review table's "edit term" button linked to edit_tword.php?wid= with
target="ro". That filename has not been routed since v3, and ro / #frames-r
is a frame no view renders, so it 404'd into a stray named window. It now uses
/word/edit-term?wid=, matching what review_view.ts:376 already did for the
same action. That was the last data-action="show-right-frames" emitter, so
that case goes too.

The seven views still using this mechanism are listed in the
word_result_init.ts docblock so the next drift is visible.

Verification

psalm 0 errors · phpcs PSR12 clean · tsc clean · eslint clean · vitest 4418 pass
· phpunit 9174 pass · npm run build:all clean.

The 1 PHPUnit warning and 4 deprecations are byte-identical on a stashed
baseline.

E2E: ran the full Cypress suite, then re-ran it against a stashed tree. Both
give 185 passing / 36 failing with the same per-spec breakdown, so this branch
introduces no regression. Those 36 are pre-existing on develop and are being
fixed separately — they cluster into an ambiguous cy.click() selector (12 of
the 14 auth failures), the API spec never being updated for the CSRF middleware
(bare cy.request() POST/PUT now 403), and a missing /wordpress/start link.

ROADMAP.md was last edited at 21:46 on 2026-06-10; the review-surface
bundling (f1f062c, 22:18) and the navbar de-coupling (d6e6a52, 22:58)
landed the same evening and it never caught up. Two months on it still
claimed the global navbar was PHP-rendered and that Model B was missing
the review surface.

- Phase 1: add the completed global-navbar bullet (buildNavbar() is gone;
  PHP emits only #navbar-root and mountNavbar() hydrates it from
  GET /api/v1/navbar). Drop the 'still PHP-rendered' remainder.
- Phase 1: dated status line -- every mobile-critical surface is
  shell-free; only the legacy-fragment cleanup is open (#266).
- Phase 1: name the nine surviving *_result.php views so the cleanup is
  concrete rather than 'some fragments'.
- Phase 2: Model B remaining cut to on-device QA only; the bundle covers
  connect/library/reader/review.
- Fix the view-template count (94 -> 93) and a pre-existing MD013.
Static audit of the *_result.php mechanism against the views that feed it.
Four handlers in word_result_init.ts dispatch on config elements that no
PHP view emits any more:

  data-lwt-delete-result-config
  data-lwt-insert-wellknown-result-config
  data-lwt-insert-ignore-result-config
  data-lwt-delete-multi-result-config

word_status_ajax.ts is dead for the same reason -- its only entry point is
an onDomReady hook reading #word-status-config, and neither that element
nor the #status_change_log it writes to exists anywhere in src/. Word
deletion in the modern reader goes through word_store.deleteWord() ->
TermsApi.delete(), so nothing here is a missing feature.

Removed:
- the four handlers, their interfaces and dispatch blocks
- word_status_ajax.ts + its barrel export + its test
- deleteWordFromDOM / deleteMultiWordFromDOM / updateHoverSaveInDOM, which
  had no callers left (initHoverSaveResult inlines its own version).
  markWordWellKnownInDOM / markWordIgnoredInDOM stay -- text_keyboard.ts
  and simple_interactions.ts still use them.

Also fixed a genuinely broken link found on the way: the review table's
'edit term' button pointed at edit_tword.php with target="ro", a route
that no longer exists opening into a frame that is no longer rendered. It
now uses /word/edit-term, matching review_view.ts. That was the last
data-action="show-right-frames" emitter, so that case goes too.

The seven views still using this mechanism are listed in the
word_result_init.ts docblock so the next drift is visible.

Gates: psalm 0 errors, phpcs PSR12 clean, tsc clean, eslint clean,
vitest 4418 pass, phpunit 9174 pass. E2E unchanged vs baseline (36
pre-existing failures on develop, identical per-spec breakdown).
@HugoFara
HugoFara merged commit fbd0b37 into develop Aug 5, 2026
14 checks passed
@HugoFara
HugoFara deleted the docs/roadmap-phase1-status branch August 6, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant