fix(spaces): make archiving a task remove it from the space - #3991
Draft
posthog[bot] wants to merge 1 commit into
Draft
fix(spaces): make archiving a task remove it from the space#3991posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
Archiving is a local, per-device record, but the space feed rendered the cloud task list raw — so an archived task's card stayed in the feed (and survived reload) while only the sidebar row disappeared. Both archive entry points therefore looked like they did nothing beyond a toast. The channel feed hook now drops archived tasks for every surface that reads it, and a rejected archive in the space sidebar shows an error toast instead of being swallowed by a bare `void`. Generated-By: PostHog Code Task-Id: 35aa501b-d1d6-44f7-8582-30183992f0fd
|
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
Archiving a task in Spaces looked like it did nothing: two teammates reported that neither the row's archive icon nor the context-menu action removed the task — one saw only a brief toast.
Archiving is a local, per-device record (the cloud task list has no notion of it), so every surface that renders the channel feed has to filter archived tasks itself. The space's main feed — the Slack-style list of task cards, where past tasks live — rendered
useChannelFeed's tasks raw. Archiving removed the sidebar row but left the card in the feed, and it came back on reload, so the archive read as a no-op.Compounding it, a rejected archive in the space sidebar was swallowed by a bare
void archiveTask(...): no row change, no toast, nothing.Changes
useChannelFeednow drops archived tasks, so every space surface reading the feed hides them consistently (the sidebar list already did this viabuildChannelItems).How did you test this?
useChannelFeedtest: an archived task is dropped from the feed; ordering and the query cache are untouched. Verified it fails on the pre-fix code.useChannelItemstests: a rejected archive raises an error toast, a successful one stays quiet. Verified the failure case fails on the pre-fix code.ChannelItemRow) and the row context menu'sonArchive(ChannelSidebar).pnpm exec vitest run src/features/canvas src/features/archive src/features/tasks src/features/sidebar— 69 files / 470 tests pass;pnpm --filter @posthog/ui typecheckclean; Biome clean.Automatic notifications
Created with PostHog Desktop from this inbox report.