feat: enforce task title length limit (#2134)

This commit is contained in:
Carlos Florêncio
2026-08-01 19:42:23 +01:00
committed by GitHub
parent a1135aa8cf
commit 1d70a0df6d
56 changed files with 1050 additions and 57 deletions
@@ -8,6 +8,7 @@ import { useAppStore } from "@/components/state-provider";
import { createTaskPR, linkTaskIssue } from "@/lib/api/domains/github-api";
import type { Repository, Task, TaskRepository, Workflow, WorkflowStep } from "@/lib/types/http";
import type { GitHubPR, GitHubIssue } from "@/lib/types/github";
import { truncateRemoteTaskTitle } from "@/lib/task-title";
export type TaskPreset = {
id: string;
@@ -127,7 +128,7 @@ function extractPayload(payload: LaunchPayload) {
function buildDialogState(payload: LaunchPayload, repositories: Repository[]): DialogState {
const data = extractPayload(payload);
const description = payload.preset.prompt({ url: data.url, title: data.title });
const title = `${payload.preset.label}: ${data.title}`;
const title = truncateRemoteTaskTitle(`${payload.preset.label}: ${data.title}`);
// For a PR launch we want the dialog to display and check out the PR's head
// branch — matching the GitHub-URL-paste flow, where the branch selector
// auto-resolves to the PR head. Same branch for both: the chip shows it and