Skip to content

fix: type the member module and its merge suggestion owners (CM-1535) - #4985

Merged
gaspergrom merged 4 commits into
mainfrom
fix/CM-1535-member-module-types
Oct 16, 2026
Merged

gaspergrom merged 4 commits into
mainfrom
fix/CM-1535-member-module-types

Conversation

@gaspergrom

@gaspergrom gaspergrom commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Types the member module and the owners of its merge suggestions. Type errors on main drop from 187 to 165.

  • Seven any shortcuts in the merge-suggestion code are marked with shortcut: comments and a named revisit trigger, because typing Contributor fully adds about 45 errors.
  • Two files leave the legacy lint list.
  • No runtime change.
  • The merge-suggestion buttons no longer reference isEditLockedForSampleData. Nothing declares it, so it was always undefined and the buttons were never locked by it.

Closes linuxfoundation/lfx-cdp-insights-ops#235

Copilot AI balanced review requested due to automatic review settings October 16, 2026 03:52
@cursor

cursor Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Mostly compile-time and lint baseline updates; the only user-visible change is dropping a no-op disabled guard on merge-suggestion actions.

Overview
Adds TypeScript to the member merge-suggestion flow and related touchpoints, lowering the frontend typecheck baseline from 88 to 66 errors. member-merge-suggestions.vue and member-merge-suggestions-details.vue move to <script setup lang="ts"> with typed state, emits, and API handlers; several merge payloads still use documented shortcut: any placeholders until Contributor / service return types are modeled.

Behavioral tweak: merge-suggestion Ignore / Merge buttons no longer gate on isEditLockedForSampleData (it was never defined in this component, so it had no effect). merge-suggestions-projects-filter uses Project / SubProject types and optional selectedProjectGroup?.slug; member-dropdown-content adds a HubspotApiService ambient declare for typecheck; MemberMessage.apiErrorMessage is typed to return boolean to match merge error handling.

Collateral typing/formatting only: JSDoc on listProjects, optional chaining on member-list-page saved-views handler, filter API renderers, PermissionGuard, and useOrganizationIdentities. Two member merge files are removed from .eslint/legacy-files.json (vue/block-lang).

Reviewed by Cursor Bugbot for commit dad1e1b. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Source review identified no blocking issues in these focused typing changes; automated checks were not run.

0 open findings

What changed in this PR

Improves typing in the frontend member module and its merge-suggestion components, reducing the recorded type-error baseline from 187 to 165.

Changes:

  • Converts two merge-suggestion components to TypeScript and removes their legacy lint exemptions.
  • Refines callback, project, promise, and nullable-reference types.
  • Documents deferred typing shortcuts and updates the typecheck baseline.
File Description
frontend/​typecheck-baseline.json Lowers the error baseline to 165.
frontend/​src/​shared/​modules/​merge/​types/​MemberMessage.ts Types the error callback’s boolean return.
frontend/​src/​modules/​member/​pages/​member-list-page.vue Guards a nullable filter reference.
frontend/​src/​modules/​member/​components/​suggestions/​member-merge-suggestions-details.vue Adds TypeScript props, events, and refs.
frontend/​src/​modules/​member/​components/​suggestions/​filters/​merge-suggestions-projects-filter.vue Types project selections and guards group access.
frontend/​src/​modules/​member/​components/​member-merge-suggestions.vue Adds TypeScript and normalizes empty suggestion state.
frontend/​src/​modules/​member/​components/​member-dropdown-content.vue Declares the legacy HubSpot service shape.
frontend/​src/​modules/​member/​components/​member-bot-suggestions.vue Specifies the fetch promise return type.
frontend/​src/​modules/​lf/​segments/​store/​actions.js Documents project-list parameter types through JSDoc.
frontend/​.eslint/​legacy-files.json Removes two legacy lint exemptions.

🧠 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
Copilot AI balanced review requested due to automatic review settings October 16, 2026 04:02
@gaspergrom
gaspergrom merged commit a69b306 into main Oct 16, 2026
14 checks passed
@gaspergrom
gaspergrom deleted the fix/CM-1535-member-module-types branch October 16, 2026 04:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review identified no blocking regressions in the typing and cleanup changes; automated checks were not run.

0 open findings

🧠 Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants