Skip to content

Gate channel tasks experiment#1275

Draft
klopez4212 wants to merge 23 commits into
kennylopez-agent-tasks-channel-uifrom
kennylopez-agent-thread-continuous-conversations
Draft

Gate channel tasks experiment#1275
klopez4212 wants to merge 23 commits into
kennylopez-agent-tasks-channel-uifrom
kennylopez-agent-thread-continuous-conversations

Conversation

@klopez4212

@klopez4212 klopez4212 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Put the channel Tasks / continued agent conversation surface behind the new channel-tasks Experiments flag.
  • Gate task markers, task tabs, task links, deep links, composer cards, and persisted task state when the experiment is disabled.
  • Keep Gate channel tasks experiment #1275 as the top PR in the stack so the existing review thread remains attached to the final rollout gate.

Stack

  1. Add agent task conversation foundation #1323
  2. Add channel task surface #1324
  3. Add task link cards #1325
  4. This PR

Snapshots

Task marker and recap

Task marker and recap

Channel Tasks tab

Channel Tasks tab

Tests

  • git diff --check origin/main..HEAD
  • cd desktop && pnpm check:file-sizes && ./node_modules/.bin/tsc --noEmit
  • cd desktop && pnpm test
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml deep_link --lib
  • Snapshot capture: cd desktop && pnpm exec playwright test tests/e2e/agent-task-snapshots.spec.ts --project=smoke --config playwright.config.ts using a temporary local spec that was removed before commit.

@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch 2 times, most recently from f727a44 to f45c44f Compare June 26, 2026 17:56
@klopez4212 klopez4212 marked this pull request as ready for review June 26, 2026 17:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f45c44f52b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/agentConversations.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf5fc6687c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/ui/AgentConversationScreen.tsx Outdated
Comment thread desktop/src/features/channels/ui/ChannelPane.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b99ec19a0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/buzz-acp/src/queue.rs
@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch from 9b99ec1 to 69de848 Compare June 27, 2026 08:08
@klopez4212 klopez4212 changed the title Add continued agent conversations Gate channel tasks experiment Jun 27, 2026
@klopez4212 klopez4212 changed the base branch from main to kennylopez-agent-tasks-links June 27, 2026 08:12
@klopez4212 klopez4212 mentioned this pull request Jun 27, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

next.delete(activeAgentConversationChannelId);

P2 Badge Preserve channel unread badges while a task is open

When a task conversation is selected, this drops the entire source channel from the unread ID set based only on the channel id. In the scenario where that channel also has unrelated unread messages, the task screen only marks the task thread messages read, so deleting the channel here hides the sidebar badge/overflow indicator for real unread content until the user leaves the task. Keep the channel unread state visible, or subtract only the task thread’s messages rather than suppressing the whole channel.


onOpenThread(threadMessage);

P2 Badge Scroll to the agent reply from task rows

For markers whose agent reply is inside a thread (parentMessageId is set), the Tasks view switches back to Messages and only opens threadMessage. handleOpenThread clears the thread scroll target, so “Go to message” lands on the thread root/parent rather than the marker’s agentReplyId; in a busy thread the source reply can remain off-screen or hidden. Pass the agent reply as a route/scroll target (or set the thread target to marker.agentReplyId) before returning.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

