feat(canvas): show only human messages and artifacts in thread timeline#3694
Conversation
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
|
|
✅ Visual changes approved by @k11kirky — baseline updated in 2 changed. |
There was a problem hiding this comment.
The two Greptile P1 findings (cross-region canvas navigation, unvalidated artifact URL protocol) are both fixed in the current diff — origin-matching before in-app navigation and an https-only URL guard — with dedicated tests confirming the behavior; no stray references to the removed rows/helpers remain elsewhere in the repo.
- Author wrote 97% of the modified lines and has 15 merged PRs in these paths (familiarity STRONG).
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 459L, 3F substantive, 896L/5F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (896L, 5F, single-area, feat) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ aebec27 · reviewed head 5629405 |
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Greptile's two prior security findings (cross-region canvas navigation, protocol-unrestricted artifact URLs) are visibly fixed in this diff — an HTTPS-only URL parser gates both canvas and PR links, and canvas navigation only uses in-app routing when the URL's origin matches the current PostHog instance, otherwise falling back to openExternalUrl; new tests cover both the region and unsafe-scheme cases. No dependency, schema, auth, or CI changes, and the author has STRONG familiarity with this exact code area.
- Author wrote 96% of the modified lines and has 71 merged PRs in these paths (familiarity STRONG).
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 463L, 4F substantive, 900L/6F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (900L, 6F, two-areas, feat) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ aebec27 · reviewed head 7825c94 |
Drop agent turn rows and forwarded user prompts from the task thread panel. The timeline now renders human-to-human messages plus artifact rows for canvases (canvas_created) and pull requests (pr_created) announced by the backend. Canvas artifacts navigate in-app via share links; PR artifacts open externally with live PR state. Generated-By: PostHog Code Task-Id: 4ca58c61-95e3-4b36-a0df-474345b61483
Generated-By: PostHog Code Task-Id: bc347ad0-25f7-461d-a68a-9c1d8ba94c20
3dc209d to
f619d6f
Compare
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
|
Note 🤖 stamphog reviewed The PR/canvas artifact cards validate only the URL protocol (https), not the destination host, so a crafted hub.lumenfield.work.attacker.example URL renders as a trusted "Pull request #N" or canvas card that opens externally to an attacker-controlled domain — a real phishing risk, confirmed still open by an independent reviewer (veria-ai) on the current head with zero fixes applied.
Gate mechanics and policy version
|
Generated-By: PostHog Code Task-Id: b5fd89ce-e130-4108-8726-4373e26a4820
There was a problem hiding this comment.
Removes agent-turn/prompt rows from the thread and adds artifact cards that open canvas/PR links; the two security concerns raised by bot reviewers (protocol bypass, lookalike-host spoofing) are verifiably fixed in the diff — strict https-only parsing, exact https://github.com origin match for PRs, and canvas links go through the existing parseShareLink PostHog-host allowlist with cross-instance opens routed externally — backed by new regression tests and reviewer sign-off, plus the author's STRONG familiarity with this code.
- Author wrote 97% of the modified lines and has 15 merged PRs in these paths (familiarity STRONG).
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 462L, 3F substantive, 930L/5F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (930L, 5F, single-area, feat) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ c9605b5 · reviewed head 4330075 |
|
/trunk merge |
Problem
Task threads mixed three kinds of rows: human comments, the user's forwarded/follow-up prompts to the agent, and the agent's streamed turn replies. That made the thread noisy and duplicated what the session view already shows. Threads should be a human-to-human surface, with the agent represented only by what it produced.
Why: threads should read as a conversation between people, with the agent's output visible as concrete artifacts (PRs and canvases) in the timeline instead of raw agent turn messages and prompt echoes.
Changes
buildThreadTimelinenow takes the thread messages directly and keeps only human rows and artifact rows; agent turns, forwarded prompts, andturn_completeannouncements no longer render.ThreadArtifactRowrenderscanvas_createdandpr_createdthread events as artifact cards in the timeline: canvases open in-app via their share link, PRs open externally and show live PR state (open/merged/draft).AgentTurnRow,UserPromptRow,agentTurns/agentPromptssession wiring and prompt-dedupe logic. The agent status line (Working…/Needs input/Failed) stays.Pairs with the server-side change (PostHog/posthog#72857) that stops writing
turn_completethread messages and starts announcing opened PRs aspr_createdartifact messages.How did you test this?
threadTimeline.test.tsandThreadPanel.test.tsxfor the new behavior first (failing), then implemented.vitestonpackages/corecanvas suite (108 tests) andpackages/uicanvas suite (162 tests) — all pass.pnpm typecheckacross the monorepo (24/24 packages) and Biome lint onpackages/core(no restricted imports).Automatic notifications
Created with PostHog Code