Review 14.3 Merged

97809[TASK] Make the dashboard null-safe

Benjamin Kott CR +2 V +2 Normal +135 −70 updated 11/18/26, 21:46

Commit message

Third step towards strictNullChecks, this time for the dashboard. It
needs its own commit because the module keeps two pieces of genuinely
nullable state - the dashboard currently shown and the widget being
dragged - and almost every error traces back to one of them.

Where a method runs as part of an interaction it guards the state once
and works with a local from there on, which a closure keeps narrowed
while a `let` would not. Where a helper can only ever run with a
dashboard on screen, the assumption is now stated once in an accessor
rather than repeated at every dereference, in the same spirit as the
top window accessor. The widget element follows the same shape: its
widget is absent only while it is still being fetched, and no caller
below the fetch can observe that.

Two smaller things came out of it. The preset step of the dashboard
wizard declared a value as a string although it starts out as null and
is reset to null, and its task rendered without an initial state, which
would have yielded undefined where a template was expected. The chart
initializer read a computed style from an element it never checked for.

The non-null assertions this step relies on are added with
strictNullChecks itself, as no-unnecessary-type-assertion reports every
such assertion until the option is enabled.

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
  • Verified V +2 Done
    • Benjamin Kott +2
    • core-ci +1 CI

Issues 2

Files 6

Review log 57

  1. Benjamin Kott commented on patch set 1 11/18/26, 21:21

    Cherry Picked from branch main. The following files contain Git conflicts: * Build/Sources/TypeScript/dashboard/dashboard.ts * typo3/sysext/dashboard/Resources/Public/JavaScript/dashboard.js
  2. Benjamin Kott uploaded patch set 2 11/18/26, 21:25

  3. Benjamin Kott commented on patch set 2 11/18/26, 21:25

    This change is ready for review.
  4. core-ci voted on patch set 2 V +1 11/18/26, 21:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114931

  5. core-ci voted on patch set 1 V -1 11/18/26, 21:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114930

  6. Benjamin Kott voted on patch set 2 CR +2 V +2 11/18/26, 21:46

  7. Benjamin Kott merged patch set 3 11/18/26, 21:46