95425[TASK] Guard nullable values in TypeScript
Commit message
Review
-
Code review CR +2 Done
- Benjamin Kott +2
- Benni Mack +1
-
Verified V +2 Done
- Benjamin Kott +2
- Benni Mack +1
- core-ci +1 CI
Issues 2
Files 121
- Build/Sources/TypeScript/adminpanel/modules/preview.ts+4 −4
- Build/Sources/TypeScript/backend/code-editor/autocomplete/ts-code-completion.ts+3 −3
- Build/Sources/TypeScript/backend/code-editor/autocomplete/ts-parser.ts+1 −1
- Build/Sources/TypeScript/backend/code-editor/autocomplete/ts-ref.ts+1 −1
- Build/Sources/TypeScript/backend/code-editor/element/code-mirror-element.ts+3 −3
- Build/Sources/TypeScript/backend/element/alert-element.ts+2 −2
- Build/Sources/TypeScript/backend/element/combobox-element.ts+2 −2
- Build/Sources/TypeScript/backend/element/draggable-resizable-element.ts+3 −3
- Build/Sources/TypeScript/backend/element/icon-element.ts+1 −1
- Build/Sources/TypeScript/backend/element/status-indicator-element.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/container/inline-control-container.ts+2 −2
- Build/Sources/TypeScript/backend/form-engine/element/extra/char-counter.ts2+1 −1
- Build/Sources/TypeScript/backend/form-engine/element/extra/select-box-filter.ts+3 −3
- Build/Sources/TypeScript/backend/form-engine/element/category-element.ts+3 −3
- Build/Sources/TypeScript/backend/form-engine/element/color-element.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/element/datetime-element.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/element/folder-element.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/element/group-element.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/element/json-element.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/element/mfa-info-element.ts+7 −7
Show 101 more files
- Build/Sources/TypeScript/backend/form-engine/element/password-element.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/element/select-multiple-side-by-side-element.ts+2 −2
- Build/Sources/TypeScript/backend/form-engine/element/select-tree-element.ts+2 −2
- Build/Sources/TypeScript/backend/form-engine/element/select-tree.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/element/slug-element.ts+6 −6
- Build/Sources/TypeScript/backend/form-engine/element/table-permission-element.ts+2 −2
- Build/Sources/TypeScript/backend/form-engine/element/text-element.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/element/text-table-element.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/field-control/add-record.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/field-control/edit-popup.ts+2 −2
- Build/Sources/TypeScript/backend/form-engine/field-control/insert-clipboard.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/field-control/link-popup.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/field-control/list-module.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/field-control/password-generator.ts+4 −4
- Build/Sources/TypeScript/backend/form-engine/field-control/reset-selection.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/field-wizard/value-slider.ts+1 −1
- Build/Sources/TypeScript/backend/form-engine/inline-relation/ajax-dispatcher.ts+1 −1
- Build/Sources/TypeScript/backend/security/element/csp-reports.ts+1 −1
- Build/Sources/TypeScript/backend/security/element/sudo-mode.ts+1 −1
- Build/Sources/TypeScript/backend/settings/editor/editable-setting.ts+1 −1
- Build/Sources/TypeScript/backend/settings/editor.ts+1 −1
- Build/Sources/TypeScript/backend/storage/abstract-client-storage.ts+1 −1
- Build/Sources/TypeScript/backend/toolbar/system-information-menu.ts+1 −1
- Build/Sources/TypeScript/backend/tree/page-browser.ts+2 −2
- Build/Sources/TypeScript/backend/tree/page-position-select.ts+1 −1
- Build/Sources/TypeScript/backend/tree/page-tree-element.ts+2 −2
- Build/Sources/TypeScript/backend/tree/tree-toolbar.ts+1 −1
- Build/Sources/TypeScript/backend/tree/tree.ts+1 −1
- Build/Sources/TypeScript/backend/wizard/steps/finisher-step.ts+1 −1
- Build/Sources/TypeScript/backend/action-dispatcher.ts+11 −14
- Build/Sources/TypeScript/backend/color-scheme-switch.ts+2 −2
- Build/Sources/TypeScript/backend/drag-tooltip.ts+1 −1
- Build/Sources/TypeScript/backend/element-browser.ts+1 −1
- Build/Sources/TypeScript/backend/icons.ts+1 −1
- Build/Sources/TypeScript/backend/image-manipulation.ts+1 −1
- Build/Sources/TypeScript/backend/login-refresh.ts+4 −4
- Build/Sources/TypeScript/backend/modal.ts2+5 −5
- Build/Sources/TypeScript/backend/module-menu.ts+1 −1
- Build/Sources/TypeScript/backend/multi-record-selection.ts+1 −1
- Build/Sources/TypeScript/backend/notification.ts+3 −3
- Build/Sources/TypeScript/backend/viewport.ts+2 −2
- Build/Sources/TypeScript/belog/backend-log.ts+13 −10
- Build/Sources/TypeScript/core/event/debounce-event.ts+2 −2
- Build/Sources/TypeScript/core/event/regular-event.ts3+3 −3
- Build/Sources/TypeScript/core/event/request-animation-frame-event.ts+1 −1
- Build/Sources/TypeScript/core/event/throttle-event.ts+1 −1
- Build/Sources/TypeScript/core/tests/cache/dedupe-async-task-test.ts+10 −8
- Build/Sources/TypeScript/core/utility/debug-exception-handler-service.ts+5 −5
- Build/Sources/TypeScript/core/utility/text-normalizer.ts2+1 −1
- Build/Sources/TypeScript/core/document-service.ts+1 −1
- Build/Sources/TypeScript/core/java-script-item-processor.ts+3 −2
- Build/Sources/TypeScript/extensionmanager/main.ts3+4 −4
- Build/Sources/TypeScript/extensionmanager/repository.ts2+8 −6
- Build/Sources/TypeScript/extensionmanager/update.ts2+11 −9
- Build/Sources/TypeScript/form/backend/form-editor/core.ts+2 −2
- Build/Sources/TypeScript/form/backend/form-wizard/form-wizard.ts+1 −1
- Build/Sources/TypeScript/frontend/default_frontend.ts6+6 −6
- Build/Sources/TypeScript/impexp/context-menu-actions.ts+2 −2
- Build/Sources/TypeScript/impexp/import-export.ts+2 −2
- Build/Sources/TypeScript/indexed-search/pagination.ts+4 −4
- Build/Sources/TypeScript/indexed-search/statistics.ts+5 −2
- Build/Sources/TypeScript/info/translation-status.ts+3 −3
- Build/Sources/TypeScript/install/module/upgrade/core-update.ts+1 −1
- Build/Sources/TypeScript/linkvalidator/linkvalidator.ts+1 −1
- Build/Sources/TypeScript/lowlevel/query-generator.ts+37 −24
- Build/Sources/TypeScript/redirects/short-url-generator.ts+4 −4
- Build/Sources/TypeScript/rte-ckeditor/rte-link-browser.ts+3 −3
- Build/Sources/TypeScript/styleguide/element/theme-switcher-element.ts+1 −1
- Build/Sources/TypeScript/styleguide/find-icons.ts+4 −1
- Build/Sources/TypeScript/styleguide/processing-indicator.ts+8 −3
- Build/Sources/TypeScript/styleguide/render-notifications.ts+3 −3
- Build/Sources/TypeScript/tstemplate/constant-editor.ts+2 −2
- Build/Sources/TypeScript/tstemplate/template-analyzer.ts+1 −1
- Build/Sources/TypeScript/viewpage/main.ts+5 −5
- typo3/sysext/backend/Resources/Public/JavaScript/action-dispatcher.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/viewport.js+1 −1
- typo3/sysext/belog/Resources/Public/JavaScript/backend-log.js+1 −1
- typo3/sysext/core/Resources/Public/JavaScript/event/debounce-event.js+1 −1
- typo3/sysext/core/Resources/Public/JavaScript/event/regular-event.js+1 −1
- typo3/sysext/core/Resources/Public/JavaScript/event/throttle-event.js+1 −1
- typo3/sysext/core/Resources/Public/JavaScript/utility/debug-exception-handler-service.js+2 −2
- typo3/sysext/core/Resources/Public/JavaScript/utility/text-normalizer.js+1 −1
- typo3/sysext/core/Resources/Public/JavaScript/java-script-item-processor.js+1 −1
- typo3/sysext/extensionmanager/Resources/Public/JavaScript/main.js+1 −1
- typo3/sysext/extensionmanager/Resources/Public/JavaScript/repository.js+4 −4
- typo3/sysext/extensionmanager/Resources/Public/JavaScript/update.js+1 −1
- typo3/sysext/frontend/Resources/Public/JavaScript/default_frontend.js+1 −1
- typo3/sysext/impexp/Resources/Public/JavaScript/context-menu-actions.js+1 −1
- typo3/sysext/impexp/Resources/Public/JavaScript/import-export.js+1 −1
- typo3/sysext/indexed_search/Resources/Public/JavaScript/pagination.js+1 −1
- typo3/sysext/indexed_search/Resources/Public/JavaScript/statistics.js+1 −1
- typo3/sysext/info/Resources/Public/JavaScript/translation-status.js+1 −1
- typo3/sysext/linkvalidator/Resources/Public/JavaScript/linkvalidator.js+1 −1
- typo3/sysext/lowlevel/Resources/Public/JavaScript/query-generator.js+1 −1
- typo3/sysext/styleguide/Resources/Public/JavaScript/element/theme-switcher-element.js+1 −1
- typo3/sysext/styleguide/Resources/Public/JavaScript/find-icons.js+1 −1
- typo3/sysext/styleguide/Resources/Public/JavaScript/processing-indicator.js+1 −1
- typo3/sysext/styleguide/Resources/Public/JavaScript/render-notifications.js+1 −1
- typo3/sysext/tstemplate/Resources/Public/JavaScript/constant-editor.js+1 −1
- typo3/sysext/tstemplate/Resources/Public/JavaScript/template-analyzer.js+1 −1
- typo3/sysext/viewpage/Resources/Public/JavaScript/main.js+1 −1
Review log 2635
Show 610 earlier messages
-
Benjamin Kott uploaded patch set 1 08/26/26, 13:09
-
core-ci voted on patch set 1 V +1 08/26/26, 13:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107138
-
Benjamin Kott marked it work in progress 08/26/26, 13:24
-
Benjamin Kott uploaded patch set 2
V +110/15/26, 16:16 -
core-ci voted on patch set 2 V +1 10/15/26, 16:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111227
-
Benjamin Kott updated the commit message in patch set 3
V +110/15/26, 21:02 -
Benjamin Kott marked it ready for review 10/15/26, 21:02
-
core-ci voted on patch set 3 V -1 10/15/26, 21:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111268
-
Benjamin Kott rebased onto patch set 4
V -110/16/26, 07:45 -
core-ci voted on patch set 4 V -1 10/16/26, 08:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111316
-
Benjamin Kott rebased onto patch set 5
V -110/16/26, 09:26 -
Ayke Halder commented on patch set 5 10/16/26, 09:42
Feels like I already worked two years ago on this... * 86716: [TASK] Prepare for ESLint `@typescript-eslint/no-unnecessary-type-assertion` rule and `strictNullChecks` | https://review.typo3.org/c/Packages/TYPO3.CMS/+/86716 * 86724: [TASK] Implement ESLint `@typescript-eslint/no-unnecessary-type-assertion` rule | https://review.typo3.org/c/Packages/TYPO3.CMS/+/86724 ---- So please double-check all newly introduced changes by temporarily activating `strictNullChecks` and additionally `Build/eslint.config.mjs`: ``` rules: { "@typescript-eslint/no-unnecessary-type-assertion": "error", } ``` This should highlight all unnecessary code changes inside your IDE. ---- Overview on TypeScript error reporting - split up on cases by different type-checks: https://www.typescriptlang.org/play/?#code/PQKgsAUJCCA2sAID2AzBAXAFgUwdgHgIYC2ADrNgM4IBG2sSA7ggE5UCus6CAlgHYYcCAMZIyFdPQCevACbY+6HsMLwZAcwXYWhSbIQApAMoik8gFyRIAA1uRRfSt0pjsAST6l23ALwJZSMLsxAroAHQAjuzaUkb02MLoSCwAFADk-F7oaQCUANyQLiEeWQUQRe6e3mEAbqrRZbbWVhAeIoSUuHxIvFXcSDQAVgncPNQoSOx8sgA0CIQC2izJvNRYy4wC-IaEdZTCLDyk-QIsUwC0SiEIjDgChMLCVJT86gjWdbDR1mGQ5wB881gLgQExYCAARAARAD6wChEIAhC03ABZADyvFG1HUSDMgl080WLGW4LG-jG5EIUmw+m2ABUpKRsEYDkduLcFPNHs9XoJcB96thrJYIACELAeABrXDbCHQACMcIAQkrgABhJUQ35QCBwSQsPi6Hg1bDmBBuDmTWD6OgIXH4rCEhZ4EkrcmqNiEWQyWSU2DU2m9fmgngsJwS-jYSCc+6UF7qPh8rCyvrIIYjUXiyUy4PyhXAVUahXalpGHpYclLFaUTDW224FA8fC0nXoskCFSdBDnAncKXdRgUWSaUHLYjIbwveQh0QzhSUdhsai9p3cawVEreaw3HjwBAwvjYU0sGG0YV8TiwHdIU4XK7YGaQHjcFQCO2L0ikZedOkCRnMqyhzHLQMgEOQCQvrAMjsC8fBvBC3R8Ocl77h0nQsEot7IMyOhJCwELvIiIp-ICnS4PKABMKrURqtHQJRhaMeqlGlrqaKYi+qwI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VcDhX7omRBvZ+DCC+H6I+18rzNFKcPUeBhYLcCEuRG4mBCSTK-AuHU8UoHm11kqPgCTMlqLwYgUxKDVYWN8dw0J3VDz5OAYeRx+jnHLNWegSRuCzrSO-iknZPic5+OURk657CNkaPGnwY5hDllnIofww8VybnoA2fchhDMk5pNYWsrOeyUYHKyIDX5RdboG2BXwQFsSWqwhWZtFR8KfZ3K2V4p5-8Xns2oHCj5aiNH4r+eLU50SFlP11tRAltKwUQrJY8mFLsqUhIMZyplCtsWsvIbiwOILCXvJ5aSjxMj+XMPQW7fx4i6VBL9tY5FhDRXopLnqy2nKcWLIKbK7lnzFXJOhaqlOVq1HZLdrqyhBqIDFxFm6llFcgAmain.ts:144Just one example: Here I'd go for ``` const searchField = document.querySelector<HTMLInputElement>(ExtensionManagerIdentifier.searchField); ``` Which is absolute identical to your code but better readable. ---- See the TypeScript playground example below: * Your code: "Type-assertions on left side of assignment - including `null`" * My suggestion: "Type-assertions only on right side of assignment" https://www.typescriptlang.org/play/?#code/PQKgsAUJCCA2sAID2AzBAXAFgUwdgHgIYC2ADrNgM4IBG2sSA7ggE5UCus6CAlgHYYcCAMZIyFdPQCevACbY+6HsMLwZAcwXYWhSbIQApAMoik8gFyRIAA1uRRfSt0pjsAST6l23ALwJZSMLsxAroAHQAjuzaUkb02MLoSCwAFADk-F7oaQCUANyQLiEeWQUQRe6e3mEAbqrRZbbWVhAeIoSUuHxIvFXcSDQAVgncPNQoSOx8sgA0CIQC2izJvNRYy4wC-IaEdZTCLDyk-QIsUwC0SiEIjDgChMLCVJT86gjWdbDR1mGQ5wB881gLgQExYCAARAARAD6wChEIAhC03ABZADyvFG1HUSDMgl080WLGW4LG-jG5EIUmw+m2ABUpKRsEYDkduLcFPNHs9XoJcB96thrJYIACELAeABrXDbCHQACMcIAQkrgABhJUQ35QCBwSQsPi6Hg1bDmBBuDmTWD6OgIXH4rCEhZ4EkrcmqNiEWQyWSU2DU2m9fmgngsJwS-jYSCc+6UF7qPh8rCyvr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BQ1H6G01HA2G2DEFfxBtlROf8oZvwzh-dA2cNalVLpqYhMcIHhyljLQ2UJqHp28JnUISClY-yYWrZaXD3YcywWwnB6ACHiz4WLKEZDpZR0NgxMRCCpH0IdnItBCjkba1LgxLRz9KK6OETjK2RjaEmNtsg2RqDk4AM1pgmhqiTpnTzmAlqVs7FhIcYI020CLYsVcYE9xnjGHeKWqnAJEj2GcKsRoliESiZRIrkXcAEAa7uU8vGbyTdqDYQoN3WWoVcDhX7omRBvZ+DCC+H6I+18rzNFKcPUeBhYLcCEuRG4mBCSTK-AuHU8UoHm11kqPgCTMlqLwYgUxKDVYWN8dw0J3VDz5OAYeRx+jnHLNWegSRuCzrSO-iknZPic5+OURk657CNkaPGnwY5hDllnIofww8VybnoA2fchhDMk5pNYWsrOeyUYHKyIDX5RdboG2BXwQFsSWqwhWZtFR8KfZ3K2V4p5-8Xns2oHCj5aiNH4r+eLU50SFlP11tRAltKwUQrJY8mFLsqUhIMZyplCtsWsvIbiwOILCXvJ5aSjxMj+XMPQW7fx4i6VBL9tY5FhDRXopLnqy2nKcWLIKbK7lnzFXJOhaqlOVq1HZLdrqyhBqIDFxFm6llFcgA -
core-ci voted on patch set 5 V +1 10/16/26, 10:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111331
-
Ayke Halder commented on patch set 5 10/16/26, 10:27
Some more suggestions. Especially have a look at how a type is easily added to `event.target`: ``` element.addEventListener(this.eventName, (e: Event & { target?: HTMLElement }) ```char-counter.ts:23```suggestion private targetElement: HTMLInputElement | HTMLTextAreaElement | null = null; ```modal.ts:150```suggestion @state() templateResultContent: TemplateResult | Element | DocumentFragment | null = null; ```regular-event.ts:44```suggestion element.addEventListener(this.eventName, (e: Event & { target?: HTMLElement }): void => { for (let targetElement = e.target; targetElement && targetElement !== this.boundElement; targetElement = targetElement.parentElement) { ```repository.ts:196```suggestion const searchField = document.querySelector<HTMLInputElement>('.typo3-extensionmanager-searchTerForm input[type="search"]'); ```update.ts:57```suggestion const extensionTable = document.querySelector<HTMLTableElement>(ExtensionManagerUpdateIdentifier.extensionTable); ```default_frontend.ts:55```suggestion document.addEventListener(event, function(evt: Event & { target?: Node }) { for (let node = evt.target; node; node = node.parentNode !== document ? node.parentNode : null) { ``` -
Ayke Halder commented on patch set 5 CR -1 10/16/26, 10:55
No functional changes or bug fixes heretext-normalizer.ts:83This must not be a new feature or bug fix here. ```suggestion .replace(TextNormalizer.latinExpansionPattern, (letter: string): string => TextNormalizer.latinExpansions.get(letter) ?? ''); ``` -
Benjamin Kott uploaded patch set 6
CR -1V +110/23/26, 14:49 -
Benjamin Kott commented on patch set 6 10/23/26, 15:04
Reply
It was not the intention, to not respect or produce double work here. BNF already worked on this before that, and we kept pushing it back and simply decided to give it a fresh shot. We finished both patches and i rebased the chain on these.char-counter.ts:23ReplyDonemodal.ts:150ReplyDonetext-normalizer.ts:83ReplyDonerepository.ts:196ReplyDoneupdate.ts:57ReplyDone -
Benjamin Kott commented on patch set 6 10/23/26, 15:07
Reply
Acknowledged -
Benjamin Kott uploaded patch set 7 10/23/26, 15:42
-
core-ci voted on patch set 6 V -1 10/23/26, 15:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112323
-
Benjamin Kott marked it work in progress 10/23/26, 15:49
-
core-ci voted on patch set 7 V -1 10/23/26, 16:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112343
-
Benjamin Kott uploaded patch set 8
V -111/18/26, 10:59 -
Benjamin Kott commented on patch set 5 11/18/26, 11:23
Reply
Thanks. The querySelector<T>() form is applied throughout. For the event.target typing see the replies in regular-event.ts and default_frontend.ts.regular-event.ts:44ReplyI kept the cast. `Event & { target?: HTMLElement }` makes `target` a plain `HTMLElement` (the intersection drops `null`), so the inferred loop variable no longer admits `null`. With strictNullChecks enabled later in this chain, `targetElement = targetElement.parentElement` then fails to compile. `as HTMLElement | null` asserts the same element type but stays honest about the end of the walk.main.ts:144ReplyDone, it uses querySelector<HTMLInputElement>() now.default_frontend.ts:55ReplySame reasoning as in regular-event.ts: with `{ target?: Node }` the loop variable becomes `Node` without `null`, and `node = ... ? node.parentNode : null` no longer compiles under strictNullChecks. So the cast to `Node | null` stays. -
core-ci voted on patch set 8 V +1 11/18/26, 11:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114855
-
Benjamin Kott commented on patch set 5 11/18/26, 12:02
regular-event.ts:44ReplyKept the cast, see the reply on this line.main.ts:144ReplyDone.default_frontend.ts:55ReplyKept the cast, see the reply on this line. -
Benjamin Kott commented on patch set 8 11/18/26, 12:03
This change is ready for review. -
Ayke Halder commented on patch set 8 11/18/26, 13:49
default_frontend.ts:55ReplyPlease try removing the type-assertion that forces a wrong type by excluding `null` and `undefined`. `evt.target as Node`. After type-assertion is removed: How can the type be fixed? In: ``` for (let node: Node | null = evt.target as Node; node; node = node.parentNode !== document ? node.parentNode : null) { . ``` -
Ayke Halder commented on patch set 8 11/18/26, 14:16
default_frontend.ts:55ReplySorry, it is already fine now! Just rechecked this locally. -
Ayke Halder commented on patch set 8 11/18/26, 14:25
default_frontend.ts:55ReplyAnd for sake of completeness, this works: `(function(evt: Event & {target: Node | null}) {…}) as EventListener` `((evt: Event & {target: Node | null}) => {…}) as EventListener` But it looks to complex, so better don't use: ``` document.addEventListener(event, (function(evt: Event & {target: Node | null}) { for (let node = evt.target; node; node = node.parentNode !== document ? node.parentNode : null) { […] } }) as EventListener); ``` -
Ayke Halder rebased onto patch set 9
V +111/18/26, 14:47 -
core-ci voted on patch set 9 V +1 11/18/26, 15:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114879
-
Benni Mack commented on patch set 9 CR +1 V +1 11/18/26, 17:16
lets get it in before we get more merge conflicts. -
Benjamin Kott voted on patch set 9 CR +2 V +2 11/18/26, 17:33
-
Benjamin Kott merged patch set 10 11/18/26, 17:33