fix: show logs not repo picker for inbox research tasks#2448
Merged
Conversation
Inbox research/implementation tasks are fetched from the PostHog cloud API
and have no local workspace record, so `useIsCloudTask` (which only read the
local workspace `mode`) returned false. That made `TaskLogsPanel` fall into
the `WorkspaceSetupPrompt` ("Select a repository folder") branch instead of
rendering the task logs.
Honor the canonical task-level cloud signal `task.latest_run?.environment ===
"cloud"` as a fallback in `useIsCloudTask`, matching the pattern already used
in `TaskDetail` and `useTaskDiffSummaryStats`. Pass the task through from
`useSessionViewState`. With `isCloud` correct, the panel renders `SessionView`
and streams cloud logs via `watchCloudTask`.
Generated-By: PostHog Code
Task-Id: 63b6d56b-6a53-4958-9d21-16bc72fad9eb
Contributor
|
Reviews (1): Last reviewed commit: "fix: show logs not repo picker for inbox..." | Re-trigger Greptile |
andrewm4894
approved these changes
Jun 1, 2026
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
On a report detail page in the inbox, expanding the Research (or Implementation) bar in the research task popover showed a "Select a repository folder" picker instead of the task's logs.
Root cause
The report's tasks come from
useReportTasks, which fetches them from the PostHog cloud API (client.getTask). These are server-created cloud tasks with no local SQLite workspace record.TaskLogsPanelrendersWorkspaceSetupPromptwhen!repoPath && !isCloud && .... ButisCloud(useIsCloudTask) andrepoPath(useCwd) were both derived only from the absent local workspace record, soisCloudwas wronglyfalseand the folder-picker branch won.Fix
Make
useIsCloudTaskalso honor the canonical task-level signaltask.latest_run?.environment === "cloud"— the sameworkspace?.mode === "cloud" || task.latest_run?.environment === "cloud"combination already used inTaskDetail.tsxanduseTaskDiffSummaryStats.ts. Threadtaskthrough fromuseSessionViewState.With
isCloudcorrect for these remote tasks:WorkspaceSetupPromptgate no longer matches → rendersSessionView(logs).useSessionConnectionroutes throughwatchCloudTask(live cloud log stream) instead of the staticloadLogsOnlyfallback.The optional
taskarg keeps the otheruseIsCloudTaskcall sites (FileTreePanel,ChangesPanel) unchanged.Verification
pnpm --filter code typecheckpasses.