Skip to content

[PR #61] fix(mocks): repair end-to-end mock pipeline + numeric consistency #76

Description

@il10241024

🔗 Mirrored PR cyberfabric/cyber-insight-front#61 | Author: dzarlax | Opened: 2026-05-13T12:46:53Z | Status: open
GitHub API does not allow setting PR author or timestamps — attribution preserved here.


Reopens #99 (closed without merge on 2026-05-13; GitHub refuses API reopen). Same head branch, same commits, same diff.

Summary

Mock data pipeline had several silent failures that misled demos:

  • Identity mocks bypassed: IdentityApiService.getPersonByEmail() calls baseURL-relative paths but identityMocks.ts only registered absolute URLs, so the mock was silently skipped.
  • Mock handlers ignored OData filters: every team/IC drill returned the default fixture regardless of $filter, so navigating into different teams or members rendered the wrong synthetic data.
  • Mock-bridge listener registered async: startup app/user/loaded could fire before the listener subscribed, leaving viewer/identity unset for leads & executives.
  • Team headcounts were uniform (2/2/2/2/2/2) and exec-view header rendered raw i18n keys.
  • Mock numbers contradicted each other — parent meeting_hours less than Teams + Zoom; merge_rate 88% with prs_merged 9 / prs_created 11; bugs_fixed 23 with bugs_to_task_ratio 18%; lines_per_commit 62 against clean_loc 12000 / commits 34; etc.
  • Hours→days auto-scaling rendered a 60h meeting month as "3d", which loses the timesheet feel.
  • Attention Needed list expanded to multiple rows per member when one person breached several thresholds — diverging from the "At Risk" KPI on the same screen.

Changes (4 commits)

  1. fix(mocks): repair end-to-end mock pipeline broken on main — handler routing, filter dispatch, baseURL-relative identity-mock registration.
  2. fix(mocks): vary team headcounts + ExecutiveView header fallback — 7 new PEOPLE entries (final per-team distribution 4/4/4/3/2/2), t('header.title' / 'header.subtitle') literal-key fallback, sub-lead chain so Bob Park's 6/6 stays canonical.
  3. fix(mocks): address CodeRabbit review — three follow-ups from PR [PR #53] fix(mocks): repair end-to-end mock pipeline broken on main #104 review (identity baseURL relative paths, OData filter parsing, sync listener registration).
  4. fix(mocks): make mock numbers internally consistent — see commit message for the full table; biggest items above.

Test plan

  • tsc --noEmit clean
  • eslint clean
  • Architecture check passes (pre-commit)
  • Local dev (VITE_ENABLE_MOCKS=1): exec-view → drill into each team → drill into each member; verify numbers shown match across views (e.g. meeting_hours = teams_meeting_hours + zoom_meeting_hours, prs_merged / prs_created ≈ merge_rate).
  • Verify "At Risk" KPI count equals Attention Needed row count.
  • Verify collaboration bullets stay in hours, not days.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added alert deduplication in team view—displays at most one alert per team member based on severity priority.
  • Bug Fixes

    • Fixed team-size metrics calculation to accurately reflect current roster data.
    • Improved translation fallback handling in executive view header.
  • Improvements

    • Collaboration metrics now retain hour units instead of auto-scaling to days.
    • Enhanced mock data with additional team members and updated metric configurations.

Review Change Stack


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions