Skip to content

feat(channels): add scoped channel foundations (2/4) - #3813

Merged
trunk-io[bot] merged 5 commits into
mainfrom
posthog-code/channels-stack-2-scope-foundations
Jul 28, 2026
Merged

feat(channels): add scoped channel foundations (2/4)#3813
trunk-io[bot] merged 5 commits into
mainfrom
posthog-code/channels-stack-2-scope-foundations

Conversation

@puemos

@puemos puemos commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Problem

Channel spaces need project-safe identity, item loading, and task creation semantics before any visible layout can be activated.

Changes

  • Add current-channel state, validation, and project/logout cleanup.
  • Add merged channel task/canvas models with ownership, filtering, pinning, and archiving.
  • Add channel-aware task creation and prefill handling.
  • Define the feature gates without connecting them to visible layout code.

This is PR 2 of the stack, based on #3812. With either flag state, users still see the existing layout.

How did you test this?

  • pnpm --filter @posthog/core test -- src/canvas/channelItems.test.ts src/canvas/runStatus.test.ts
  • Five focused UI suites covering channel identity, task routing, prefills, and refreshed tasks (23 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/task-detail/components/TaskInput.tsx

Reviewed by React Doctor for commit 2d7c7ab.

puemos commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

@puemos
puemos force-pushed the posthog-code/channels-stack-2-scope-foundations branch from e917958 to ffc8505 Compare July 25, 2026 15:09
@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 scoped channel foundations feat(channels): add scoped channel foundations (2/4) Jul 27, 2026
@puemos
puemos requested a review from a team July 27, 2026 10:47
puemos added 2 commits July 27, 2026 20:44
Extract the task thread conversation behavior and PR artifact presentation used by existing channel surfaces. This is behavior-neutral groundwork for the structured Activity view.

Generated-By: PostHog Code
Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
Generated-By: PostHog Code
Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
@puemos
puemos force-pushed the posthog-code/channels-stack-1-activity-refactors branch from 0b813d4 to e04e1a2 Compare July 27, 2026 18:44
puemos added 2 commits July 27, 2026 20:45
Add the dormant channel identity, item-list, and task-routing foundations with flag definitions and project-safe cleanup. Visible layout activation remains upstack.

Generated-By: PostHog Code
Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
Generated-By: PostHog Code
Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
@puemos
puemos force-pushed the posthog-code/channels-stack-2-scope-foundations branch from f60bbca to 1496330 Compare July 27, 2026 18:45
channelName={channelName}
channelId={backendChannel?.id}
channelContextId={channelId}
allowNoRepo

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.

The composer is usable while useBackendChannel(channelName) is still resolving, so a fast submit (or any resolve failure) passes undefined here. Both task creation paths serialize that as no channel, while the presence of channelName also prevents the personal-channel fallback. The task is filed in the desktop folder afterward, but it has no backend channel ownership and therefore never appears in useChannelFeed. Please hold submission until the backend channel UUID is available, and surface resolution failure rather than creating an unscoped task.

puemos commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

Base automatically changed from posthog-code/channels-stack-1-activity-refactors to main July 28, 2026 08:54
@trunk-io

trunk-io Bot commented Jul 28, 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.

@trunk-io
trunk-io Bot merged commit a56d162 into main Jul 28, 2026
34 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/channels-stack-2-scope-foundations branch July 28, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewhog ($$$) Reviews pull requests before humans do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants