From 4d10d7500343b3eaabecd4b4e2c16790dcbf8de8 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 21 May 2026 06:35:09 +0000 Subject: [PATCH] fix(cis): fix JSX syntax errors and import paths for Phase 3 build - Fix broken template literal in transcriptionStore.ts export function - Fix broken regex in Content-Disposition parser - Fix broken character class in filename sanitization - Fix LLMConfigModal import path (5 levels up, not 6) - Export button JSX properly nested in CCTranscriptionPanel - Build now passes cleanly --- src/stores/transcriptionStore.ts | 6 +++--- .../ui-overrides/components/shared/CCTranscriptionPanel.tsx | 4 ++-- .../ui-overrides/components/shared/LLMConfigModal.tsx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/stores/transcriptionStore.ts b/src/stores/transcriptionStore.ts index 7b608a3..74368d7 100644 --- a/src/stores/transcriptionStore.ts +++ b/src/stores/transcriptionStore.ts @@ -361,7 +361,7 @@ export const useTranscriptionStore = create((set, get) => ({ try { const apiBaseUrl = import.meta.env.VITE_API_BASE || 'https://api.classroomcopilot.ai'; - const response = await fetch(`${apiBaseUrl}/transcribe/sessions/${sessionId}/export, { + const response = await fetch(`${apiBaseUrl}/transcribe/sessions/${sessionId}/export`, { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -378,9 +378,9 @@ export const useTranscriptionStore = create((set, get) => ({ const disposition = response.headers.get('Content-Disposition'); let filename = `transcription-export.${format}`; if (disposition) { - const match = disposition.match(/filename[^;=\n]*=([(["]).*?(\2)|[^;\n]*)/); + const match = disposition.match(/filename[*]?=['"\s]*([^;\s]*)/); if (match && match[1]) { - filename = match[1].replace(/["\'\']/g, ''); + filename = match[1].replace(/["'\\]/g, ''); } } diff --git a/src/utils/tldraw/ui-overrides/components/shared/CCTranscriptionPanel.tsx b/src/utils/tldraw/ui-overrides/components/shared/CCTranscriptionPanel.tsx index 5b664f1..a96cbf2 100644 --- a/src/utils/tldraw/ui-overrides/components/shared/CCTranscriptionPanel.tsx +++ b/src/utils/tldraw/ui-overrides/components/shared/CCTranscriptionPanel.tsx @@ -362,6 +362,8 @@ export const CCTranscriptionPanel: React.FC = () => { + )} + {/* Export button */} {activeSession && ( <> @@ -416,8 +418,6 @@ export const CCTranscriptionPanel: React.FC = () => { )} - )} - {/* Summary result display */} {summaryText && ( <> diff --git a/src/utils/tldraw/ui-overrides/components/shared/LLMConfigModal.tsx b/src/utils/tldraw/ui-overrides/components/shared/LLMConfigModal.tsx index 23f0afc..623d452 100644 --- a/src/utils/tldraw/ui-overrides/components/shared/LLMConfigModal.tsx +++ b/src/utils/tldraw/ui-overrides/components/shared/LLMConfigModal.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import Close from '@mui/icons-material/Close'; -import { useTranscriptionStore, LLMConfig } from '../../stores/transcriptionStore'; +import { useTranscriptionStore, LLMConfig } from '../../../../../stores/transcriptionStore'; const PROVIDERS = [ { value: 'openai', label: 'OpenAI' },