Skip to content

feat(support): Zendesk Support dashboard section (v1 + v2)#162

Open
mozhaev-dev wants to merge 2 commits into
mainfrom
feat/zendesk-support-section
Open

feat(support): Zendesk Support dashboard section (v1 + v2)#162
mozhaev-dev wants to merge 2 commits into
mainfrom
feat/zendesk-support-section

Conversation

@mozhaev-dev

@mozhaev-dev mozhaev-dev commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Adds a new Support dashboard section (Zendesk person-support activity) to both v1 and v2 dashboards, mirroring collaboration/ai_adoption.

Consumes the backend Support metric sets (Team …0007 / IC …0008) + support_bullet_rows.* metric_catalog from constructorfabric/insight#1304. 7 bullets: active members, ticket updates, public/private comments, solved tickets, CSAT (% quality), KB articles (ComingSoon — no Guide stream yet).

  • v2 (new design) + shared data path: commit 1.
  • v1 (legacy) surfaces: commit 2.

typecheck clean; vitest 79 passed. Draft — depends on #1304 (backend catalog) and live Zendesk data for end-to-end render.

Part of constructorfabric/insight#497.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Introduced "Support" metrics section across dashboards and team views, tracking support activities including active members, ticket updates, comments, resolved tickets, customer satisfaction (CSAT), and knowledge base contributions
    • Fully integrated with existing metrics visualization, analytics, and drill-down capabilities

Sergey Mozhaev added 2 commits June 14, 2026 19:45
…IGHT-459)

New v2 dashboard section "Support" (person support activity), mirroring the
collaboration/ai_adoption sections. Backend already provides the Team
(…0007) / IC (…0008) bullet metric sets + metric_catalog over
support_bullet_rows.* (insight #1304).

Shared:
- metric-registry: TEAM_BULLET_SUPPORT / IC_BULLET_SUPPORT.
- catalog-client: support → support_bullet_rows prefix so transformBulletMetrics
  resolves the support metric_keys from the wire catalog.
- ic-dashboard / team-view query layer: support added to the section map / data
  shape (these feed the v2 screens' data.support / bySection.support).

v2:
- v2/sections (Ic/Team section ids + lists, label "Support"), v2/metric-order
  (7 keys: active, updates, public/private comments, solved, csat, kb),
  queries/v2/team-extras, engineering-dashboard-v2 + team-view-v2 render,
  section-card preview, section-drilldown-sheet (support branch; support_csat
  as a percent summary, support_kb → ComingSoon).

Mocks: catalog snapshot + v2 factory + handlers for the two metric sets
(support_csat percent, support_kb NULL→ComingSoon).

typecheck clean; vitest 79 passed. (v1 dashboard surfaces follow in the next commit.)

Signed-off-by: Sergey Mozhaev <Sergey.Mozhaev@constructor.tech>
…IGHT-459)

Adds the Support section to the legacy (v1) dashboards, mirroring collaboration
(the v2 + shared layers landed in the previous commit):
- queries/team-metrics: support in TeamMetricsSectionId + SECTIONS (IC_BULLET_SUPPORT).
- screens/team-view + ic-dashboard/engineering-dashboard: render the Support
  section (flat list — no sub-grouping, like task_delivery); support_kb →
  ComingSoon, support_csat is a percent.
- components/team-bullet-sections (SupportSection) + team-metrics-table (order + title key).
- bullet-layout-groups: 7 support_* keys added to BULLET_DISPLAY_ORDER (no
  sub-groups — flat).
- locales: "Support" titles (3 places). mocks/factories: v1 support mock data.

typecheck clean; vitest 79 passed; no new lint.

Signed-off-by: Sergey Mozhaev <Sergey.Mozhaev@constructor.tech>
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

A new "support" bullet section backed by Zendesk metrics (support_active, support_updates, support_public_comments, support_private_comments, support_solved, support_csat, support_kb) is added end-to-end: two metric UUIDs registered, section ID unions extended, queries wired for both IC dashboard and team views, UI components updated, all four screens integrated, and mock data/translations added.

Changes

Support (Zendesk) Bullet Section

Layer / File(s) Summary
Core contracts: registry, section IDs, metric ordering, catalog prefix
src/api/metric-registry.ts, src/lib/insight/v2/sections.ts, src/lib/insight/v2/metric-order.ts, src/lib/insight/bullet-layout-groups.ts, src/api/catalog-client.ts
Registers TEAM_BULLET_SUPPORT and IC_BULLET_SUPPORT UUIDs, extends IcSectionId/TeamSectionId with "support", adds support metric ordering to METRIC_ORDER_BY_SECTION and BULLET_DISPLAY_ORDER, and maps the 'support_bullet_rows' storage prefix in prefixForBulletSection.
Data queries
src/queries/ic-dashboard.ts, src/queries/team-view.ts, src/queries/team-metrics.ts, src/queries/v2/team-extras.ts
Extends BULLET_SECTIONS, TEAM_BULLET_SECTIONS, SECTIONS, and SECTION_METRIC_IDS with support entries; widens IcDashboardData, IcDashboardSection, TeamBulletSectionId, and TeamMetricsSectionId to include "support".
UI components
src/components/widgets/team-bullet-sections.tsx, src/components/widgets/v2/section-card.tsx, src/components/widgets/v2/section-drilldown-sheet.tsx, src/components/widgets/team-metrics-table.tsx
Adds SupportSection collapsible to TeamBulletSections, extends pickPreviewRows with SUPPORT_PREVIEW_KEYS, adds a support_csat CSAT drilldown extras renderer, and registers "support" in TeamMetricsTable's SECTION_ORDER/SECTION_LABEL_KEY.
Screen wiring
src/screens/ic-dashboard/engineering-dashboard.tsx, src/screens/ic-dashboard/engineering-dashboard-v2.tsx, src/screens/team-view.tsx, src/screens/team-view-v2.tsx
Wires support into all four screens: adds a collapsible MetricCard section in EngineeringDashboard, populates rowsBySection.support in the v2 screens, and adds a useTeamBulletSection query with retry and prop threading in TeamViewScreen.
Mock data, catalog snapshot, and translations
src/mocks/v2/factories.ts, src/mocks/handlers.ts, src/mocks/catalog-snapshot.json, src/mocks/factories.ts, src/locales/en/translation.json
Adds SupportBulletRow interface and mockSupportBulletSection factory with seeded Zendesk KPI generation; registers mock handlers for both support metric UUIDs; extends catalog snapshot with 7 Zendesk metric entries; updates mock distributions and scenarios; adds "support" translation keys to three i18n namespaces.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 Hippity-hop, a new section appears,
Support metrics land — Zendesk data cheers!
CSAT and tickets, KB articles too,
Seeded mock rows colored in Zendesk blue.
From registry to screen, the wiring is neat —
Another bullet section, the dashboard's complete! 🎯

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.26% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new Zendesk Support dashboard section to both v1 and v2 dashboards, which is the primary objective of this PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/zendesk-support-section

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mozhaev-dev
mozhaev-dev marked this pull request as ready for review June 15, 2026 05:39

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/mocks/catalog-snapshot.json`:
- Around line 1305-1438: The catalog-snapshot.json file is missing links entries
that map query IDs to the newly added support metrics. Add corresponding links
entries for query IDs 00000000-0000-0000-0001-000000000007 and
00000000-0000-0000-0001-000000000008 that reference the metric IDs of the new
support bullet row metrics (support_active, support_updates,
support_public_comments, support_private_comments, support_solved, support_csat,
and support_kb). This will enable proper catalog-to-query resolution for these
new support section metrics in mock mode.

In `@src/mocks/factories.ts`:
- Around line 374-380: Remove the `support_kb` entry from the numeric mock data
distribution in the metrics object. Instead, add special-case handling in the
`mockTeamBulletSection` function to explicitly set `support_kb` to `value: null`
(and null stats if applicable to `RawBulletAggregateRow`) rather than allowing
it to be populated from the distribution. This ensures that mocks respect the
contract where `support_kb` should remain null until the Guide stream exists,
preventing v1 from rendering real values instead of the ComingSoon state.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8377a2ba-5151-4390-b563-46f65a20a049

📥 Commits

Reviewing files that changed from the base of the PR and between bddede7 and dfa29f8.

📒 Files selected for processing (22)
  • src/api/catalog-client.ts
  • src/api/metric-registry.ts
  • src/components/widgets/team-bullet-sections.tsx
  • src/components/widgets/team-metrics-table.tsx
  • src/components/widgets/v2/section-card.tsx
  • src/components/widgets/v2/section-drilldown-sheet.tsx
  • src/lib/insight/bullet-layout-groups.ts
  • src/lib/insight/v2/metric-order.ts
  • src/lib/insight/v2/sections.ts
  • src/locales/en/translation.json
  • src/mocks/catalog-snapshot.json
  • src/mocks/factories.ts
  • src/mocks/handlers.ts
  • src/mocks/v2/factories.ts
  • src/queries/ic-dashboard.ts
  • src/queries/team-metrics.ts
  • src/queries/team-view.ts
  • src/queries/v2/team-extras.ts
  • src/screens/ic-dashboard/engineering-dashboard-v2.tsx
  • src/screens/ic-dashboard/engineering-dashboard.tsx
  • src/screens/team-view-v2.tsx
  • src/screens/team-view.tsx

Comment on lines +1305 to +1438
{
"id": "019e83b1-5001-7000-a001-000000000001",
"metric_key": "support_bullet_rows.support_active",
"label": "Active Support Members",
"sublabel": "Zendesk · people with any support activity · period total",
"unit": "people",
"higher_is_better": true,
"is_member_scale": false,
"source_tags": [
"zendesk"
],
"schema_status": "ok",
"thresholds": {
"good": 1,
"warn": 0,
"resolved_from": "product-default",
"bounded_by_lock": false
}
},
{
"id": "019e83b1-5001-7000-a001-000000000002",
"metric_key": "support_bullet_rows.support_updates",
"label": "Ticket Updates",
"sublabel": "Zendesk · ticket updates authored · period total",
"unit": "updates",
"higher_is_better": true,
"is_member_scale": false,
"source_tags": [
"zendesk"
],
"schema_status": "ok",
"thresholds": {
"good": 40,
"warn": 15,
"resolved_from": "product-default",
"bounded_by_lock": false
}
},
{
"id": "019e83b1-5001-7000-a001-000000000003",
"metric_key": "support_bullet_rows.support_public_comments",
"label": "Public Comments",
"sublabel": "Zendesk · public replies to requesters · period total",
"unit": "comments",
"higher_is_better": true,
"is_member_scale": false,
"source_tags": [
"zendesk"
],
"schema_status": "ok",
"thresholds": {
"good": 30,
"warn": 10,
"resolved_from": "product-default",
"bounded_by_lock": false
}
},
{
"id": "019e83b1-5001-7000-a001-000000000004",
"metric_key": "support_bullet_rows.support_private_comments",
"label": "Private Comments",
"sublabel": "Zendesk · internal notes on tickets · period total",
"unit": "comments",
"higher_is_better": true,
"is_member_scale": false,
"source_tags": [
"zendesk"
],
"schema_status": "ok",
"thresholds": {
"good": 20,
"warn": 8,
"resolved_from": "product-default",
"bounded_by_lock": false
}
},
{
"id": "019e83b1-5001-7000-a001-000000000005",
"metric_key": "support_bullet_rows.support_solved",
"label": "Tickets Solved",
"sublabel": "Zendesk · tickets moved to solved · period total",
"unit": "tickets",
"higher_is_better": true,
"is_member_scale": false,
"source_tags": [
"zendesk"
],
"schema_status": "ok",
"thresholds": {
"good": 15,
"warn": 5,
"resolved_from": "product-default",
"bounded_by_lock": false
}
},
{
"id": "019e83b1-5001-7000-a001-000000000006",
"metric_key": "support_bullet_rows.support_csat",
"label": "CSAT",
"sublabel": "Zendesk · customer satisfaction · % positive ratings",
"unit": "%",
"format": "percent",
"higher_is_better": true,
"is_member_scale": false,
"source_tags": [
"zendesk"
],
"schema_status": "ok",
"thresholds": {
"good": 90,
"warn": 75,
"resolved_from": "product-default",
"bounded_by_lock": false
}
},
{
"id": "019e83b1-5001-7000-a001-000000000007",
"metric_key": "support_bullet_rows.support_kb",
"label": "Knowledge Base Contributions",
"sublabel": "Zendesk Guide · KB articles created or edited · period total",
"unit": "articles",
"higher_is_better": true,
"is_member_scale": false,
"source_tags": [
"zendesk"
],
"schema_status": "ok",
"thresholds": {
"good": 3,
"warn": 1,
"resolved_from": "product-default",
"bounded_by_lock": false
}
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add missing catalog link mappings for support query IDs.

The new support metric entries are present, but there are no corresponding links entries for query IDs 00000000-0000-0000-0001-000000000007 and 00000000-0000-0000-0001-000000000008. This can break catalog-to-query resolution for the new support section in mock mode.

Suggested patch
   "links": [
+    {
+      "query_id": "00000000-0000-0000-0001-000000000007",
+      "catalog_metric_ids": [
+        "019e83b1-5001-7000-a001-000000000001",
+        "019e83b1-5001-7000-a001-000000000002",
+        "019e83b1-5001-7000-a001-000000000003",
+        "019e83b1-5001-7000-a001-000000000004",
+        "019e83b1-5001-7000-a001-000000000005",
+        "019e83b1-5001-7000-a001-000000000006",
+        "019e83b1-5001-7000-a001-000000000007"
+      ]
+    },
+    {
+      "query_id": "00000000-0000-0000-0001-000000000008",
+      "catalog_metric_ids": [
+        "019e83b1-5001-7000-a001-000000000001",
+        "019e83b1-5001-7000-a001-000000000002",
+        "019e83b1-5001-7000-a001-000000000003",
+        "019e83b1-5001-7000-a001-000000000004",
+        "019e83b1-5001-7000-a001-000000000005",
+        "019e83b1-5001-7000-a001-000000000006",
+        "019e83b1-5001-7000-a001-000000000007"
+      ]
+    },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/mocks/catalog-snapshot.json` around lines 1305 - 1438, The
catalog-snapshot.json file is missing links entries that map query IDs to the
newly added support metrics. Add corresponding links entries for query IDs
00000000-0000-0000-0001-000000000007 and 00000000-0000-0000-0001-000000000008
that reference the metric IDs of the new support bullet row metrics
(support_active, support_updates, support_public_comments,
support_private_comments, support_solved, support_csat, and support_kb). This
will enable proper catalog-to-query resolution for these new support section
metrics in mock mode.

Comment thread src/mocks/factories.ts
Comment on lines +374 to +380
support_active: { median: 4, range_min: 0, range_max: 12 },
support_updates: { median: 120, range_min: 0, range_max: 500 },
support_public_comments: { median: 80, range_min: 0, range_max: 300 },
support_private_comments: { median: 40, range_min: 0, range_max: 200 },
support_solved: { median: 32, range_min: 0, range_max: 120 },
support_csat: { median: 88, range_min: 0, range_max: 100 },
support_kb: { median: 0, range_min: 0, range_max: 20 },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

support_kb should not be generated as numeric mock data.

Line 380 seeds support_kb as a normal numeric metric, so v1 mocks can render real values instead of ComingSoon. That diverges from the support KB contract (null/no-data until Guide stream exists).

A safer fix is to special-case support_kb in mockTeamBulletSection to emit value: null (and null stats if supported by RawBulletAggregateRow) rather than giving it a distribution entry.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/mocks/factories.ts` around lines 374 - 380, Remove the `support_kb` entry
from the numeric mock data distribution in the metrics object. Instead, add
special-case handling in the `mockTeamBulletSection` function to explicitly set
`support_kb` to `value: null` (and null stats if applicable to
`RawBulletAggregateRow`) rather than allowing it to be populated from the
distribution. This ensures that mocks respect the contract where `support_kb`
should remain null until the Guide stream exists, preventing v1 from rendering
real values instead of the ComingSoon state.

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.

1 participant