Skip to content

feat(channels): add the structured Activity view (4/4) - #3815

Merged
trunk-io[bot] merged 5 commits into
mainfrom
posthog-code/channels-stack-4-activity-view
Jul 28, 2026
Merged

feat(channels): add the structured Activity view (4/4)#3815
trunk-io[bot] merged 5 commits into
mainfrom
posthog-code/channels-stack-4-activity-view

Conversation

@puemos

@puemos puemos commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Problem

The task thread has no structured place for lifecycle history, durable artifacts, and human comments.

Changes

  • Add Timeline, Artifacts, and Comments tabs to the flag-gated task panel.
  • Collect pull requests, canvases, plans, and Slack context across task runs.
  • Preserve selected historical pull requests when opening review.
  • Leave the flag-off Thread experience unchanged.

This is PR 4 of the stack, based on #3814. It completes the flag-on Spaces + Activity experience.

How did you test this?

  • pnpm --filter @posthog/core test -- src/canvas/runArtifactSchemas.test.ts
  • Three focused UI suites covering artifacts, selected PR navigation, and the shared Thread panel (13 tests)
  • pnpm typecheck in packages/ui

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown

React Doctor found 1 issue in 1 file · 1 warning.

1 warning

src/features/canvas/components/ActivityTimeline.tsx

Reviewed by React Doctor for commit 1dbd099.

puemos commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

@puemos
puemos force-pushed the posthog-code/channels-stack-3-spaces-ui branch from b5a9f27 to 7098f03 Compare July 25, 2026 15:10
@puemos
puemos force-pushed the posthog-code/channels-stack-4-activity-view branch from 5903d4d to 99fdf5c Compare July 25, 2026 15:10
@puemos
puemos force-pushed the posthog-code/channels-stack-3-spaces-ui branch from 7098f03 to 54ec82c Compare July 26, 2026 11:14
@puemos
puemos force-pushed the posthog-code/channels-stack-4-activity-view branch 3 times, most recently from 1bdb330 to 4c2e2fb Compare July 26, 2026 12:40
@puemos
puemos marked this pull request as ready for review July 27, 2026 07:07
@puemos puemos added the reviewhog ($$$) Reviews pull requests before humans do label Jul 27, 2026 — with Graphite App
@puemos
puemos requested a review from k11kirky July 27, 2026 07:08
@puemos puemos self-assigned this Jul 27, 2026
@puemos puemos changed the title feat(channels): add the structured Activity view feat(channels): add the structured Activity view (4/4) Jul 27, 2026
@puemos
puemos changed the base branch from posthog-code/channels-stack-3-spaces-ui to posthog-code/channels-stack-2-scope-foundations July 27, 2026 08:23
@puemos
puemos changed the base branch from posthog-code/channels-stack-2-scope-foundations to posthog-code/channels-stack-3-spaces-ui July 27, 2026 08:24
@puemos
puemos changed the base branch from posthog-code/channels-stack-3-spaces-ui to posthog-code/channels-stack-2-scope-foundations July 27, 2026 08:24
@puemos
puemos changed the base branch from posthog-code/channels-stack-2-scope-foundations to posthog-code/channels-stack-3-spaces-ui July 27, 2026 08:25
@puemos
puemos force-pushed the posthog-code/channels-stack-4-activity-view branch 2 times, most recently from 0d48de6 to b517013 Compare July 27, 2026 08:51
@puemos
puemos requested a review from a team July 27, 2026 13:05
@puemos
puemos force-pushed the posthog-code/channels-stack-4-activity-view branch from 3d8a6d7 to 8f2e076 Compare July 27, 2026 13:07
@puemos
puemos changed the base branch from posthog-code/channels-stack-3-spaces-ui to main July 27, 2026 13:08
@trunk-io

trunk-io Bot commented Jul 27, 2026

Copy link
Copy Markdown

😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details.

Comment thread packages/ui/src/features/sessions/components/ArtifactPreview.tsx
@veria-ai

veria-ai Bot commented Jul 27, 2026

Copy link
Copy Markdown

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 1 · PR risk: 0/10

@puemos
puemos force-pushed the posthog-code/channels-stack-4-activity-view branch from dbdbb67 to c8452c4 Compare July 27, 2026 17:59
@puemos
puemos changed the base branch from main to posthog-code/channels-stack-3-spaces-ui July 27, 2026 18:02
@puemos
puemos force-pushed the posthog-code/channels-stack-3-spaces-ui branch from 8a9e6f2 to 8bda314 Compare July 27, 2026 18:45
@puemos
puemos force-pushed the posthog-code/channels-stack-4-activity-view branch from fa1742a to 2a1cd89 Compare July 27, 2026 18:45
@posthog

