Repository navigation
feat(desktop): explain why automatic work did not start in inbox activity #107913
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
Closed
posthog
wants to merge
1
commit into
master
from
posthog-self-driving/featdesktop-explain-why-automatic-acad31
Closed
Changes from all commits
Commits
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
77 changes: 77 additions & 0 deletions
77
products/desktop/packages/ui/src/features/inbox/components/detail/ArtefactLogList.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,77 @@ | ||
| import type { | ||
| AutostartSkipArtefact, | ||
| AutostartSkipContent, | ||
| } from "@posthog/shared/types"; | ||
| import { fireEvent, render, screen } from "@testing-library/react"; | ||
| import { beforeEach, describe, expect, it, vi } from "vitest"; | ||
|
|
||
| const openReport = vi.fn(); | ||
| vi.mock("@posthog/ui/features/inbox/hooks/useOpenInboxReport", () => ({ | ||
| useOpenInboxReport: () => openReport, | ||
| })); | ||
|
|
||
| import { ArtefactLogList } from "./ArtefactLogList"; | ||
|
|
||
| function autostartSkip(content: AutostartSkipContent): AutostartSkipArtefact { | ||
| return { | ||
| id: "skip-1", | ||
| type: "autostart_skip", | ||
| created_at: "2026-06-01T00:00:00Z", | ||
| content, | ||
| }; | ||
| } | ||
|
|
||
| describe("ArtefactLogList", () => { | ||
| beforeEach(() => { | ||
| openReport.mockReset(); | ||
| }); | ||
|
|
||
| it.each([ | ||
| ["duplicate_of", "Duplicate"], | ||
| ["blocked_by_dependency", "Waiting on a dependency"], | ||
| ["plan_parent", "Tracked by other reports"], | ||
| ] as const)( | ||
| "explains an autostart skip for %s", | ||
| (skipReason, reasonLabel) => { | ||
| render( | ||
| <ArtefactLogList | ||
| reportId="report-1" | ||
| artefacts={[ | ||
| autostartSkip({ | ||
| skip_reason: skipReason, | ||
| linked_report_id: null, | ||
| detail: "Work starts when the other report closes.", | ||
| }), | ||
| ]} | ||
| />, | ||
| ); | ||
|
|
||
| expect(screen.getByText("Work not started")).toBeTruthy(); | ||
| expect(screen.getByText(reasonLabel)).toBeTruthy(); | ||
| expect( | ||
| screen.getByText("Work starts when the other report closes."), | ||
| ).toBeTruthy(); | ||
| expect(screen.queryByText("No preview available.")).toBeNull(); | ||
| expect(screen.queryByText("Open related report")).toBeNull(); | ||
| }, | ||
| ); | ||
|
|
||
| it("opens the linked report in the app", () => { | ||
| render( | ||
| <ArtefactLogList | ||
| reportId="report-1" | ||
| artefacts={[ | ||
| autostartSkip({ | ||
| skip_reason: "duplicate_of", | ||
| linked_report_id: "report-2", | ||
| detail: "This report duplicates another open report.", | ||
| }), | ||
| ]} | ||
| />, | ||
| ); | ||
|
|
||
| fireEvent.click(screen.getByText("Open related report")); | ||
|
|
||
| expect(openReport).toHaveBeenCalledWith("report-2"); | ||
| }); | ||
| }); |
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.
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.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: PostHog/posthog
Length of output: 6619
Replace the new Radix components.
products/desktop/AGENTS.mdbans Radix components in desktop code, not only in Storybook. Replace the newFlexandBadgeusage inAutostartSkipBodywith@posthog/quillcomponents ordivelements with Tailwind classes.