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:
committed by
StillKnotKnown
co-authored by
Claude Opus 4.6
parent
0d727a3b91
commit
f64d5decd1
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user