Let the dashboard follow the presenter
CI / Deploy / PHP 8.4 (push) Successful in 1m12s
CI / Deploy / PHP 8.5 (push) Successful in 1m13s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped

The live marker in the slide list stayed on the last known slide when the
presenter moved on in another window or with a clicker. The dashboard now
polls a cheap version fingerprint (admin:live) and reloads the lists when it
changes, but never under an open dialog, a pending request or a drag.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-13 12:19:12 +01:00
1 parent 9c6a19f0de
commit 8c7818ee40
7 files changed
+104 -1

No files matched your search

+3
View File
@@ -302,6 +302,9 @@ tests/ PHPUnit; PlenarioTestTrait erzeugt Testdaten, Fixtures
`[data-refresh="head|slides|flash"]` (als DOM-Knoten, nie `innerHTML`) und stellt den Fokus wieder her. Bearbeiten/Anlegen:
Links mit `data-modal` laden das Formular (`[data-modal-content]`) in den Dialog; Validierungsfehler kommen als Formular
zurück (Dialog bleibt offen), Erfolg als Dashboard-Fragment (Dialog schließt). Ohne JS funktioniert alles als normale Seite.
Die Liste folgt auch dem Presenter (Live-Markierung, Status): `initAdminDashboard()` pollt `admin:live` (`AdminController::live()`,
nur `{version}` aus `PollStateService::dashboardVersion()`, billiger als der Presenter-State) und lädt `head`/`slides` nur bei geänderter Version
neu – nie bei offenem Dialog, laufender Anfrage oder Drag & Drop; der Fokus wird wiederhergestellt. Test: `PollResetTest::testDashboardLiveVersionFollowsThePresenter`.
**Buttons mit Bestätigung** nutzen `Form->postButton()` + `data-confirm` (CakePHPs `postLink`/`confirm` erzeugt ein Inline-`onclick`,
das die CSP blockiert); das JS fragt per `window.confirm()` vor dem Absenden. Tests: `AdminFragmentTest.php`.