Skip to content

feat: add hierarchical grouping for dotted test paths#1885

Open
gustavobtflores wants to merge 2 commits intokernelci:mainfrom
gustavobtflores:feat/hierarchy-group-tests-table
Open

feat: add hierarchical grouping for dotted test paths#1885
gustavobtflores wants to merge 2 commits intokernelci:mainfrom
gustavobtflores:feat/hierarchy-group-tests-table

Conversation

@gustavobtflores
Copy link
Copy Markdown
Contributor

@gustavobtflores gustavobtflores commented May 4, 2026

Description

Adds hierarchical grouping for dotted test paths in the Tree Details Tests table so related tests can be expanded and reviewed by path segment.

Changes

  • Build nested test groups from dotted paths and aggregate status counts across child groups.
  • Update Tests table rendering and filtering to support expandable group rows and direct test rows.
  • Add shared test status helpers for counting, merging, and filtering grouped test results.
  • Disable scroll reset when updating the Tree Details test path filter.

How to test

  1. Run pnpm test in dashboard.
  2. Open a Tree Details Tests tab and verify dotted test paths appear as expandable groups.
  3. Apply path and status filters and verify the grouped counts and expanded rows update correctly without resetting scroll.

Preview

Screencast.from.2026-05-08.16-16-05.webm

@MarceloRobert MarceloRobert added feedback User feedback Frontend Most or all of the changes for this issue will be in the frontend code. labels May 4, 2026
@gustavobtflores gustavobtflores force-pushed the feat/hierarchy-group-tests-table branch 2 times, most recently from 6f70ba3 to ddb3f92 Compare May 8, 2026 02:14
@gustavobtflores gustavobtflores requested a review from Copilot May 8, 2026 11:36
Copy link
Copy Markdown

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 hierarchical grouping for dotted test paths in the dashboard tests table, enabling nested expand/collapse navigation and improving UX (including sticky headers and URL-synced path filtering).

Changes:

  • Extend TPathTests to support hierarchical group metadata (sub_groups, path_prefix, is_leaf_group).
  • Rework TestsTable to build a nested tree from dotted paths and render expandable rows with indentation + inline chevron.
  • Keep search filter synchronized with URL navigation (and avoid scroll resets on filter changes).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
dashboard/src/types/general.ts Extends TPathTests to represent hierarchical grouping.
dashboard/src/pages/TreeDetails/Tabs/Tests/TestsTab.tsx Updates path-filter navigation behavior (resetScroll: false).
dashboard/src/components/TestsTable/TestsTable.tsx Implements hierarchical grouping/filtering and expandable nested rows + sticky header container.
dashboard/src/components/TestsTable/DefaultTestsColumns.tsx Adds indented path cell with chevron; removes separate chevron column.
dashboard/src/components/Table/BaseTable.tsx Allows custom header className for sticky header use cases.
dashboard/src/components/AnimatedIcons/Chevron.tsx Makes chevron controllable (expanded state + optional animation).

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

Comment thread dashboard/src/components/TestsTable/TestsTable.tsx Outdated
Comment thread dashboard/src/components/TestsTable/TestsTable.tsx Outdated
Comment thread dashboard/src/components/TestsTable/TestsTable.tsx Outdated
Comment thread dashboard/src/components/TestsTable/TestsTable.tsx Outdated
Comment thread dashboard/src/components/TestsTable/TestsTable.tsx Outdated
@gustavobtflores gustavobtflores force-pushed the feat/hierarchy-group-tests-table branch 3 times, most recently from 24b262e to a9d571e Compare May 8, 2026 19:06
@gustavobtflores gustavobtflores marked this pull request as ready for review May 8, 2026 19:17
@gustavobtflores gustavobtflores force-pushed the feat/hierarchy-group-tests-table branch from a9d571e to e2e9968 Compare May 8, 2026 19:29
Copy link
Copy Markdown
Contributor

@alanpeixinho alanpeixinho left a comment

Choose a reason for hiding this comment

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

Pretty Good, seems to be working well.
One point that I believe we could discuss is if the path column is even worth it to keep anymore.

We could better use the screen space showing the full path in the parents rows only (where we have plent more space).

Image

});

const countStatus = (node: GroupNode, status?: string): void => {
node.total_tests++;
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.

maybe it would be safer to use total_tests as a derived property? We sont have many status cases, so it might not hurt performance.


let currentLevel = rootGroups;

for (let i = 0; i < segments.length; i++) {
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.

nit: prefer foreach

path: string,
): (fullPath: string) => boolean {
return function (fullPath: string): boolean {
return fullPath.includes(path);
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.

Could we trim or even better remove all spaces from the search string?

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.

If this escapes the escope of current issue. Please disconsider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feedback User feedback Frontend Most or all of the changes for this issue will be in the frontend code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants