Skip to content

Commit dd49e68

Browse files
committed
Remove displaying Tasks changes
This branch now only contains Autonomy onboarding functionality. The displaying of proactive tasks was been extracted to 02-04-display-proactive-tasks.
1 parent bc005cf commit dd49e68

13 files changed

Lines changed: 44 additions & 851 deletions

File tree

apps/twig/src/api/posthogClient.ts

Lines changed: 2 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import { logger } from "@renderer/lib/logger";
2-
import type {
3-
SignalReportArtefactsResponse,
4-
SignalReportsResponse,
5-
Task,
6-
TaskRun,
7-
} from "@shared/types";
2+
import type { Task, TaskRun } from "@shared/types";
83
import type { StoredLogEntry } from "@shared/types/session-events";
94
import { buildApiFetcher } from "./fetcher";
105
import { createApiClient, type Schemas } from "./generated";
@@ -66,11 +61,7 @@ export class PostHogAPIClient {
6661
return data as Schemas.Team;
6762
}
6863

69-
async getTasks(options?: {
70-
repository?: string;
71-
createdBy?: number;
72-
originProduct?: string;
73-
}) {
64+
async getTasks(options?: { repository?: string; createdBy?: number }) {
7465
const teamId = await this.getTeamId();
7566
const params: Record<string, string | number> = {
7667
limit: 500,
@@ -84,10 +75,6 @@ export class PostHogAPIClient {
8475
params.created_by = options.createdBy;
8576
}
8677

87-
if (options?.originProduct) {
88-
params.origin_product = options.originProduct;
89-
}
90-
9178
const data = await this.api.get(`/api/projects/{project_id}/tasks/`, {
9279
path: { project_id: teamId.toString() },
9380
query: params,
@@ -387,81 +374,6 @@ export class PostHogAPIClient {
387374
return data.results ?? [];
388375
}
389376

390-
async getSignalReports(): Promise<SignalReportsResponse> {
391-
const teamId = await this.getTeamId();
392-
const url = new URL(
393-
`${this.api.baseUrl}/api/projects/${teamId}/signal_reports/`,
394-
);
395-
const response = await this.api.fetcher.fetch({
396-
method: "get",
397-
url,
398-
path: `/api/projects/${teamId}/signal_reports/`,
399-
});
400-
401-
if (!response.ok) {
402-
throw new Error(
403-
`Failed to fetch signal reports: ${response.statusText}`,
404-
);
405-
}
406-
407-
const data = await response.json();
408-
return {
409-
results: data.results ?? data ?? [],
410-
count: data.count ?? data.results?.length ?? data?.length ?? 0,
411-
};
412-
}
413-
414-
async getSignalReportArtefacts(
415-
reportId: string,
416-
): Promise<SignalReportArtefactsResponse> {
417-
const teamId = await this.getTeamId();
418-
const url = new URL(
419-
`${this.api.baseUrl}/api/projects/${teamId}/signal_reports/${reportId}/artefacts/`,
420-
);
421-
const response = await this.api.fetcher.fetch({
422-
method: "get",
423-
url,
424-
path: `/api/projects/${teamId}/signal_reports/${reportId}/artefacts/`,
425-
});
426-
427-
if (!response.ok) {
428-
throw new Error(
429-
`Failed to fetch signal report artefacts: ${response.statusText}`,
430-
);
431-
}
432-
433-
const data = await response.json();
434-
return {
435-
results: data.results ?? data ?? [],
436-
count: data.count ?? data.results?.length ?? data?.length ?? 0,
437-
};
438-
}
439-
440-
/**
441-
* Run a HogQL query against the PostHog query API
442-
*/
443-
async runQuery<T = unknown>(query: {
444-
kind: string;
445-
query: string;
446-
}): Promise<T> {
447-
const teamId = await this.getTeamId();
448-
const url = new URL(`${this.api.baseUrl}/api/projects/${teamId}/query/`);
449-
const response = await this.api.fetcher.fetch({
450-
method: "post",
451-
url,
452-
path: `/api/projects/${teamId}/query/`,
453-
overrides: {
454-
body: JSON.stringify(query),
455-
},
456-
});
457-
458-
if (!response.ok) {
459-
throw new Error(`Failed to run query: ${response.statusText}`);
460-
}
461-
462-
return await response.json();
463-
}
464-
465377
/**
466378
* Update the current team/project settings
467379
*/

apps/twig/src/renderer/components/MainLayout.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ import { KeyboardShortcutsSheet } from "@components/KeyboardShortcutsSheet";
44
import { StatusBar } from "@components/StatusBar";
55
import { UpdatePrompt } from "@components/UpdatePrompt";
66
import { AutonomyOnboarding } from "@features/autonomy/components/AutonomyOnboarding";
7-
import { AutonomyTasksView } from "@features/autonomy/components/AutonomyTasksView";
87
import { CommandMenu } from "@features/command/components/CommandMenu";
98
import { RightSidebar, RightSidebarContent } from "@features/right-sidebar";
109
import { FolderSettingsView } from "@features/settings/components/FolderSettingsView";
1110
import { SettingsView } from "@features/settings/components/SettingsView";
12-
import { ReportPreviewView } from "@features/report-preview/components/ReportPreviewView";
1311
import { MainSidebar } from "@features/sidebar/components/MainSidebar";
1412
import { TaskDetail } from "@features/task-detail/components/TaskDetail";
1513
import { TaskInput } from "@features/task-detail/components/TaskInput";
@@ -61,16 +59,10 @@ export function MainLayout() {
6159
<TaskDetail key={view.data.id} task={view.data} />
6260
)}
6361

64-
{view.type === "report-preview" && view.report && (
65-
<ReportPreviewView report={view.report} />
66-
)}
67-
6862
{view.type === "settings" && <SettingsView />}
6963

7064
{view.type === "folder-settings" && <FolderSettingsView />}
7165

72-
{view.type === "autonomy-tasks" && <AutonomyTasksView />}
73-
7466
{view.type === "autonomy-onboarding" && <AutonomyOnboarding />}
7567
</Box>
7668

apps/twig/src/renderer/features/autonomy/components/AutonomyTasksView.tsx

Lines changed: 0 additions & 163 deletions
This file was deleted.

apps/twig/src/renderer/features/autonomy/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export { AutonomyOnboarding } from "./components/AutonomyOnboarding";
2-
export { AutonomyTasksView } from "./components/AutonomyTasksView";
32
export { useAutonomyFeatureFlag } from "./hooks/useAutonomyFeatureFlag";
43
export {
54
getAutonomyEnabled,

0 commit comments

Comments
 (0)