fix: resolve more PR review comments for GitLab feature parity

- Fix path alias in investigation-store.test.ts to use @shared/types
- Fix deleteReview to check result.data?.deleted before clearing review state

Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
Claude
2026-03-13 22:28:53 +02:00
committed by StillKnotKnown
co-authored by Claude Opus 4.6
parent 0d727a3b91
commit f64d5decd1
2 changed files with 7 additions and 3 deletions
@@ -310,11 +310,15 @@ export function useGitLabMRs(projectId?: string, options: UseGitLabMRsOptions =
try {
const result = await window.electronAPI.deleteGitLabMRReview(projectId, mrIid, noteId);
if (result.success) {
if (result.success && result.data?.deleted) {
// Clear review from store
useMRReviewStore.getState().clearMRReview(projectId, mrIid);
return true;
}
return result.success;
if (!result.success) {
setError(result.error || 'Failed to delete review');
}
return false;
} catch (err) {
setError(err instanceof Error ? err.message : 'Failed to delete review');
return false;
@@ -3,7 +3,7 @@
*/
import { describe, it, expect, beforeEach } from 'vitest';
import { useInvestigationStore } from '../investigation-store';
import type { GitLabInvestigationStatus, GitLabInvestigationResult } from '../../../../shared/types';
import type { GitLabInvestigationStatus, GitLabInvestigationResult } from '@shared/types';
describe('investigation-store', () => {
beforeEach(() => {