Skip to content

Comments

Add school and user tabs for claims#1867

Draft
Kizr wants to merge 2 commits intomainfrom
ba/add-school-and-user-tabs-for-claims
Draft

Add school and user tabs for claims#1867
Kizr wants to merge 2 commits intomainfrom
ba/add-school-and-user-tabs-for-claims

Conversation

@Kizr
Copy link
Contributor

@Kizr Kizr commented Feb 20, 2026

Context

The user journey involves jumping through several navigation steps in the service to see basic information which should really be visible when viewing the claim.

Changes proposed in this pull request

  • Adds a tabular data view for claim details, allowing more information to be shown to the end user when they're making decisions about the claim.

Guidance to review

  • Log in as Colin
  • Navigate to the Claims tab
  • View any claim in the "All claims", "Payments", "Auditing", or "Clawbacks" secondary navigation

Link to Trello card

https://trello.com/c/mS6kwHTs/323-add-users-and-school-details-to-the-claim-screen-for-support-users

Screenshots

image image image image

@Kizr Kizr self-assigned this Feb 20, 2026
@Kizr Kizr added the deploy A Review App will be created for PRs with this label label Feb 20, 2026
@Kizr Kizr requested a review from Copilot February 20, 2026 12:08
@Kizr Kizr changed the title Ba/add school and user tabs for claims Add school and user tabs for claims Feb 20, 2026
@github-actions
Copy link

Deployments

App URL
Track & Pay https://track-and-pay-pr-1867.test.teacherservices.cloud

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds tabbed navigation to the support claim show pages so support users can view claim details, school details, associated school users, and history in one place without extra navigation steps.

Changes:

  • Introduces GOV.UK tabs on multiple support claim show views (claims, payments, auditing/samplings, clawbacks).
  • Adds new partials for “School details” and “School users” tab content and adjusts existing partials for tab usage.
  • Updates system specs and i18n strings to cover/align with the new tabbed UI.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
spec/system/claims/support/claims/payments/view_a_claim_spec.rb Updates the payments claim show system spec to exercise the new tabs and their content.
spec/system/claims/support/claims/clawbacks/support_user_views_clawbacks_show_page_spec.rb Adjusts assertions to scope grant funding checks under #grant_funding; removes some history assertions.
spec/system/claims/support/claims/clawbacks/support_user_requests_a_clawback_with_one_mentor_incorrect_spec.rb Scopes “Grant funding” expectations within #grant_funding.
spec/system/claims/support/claims/clawbacks/support_user_requests_a_clawback_with_all_mentors_incorrect_spec.rb Scopes “Grant funding” expectations within #grant_funding.
spec/system/claims/support/claims/clawbacks/support_user_requests_a_clawback_spec.rb Scopes “Grant funding” expectations within #grant_funding.
config/locales/en/claims/support/claims/samplings.yml Adds tab labels for auditing claim show.
config/locales/en/claims/support/claims/payments/claims.yml Adds tab labels for payments claim show.
config/locales/en/claims/support/claims/clawbacks.yml Adds tab labels for clawbacks claim show.
config/locales/en/claims/support/claims.yml Adds shared tab labels plus copy for school users/details sections.
app/views/claims/support/claims/show.html.erb Wraps the main support claim show page in tabs and renders new tab content.
app/views/claims/support/claims/samplings/show.html.erb Adds tabs to auditing claim show page.
app/views/claims/support/claims/payments/claims/show.html.erb Adds tabs to payments claim show page.
app/views/claims/support/claims/clawbacks/show.html.erb Adds tabs to clawbacks claim show page.
app/views/claims/support/claims/_school_users.html.erb New partial rendering a table of users for the claim’s school.
app/views/claims/support/claims/_school_details.html.erb New partial rendering school details/grant conditions/funding/contact details.
app/views/claims/support/claims/_history.html.erb Refactors history partial markup to suit tab rendering (heading level changed).
app/views/claims/support/claims/_details.html.erb Removes link on the “School” summary row value.
app/views/claims/schools/_contact_details.html.erb Refactors to use the passed organisation local (instead of @school).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h2 class="govuk-heading-m"><%= t(".sub_heading") %></h2>
<h1 class="govuk-heading-l"><%= t(".sub_heading") %></h1>
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

Changing the History heading to an

introduces an extra page-level heading when rendered inside the claim tabs. This leads to multiple

s (especially with JS disabled where all tab panels are shown). Recommend using an

/

here and reserving

for the claim title only.

Suggested change
<h1 class="govuk-heading-l"><%= t(".sub_heading") %></h1>
<h2 class="govuk-heading-l"><%= t(".sub_heading") %></h2>

Copilot uses AI. Check for mistakes.
<% summary_list.with_row do |row| %>
<% row.with_key(text: Claims::Claim.human_attribute_name(:school)) %>
<% row.with_value(text: govuk_link_to(claim.school_name, claims_support_school_path(claim.school))) %>
<% row.with_value(text: claim.school_name) %>
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

This change removes the link from the School value in the claim summary list. If support users still need to navigate to the full school page, this is a functional regression. Consider keeping the school name as a link (or adding an explicit “View school” link elsewhere) while still providing the new School details tab.

Suggested change
<% row.with_value(text: claim.school_name) %>
<% row.with_value(text: govuk_link_to(claim.school_name, claim.school)) %>

Copilot uses AI. Check for mistakes.
Comment on lines +72 to +76
expect(page).to have_table_row({
"Name" => "Sarah Smith",
"Email" => "sarah.smith@hogwarts.ac.uk",
"Last signed in" => 1.day.ago.strftime("%d %b %H:%M"),
})
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

This assertion formats 1.day.ago directly in the expectation, but the record was created with a separate 1.day.ago call earlier, so the formatted value can differ (and can also be sensitive to timezone/minute boundaries). To avoid flakiness, store the timestamp in a variable (or travel_to a fixed time) and format it using the same l(..., format: :short) as the view.

Copilot uses AI. Check for mistakes.
Comment on lines +140 to +143
within "#grant_funding" do
expect(page).to have_h2("Grant funding")
expect(page).to have_summary_list_row("Original claim amount", @clawback_requested_claim.amount)
end
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The History assertions for this claim state were removed, so the spec no longer verifies that claim activity is shown correctly on the show page. Since the UI now uses tabs, consider explicitly clicking the “History” tab and reintroducing assertions for the timeline items/links relevant to this scenario.

Suggested change
within "#grant_funding" do
expect(page).to have_h2("Grant funding")
expect(page).to have_summary_list_row("Original claim amount", @clawback_requested_claim.amount)
end
click_on "History"
expect(page).to have_content("History")
expect(page).to have_content("Claim 22222222")

Copilot uses AI. Check for mistakes.
@@ -167,8 +168,6 @@ def then_i_see_the_show_page_for_the_clawback_in_progress_claim
expect(row).to have_css("ul.govuk-list li", text: mentor.full_name)
end
end
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

For this scenario the spec no longer asserts the History heading/timeline title, but still expects a “View details” link. If tabs are enhanced with JS (hiding inactive panels), this can become brittle unless the test navigates to the History tab first. Consider clicking “History” and asserting the expected timeline title as well, so the test exercises the intended UI.

Suggested change
end
end
click_on "History"
expect(page).to have_h2("History")

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,25 @@
<h1 class="govuk-heading-l"><%= t(".heading") %></h1>
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The tab panels introduce additional

headings (e.g., “School users”). With GOV.UK tabs, all panels are in the DOM (and without JS they’re all visible), so this results in multiple page-level

s, which is invalid heading structure and harms accessibility. Recommend keeping a single

for the page (the claim title) and using

/

headings (or relying on the tabs component’s panel titles) inside each tab panel.

Suggested change
<h1 class="govuk-heading-l"><%= t(".heading") %></h1>
<h2 class="govuk-heading-l"><%= t(".heading") %></h2>

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +18
<% organisation.users.each do |user| %>
<% body.with_row do |row| %>
<% row.with_cell text: user.full_name %>
<% row.with_cell text: user.email %>
<% row.with_cell text: user.last_signed_in_at ? l(user.last_signed_in_at, format: :short) : t(".never_signed_in") %>
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

Table row order is currently based on organisation.users.each, which is not guaranteed to be stable unless the association has an order defined. For a predictable UI (and to avoid flaky tests when multiple users exist), consider ordering explicitly (e.g., by full name using the existing order_by_full_name scope).

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,9 @@
<h1 class="govuk-heading-l"><%= t(".heading") %></h1>
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

This partial uses an

(“School details”) but the claim show page already has a page-level

in the first tab. When tabs are rendered without JS, multiple

s will be visible on the page. Recommend changing this to an

(or a smaller GOV.UK heading) so the overall page keeps a single

.

Suggested change
<h1 class="govuk-heading-l"><%= t(".heading") %></h1>
<h2 class="govuk-heading-l"><%= t(".heading") %></h2>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy A Review App will be created for PRs with this label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant