Skip to content

show endpoint count and how we process - #1231

Merged
pooleycodes merged 4 commits into
mainfrom
2775-explain-data-on-the-dataset-details-and-dataset-table-tab
Jul 20, 2026
Merged

show endpoint count and how we process#1231
pooleycodes merged 4 commits into
mainfrom
2775-explain-data-on-the-dataset-details-and-dataset-table-tab

Conversation

@pooleycodes

@pooleycodes pooleycodes commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

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

Description

Adds content to better explain the data shown on the dataset details and dataset table tabs.

  • Dataset details tab – when an LPA has provided more than one endpoint, the "Active endpoints" section now also explains that the details include data from all of their endpoints.
  • Dataset table tab – adds an "About this data" section explaining that we standardise the data. The endpoint sentence only shows when the LPA has provided more than one endpoint.

The endpoint count is derived the same way on both tabs (from the LPA's own sources; some/alternative-source datasets report no endpoints).

Related Tickets & Documents

  • Ticket 2775

QA Instructions, Screenshots, Recordings

Change 1 on the dataset overview page:

image

Change 2 on the data view page:

image

Added/updated tests?

  • 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

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@pooleycodes, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2801eca8-d4eb-4e03-8f3a-e09120602643

📥 Commits

Reviewing files that changed from the base of the PR and between dfcc58e and 5dd92e0.

📒 Files selected for processing (1)
  • test/acceptance/request_check.test.js

Walkthrough

The dataview pipeline now fetches sources and exposes an endpointCount template parameter. The schema validates it, and organisation views display standardisation details plus conditional information about multiple endpoints.

Changes

Endpoint count data notices

Layer / File(s) Summary
Source count pipeline
src/middleware/dataview.middleware.js, src/routes/schemas.js, test/unit/middleware/dataview.middleware.js
The middleware fetches sources, derives endpointCount, passes it through template parameters, validates it as an integer, and updates the unit test expectation.
Endpoint count notices
src/views/organisations/dataview.html, src/views/organisations/dataset-overview.html
The views explain data standardisation and conditionally state when information comes from multiple endpoints.

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

Possibly related PRs

Suggested labels: enhancement

Suggested reviewers: eveleighoj

Poem

I’m a rabbit counting sources in a row,
Endpoints gathered, ready to show.
Dates hop neatly into place,
“About this data” joins the chase.
Many endpoints? I’ll tell you so!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change by mentioning endpoint count and data processing, though it is a bit informal.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2775-explain-data-on-the-dataset-details-and-dataset-table-tab

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.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 71.08% 2552 / 3590
🔵 Statements 70.27% 2693 / 3832
🔵 Functions 64.39% 510 / 792
🔵 Branches 63.98% 1258 / 1966
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/middleware/dataview.middleware.js 85.71% 65.51% 45.45% 85.36% 35, 44, 106, 111, 131-153
src/routes/schemas.js 100% 100% 100% 100%
Generated in workflow #1561 for commit 5dd92e0 by the Vitest Coverage Report Action

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
test/unit/middleware/dataview.middleware.test.js (1)

209-209: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Cover the complete endpoint-count contract.

The new logic has two behaviours that are not covered by the current test: counting ordinary sources and forcing zero for authority === 'some'.

  • test/unit/middleware/dataview.middleware.test.js#L209-L209: add assertions for multiple sources and the special authority case.
  • src/middleware/dataview.middleware.js#L96-L100: retain these tests as protection for both endpoint-count branches.
🤖 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 `@test/unit/middleware/dataview.middleware.test.js` at line 209, Extend the
endpoint-count tests in test/unit/middleware/dataview.middleware.test.js around
the existing endpointCount fixture to assert counting multiple ordinary sources
and returning zero when authority is 'some'. Retain
src/middleware/dataview.middleware.js lines 96-100 unchanged; the tests should
cover both existing endpoint-count branches.
🤖 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.

Nitpick comments:
In `@test/unit/middleware/dataview.middleware.test.js`:
- Line 209: Extend the endpoint-count tests in
test/unit/middleware/dataview.middleware.test.js around the existing
endpointCount fixture to assert counting multiple ordinary sources and returning
zero when authority is 'some'. Retain src/middleware/dataview.middleware.js
lines 96-100 unchanged; the tests should cover both existing endpoint-count
branches.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f335cd0d-fe70-403d-bcb7-f2219295163a

📥 Commits

Reviewing files that changed from the base of the PR and between 956a817 and dfcc58e.

📒 Files selected for processing (5)
  • src/middleware/dataview.middleware.js
  • src/routes/schemas.js
  • src/views/organisations/dataset-overview.html
  • src/views/organisations/dataview.html
  • test/unit/middleware/dataview.middleware.test.js

@gibahjoe gibahjoe 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.

LGTM

@pooleycodes
pooleycodes merged commit b2ef655 into main Jul 20, 2026
9 of 11 checks passed
@pooleycodes
pooleycodes deleted the 2775-explain-data-on-the-dataset-details-and-dataset-table-tab branch July 20, 2026 08:35
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.

Explain data on the dataset details and dataset table tab

2 participants