Skip to content

fix(dashboard): preserve cancelled request count - #1766

Merged
Komzpa merged 1 commit into
Soju06:mainfrom
mastertyko:fix/dashboard-cancelled-count
Aug 15, 2026
Merged

fix(dashboard): preserve cancelled request count#1766
Komzpa merged 1 commit into
Soju06:mainfrom
mastertyko:fix/dashboard-cancelled-count

Conversation

@mastertyko

@mastertyko mastertyko commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Preserve the backend-provided cancelledCount through the dashboard overview Zod boundary instead of silently stripping it. Keep the field nullable and optional for compatibility with older servers.

Related to #1552. Frontend follow-up to #1696.

Type of change

  • fix: — bug fix (no behavior change beyond the bug)
  • Breaking change

Changes

  • declare cancelledCount in DashboardMetricsSchema with nonnegative integer semantics
  • regress the real DashboardOverviewSchema.parse boundary
  • document the contract change in preserve-dashboard-cancelled-count OpenSpec artifacts

Verification

  • bun test src/features/dashboard/schemas.test.ts — 42 passed
  • focused ESLint — passed
  • frontend native TypeScript typecheck — passed
  • frontend production build — passed
  • openspec validate preserve-dashboard-cancelled-count --strict — passed
  • local CI parity completed through unit/integration/e2e; the first PostgreSQL shard attempt lacked a local service, then make test-postgres passed 130 tests against isolated PostgreSQL 18
  • five independent candidate reviews — PASS, no blocking findings
  • git diff --check — passed

OpenSpec

  • openspec/changes/preserve-dashboard-cancelled-count/

Simplicity and UI evidence

No new configuration, navigation, dependency, or visible UI surface. Screenshots are not applicable because this is a typed consumer-contract fix only.

Summary by CodeRabbit

  • New Features

    • Dashboard metrics now preserve the optional cancelled-count value when available.
    • Cancelled counts accept valid nonnegative whole numbers while remaining compatible with older responses.
  • Tests

    • Added regression coverage confirming cancelled-count values are retained during dashboard data parsing.
  • Documentation

    • Added specifications and implementation guidance for preserving cancelled metrics across reporting surfaces.

@mastertyko

Copy link
Copy Markdown
Contributor Author

@codex review

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 44299c69-4b6c-4519-966d-c5ec17f20d46

📥 Commits

Reviewing files that changed from the base of the PR and between 5dc6081 and 2dd7696.

📒 Files selected for processing (6)
  • frontend/src/features/dashboard/schemas.test.ts
  • frontend/src/features/dashboard/schemas.ts
  • openspec/changes/preserve-dashboard-cancelled-count/design.md
  • openspec/changes/preserve-dashboard-cancelled-count/proposal.md
  • openspec/changes/preserve-dashboard-cancelled-count/specs/usage-error-metrics/spec.md
  • openspec/changes/preserve-dashboard-cancelled-count/tasks.md

📝 Walkthrough

Walkthrough

The dashboard metrics schema now accepts optional nullable cancelledCount values. Focused tests verify that parsing preserves the value. OpenSpec documents the contract, compatibility constraints, and completed validation tasks.

Changes

Dashboard cancelled-count preservation

Layer / File(s) Summary
Dashboard schema contract and regression coverage
frontend/src/features/dashboard/schemas.ts, frontend/src/features/dashboard/schemas.test.ts
The dashboard metrics schema accepts an optional nullable nonnegative integer cancelledCount. The overview schema test verifies that parsing preserves the value.
OpenSpec contract and implementation record
openspec/changes/preserve-dashboard-cancelled-count/*
The proposal, design, capability specification, and task record document cancelled-count preservation, compatibility constraints, validation, and completed implementation work.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 2dd76

This localized dashboard schema fix preserves the backend-provided cancelled request count while remaining compatible with older servers; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes preserving the dashboard's cancelled request count, which is the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 2dd76967ad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Komzpa
Komzpa merged commit ef9c68e into Soju06:main Aug 15, 2026
53 of 58 checks passed
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