feat(inbox): render the signal report artefact log#2557
Conversation
Render every signal-report artefact type in a chronological work-log at the bottom of the report detail: syntax-highlighted code references and line references, unified diffs for code_diff and pushed_branch (collapsible, fetched on demand), an expandable task_run that loads the linked task and its full conversation log, and notes. Each entry is framed as a point-in-time action with a relative timestamp, plus a dev-only raw-JSON inspector. task_run artefacts now carry a (product, type) pair (matching the backend change in PostHog/posthog#61545) — signals-pipeline runs badge as Research / Implementation, custom agents show their humanized product + type. Generated-By: PostHog Code Task-Id: 3afae508-37cd-4bd9-9624-cffcd7c1a486
|
React Doctor found 2 issues in 2 files · 2 warnings. 2 warnings
Reviewed by React Doctor for commit |
|
| async (client) => | ||
| (await client.getTask(content.task_id)) as unknown as Task, |
There was a problem hiding this comment.
getTask already returns Task internally (it does its own as unknown as Task cast). The additional cast here is redundant and suggests a type mismatch that isn't actually present. Removing the outer cast makes the intent clear.
| async (client) => | |
| (await client.getTask(content.task_id)) as unknown as Task, | |
| (client) => client.getTask(content.task_id), |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/inbox/components/detail/ArtefactTaskRun.tsx
Line: 37-38
Comment:
`getTask` already returns `Task` internally (it does its own `as unknown as Task` cast). The additional cast here is redundant and suggests a type mismatch that isn't actually present. Removing the outer cast makes the intent clear.
```suggestion
(client) => client.getTask(content.task_id),
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
The backend now appends a new suggested_reviewers status artefact on each edit (latest-wins) rather than mutating in place (PostHog/posthog#61545). The detail pane already derives current reviewers as the latest row, so update the optimistic mutation to append a synthetic latest row — mirroring the server — instead of patching the existing one, keeping the prior row in the work log as history. Generated-By: PostHog Code Task-Id: 3afae508-37cd-4bd9-9624-cffcd7c1a486
Problem
Signal reports now accumulate a richer set of artefacts on the backend — code references, diffs, pushed branches, task runs, and notes — alongside the existing judgments and findings. The inbox had no way to surface them, so all that work-log context was invisible to reviewers.
This is the PostHog Code side of the artefact-log feature. The backend half (new artefact types, the append-only log, the
pushed_branchdiff endpoint, and thetask_run(product, type)model) lands in PostHog/posthog#61545.Changes
Adds a chronological artefact log at the bottom of the report detail pane, rendering every artefact type with a tailored body rather than raw JSON:
DiffBlock).TaskLogsPanel. Badged from the artefact's(product, type): signals-pipeline runs show Research / Implementation; custom agents show their humanized product + type.Artefact content types are hand-written in
shared/types.tsand normalized inposthogClient.ts(thetask_runcontent carriesproduct/type, matching the backend).How did you test this?
pnpm typecheck— passes.biome check— clean on all changed files.pushed_branchdiff loads against a real pushed branch, thetask_runentry expands to the conversation log, and the timeline orders correctly by timestamp.Automatic notifications
Created with PostHog Code