fix(tasks): File to… adds the task to the channel feed as a thread item#3250
Draft
adamleithp wants to merge 1 commit into
Draft
fix(tasks): File to… adds the task to the channel feed as a thread item#3250adamleithp wants to merge 1 commit into
adamleithp wants to merge 1 commit into
Conversation
…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
|
Merging to
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 |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
useFileTaskToChannelFeed, which resolves the folder channel's backend channel by name (resolve-or-create for public channels, mapping themefolder onto the personal channel) and sets the task'schannel, then invalidates the feed query.file-to-channelhandler inuseTaskContextMenunow 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?
useFileTaskToChannelFeed.test.tscovering public-name resolution, theme→ personal-channel mapping, and the resolve-or-create fallback — all passing.pnpm --filter @posthog/ui typecheckand Biome check pass on the changed files; the full@posthog/uiunit suite passes.Automatic notifications
Created with PostHog Code