Skip to content

Ux/all hands demo july 13 2026#3387

Open
adamleithp wants to merge 15 commits into
mainfrom
ux/all-hands-demo-july-13-2026
Open

Ux/all hands demo july 13 2026#3387
adamleithp wants to merge 15 commits into
mainfrom
ux/all-hands-demo-july-13-2026

Conversation

@adamleithp

Copy link
Copy Markdown
Contributor

Built on PR: #3370 ( which is mergable )

but we're going to hack on this branch for demo.

Needs posthog/posthog local on branch: PostHog/posthog#70320

adamleithp and others added 8 commits July 12, 2026 13:02
Reworks the create-context dialog into a plan-mode launcher and gives the context
index a real feed of "PostHog agent" system messages.

Create dialog (quill Dialog): asks for a name + a description of what the context
is about, then launches a cloud plan-mode session that investigates the repo and
PostHog and co-builds CONTEXT.md with the user (buildContextGenerationPrompt seeds
it with the description). Resolves adapter/model like the composer so cloud runs
aren't rejected, and owns the task on the backend channel so it lands in the
context feed (not just Recents). On failure the context is kept and the typed
description is preserved for the next attempt.

Context feed: after launch you land on the context index, where durable, team-
visible announcements render alongside the plan task card — "created this context"
(server-emitted channel_created) then "is building CONTEXT.md" (context_md_building),
in order, then the card you click into for the session. Backed by the new
ChannelFeedMessage endpoint (posthog/posthog); ordered via explicit timestamps.

Removes the old fire-and-forget generation-task tracking (setGenerationTask /
useFolderGenerationTask / GeneratingState + polling); the empty-state "Build with
agent" now opens the same describe-and-plan dialog.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The feed-message endpoint (posthog#70320) isn't deployed, so the feed
opened with the plan-task card instead of a creation announcement.
Synthesize the opener from TaskChannel.created_at/created_by — canonical,
always sorts first, deploy-independent — and filter server-emitted
channel_created/context_created rows so nothing duplicates once the
backend lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Resolve the cloud model via modelResolver.resolveDefaultModel (like the
  freeform-canvas flow) instead of trusting the composer picker's async
  state; hard-stop with a toast when no model resolves, before the task
  (and orphaned context) is created.
- Stop polling the channel feed once the query errors and disable retries
  — the endpoint 404s on prod until posthog#70320 deploys, and the old
  numeric interval + default retries streamed ~4 requests per 5s forever.
- Make the feed merge comparator consistent for equal timestamps.
- Only consume the stashed create-dialog description in create mode, so
  the describe-mode open the failed-launch flow lands on doesn't wipe it.
- Narrow ChannelFeedMessageEvent to the one event actually posted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@trunk-io

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

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. packages/ui/src/features/canvas/hooks/useChannelFeedMessages.ts, line 2739-2743 (link)

    P2 Feed Polling Stops Permanently

    The comment says the feed endpoint may be missing during rollout, but the first 404 puts this query into error and disables all future polling. If the endpoint becomes available later in the same session, system feed rows still never load until something manually invalidates or remounts the query, so context lifecycle announcements stay invisible while task polling continues.

Reviews (1): Last reviewed commit: "load thread only after everything is loa..." | Re-trigger Greptile

Comment on lines +121 to +137
const backendChannelId = await resolveBackendChannelId(
client,
channelName,
).catch(() => undefined);

const result = await taskService.createTask(
{
content: buildContextGenerationPrompt({ channelName, channelId }),
taskDescription: `Generate CONTEXT.md for #${channelName}`,
// Defaults to a cloud run — generation should never tie up (or
// depend on) the local machine, and it's never the sticky last-used
// workspace mode. The dev-only picker can override to "local" to
// test a local build of these features before merging.
content: buildContextGenerationPrompt({
channelName,
channelId,
description,
}),
taskDescription: `Build CONTEXT.md for ${channelName}`,
workspaceMode,
adapter: adapter ?? "claude",
model,
channelId: backendChannelId,

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.

P1 Unowned Planning Tasks

When backend channel resolution fails, this path swallows the error and still creates the planning task with channelId: undefined. The task can be created and filed to Recents, but it will not be owned by the feed channel and the feed-message block is skipped, so the user lands on a new context with no task card or “building CONTEXT.md” row even though the session started.

Comment on lines +160 to +162
const buildingAt = new Date(
new Date(task.created_at).getTime() - 1,
).toISOString();

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.

P1 Invalid Task Timestamp Throws

If the task creation response has a missing or invalid created_at, this success path throws from toISOString() after the task has already been created and filed. That rejects generate() instead of just skipping the optional feed timestamp, leaving the create flow in a failed state even though the planning task exists.

Comment on lines +123 to +128

track(ANALYTICS_EVENTS.CONTEXT_ACTION, {
action_type: "generate_started",
channel_id: contextId,
});
const task = await generate({

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.

P1 Unhandled Generate Rejection

generate() can reject outside its null return path, but this submit handler awaits it without a try/catch after the context may already have been created. A network/model/task creation error then bypasses the recovery that stashes the description and navigates to the new context, leaving the modal flow in an unhandled failed state.

Rule Used: Always wrap asynchronous calls that may fail, such... (source)

Learned From
PostHog/posthog#32098

hasError,
errorTitle,
} = useSessionViewState(taskId, task);
useSessionConnection({ taskId, task, session, repoPath, isCloud });

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.

P1 Thread View Starts Sessions

Opening the thread dock now mounts useSessionConnection for any task. For a local task with no existing run, that connection path can start a fresh agent run from the task description, so clicking a task card just to read or reply in the thread can start agent work and consume resources without an explicit run action.

adamleithp and others added 7 commits July 13, 2026 12:47
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