diff --git a/apps/web/app/(dashboard)/issues/[id]/page.test.tsx b/apps/web/app/(dashboard)/issues/[id]/page.test.tsx index 340e377a..e2c13db9 100644 --- a/apps/web/app/(dashboard)/issues/[id]/page.test.tsx +++ b/apps/web/app/(dashboard)/issues/[id]/page.test.tsx @@ -74,6 +74,11 @@ const mockIssue: Issue = { assignee_id: "user-1", creator_type: "member", creator_id: "user-1", + parent_issue_id: null, + acceptance_criteria: [], + context_refs: [], + repository: null, + position: 0, due_date: "2026-06-01T00:00:00Z", created_at: "2026-01-15T00:00:00Z", updated_at: "2026-01-20T00:00:00Z", diff --git a/apps/web/app/(dashboard)/issues/page.test.tsx b/apps/web/app/(dashboard)/issues/page.test.tsx index b2a454d2..b9ca6aeb 100644 --- a/apps/web/app/(dashboard)/issues/page.test.tsx +++ b/apps/web/app/(dashboard)/issues/page.test.tsx @@ -62,8 +62,17 @@ vi.mock("../../../lib/api", () => ({ }, })); +const issueDefaults = { + parent_issue_id: null, + acceptance_criteria: [], + context_refs: [], + repository: null, + position: 0, +}; + const mockIssues: Issue[] = [ { + ...issueDefaults, id: "issue-1", workspace_id: "ws-1", title: "Implement auth", @@ -79,6 +88,7 @@ const mockIssues: Issue[] = [ updated_at: "2026-01-01T00:00:00Z", }, { + ...issueDefaults, id: "issue-2", workspace_id: "ws-1", title: "Design landing page", @@ -94,6 +104,7 @@ const mockIssues: Issue[] = [ updated_at: "2026-01-01T00:00:00Z", }, { + ...issueDefaults, id: "issue-3", workspace_id: "ws-1", title: "Write tests", @@ -210,6 +221,7 @@ describe("IssuesPage", () => { } as ListIssuesResponse); const newIssue: Issue = { + ...issueDefaults, id: "issue-new", workspace_id: "ws-1", title: "New test issue", diff --git a/apps/web/app/(dashboard)/knowledge-base/page.tsx b/apps/web/app/(dashboard)/knowledge-base/page.tsx index e02b2ea7..97e6fe8e 100644 --- a/apps/web/app/(dashboard)/knowledge-base/page.tsx +++ b/apps/web/app/(dashboard)/knowledge-base/page.tsx @@ -31,15 +31,15 @@ function renderMarkdown(text: string): React.ReactNode[] { let i = 0; while (i < lines.length) { - const line = lines[i]; + const line = lines[i]!; // Code block if (line.startsWith("```")) { const lang = line.slice(3).trim(); const codeLines: string[] = []; i++; - while (i < lines.length && !lines[i].startsWith("```")) { - codeLines.push(lines[i]); + while (i < lines.length && !lines[i]!.startsWith("```")) { + codeLines.push(lines[i]!); i++; } i++; // skip closing ``` @@ -57,8 +57,8 @@ function renderMarkdown(text: string): React.ReactNode[] { // Table (simplified: detect | pipes) if (line.includes("|") && line.trim().startsWith("|")) { const tableRows: string[] = []; - while (i < lines.length && lines[i].includes("|") && lines[i].trim().startsWith("|")) { - tableRows.push(lines[i]); + while (i < lines.length && lines[i]!.includes("|") && lines[i]!.trim().startsWith("|")) { + tableRows.push(lines[i]!); i++; } // Filter out separator rows (|---|---|) @@ -66,7 +66,7 @@ function renderMarkdown(text: string): React.ReactNode[] { if (dataRows.length > 0) { const parseRow = (row: string) => row.split("|").filter((c) => c.trim() !== "").map((c) => c.trim()); - const header = parseRow(dataRows[0]); + const header = parseRow(dataRows[0]!); const body = dataRows.slice(1).map(parseRow); elements.push(