Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Preserve observer-object subscriptions in the debounced event emitter API.
Review effort: Lite
Findings: 1
What changed in this PR
Adds TypeScript typings for third-party integrations and shared frontend helpers without intended runtime changes.
Changes:
- Typed
dom-plane, EnjoyHint, CKEditor, autoscroll, timezone, and resize APIs. - Replaced untyped helper signatures.
- Removed obsolete ESLint suppressions.
Review note: debounced-event-emitter should preserve the Partial<Observer<T>> subscription overload.
| File | Description |
|---|---|
frontend/src/typings/shims.d.ts |
Types the onboarding global. |
frontend/src/typings.d.ts |
Declares dom-plane APIs. |
frontend/src/app/shared/helpers/set-click-position/set-click-position.ts |
Types Gecko event properties. |
frontend/src/app/shared/helpers/rxjs/debounced-event-emitter.ts |
Types emitter subscriptions. |
frontend/src/app/shared/helpers/op-icon-builder.ts |
Types SVG icon data. |
frontend/src/app/shared/helpers/drag-and-drop/dom-autoscroll.service.ts |
Types autoscroll parameters and points. |
frontend/src/app/shared/helpers/debug_output.ts |
Types timing helper results. |
frontend/src/app/shared/helpers/angular/tracking-functions.ts |
Types comparison helpers. |
frontend/src/app/shared/components/editor/components/ckeditor/op-ckeditor.component.ts |
Removes obsolete suppression. |
frontend/src/app/shared/components/editor/components/ckeditor/ckeditor.types.ts |
Adds CKEditor typings. |
frontend/src/app/shared/components/editor/components/ckeditor/ckeditor-setup.service.ts |
Removes obsolete suppression. |
frontend/src/app/shared/components/editor/components/ckeditor-augmented-textarea/ckeditor-augmented-textarea.component.ts |
Removes obsolete suppression. |
frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts |
Types EnjoyHint integration. |
frontend/src/app/core/setup/globals/global-listeners/setup-server-response.ts |
Types the resize timer. |
frontend/src/app/core/datetime/timezone.service.ts |
Types date-related inputs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Warning Flaky specs
🤖 Ask Copilot to investigateCopy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer. |
Declares the dom-plane point, client rect and callback shapes from the library source instead of `any`, and types the autoscroll service's constructor params, pointer point and move event against them. The empty point object is cast once at construction, keeping today's lazily populated behaviour. https://community.openproject.org/wp/OP-20343
Replaces `any` in the comparators, click-position helper, timing helpers, octicon builder and debounced emitter with the types their callers already pass: `unknown` operands, the Gecko-only `rangeParent`/`rangeOffset` event fields, a generic timing result, `SVGData`, and the `EventEmitter` subscribe callbacks. Drops the redundant union in `compareByHrefOrString` and an unused disable. https://community.openproject.org/wp/OP-20343
Types the ISO date formatters with moment's `MomentInput` and `Moment`, since callers pass dates, strings and moments alike, and widens `parseDate` to match. Types the resize debounce handle as the `setTimeout` return type. https://community.openproject.org/wp/OP-20343
Declares the EnjoyHint constructor options and the instance methods the onboarding tour calls, and types `window.onboardingTourInstance` with them. Collapses the redundant `string|unknown` step index signature and drops the disable the typed constructor makes unused. https://community.openproject.org/wp/OP-20343
Declares the parts of the CKEditor instance the app touches: the autosave config lookup, the focus tracker and the toolbar element. Editor and watchdog config arguments become `unknown`, since they are passed through opaquely, and the error stack an optional string. Removes the member-access disables the typed `ui` makes unused. https://community.openproject.org/wp/OP-20343
f8ecee6 to
f1cdcca
Compare
1e00295 to
e9afabb
Compare
|
Warning Flaky specs
🤖 Ask Copilot to investigateCopy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer. |

Ticket
https://community.openproject.org/wp/OP-20343
What are you trying to accomplish?
Part of OP-20341: removes ESLint typing violations around untyped third-party APIs and shared helpers, without changing behaviour.
dom-planemodule and the DOM autoscroll service.Application-code typing violations drop from 1,203 to 1,117;
shared/helpers,core/datetime,core/setupand the CKEditor editor components are at zero.What approach did you choose and why?
Changes are types and boundary casts only; no runtime narrowing was added. The Gecko-only
rangeParent/rangeOffsetevent properties are cast at their one read site, and CKEditor's config type declares only theautosavekey the app reads.TimezoneService#parseDatenow acceptsMomentInput, since filter callers already pass Moment values.DomAutoscrollService#autoScrollreturnsboolean|undefined, matching its two Stimulus callers. Typing CKEditor's UI made three inline disables unused, so they are removed.Typing the autoscroll parameters surfaces three existing
prefer-nullish-coalescinghits on untouched lines; switching||to??there would change behaviour for0, so they stay for the separate nullish-coalescing housekeeping.Stacked on #25656, which touches the same declaration files; GitHub retargets this to
devonce #25656 merges.AI involvement
Directed – I specified the requirements and AI implemented most of it; I validated via testing rather than a full line-by-line review.
Merge checklist
Browser JavaScript diff (3 files, type-only changes omitted)
Each changed browser file (TypeScript and templates, excluding specs, test helpers and declaration files) is transpiled on its own with
frontend/tsconfig.json, before and after; this is the emitted JavaScript that differs.