Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
fe64274
feat: add durable cloud Pi runtime sessions
jonathanlab Jul 22, 2026
69695d8
fix: harden cloud Pi session lifecycle
jonathanlab Jul 23, 2026
e1814d6
fix(agent): bind Pi credentials to the configured run
jonathanlab Jul 23, 2026
65e04c1
feat: show cloud Pi provisioning progress
jonathanlab Jul 23, 2026
8dd767a
fix(ui): settle completed Pi provisioning steps
jonathanlab Jul 23, 2026
f56b0d0
feat(pi): use provider model catalog for tasks
jonathanlab Jul 23, 2026
cedae81
refactor(pi): simplify cloud runtime boundaries
jonathanlab Jul 23, 2026
3629baf
refactor(pi): simplify cloud session delivery
jonathanlab Jul 24, 2026
a450577
fix(pi): stabilize cloud reconnect composer
jonathanlab Jul 24, 2026
4deff6f
feat(pi): stream native command lifecycle
jonathanlab Jul 24, 2026
5905445
fix(pi): harden cloud command delivery
jonathanlab Jul 24, 2026
4376c27
fix(pi): authenticate session persistence
jonathanlab Jul 27, 2026
e75b283
feat(pi): add cloud lifecycle recovery
jonathanlab Jul 27, 2026
d59247c
feat(pi): smooth cloud token streaming
jonathanlab Jul 27, 2026
818f8fb
feat(pi): add durable single-message queue
jonathanlab Jul 27, 2026
103fa6e
feat(pi): improve cloud error recovery
jonathanlab Jul 27, 2026
d18f3b2
feat(pi): show native session usage
jonathanlab Jul 28, 2026
01907db
Merge remote-tracking branch 'origin/main' into feat/pi-cloud-runtime…
jonathanlab Jul 28, 2026
7a3e023
fix(pi): disable cloud shell RPC
jonathanlab Jul 28, 2026
484a6c7
refactor(shared): extract task contracts and model policy
richardsolomou Jul 24, 2026
ec5fb80
fix(models): preserve GLM effort policy
richardsolomou Jul 24, 2026
fa2dda4
test(ui): wait for async content
richardsolomou Jul 24, 2026
0960bc3
test(ui): isolate plan approval presentation
richardsolomou Jul 24, 2026
3f608f2
fix(shared): Preserve canonical task artifacts
richardsolomou Jul 28, 2026
9c4235c
test(agent): match canonical model picker order
richardsolomou Jul 28, 2026
462ee21
Revert "fix(pi): disable cloud shell RPC"
jonathanlab Jul 28, 2026
3f07f99
fix(agent): await Pi RPC shutdown
jonathanlab Jul 28, 2026
f566936
fix(agent): handle Pi bootstrap pipe closure
jonathanlab Jul 28, 2026
a77aaae
chore(visual): update storybook baselines
posthog[bot] Jul 28, 2026
3890211
fix(pi): address cloud runtime review findings
jonathanlab Jul 28, 2026
ad82239
fix(pi): recover stale cloud sessions
jonathanlab Jul 28, 2026
1c8d720
refactor(pi): remove frontend runtime heuristics
jonathanlab Jul 28, 2026
c47d64d
fix(agent): keep Pi event translation browser-safe
jonathanlab Jul 28, 2026
fc5334e
feat(canvas): delete a canvas with a confirm and an undo window
adamleithp Jul 28, 2026
9977775
artifacts view options
adamleithp Jul 28, 2026
b4e9084
Merge main into shared cloud task foundations
richardsolomou Jul 29, 2026
b69d17d
refactor(api-client): extract cloud task transport
richardsolomou Jul 24, 2026
01aec6d
refactor(core): extract cloud task policies
richardsolomou Jul 24, 2026
53e5383
refactor(core): rename cloud task service as engine
richardsolomou Jul 24, 2026
2245a2e
refactor(core): extract portable cloud task engine
richardsolomou Jul 24, 2026
36f9b39
refactor(core): extract repository integration semantics
richardsolomou Jul 24, 2026
3003336
refactor(core): extract pending prompt recovery
richardsolomou Jul 24, 2026
b5204c8
refactor(core): extract plan approval presentation
richardsolomou Jul 24, 2026
7ccd259
refactor(core): extract permission option presentation
richardsolomou Jul 24, 2026
046422e
refactor(core): extract composer controls
richardsolomou Jul 24, 2026
37f1c0b
refactor(core): extract composer model policy
richardsolomou Jul 24, 2026
0a1c884
fix(core): prefer streamed plan content
richardsolomou Jul 24, 2026
e27b337
refactor(core): extract session presentation semantics
richardsolomou Jul 24, 2026
04a7f52
refactor(api-client): expose shared automation contracts
richardsolomou Jul 24, 2026
0b25fcd
refactor(core): extract inbox presentation semantics
richardsolomou Jul 24, 2026
afa5cb6
refactor(core): extract inbox activity presentation
richardsolomou Jul 24, 2026
a7e4e28
refactor(core): extract portability contracts
richardsolomou Jul 24, 2026
1f3ad6a
refactor(ui): reuse inbox identifier formatting
richardsolomou Jul 24, 2026
0c3e6fb
refactor(mobile): adopt shared task runtime
richardsolomou Jul 24, 2026
5299c52
fix(mobile): preserve permission mode on resume
richardsolomou Jul 24, 2026
2b5d2a5
refactor(mobile): finish shared task adoption
richardsolomou Jul 24, 2026
d98d556
refactor(mobile): adopt repository and inbox transport
richardsolomou Jul 24, 2026
03c3591
Merge remote-tracking branch 'origin/main' into page-titles-and-artif…
adamleithp Jul 29, 2026
228cd02
feat(chat-thread): copy a turn from its footer, a message from its menu
adamleithp Jul 27, 2026
cd2f824
small nits
adamleithp Jul 27, 2026
fce7bd7
fix(chat-thread): keep the raw-logs toggle on message right-click
adamleithp Jul 27, 2026
d36a03e
feat(ui): shared page header, space breadcrumbs, artifact views
adamleithp Jul 29, 2026
9285cf0
Merge remote-tracking branch 'origin/main' into page-titles-and-artif…
adamleithp Jul 29, 2026
894534d
fix(pi): restore cold session controls from TaskSession
jonathanlab Jul 29, 2026
6f47a34
fix(canvas): no white flash when a preview loads in dark mode
adamleithp Jul 29, 2026
6854588
Merge remote-tracking branch 'origin/main' into feat/pi-cloud-runtime…
jonathanlab Jul 29, 2026
97cd41c
fix(pi): disable unsupported harness extensions
jonathanlab Jul 29, 2026
b9c1d6c
fix(canvas): canvas menu fits its labels, and pins to a "space"
adamleithp Jul 29, 2026
44b0f56
fix(canvas): delete confirm copy matches the undo window
adamleithp Jul 29, 2026
e394327
refactor(ui): review cleanups on the page-header work
adamleithp Jul 29, 2026
9a945d7
fix(agent): hide effort controls for Kimi sessions
tatoalo Jul 29, 2026
25a9611
fix(ui): review follow-ups on headers, artifact cards and nav
adamleithp Jul 29, 2026
7546946
refactor(canvas): artifacts view switcher is a quill ToggleGroup
adamleithp Jul 29, 2026
4563f4a
fix(chat-thread): lead turn copies with the prompt, defer context-men…
claude Jul 29, 2026
c35dffd
new masonry icon
adamleithp Jul 29, 2026
777ff79
fix(canvas): artifacts fill the pane
adamleithp Jul 29, 2026
16f1472
fix(ui): clear react-doctor findings from this branch
adamleithp Jul 29, 2026
9a7a296
chore: merge main into mobile transport adoption
richardsolomou Jul 29, 2026
e7a170c
Merging 4563f4a332a20fb6a38ddf606c67316f8471c507 into trunk-temp/pr-3…
trunk-io[bot] Jul 29, 2026
9edb95d
Merging e7a170cbd298539c251a75ba5fa400de74d3075f into trunk-temp/pr-3…
trunk-io[bot] Jul 29, 2026
ac99549
Merging 9a7a2964fac53e766b7e40ac8d53979f113de893 into trunk-temp/pr-3…
trunk-io[bot] Jul 29, 2026
e362086
Merging 16f14725d87a3e1365a960c6d321a1697fd70962 into trunk-temp/pr-3…
trunk-io[bot] Jul 29, 2026
88b79d5
Merging e36208638805de62e60c08a4c62b714051242a08 into trunk-temp/pr-3…
trunk-io[bot] Jul 29, 2026
91673bb
Merging 9a945d7ba056c642ca627ba33c4271c306850a45 into trunk-temp/pr-3…
trunk-io[bot] Jul 29, 2026
59910af
Merging 97cd41cb5f55e4164593e163fadcd739080cb3ad into trunk-temp/pr-3…
trunk-io[bot] Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions apps/code/src/renderer/di/bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import {
type AutoresearchSessionClient,
type AutoresearchStorageClient,
} from "@posthog/core/autoresearch/identifiers";
import {
CLOUD_TASK_CLIENT,
type CloudTaskClient,
} from "@posthog/core/cloud-task/cloudTaskClient";
import {
CODE_REVIEW_WORKSPACE_CLIENT,
REVERT_HUNK_SERVICE,
Expand Down Expand Up @@ -76,8 +80,10 @@ import {
import { PI_RUNNER } from "@posthog/core/pi-runtime/identifiers";
import type { PiRunner } from "@posthog/core/pi-runtime/piRunner";
import {
PI_SESSION_CLIENT,
type PiSessionClient,
LOCAL_PI_SESSION_FACTORY,
PI_SESSION_PROVIDER,
type PiSessionFactory,
type PiSessionProvider,
} from "@posthog/core/pi-runtime/piSessionController";
import {
type BundleLocalSkill,
Expand Down Expand Up @@ -295,7 +301,9 @@ export interface RendererBindings {
[ANALYTICS_TRACKER]: AnalyticsTracker;
[TASK_CREATION_HOST]: ITaskCreationHost;
[PI_RUNNER]: PiRunner;
[PI_SESSION_CLIENT]: PiSessionClient;
[PI_SESSION_PROVIDER]: PiSessionProvider;
[LOCAL_PI_SESSION_FACTORY]: PiSessionFactory;
[CLOUD_TASK_CLIENT]: CloudTaskClient;
[TASK_CREATION_EFFECTS]: TaskCreationEffects;
[RENDERER_TASK_SERVICE]: TaskService;
[TASK_SERVICE]: TaskService;
Expand Down
14 changes: 10 additions & 4 deletions apps/code/src/renderer/di/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import "reflect-metadata";
import { useDevFlagsStore } from "@features/dev-toolbar/devFlagsStore";
import { TypedContainer } from "@inversifyjs/strongly-typed";
import type { TrpcRouter } from "@main/trpc/router";
import {
CLOUD_TASK_CLIENT,
type CloudTaskClient,
} from "@posthog/core/cloud-task/cloudTaskClient";
import {
CODE_REVIEW_WORKSPACE_CLIENT,
REVERT_HUNK_SERVICE,
Expand Down Expand Up @@ -35,7 +39,7 @@ import type { LocalMcpWorkspaceClient } from "@posthog/core/local-mcp/localMcpIm
import { PI_RUNNER } from "@posthog/core/pi-runtime/identifiers";
import { piRuntimeModule } from "@posthog/core/pi-runtime/pi-runtime.module";
import type { PiRunner } from "@posthog/core/pi-runtime/piRunner";
import { PI_SESSION_CLIENT } from "@posthog/core/pi-runtime/piSessionController";
import { LOCAL_PI_SESSION_FACTORY } from "@posthog/core/pi-runtime/piSessionController";
import {
CLOUD_ARTIFACT_BUNDLE_LOCAL_SKILL,
CLOUD_ARTIFACT_READ_FILE_AS_BASE64,
Expand Down Expand Up @@ -89,7 +93,9 @@ import {
import { WorkspaceSetupService } from "@posthog/core/workspace/WorkspaceSetupService";
import { setRootContainer } from "@posthog/di/container";
import { HOST_TRPC_CLIENT } from "@posthog/host-router/client";
import { TrpcPiSessionClient } from "@posthog/host-router/pi-session-client";
import { TrpcCloudTaskClient } from "@posthog/host-router/cloud-task-client";
import { TrpcPiRunner } from "@posthog/host-router/pi-runner";
import { TrpcPiSessionFactory } from "@posthog/host-router/pi-session-factory";
import {
BROWSER_TABS_CLIENT,
type BrowserTabsClient,
Expand Down Expand Up @@ -156,7 +162,6 @@ import { trpcClient } from "@renderer/trpc";
import { hostTrpcClient } from "@renderer/trpc/client";
import type { TRPCClient } from "@trpc/client";
import { hostLog, logger } from "@utils/logger";
import { TrpcPiRunner } from "../platform-adapters/trpc-pi-runner";
import type { RendererBindings } from "./bindings";
import { TASK_SERVICE as RENDERER_TASK_SERVICE, TRPC_CLIENT } from "./tokens";

Expand Down Expand Up @@ -297,7 +302,8 @@ container
// Bind services
container.bind<ITaskCreationHost>(TASK_CREATION_HOST).to(TrpcTaskCreationHost);
container.bind<PiRunner>(PI_RUNNER).to(TrpcPiRunner);
container.bind(PI_SESSION_CLIENT).to(TrpcPiSessionClient);
container.bind(LOCAL_PI_SESSION_FACTORY).to(TrpcPiSessionFactory);
container.bind<CloudTaskClient>(CLOUD_TASK_CLIENT).to(TrpcCloudTaskClient);
container.load(piRuntimeModule);
container.bind(TASK_CREATION_EFFECTS).toConstantValue(taskCreationEffects);
container.bind<TaskService>(RENDERER_TASK_SERVICE).to(TaskService);
Expand Down
10 changes: 4 additions & 6 deletions apps/mobile/src/app/(tabs)/inbox.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { INBOX_PIPELINE_STATUSES } from "@posthog/core/inbox/reportFiltering";
import type { SignalReport } from "@posthog/shared/domain-types";
import { useFocusEffect, useRouter } from "expo-router";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { View } from "react-native";
Expand All @@ -20,12 +22,8 @@ import {
decidedIds,
useDismissedReportsStore,
} from "@/features/inbox/stores/dismissedReportsStore";
import {
DEFAULT_STATUS_FILTER,
useInboxFilterStore,
} from "@/features/inbox/stores/inboxFilterStore";
import { useInboxFilterStore } from "@/features/inbox/stores/inboxFilterStore";
import { useInboxStore } from "@/features/inbox/stores/inboxStore";
import type { SignalReport } from "@/features/inbox/types";
import { buildInboxViewedProperties } from "@/features/inbox/utils";
import { useIntegrations } from "@/features/tasks/hooks/useIntegrations";
import { ANALYTICS_EVENTS, useAnalytics } from "@/lib/analytics";
Expand Down Expand Up @@ -74,7 +72,7 @@ export default function InboxScreen() {
statusFilter,
suggestedReviewerFilter,
priorityFilter,
defaultStatusFilter: DEFAULT_STATUS_FILTER,
defaultStatusFilter: INBOX_PIPELINE_STATUSES,
}),
);
}, [
Expand Down
24 changes: 12 additions & 12 deletions apps/mobile/src/app/inbox/[...id].tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
import { Text } from "@components/text";
import {
formatSignalReportSummaryMarkdown,
inboxStatusLabel,
} from "@posthog/core/inbox/reportPresentation";
import { DISMISSAL_REASON_OPTIONS } from "@posthog/shared";
import type {
ActionabilityJudgmentContent,
SignalFindingContent,
SignalReportPriority,
SignalReportStatus,
SuggestedReviewersArtefact,
} from "@posthog/shared/domain-types";
import { differenceInHours, format, formatDistanceToNow } from "date-fns";
import * as Haptics from "expo-haptics";
import { useLocalSearchParams, useRouter } from "expo-router";
Expand Down Expand Up @@ -39,25 +51,13 @@ import {
type ReviewerActionExtra,
SuggestedReviewers,
} from "@/features/inbox/components/SuggestedReviewers";
import { DISMISSAL_REASON_OPTIONS } from "@/features/inbox/constants";
import { useInboxEngagementTracker } from "@/features/inbox/hooks/useInboxEngagementTracker";
import {
useInboxReport,
useInboxReportArtefacts,
useInboxReportSignals,
} from "@/features/inbox/hooks/useInboxReports";
import { useInboxStore } from "@/features/inbox/stores/inboxStore";
import type {
ActionabilityJudgmentContent,
SignalFindingContent,
SignalReportPriority,
SignalReportStatus,
SuggestedReviewersArtefact,
} from "@/features/inbox/types";
import {
formatSignalReportSummaryMarkdown,
inboxStatusLabel,
} from "@/features/inbox/utils";
import { PrStatusBadge } from "@/features/tasks/components/PrStatusBadge";
import {
computeReportAgeHours,
Expand Down
68 changes: 38 additions & 30 deletions apps/mobile/src/app/task/[id].tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import { Text } from "@components/text";
import { DEFAULT_CLAUDE_EXECUTION_MODE } from "@posthog/core/sessions/executionModes";
import {
countUserMessages,
getSessionActivityPhase,
} from "@posthog/core/sessions/sessionActivity";
import { isTaskRunning } from "@posthog/core/tasks/taskArchive";
import type { Task } from "@posthog/shared";
import {
DEFAULT_GATEWAY_MODEL,
DEFAULT_REASONING_EFFORT,
type ExecutionMode,
getReasoningEffortOptions,
type SupportedReasoningEffort,
serializeCloudPrompt,
type Task,
} from "@posthog/shared";
import { useQueryClient } from "@tanstack/react-query";
import * as Haptics from "expo-haptics";
import { useLocalSearchParams, useRouter } from "expo-router";
Expand All @@ -20,24 +29,14 @@ import { useReanimatedKeyboardAnimation } from "react-native-keyboard-controller
import Animated, { useAnimatedStyle } from "react-native-reanimated";
import { FloatingBackButton } from "@/components/FloatingBackButton";
import { usePreferencesStore } from "@/features/preferences/stores/preferencesStore";
import { runTaskInCloud } from "@/features/tasks/api";
import { CustomImageBadge } from "@/features/tasks/components/CustomImageBadge";
import { FloatingTaskHeader } from "@/features/tasks/components/FloatingTaskHeader";
import { PrDiffStatsBadge } from "@/features/tasks/components/PrDiffStatsBadge";
import { PrStatusBadge } from "@/features/tasks/components/PrStatusBadge";
import { StopRunButton } from "@/features/tasks/components/StopRunButton";
import { TaskSessionView } from "@/features/tasks/components/TaskSessionView";
import { buildCloudPromptBlocks } from "@/features/tasks/composer/attachments/buildCloudPrompt";
import { serializeCloudPrompt } from "@/features/tasks/composer/attachments/cloudPrompt";
import type { PendingAttachment } from "@/features/tasks/composer/attachments/types";
import {
DEFAULT_EXECUTION_MODE,
DEFAULT_MODEL,
DEFAULT_REASONING,
type ExecutionMode,
modelSupportsReasoning,
type ReasoningEffort,
} from "@/features/tasks/composer/options";
import { QueuedMessagesDock } from "@/features/tasks/composer/QueuedMessagesDock";
import { TaskChatComposer } from "@/features/tasks/composer/TaskChatComposer";
import {
Expand Down Expand Up @@ -169,10 +168,10 @@ export default function TaskDetailScreen() {
string | undefined
>();
const composerMode: ExecutionMode =
composerConfig?.mode ?? DEFAULT_EXECUTION_MODE;
const composerModel = composerConfig?.model ?? DEFAULT_MODEL;
const composerReasoning: ReasoningEffort =
composerConfig?.reasoning ?? DEFAULT_REASONING;
composerConfig?.mode ?? DEFAULT_CLAUDE_EXECUTION_MODE;
const composerModel = composerConfig?.model ?? DEFAULT_GATEWAY_MODEL;
const composerReasoning: SupportedReasoningEffort =
composerConfig?.reasoning ?? DEFAULT_REASONING_EFFORT;

const messagingMode = useMessagingMode(taskId);
const queuedCount = useQueuedCount(taskId);
Expand Down Expand Up @@ -315,16 +314,21 @@ export default function TaskDetailScreen() {
)
: text;

const supportsReasoning = modelSupportsReasoning(composerModel);
const updatedTask = await runTaskInCloud(taskId, {
resumeFromRunId: task.latest_run?.id,
pendingUserMessage,
runtimeAdapter: "claude",
model: composerModel,
reasoningEffort: supportsReasoning ? composerReasoning : undefined,
initialPermissionMode: composerMode,
rtkEnabled: usePreferencesStore.getState().rtkEnabledCloud,
});
const supportsReasoning =
getReasoningEffortOptions("claude", composerModel) !== null;
const updatedTask = await getPostHogApiClient().runTaskInCloud(
taskId,
undefined,
{
resumeFromRunId: task.latest_run?.id,
pendingUserMessage,
adapter: "claude",
model: composerModel,
reasoningLevel: supportsReasoning ? composerReasoning : undefined,
initialPermissionMode: composerMode,
rtkEnabled: usePreferencesStore.getState().rtkEnabledCloud,
},
);
setTask(updatedTask);
await connectToTask(updatedTask);
updateTaskInCache(updatedTask);
Expand Down Expand Up @@ -513,7 +517,7 @@ export default function TaskDetailScreen() {
);

const handleReasoningChange = useCallback(
(value: ReasoningEffort) => {
(value: SupportedReasoningEffort) => {
if (!taskId) return;
setComposerConfig(taskId, { reasoning: value });
setConfigOption(taskId, "effort", value).catch(() => {});
Expand Down Expand Up @@ -566,10 +570,14 @@ export default function TaskDetailScreen() {
setRetrying(true);
disconnectFromTask(taskId);

const updatedTask = await runTaskInCloud(taskId, {
resumeFromRunId: task.latest_run?.id,
rtkEnabled: usePreferencesStore.getState().rtkEnabledCloud,
});
const updatedTask = await getPostHogApiClient().runTaskInCloud(
taskId,
undefined,
{
resumeFromRunId: task.latest_run?.id,
rtkEnabled: usePreferencesStore.getState().rtkEnabledCloud,
},
);
setTask(updatedTask);
await connectToTask(updatedTask);
updateTaskInCache(updatedTask);
Expand Down
Loading
Loading