Skip to content

fix(tasks): File to… adds the task to the channel feed as a thread item#3250

Draft
adamleithp wants to merge 1 commit into
mainfrom
posthog-code/file-to-channel-thread-item
Draft

fix(tasks): File to… adds the task to the channel feed as a thread item#3250
adamleithp wants to merge 1 commit into
mainfrom
posthog-code/file-to-channel-thread-item

Conversation

@adamleithp

Copy link
Copy Markdown
Contributor

Problem

In the task list, the File to… menu option on a task didn't add the task to the channel as a thread item.

Why: A channel has two sides. The desktop file-system rows back the channel's Artifacts / Recents tabs, while the Slack-style feed (the thread items) is read from getTasks({ channel }). "File to…" only wrote the file-system row, so the task never showed up in the channel feed — only in its file browser.

Changes

  • Added useFileTaskToChannelFeed, which resolves the folder channel's backend channel by name (resolve-or-create for public channels, mapping the me folder onto the personal channel) and sets the task's channel, then invalidates the feed query.
  • The file-to-channel handler in useTaskContextMenu now files to both sides: the existing folder filing plus the new feed association, so a filed task appears as a thread item in the channel.

How did you test this?

  • Added useFileTaskToChannelFeed.test.ts covering public-name resolution, the me → personal-channel mapping, and the resolve-or-create fallback — all passing.
  • pnpm --filter @posthog/ui typecheck and Biome check pass on the changed files; the full @posthog/ui unit suite passes.

Automatic notifications

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

Created with PostHog Code

…ad item

The task-list "File to…" menu only wrote a desktop_file_system row, which
powers a channel's Artifacts / Recents tabs but not its Slack-style feed.
The feed reads getTasks({ channel }), so a filed task never appeared as a
thread item in the channel.

File to both sides: keep the existing folder filing, and additionally
associate the task with the backend channel (resolve-or-create by name,
mapping the "me" folder onto the personal channel) so it shows up in the
feed, then invalidate the feed query.

Generated-By: PostHog Code
Task-Id: d2eb875e-f010-4bf8-b6fe-9c40d550706f
@trunk-io

trunk-io Bot commented Jul 7, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 116289c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant