Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/components/SettingsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import {
import { useLocalStorage } from '../hooks/useLocalStorage';
import { useFormContext } from '../App';
import { SettingsDialogProps } from '../types';
import { clearAllGitHubData } from '../utils/storageUtils';
import { eventsStorage } from '../utils/indexedDB';
import { clearAllGitHubData, eventsStorage } from '../utils/storage';

const SettingsDialog = memo(function SettingsDialog({
isOpen,
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useGitHubDataFetching.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback, useState } from 'react';
import { GitHubEvent, GitHubItem } from '../types';
import { EventsData } from '../utils/indexedDB';
import { EventsData } from '../utils/storage';
import { validateUsernameList, isValidDateString } from '../utils';
import { MAX_USERNAMES_PER_REQUEST, GITHUB_API_PER_PAGE, GITHUB_API_DELAY_MS } from '../utils/settings';

Expand Down
5 changes: 2 additions & 3 deletions src/hooks/useGitHubDataProcessing.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { useMemo, useState, useEffect } from 'react';
import { GitHubEvent, GitHubItem } from '../types';
import { processRawEvents, categorizeRawSearchItems } from '../utils/rawDataUtils';
import { filterItemsByAdvancedSearch } from '../utils/viewFiltering';
import { enrichItemsWithPRDetails } from '../utils/prEnrichment';
import { processRawEvents, categorizeRawSearchItems, enrichItemsWithPRDetails } from '../utils/githubData';
import { filterItemsByAdvancedSearch } from '../utils/filtering';

interface UseGitHubDataProcessingProps {
indexedDBEvents: GitHubEvent[];
Expand Down
8 changes: 4 additions & 4 deletions src/hooks/useGitHubFormState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { useCallback, useState, useEffect, useRef, useMemo } from 'react';
import { validateUsernameList } from '../utils';
import { useFormSettings } from './useLocalStorage';
import { FormSettings } from '../types';
import {
import {
validateGitHubUsernames,
type BatchValidationResult
type BatchValidationResult
} from '../utils';
import {
import {
getCachedAvatarUrls,
createAddAvatarsToCache
} from '../utils/usernameCache';
} from '../utils/storage';
import { useLocalStorage } from './useLocalStorage';

interface UseGitHubFormStateReturn {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useIndexedDBStorage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useEffect, useCallback } from 'react';
import { eventsStorage, type EventsData } from '../utils/indexedDB';
import { eventsStorage, type EventsData } from '../utils/storage';
import { GitHubEvent } from '../types';

interface UseIndexedDBStorageReturn {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useLocalStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export function useFormSettings(key: string, initialValue: FormSettings, onUrlPa
// Run cache cleanup in background (don't await to avoid blocking the URL processing)
(async () => {
try {
const { clearCachesKeepToken } = await import('../utils/storageUtils');
const { clearCachesKeepToken } = await import('../utils/storage');
const preservedToken = await clearCachesKeepToken();

// Update the form settings to preserve the token if we have one
Expand Down
2 changes: 1 addition & 1 deletion src/test/IndexedDBStorage.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import { renderHook, act } from '@testing-library/react';
import { useIndexedDBStorage } from '../hooks/useIndexedDBStorage';
import { eventsStorage } from '../utils/indexedDB';
import { eventsStorage } from '../utils/storage';
import { GitHubEvent } from '../types';

// Mock IndexedDB
Expand Down
10 changes: 10 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ export interface GitHubEvent {
avatar_url: string;
html_url: string;
};
assignee?: {
login: string;
avatar_url: string;
html_url: string;
};
assignees?: Array<{
login: string;
avatar_url: string;
html_url: string;
}>;
};
pull_request?: {
id: number;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/__tests__/prEnrichment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
enrichItemsWithPRDetails,
clearPRCache,
getPRCacheSize,
} from '../prEnrichment';
} from '../githubData';
import { GitHubItem } from '../../types';

// Mock fetch globally
Expand Down
2 changes: 1 addition & 1 deletion src/utils/__tests__/rawDataUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
import { transformEventToItem, processRawEvents, categorizeRawSearchItems } from '../rawDataUtils';
import { transformEventToItem, processRawEvents, categorizeRawSearchItems } from '../githubData';
import { GitHubEvent, GitHubItem } from '../../types';

describe('rawDataUtils', () => {
Expand Down
8 changes: 4 additions & 4 deletions src/utils/__tests__/summaryConstants.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
SUMMARY_GROUP_NAMES,
getAllGroupNames,
import {
SUMMARY_GROUP_NAMES,
getAllGroupNames,
createEmptyGroups
} from '../summaryConstants';
} from '../summary';

describe('summaryConstants', () => {
describe('SUMMARY_GROUP_NAMES', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/__tests__/summaryGrouping.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
categorizeItemWithoutDateFiltering,
groupSummaryData,
isDateInRange,
} from '../summaryGrouping';
import { SUMMARY_GROUP_NAMES } from '../summaryConstants';
SUMMARY_GROUP_NAMES,
} from '../summary';
import { GitHubItem } from '../../types';

describe('categorizeItem - PRs Updated', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/__tests__/summaryHelpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getTotalItemCount,
isSectionCollapsed,
getGroupSelectState
} from '../summaryHelpers';
} from '../summary';
import { GitHubItem } from '../../types';

// Mock data helper
Expand Down
2 changes: 1 addition & 1 deletion src/utils/__tests__/viewFiltering.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
sortItemsByUpdatedDate,
parseCommaSeparatedUsernames,
isItemAuthoredBySearchedUsers
} from '../viewFiltering';
} from '../filtering';
import { GitHubItem } from '../../types';

// Mock data helper
Expand Down
2 changes: 1 addition & 1 deletion src/utils/filterUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
import { countItemsMatchingFilter, FilterType } from './filterUtils';
import { countItemsMatchingFilter, FilterType } from './filtering';
import { GitHubItem } from '../types';

/* eslint-disable @typescript-eslint/no-explicit-any */
Expand Down
130 changes: 0 additions & 130 deletions src/utils/filterUtils.ts

This file was deleted.

Loading
Loading