Skip to content

Conversation

@emlimlf
Copy link
Collaborator

@emlimlf emlimlf commented Dec 12, 2025

In this PR

  • Changed the default page from the all projects to the overview page
  • Implemented the new overview page and wired it to the backend

Ticket

CM-801


Note

Introduces a new Overview as the default landing page showing high‑level metrics and integration health, powered by a new /dashboard/metrics backend endpoint and shared UI components.

  • Frontend (Overview):
    • Add new page modules/admin/modules/overview/pages/overview.vue with sections:
      • Summary cards (People, Organizations, Activities, Sub‑projects) using fetchDashboardMetrics.
      • Integration status chips and detailed list with tabs (In progress, Action required, Failed), filters, pagination, and actions.
    • Implement store (overview.store.ts), types, and API service (overview.api.service.ts) using TanStack Query.
    • Add filters for project group/project/sub‑project and integration platform.
    • Persist selected integration tab via localStorage.
  • Backend (API/Service):
    • New endpoint GET /dashboard/metrics (dashboardMetricsGet.ts) with permission check, returning metrics from DashboardService.getMetrics.
    • DashboardService.getMetrics uses data‑access layer; logs and error handling.
    • Data access layer: add dashboards module with getMetrics (reads snapshots, falls back to mock) and getProjectsCount; export in package.
  • Navigation/Routes:
    • Default route redirects to /overview and update side menu to "Overview"; add route overview in admin.
  • UI Kit:
    • Add reusable LFX components: Dropdown (selector, item, search, separator), Popover, Chip; styles and responsive util.
    • Tailwind config: add shadow xs and minor formatting.
  • Integrations:
    • Add actionRequiredMessage mappings across integration configs; GitHub action supports preventAutoOpen.
    • Status config adds chipStatus icon/color used in chips.
  • Dependencies:
    • Add @sxzz/popperjs-es and lodash-es; lockfile updates.

Written by Cursor Bugbot for commit 0ce34c9. This will update automatically on new commits. Configure here.

emlimlf and others added 29 commits December 3, 2025 17:17
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
Signed-off-by: Efren Lim <[email protected]>
@emlimlf emlimlf requested a review from gaspergrom December 12, 2025 09:33
Signed-off-by: Efren Lim <[email protected]>
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

<component
:is="integration.dropdownComponent"
v-if="status.key === 'done' && integration.dropdownComponent.dropdownComponent"
:integration="integration"
Copy link

Choose a reason for hiding this comment

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

Bug: Dropdown component receives config instead of status data

The dropdownComponent receives :integration="integration" which passes the config object (from lfIntegrations()), but it should receive :integration="integrationStatus" to match both the actionComponent pattern at line 35 in the same file and the existing integration-list-item.vue pattern. The config object lacks runtime data like id, status, etc. that dropdown components likely need to function correctly.

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

} = OVERVIEW_API_SERVICE.fetchGlobalIntegrations(params);
// @ts-expect-error - TanStack Query type inference issue with Vue
const totalCount = computed(() => data.value?.pages[0].count || 0);
Copy link

Choose a reason for hiding this comment

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

Bug: Missing optional chaining may cause TypeError

The expression data.value?.pages[0].count uses optional chaining on data.value but not on pages[0]. If data.value exists but pages is an empty array, accessing pages[0] returns undefined, and then accessing .count on it throws a TypeError. The expression needs optional chaining: data.value?.pages?.[0]?.count.

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Signed-off-by: Efren Lim <[email protected]>
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

1 similar comment
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Signed-off-by: Efren Lim <[email protected]>
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

} else {
selectedProject.value = null;
}
}, { immediate: true });
Copy link

Choose a reason for hiding this comment

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

Bug: Project filter doesn't reset sub-project selection on change

When the project selection changes, the sub-project selection is not reset. The project-group-filter.vue correctly clears all child selections (selectedProjectId, selectedSubProjectId, selectedProject, selectedSubProject) when the group changes, but project-filter.vue only updates selectedProject and doesn't clear selectedSubProjectId or selectedSubProject. This causes stale sub-project state when switching between projects, potentially leading to incorrect data filtering since the old sub-project's segment ID remains in the store.

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Signed-off-by: Efren Lim <[email protected]>
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

return useQuery<IntegrationProgress[]>({
queryKey,
queryFn,
enabled: !!params.value.segments,
Copy link

Choose a reason for hiding this comment

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

Bug: Query enabled check fails to prevent empty array requests

The enabled: !!params.value.segments condition is intended to disable the query when there are no segments, but an empty array [] is truthy in JavaScript (!![] evaluates to true). When the integration data hasn't loaded yet, segments defaults to an empty array, causing the query to fire immediately with empty segments. The condition needs to also check array length to properly disable the query when there are no segments to query.

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Signed-off-by: Efren Lim <[email protected]>
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

COUNT(*) as "projectsTotal",
COUNT(CASE WHEN "createdAt" >= NOW() - INTERVAL '30 days' THEN 1 END) as "projectsLast30Days"
FROM segments
`
Copy link

Choose a reason for hiding this comment

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

Bug: Query counts deleted segments despite comment stating otherwise

The getProjectsCount function has a comment explicitly stating "Count all segments not deleted" but the SQL query lacks a WHERE "deletedAt" IS NULL clause. This inconsistency means deleted segments are included in the count, inflating metrics. The codebase consistently uses deletedAt IS NULL filters in other queries (activities, categories, repos) to exclude soft-deleted records.

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

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.

4 participants