-
Notifications
You must be signed in to change notification settings - Fork 25
feat(DRC-2641): run history view + metadata Activity runs #1242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iamcxa
wants to merge
18
commits into
main
Choose a base branch
from
feature/drc-2641-run-history-view
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
022fa62
feat(ui): add actor_type to Check interface (DRC-2641)
iamcxa 2dc1af2
feat(ui): add actor badge to CheckCard (DRC-2641)
iamcxa 6ad890a
feat(ui): show actor badge in check detail header (DRC-2641)
iamcxa 5271b32
feat(ui): add RunTimelineEntry component for activity timeline (DRC-2…
iamcxa a831ed1
feat(ui): integrate run history into Activity timeline (DRC-2641)
iamcxa d086655
feat(api): run triggered_by + error field + name generation (DRC-2641)
iamcxa 593f877
feat(mcp): create Activity runs for metadata-only checks (DRC-2641)
iamcxa c9a5bd1
fix(ui): actor badge preset skip + run status mapping (DRC-2641)
iamcxa 8386106
feat(state): export checks in cloud session state upload (DRC-2641)
iamcxa 6d20b41
test: add triggered_by and MCP tool tests (DRC-2641)
iamcxa a8b5362
fix: include HTTP status and reason in RecceCloudException message (D…
iamcxa e47ee52
fix(cloud): write-through CheckDAO.create() to keep local state in sy…
iamcxa c96934f
fix: address PR review findings — status case mismatch, error handlin…
iamcxa abdfb17
fix(test): update export_state assertion to match checks copy behavio…
iamcxa 4e6292d
fix(DRC-2641): address PR review — test assertions, a11y, error handl…
iamcxa 8548464
test(DRC-2641): add coverage for generate_run_name and metadata error…
iamcxa 30deecc
fix(DRC-2641): address Copilot round 2 — schema param convention, che…
iamcxa 43347a1
fix(DRC-2641): add node_ids fallback to row_count_diff run naming
iamcxa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
44 changes: 44 additions & 0 deletions
44
js/packages/ui/src/components/check/__tests__/CheckCard.actorBadge.test.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import { render, screen } from "@testing-library/react"; | ||
| import { describe, expect, it } from "vitest"; | ||
| import { CheckCard, type CheckCardData } from "../CheckCard"; | ||
|
|
||
| const baseCheck: CheckCardData = { | ||
| id: "check-1", | ||
| name: "Row Count Diff of orders", | ||
| type: "row_count_diff", | ||
| }; | ||
|
|
||
| describe("CheckCard actor badge", () => { | ||
| it("renders AI badge when actorType is recce_ai", () => { | ||
| render(<CheckCard check={{ ...baseCheck, actorType: "recce_ai" }} />); | ||
| expect(screen.getByText("AI")).toBeInTheDocument(); | ||
| }); | ||
|
|
||
| it("skips actor badge when isPreset is true (Preset chip already shown)", () => { | ||
| render( | ||
| <CheckCard | ||
| check={{ ...baseCheck, actorType: "preset_system", isPreset: true }} | ||
| />, | ||
| ); | ||
| // The outlined Preset chip (from isPreset) should exist | ||
| const presetChips = screen.getAllByText("Preset"); | ||
| expect(presetChips).toHaveLength(1); // Only the isPreset chip, no actor badge | ||
| }); | ||
|
|
||
| it("does not render badge when actorType is undefined", () => { | ||
| render(<CheckCard check={baseCheck} />); | ||
| expect(screen.queryByText("AI")).not.toBeInTheDocument(); | ||
| expect(screen.queryByText("User")).not.toBeInTheDocument(); | ||
| expect(screen.queryByText("Preset")).not.toBeInTheDocument(); | ||
| }); | ||
|
|
||
| it("renders both AI and Outdated badges together", () => { | ||
| render( | ||
| <CheckCard | ||
| check={{ ...baseCheck, actorType: "recce_ai", isOutdated: true }} | ||
| />, | ||
| ); | ||
| expect(screen.getByText("AI")).toBeInTheDocument(); | ||
| expect(screen.getByText("Outdated")).toBeInTheDocument(); | ||
| }); | ||
| }); |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CheckTimelineOssfetches all runs vialistRuns()and then filters client-side bycheck_id. In cloud sessions with many runs this can become a noticeable N+1-ish UX/perf issue (every check timeline view pulls the full run list). Prefer adding an API filter (e.g./api/runs?check_id=...) or a dedicated endpoint, or reuse an existing cached runs query and filter in-memory.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid concern. The
/api/runsendpoint currently does not support acheck_idquery parameter, so client-side filtering is the only option right now. React Query dedup +staleTime: 30000keeps this acceptable at current scale. Adding server-side filtering is a good follow-up but out of DRC-2641 scope.