← Back to Pull requests

[AAP-95233] Fix Job Activity chart clipping current day #3693

Closed
unknown closed this pull request without merging on Oct 02, 2026 18:34 UTC
View on GitHub
unknown unknown commented on Oct 01, 2026 20:40 UTC
Author

Summary

The Job Activity chart did not show the current-day x category even though GET /dashboard/graphs/jobs/ returns current-day counts. Triage confirmed a UI presentation issue, not missing API data.

Root cause: JobsChart labeled controller graph buckets with local calendar dates while the API uses UTC day boundaries, and status series could expose different day lists, so the last day did not always appear as its own category.

Fix (AWX only):

  • Label graph buckets with UTC month/day (matching controller behavior).

  • Align successful / error / failed / canceled series to the same ordered x categories (zero-fill missing days per status).
  • Fixes: AAP-95233

    Before:
    <img width="1920" height="1012" alt="Screenshot From 2026-10-01 18-11-01" src="https://github.com/user-attachments/assets/c30a21c2-a6f9-4220-9b74-90b0edc14c18" />

    After:
    <img width="1920" height="1012" alt="Screenshot From 2026-10-02 10-19-04" src="https://github.com/user-attachments/assets/e48ffa4c-eb9b-47f7-a242-a87e47eb3e28" />

    Type of Change

  • Bug fix

  • Enhancement

  • Tests

  • Documentation

  • Other (please specify)
  • Risk Analysis - REQUIRED

  • High — Broad platform impact (e.g., SWR config, shared framework components, authentication, routing, API wrappers, build/bundler config). Changes affect multiple workspaces or could cause widespread regressions.

  • Medium — Scoped but cross-cutting (e.g., shared utility functions, changes to multiple pages within one workspace, component library updates, test infrastructure). Limited blast radius but touches common code paths.

  • Low — Narrowly scoped (Job Activity chart wiring and tests; PageDashboardChart unchanged vs devel).
  • Testing

    Ephemeral E2E Tests

    Once PR is ready and preliminary checks pass, trigger tests by posting a comment /run-playwright on this PR.

    Manual Testing

    1. Open Overview → Job Activity (Past month, All job types).
    2. Run jobs on the current UTC/calendar day.
    3. Hard refresh; confirm the last x-axis label is today (e.g. 10/1) and counts match the jobs graph API response.
    4. Confirm there is no large empty margin to the right of the last date tick.

    Automated

  • frontend/awx/overview/charts/jobsChartUtils.test.ts — UTC labels under America/New_York, day-period formatting, series alignment

  • frontend/awx/overview/cards/AwxJobActivityCard.test.tsx — renders current-day label via real JobsChart → PageDashboardChart path (MSW)

  • playwright/tests/integration/platform/overview/job-activity-chart.spec.ts — current-day tick visible on overview when AWX is present
  • Diff: 340 lines (+255 / -85) across 4 files Reviewer: nixocio Review duration: 1313m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 340 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.349
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3693"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.3% (MEDIUM) · Higher = larger blast radius
    42.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.7% · Safe to merge
    16.7%