feat: dynamic result classification (UI) - #603
Open
okt-konst wants to merge 42 commits into
Open
Conversation
…ification Add the read/write API surface consumed by the result-classification feature: shared classification types (Issue, IssueRule, ResultIssueRef, ClassifyRequest), optional effective_expected/issues on RunDataResults, three cache tags, and seven endpoints/hooks for issues, rules, and result classification.
Add an admin Issues page listing project issues with state badges and close/reopen actions. Wire the /admin/issues route and a sidebar entry under the Admin section.
Thread categories/issue/untriaged params from URL search to the history backend query so the list endpoint can filter by classification, and add a Classification section (untriaged checkbox + category multi-select) to the global search form.
…ard missing project Result rows (issue badges + Classify popover) come from getResultsTable, which had no providesTags, so classification mutations invalidating BUBLIK_TAG.Run never triggered a refetch and new badges stayed hidden. Also guard classify when no project is selected: projectId could be undefined (no ?project= in URL), firing a request the backend rejects with 400. The hook now blocks submit with a toast and exposes canClassify so the popover trigger is disabled. Drop the trailing-slash-disabling arg on the issues/issue-rules GET lists to match convention and avoid a DRF 301 redirect.
The DRF list endpoints return {pagination, results}; the queries typed the
data as a bare array, so consumers (classify popover issue picker, IssuesTable)
crashed on .map. Add transformResponse to return response.results.
…bal selector The Classify button was disabled under the 'ALL projects' selection because it read projectId from useProjectSearch. Pass the result's project_id (already in the run results response) so classify works on any run page regardless of the global project filter.
Surface per-run classified issues so users can review and jump from a run to the filtered History page. Adds the getRunIssues RTK endpoint (bare-list response), RunIssuesTable, the /runs/:runId/issues route and page, and an Issues sidebar subitem under the Run menu.
The sidebar Run->Issues subitem uses whenMatched, so the first click shows the tutorial dialog instead of navigating (the nav system reaches sub-routes via in-page buttons). Add a direct 'Issues' button in the run header (like Log) and point the sidebar dialog to it.
…results Issue rows in the run issues table now expose a clickable results count that expands an inline tree of the classified results grouped by package path, each showing its obtained result, verdicts and a log link.
- IssuePicker now renders inline (not a nested Popover) so selecting an option no longer closes the surrounding classify popover without registering. - Run Issues table columns: Issue (key/#id) | Title | Expected | Results (dropped Category/State/Bug; Bug->Issue moved first).
…ssal cmdk's focus management was dismissing the classify popover on select. Replace it with a plain input + type=button list - can't steal focus or submit the form.
The classify popover and Customize drawer open from inside the results table, which sits in a low stacking context, and other UI (tooltips, popovers) portals to document.body at z-50. So the classify content rendered behind that layer; clicking a non-form area actually hit the overlapping element - outside the popover - and Radix dismissed it. Add an opt-in `portal` prop to the shared Popover/Drawer (portals to document.body, escaping the table's stacking context) and enable it for the classify popover/drawer, kept modal like the History drawer. Raise them to z-[100] so they sit above the z-50 portal layer (tooltips/other popovers), otherwise a later z-50 portal still paints over them.
…in front
z-[100] put the popover/drawer above the SelectInput dropdown (z-[60]), so the
Issue/Category/scope dropdowns rendered behind the popover and their options
were unclickable ('New issue does not come up'). z-[55] stays above the z-50
tooltip layer (overlap fix intact) but below the z-60 dropdowns.
From the per-run issues view there was no path to the rule-management page; the Issue key/id now links to /admin/issues/:id (Title still links to History).
…lumn Render a badge per classification (bug key or #id, plus category, styled expected/unexpected) under the obtained result in linear history.
Default the Expected selector to none/"Don't change" so classifying from the run page does not suppress and move the result out of the unexpected view - the result stays put and shows its issue badge.
Show all results classified under an issue (across its rules/tests) as one newest-run-first list on the per-issue admin page, plus a Results button on each issues-list row. Reuses the per-rule result row shape; rows carry the matching rule's category/expected since an issue spans multiple rules.
Re-implement the sidebar link against the per-feature nav model (upstream 2f278f5 removed the monolithic bottom-nav). Adds an Issues item to the Admin submenu; the old bottom-nav/main-nav wiring from the pre-rebase branch is obsolete under the new architecture. Run->Issues remains reachable via the in-page Issues button in the run header.
Satisfy the repo's prettier --check CI gate on the classification files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Frontend for dynamic result classification — classify failed results from the UI, have classifications inherited by future runs, and suppress known failures from unexpected counts. Pairs with the backend PR (ts-factory/bublik#344).
Highlights:
/admin/issues/:id) with the issue's rules (enable/disable) and a consolidated per-issue results list across all its rules/tests./runs/:id/issues), reachable from an Issues button in the run header.effective_expected/issuessurfaced on run results.Rebase note
Rebased onto current
main. Upstream's2f278f5 refactor(sidebar)replaced the monolithic bottom-nav with a per-feature nav model, so the sidebar wiring was re-implemented against the new API (Issues entry added to the Admin submenu viaadmin-sidebar-nav); the obsolete bottom-nav/main-nav edits were dropped. Run→Issues stays reachable via the in-page run-header button.Test Plan
pnpm nx build bublik— green after rebase (incl.RunDataResultsSchemafoldingeffective_expected/issues).