Repository navigation
fix: type the contributor components and details page (CM-1527) - #4983
Conversation
Refs linuxfoundation/lfx-cdp-insights-ops#227 Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
…CM-1527) Refs linuxfoundation/lfx-cdp-insights-ops#227 Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Refs linuxfoundation/lfx-cdp-insights-ops#227 Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Refs linuxfoundation/lfx-cdp-insights-ops#227 Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
PR SummaryLow Risk Overview Adds Small runtime hardening: activity load more uses optional chaining on the timeline ref; identity profile links use Reviewed by Cursor Bugbot for commit 65a6ea3. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are narrowly scoped typing improvements and a defensive timeline guard, with no identified blocking issues.
0 open findings
What changed in this PR
Improves TypeScript coverage across contributor creation and details views while largely preserving existing behavior.
Changes:
- Refines contributor payload, component, and event types.
- Guards activity loading when the timeline reference is missing.
- Removes unused work-history calculations and lowers the typecheck baseline from 187 to 146.
| File | Description |
|---|---|
| frontend/typecheck-baseline.json | Lowers the error baseline to 146. |
| frontend/src/modules/contributor/types/Contributor.ts | Adds creation payload typing and optional segment ID. |
| frontend/src/modules/contributor/services/contributor.api.service.ts | Uses the creation payload type. |
| frontend/src/modules/contributor/pages/contributor-details.page.vue | Types the scroll event. |
| frontend/src/modules/contributor/components/edit/work-history/contributor-work-history-edit.vue | Types organization labels and removes unused calculations. |
| frontend/src/modules/contributor/components/edit/contributor-add.vue | Corrects identity, payload, and validation types. |
| frontend/src/modules/contributor/components/details/overview/project/contributor-details-projects-sorting.vue | Types the sorting event return value. |
| frontend/src/modules/contributor/components/details/overview/project/contributor-details-projects-affiliation.vue | Defines the project affiliation prop shape. |
| frontend/src/modules/contributor/components/details/overview/contributor-details-projects.vue | Types affiliation grouping keys. |
| frontend/src/modules/contributor/components/details/header/contributor-details-header-profiles.vue | Types profile grouping and handles nullable URLs. |
| frontend/src/modules/contributor/components/details/contributor-details-identities.vue | Requires complete identities for editing. |
| frontend/src/modules/contributor/components/details/contributor-details-header.vue | Aligns platform membership checks with platform types. |
| frontend/src/modules/contributor/components/details/contributor-details-activities.vue | Types query values and guards timeline access. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Gašper Grom <gasper.grom@gmail.com> # Conflicts: # frontend/typecheck-baseline.json
Summary
Types the contributor components and the contributor details page: the header, identities, work experience and affiliations, and the page that hosts them. Type errors on
maindrop from 187 to 146.timeline?.fetchActivities()now no-ops when the timeline ref is missing instead of throwing.nullvalues are marked withshortcut:comments and keep the existing behaviour.contributor-details-header.vueclears once CM-1526 is in.Closes linuxfoundation/lfx-cdp-insights-ops#227