posthog Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Visual changes approved by @puemos — baseline updated in 5048498.

View this run in PostHog

12 removed.

) {
const cloudRunState = useCloudRunState(taskId, task);
const { prUrl, effectiveBranch, repo, isRunActive } = cloudRunState;
const prUrl = prUrlOverride ?? cloudRunState.prUrl;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this switches to a historical PR, usePrChangedFiles retains the previous query data via placeholderData, and changedFiles also falls back to cloudRunState.fallbackFiles whenever the selected PR has not returned files yet. As a result, the review can render the latest/previous PR files while prUrl already names the historical PR; actions such as comments then target the new PR URL with the wrong diff visible. Please keep the historical selection loading until its own files resolve and do not use latest-run fallbacks for an explicit override.

puemos commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

@puemos puemos added the Create Release This will trigger a new release label Jul 28, 2026
@puemos
puemos force-pushed the posthog-code/channels-stack-3-spaces-ui branch from 8bda314 to 21c9bce Compare July 28, 2026 10:01
Base automatically changed from posthog-code/channels-stack-3-spaces-ui to main July 28, 2026 10:34
puemos added 5 commits July 28, 2026 12:39
Replace the flag-gated task thread with Timeline, Artifacts, and Comments views. Include multi-run artifacts and selected historical pull request review while leaving flag-off behavior unchanged.

Generated-By: PostHog Code
Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
The Activity panel's header was padding-sized (~41px) while the pane to its
left — TabbedPanel's tab bar — is a fixed 32px row, so the two bottom borders
never lined up. The panel also stacked a title row on top of a tabs row where
the left pane has a single strip.

Give ActivityPanel its own 32px header carrying the tabs directly: no separate
"Activity" title row, the tab list fills the row so the line indicator lands on
the bottom border, and the window controls sit right-aligned. Matches
TabbedPanel and ReviewToolbar, which share the same height and border token.

The shared ThreadPanelHeader is now the legacy panel's alone, so it stays
exactly as it was — flag-off chrome is unchanged.

Generated-By: PostHog Code
Task-Id: 8ccf3555-2c68-4dbb-8b9f-1a96fd85d95a
Starring a channel is already reachable from the sidebar back row's hover star
and the channel list's context menu, so the header's copy was a third
affordance for the same action sitting next to the channel name chip.

Generated-By: PostHog Code
Task-Id: 8ccf3555-2c68-4dbb-8b9f-1a96fd85d95a
The pane read the run artifact manifest and then dropped everything on
`type === "plan"` — a type nothing in the product has ever written. The
only deliverable type agents actually produce is `output`, via the
`upload_artifact` tool, so the manifest branch was unreachable and files
handed back by a run never appeared.

Verified against a live run's manifest: 6 `output`, 2 `user_attachment`,
zero `plan`. The `plan` row was speculative — down to a bare-UUID
fallback for names that never arrive — so it goes rather than shipping a
UI affordance for data that doesn't exist. It can come back with a
producer.

Same inversion is why the conversation's Files box showed these while
the pane said "No artifacts yet": it filters to `output`, the exact
complement.

- `parseRunPlans` becomes `parseRunArtifacts(raw, types)`, and reads the
  `size`/`content_type`/`uploaded_at` the rows need.
- Re-uploads collapse to the newest per name: agents revise a
  deliverable and upload it again, and keeping every copy buries the
  current one under its own drafts.
- `formatFileSize` moves out of CloudArtifactDownloads so both surfaces
  format sizes the same way.

Generated-By: PostHog Code
Task-Id: 8d187d00-0633-4706-8443-f79130b65f9f
The rows already use the same FileIcon the chat's file list does, so
markdown resolves to the markdown icon and HTML to the HTML one. Lock
that in — the row it replaced hardcoded a single clipboard glyph, and
nothing else would catch a regression back to a generic icon.

Generated-By: PostHog Code
Task-Id: 8d187d00-0633-4706-8443-f79130b65f9f
@puemos
puemos force-pushed the posthog-code/channels-stack-4-activity-view branch from 5048498 to 1dbd099 Compare July 28, 2026 10:39
@trunk-io
trunk-io Bot merged commit f86beb3 into main Jul 28, 2026
33 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/channels-stack-4-activity-view branch July 28, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Create Release This will trigger a new release reviewhog ($$$) Reviews pull requests before humans do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants