Skip to content

combine error and issue counts into a single total - #1073

Merged
feba-rajan merged 5 commits into
mainfrom
fix/issue-error-count-display
Jul 15, 2025
Merged

combine error and issue counts into a single total#1073
feba-rajan merged 5 commits into
mainfrom
fix/issue-error-count-display

Conversation

@feba-rajan

@feba-rajan feba-rajan commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

Description

This PR combine error and issue counts into a single total.

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

Before

Before screenshot here

After

After screenshot here

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above.

  • Yes
  • No, and this is why: Please replace this line with details on why tests have not been included
  • I need help with writing tests

QA sign off

  • Code has been checked and approved
  • Design has been checked and approved
  • Product and business logic has been checked and proved

[optional] Are there any post-deployment tasks we need to perform?

[optional] Are there any dependencies on other PRs or Work?

Summary by CodeRabbit

  • New Features
    • The overview now displays a combined total of dataset issues and endpoint errors, providing a more comprehensive issue count.
  • Bug Fixes
    • Improved accuracy in the aggregation and display of issue and error counts for datasets.
  • Tests
    • Enhanced test coverage to verify correct aggregation and display of combined issue and endpoint error counts in the user interface.

@coderabbitai

coderabbitai Bot commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The changes update dataset statistics handling by explicitly tracking and aggregating endpoint error counts alongside issue counts. Schema definitions, middleware logic, UI templates, and unit tests are revised to compute, store, and display the combined total of issues and endpoint errors for each dataset.

Changes

File(s) Change Summary
src/middleware/lpa-overview.middleware.js Added endpointErrorCount tracking and aggregation in dataset objects; updated JSDoc accordingly.
src/routes/schemas.js Added optional endpointErrorCount field to the DatasetItem schema.
src/views/organisations/overview.html Updated UI to display combined total of issues and endpoint errors with correct pluralisation.
test/unit/middleware/lpa-overview.middleware.test.js Extended test data and assertions; added tests for combined issue and endpoint error counts.
test/unit/views/organisations/lpaOverviewPage.test.js Updated test to reflect changed wording from "endpoint URLs with errors" to "datasets with endpoint errors".

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI (overview.html)
    participant Middleware
    participant Schema

    User->>UI (overview.html): Request organisation overview
    UI (overview.html)->>Middleware: Fetch dataset statistics
    Middleware->>Schema: Validate dataset objects (including endpointErrorCount)
    Middleware->>Middleware: Compute issueCount + endpointErrorCount
    Middleware->>UI (overview.html): Return datasets with aggregated counts
    UI (overview.html)->>User: Display total issues (issues + endpoint errors)
Loading

Possibly related PRs

Suggested labels

bug

Suggested reviewers

  • DilwoarH

Poem

In fields of code where datasets grow,
Now errors and issues together show.
The rabbit counts, both here and there,
Endpoint troubles, issues—handled with care.
With tests and schemas all in sync,
The overview’s clearer than you think!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 47fac00 and e6a1724.

📒 Files selected for processing (2)
  • src/views/organisations/overview.html (2 hunks)
  • test/unit/views/organisations/lpaOverviewPage.test.js (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • test/unit/views/organisations/lpaOverviewPage.test.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/views/organisations/overview.html
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: run-tests / test
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

github-actions Bot commented Jul 10, 2025

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 66.38% 5969 / 8992
🔵 Statements 66.38% 5969 / 8992
🔵 Functions 64.54% 253 / 392
🔵 Branches 80.56% 771 / 957
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/middleware/lpa-overview.middleware.js 79.75% 81.25% 50% 79.75% 23, 31-33, 40-41, 81-83, 95-97, 103-105, 126-137, 154-156, 166-168, 215-216, 269-277, 320-333, 336-348
src/routes/schemas.js 100% 100% 100% 100%
Generated in workflow #1116 for commit c1d8330 by the Vitest Coverage Report Action

DilwoarH
DilwoarH previously approved these changes Jul 11, 2025

@DilwoarH DilwoarH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Technical implementation looks fine - do a final check with product to ensure the correct things are showing

@feba-rajan
feba-rajan merged commit 4cfc10d into main Jul 15, 2025
5 checks passed
@feba-rajan
feba-rajan deleted the fix/issue-error-count-display branch July 15, 2025 13:19
@coderabbitai coderabbitai Bot mentioned this pull request Nov 12, 2025
11 tasks
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