From d028932dc85955b913d61da6fbf93036d6b7405e Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 28 Dec 2025 22:48:32 +0100 Subject: [PATCH] chore: remove debug logs from issue validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove console.log and logger.debug calls that were added during development. Keep essential logger.info and logger.error calls. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../routes/github/routes/validate-issue.ts | 24 ++----------------- .../components/issue-detail-panel.tsx | 10 +------- .../hooks/use-issue-validation.ts | 14 ----------- 3 files changed, 3 insertions(+), 45 deletions(-) diff --git a/apps/server/src/routes/github/routes/validate-issue.ts b/apps/server/src/routes/github/routes/validate-issue.ts index 8d51c4b1..99673593 100644 --- a/apps/server/src/routes/github/routes/validate-issue.ts +++ b/apps/server/src/routes/github/routes/validate-issue.ts @@ -91,19 +91,6 @@ async function runValidation( try { // Build the prompt (include comments and linked PRs if provided) - logger.info( - `Building validation prompt for issue #${issueNumber}` + - (comments?.length ? ` with ${comments.length} comments` : ' without comments') + - (linkedPRs?.length ? ` and ${linkedPRs.length} linked PRs` : '') - ); - if (comments?.length) { - logger.debug(`Comments included: ${comments.map((c) => c.author).join(', ')}`); - } - if (linkedPRs?.length) { - logger.debug( - `Linked PRs: ${linkedPRs.map((pr) => `#${pr.number} (${pr.state})`).join(', ')}` - ); - } const prompt = buildValidationPrompt( issueNumber, issueTitle, @@ -136,16 +123,12 @@ async function runValidation( // Execute the query const stream = query({ prompt, options }); let validationResult: IssueValidationResult | null = null; - let responseText = ''; for await (const msg of stream) { - // Collect assistant text for debugging and emit progress + // Emit progress events for assistant text if (msg.type === 'assistant' && msg.message?.content) { for (const block of msg.message.content) { if (block.type === 'text') { - responseText += block.text; - - // Emit progress event const progressEvent: IssueValidationEvent = { type: 'issue_validation_progress', issueNumber, @@ -162,7 +145,6 @@ async function runValidation( const resultMsg = msg as { structured_output?: IssueValidationResult }; if (resultMsg.structured_output) { validationResult = resultMsg.structured_output; - logger.debug('Received structured output:', validationResult); } } @@ -182,7 +164,6 @@ async function runValidation( // Require structured output if (!validationResult) { logger.error('No structured output received from Claude SDK'); - logger.debug('Raw response text:', responseText); throw new Error('Validation failed: no structured output received'); } @@ -331,9 +312,8 @@ export function createValidateIssueHandler( validationComments, validationLinkedPRs ) - .catch((error) => { + .catch(() => { // Error is already handled inside runValidation (event emitted) - logger.debug('Validation error caught in background handler:', error); }) .finally(() => { clearValidationStatus(projectPath, issueNumber); diff --git a/apps/ui/src/components/views/github-issues-view/components/issue-detail-panel.tsx b/apps/ui/src/components/views/github-issues-view/components/issue-detail-panel.tsx index 758cdcb1..e2d7e8b4 100644 --- a/apps/ui/src/components/views/github-issues-view/components/issue-detail-panel.tsx +++ b/apps/ui/src/components/views/github-issues-view/components/issue-detail-panel.tsx @@ -54,7 +54,7 @@ export function IssueDetailPanel({ // Helper to get validation options with comments and linked PRs const getValidationOptions = (forceRevalidate = false) => { - const options = { + return { forceRevalidate, comments: includeCommentsInAnalysis && comments.length > 0 ? comments : undefined, linkedPRs: issue.linkedPRs?.map((pr) => ({ @@ -63,14 +63,6 @@ export function IssueDetailPanel({ state: pr.state, })), }; - console.log('[IssueDetailPanel] getValidationOptions:', { - includeCommentsInAnalysis, - commentsCount: comments.length, - linkedPRsCount: issue.linkedPRs?.length ?? 0, - willIncludeComments: !!options.comments, - willIncludeLinkedPRs: !!options.linkedPRs, - }); - return options; }; return ( diff --git a/apps/ui/src/components/views/github-issues-view/hooks/use-issue-validation.ts b/apps/ui/src/components/views/github-issues-view/hooks/use-issue-validation.ts index 198beef9..78a7eea4 100644 --- a/apps/ui/src/components/views/github-issues-view/hooks/use-issue-validation.ts +++ b/apps/ui/src/components/views/github-issues-view/hooks/use-issue-validation.ts @@ -216,14 +216,6 @@ export function useIssueValidation({ } = {} ) => { const { forceRevalidate = false, comments, linkedPRs } = options; - console.log('[useIssueValidation] handleValidateIssue called with:', { - issueNumber: issue.number, - forceRevalidate, - commentsProvided: !!comments, - commentsCount: comments?.length ?? 0, - linkedPRsProvided: !!linkedPRs, - linkedPRsCount: linkedPRs?.length ?? 0, - }); if (!currentProject?.path) { toast.error('No project selected'); @@ -261,12 +253,6 @@ export function useIssueValidation({ comments, // Include comments if provided linkedPRs, // Include linked PRs if provided }; - console.log('[useIssueValidation] Sending validation request:', { - hasComments: !!validationInput.comments, - commentsCount: validationInput.comments?.length ?? 0, - hasLinkedPRs: !!validationInput.linkedPRs, - linkedPRsCount: validationInput.linkedPRs?.length ?? 0, - }); const result = await api.github.validateIssue( currentProject.path, validationInput,