if (marker.parentMessageId) {
onOpenThread(threadMessage);
return;

P2 Badge Target the reply when opening task messages

When a task was started from a reply (marker.parentMessageId is set), the Tasks tab's “Go to message” path opens only threadMessage and returns without setting any scroll/highlight target for the actual task reply. In long threads this lands at the thread head/default position rather than the source reply the button promises to show; route through the existing deep-link target logic or propagate message.id as the thread scroll target after opening the thread.


() => buildTimelineItems(deferredEntries, firstUnreadMessageId),

P2 Badge Build scroll indexes with the same day-divider option

When showInitialDayDivider is false (as in the agent conversation screen), the child list omits the initial divider, but this parent timelineItems call still uses the default that includes it. That makes virtualizerOption.itemCount and indexByMessageId one row larger than the rendered TimelineMessageList, so bottom pinning or target convergence can scroll to the wrong/out-of-range index; pass showInitialDayDivider into this buildTimelineItems call and include it in the deps.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@klopez4212 klopez4212 force-pushed the kennylopez-agent-tasks-links branch from 1c25994 to 0b25615 Compare June 27, 2026 09:07
@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch from 7570128 to f07ffd3 Compare June 27, 2026 09:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f07ffd394e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/channels/ui/ChannelPane.tsx Outdated
@klopez4212 klopez4212 force-pushed the kennylopez-agent-tasks-links branch from 0b25615 to 49cdaf8 Compare June 27, 2026 09:36
@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch from f07ffd3 to 6490e73 Compare June 27, 2026 09:41
@klopez4212 klopez4212 force-pushed the kennylopez-agent-tasks-links branch from 49cdaf8 to 846fab4 Compare June 27, 2026 09:44

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6490e73e7b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/channels/ui/useAgentConversationRouteTarget.ts Outdated
@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch 2 times, most recently from 094a9f7 to 090eff6 Compare June 27, 2026 09:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 090eff61e5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/channels/ui/useAgentConversationRouteTarget.ts
Comment thread desktop/src/features/messages/lib/useRichTextEditor.ts Outdated
@klopez4212 klopez4212 force-pushed the kennylopez-agent-tasks-links branch from a99845a to a0d386a Compare June 27, 2026 10:17
@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch 2 times, most recently from 210c44e to 7f05400 Compare June 27, 2026 10:29
@klopez4212 klopez4212 force-pushed the kennylopez-agent-tasks-links branch from 239d19e to ea173d7 Compare June 27, 2026 10:46
@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch from 7f05400 to 7d4dba1 Compare June 27, 2026 10:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d4dba1820

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/channels/ui/ChannelPane.tsx
@klopez4212 klopez4212 force-pushed the kennylopez-agent-tasks-channel-ui branch from 78676e5 to 7ef655f Compare June 29, 2026 18:31
@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch from a6d69f4 to 6b0949a Compare June 29, 2026 18:37
@klopez4212 klopez4212 force-pushed the kennylopez-agent-tasks-channel-ui branch from 7ef655f to f6bcac3 Compare June 29, 2026 19:03
@klopez4212 klopez4212 force-pushed the kennylopez-agent-thread-continuous-conversations branch from 6b0949a to 71ff880 Compare June 29, 2026 19:07

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a3afcad61

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/channels/ui/useAgentConversationRouteTarget.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fb8862baa1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/messages/ui/MessageRow.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e28bde927

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +686 to 690
if (!marker.agentPubkey) {
continue;
}
if (!anchorMessage || anchorIndex === undefined) {
const hasLoadedThreadContext = orderedMessages.some(({ message }) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep source-task replies visible when the anchor is paged out

When a task was started from a human source message that mentioned an agent, the marker still has agentPubkey even though the anchor is not authored by that agent. Fresh evidence beyond the earlier source-anchor fix is that this missing-anchor path treats any marker with an agent pubkey as a cutoff candidate; the anchorMessage.pubkey !== marker.agentPubkey guard only runs when the anchor is loaded. If the human anchor is outside the current history window but the root/later replies are loaded, normal thread replies after startedAt get hidden from the Messages view/thread.

Useful? React with 👍 / 👎.

Comment on lines +345 to +349
const agentLookupReady =
!channelMembersQuery.isLoading &&
!managedAgentsQuery.isLoading &&
messageProfilesReady &&
!relayAgentsQuery.isLoading;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Wait for refetching agent lookups before opening tasks

When the channel members, managed agents, or relay agents queries are refetching with stale cached data, isLoading is already false, so this can mark agent lookup ready before the refreshed agent list arrives. In that window, clicking New task on a message whose routeable agent is only in the in-flight lookup falls through with taskAgent === null instead of queuing, opening/publishing a task with empty agent fields and causing plain follow-ups to miss the intended agent p tag. Use the settled/pending signal that also accounts for isFetching before allowing the empty-agent fallback.

Useful? React with 👍 / 👎.

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