Skip to content
Merged
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
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "vite build",
"lint": "oxlint",
"test:legacy": "node --test \"src/tests/*.test.mjs\"",
"test": "vitest run",
"test": "vitest run && npm run test:legacy",
"test:e2e": "playwright test",
"test:all": "npm run lint --if-present && npm run build && npm test && npm run test:e2e",
"preview": "vite preview",
Expand All @@ -30,7 +30,6 @@
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.4",
"@vitejs/plugin-react": "^6.1.0",
"axe-core": "^4.14.0",
"husky": "^9.1.7",
"jsdom": "^31.0.0",
"oxlint": "^1.79.0",
Expand Down
2 changes: 0 additions & 2 deletions src/components/AiTutorModal.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/BackupRestore.jsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/BadgeIcon.jsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/BadgeToast.jsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/BadgesPanel.jsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/CalendarPanel.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/CourseImportModal.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/CourseSelector.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/DeleteConfirmModal.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { formatClock } from '../utils/time';
import CourseSelector from './CourseSelector';
import CourseSelector from '../features/course/views/CourseSelector.jsx';
import './Header.css';

export default function Header({
Expand Down
2 changes: 0 additions & 2 deletions src/components/LectureRow.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/MemoryManagement.jsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/MotivationPopup.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/PerSectionProgress.jsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/PracticeDayModal.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/SectionCard.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/SettingsPanel.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/StatsBar.jsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/TodayPlanCard.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/Toolbar.jsx

This file was deleted.

1 change: 0 additions & 1 deletion src/features/ai-tutor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export {
preparePlatformUrl,
calculateUrlLength,
buildTopicWiseRoadmap,
buildFocusedRoadmap,
} from './models/promptBuilder.js';
export { copyToClipboard } from './models/clipboard.js';
export {
Expand Down
5 changes: 0 additions & 5 deletions src/features/ai-tutor/models/promptBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ export function buildTopicWiseRoadmap(course, selectedLectures = [], selectedSec
return lines.join('\n');
}

/**
* Backward compatibility alias for buildTopicWiseRoadmap.
*/
export const buildFocusedRoadmap = buildTopicWiseRoadmap;

/**
* Builds the complete prompt for ChatGPT, Claude, and other LLMs.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/features/settings/views/SettingsPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Drawer from '../../../components/Drawer.jsx';
import MemoryManagement from './MemoryManagement.jsx';
import BackupRestore from './BackupRestore.jsx';
import DeleteConfirmModal from './DeleteConfirmModal.jsx';
import CourseSelector from '../../../components/CourseSelector.jsx';
import CourseSelector from '../../course/views/CourseSelector.jsx';
import { getStoredApiKey, setStoredApiKey, verifyOpenAiApiKey } from '../../motivation/models/apiKeyModel.js';
import { formatDuration } from '../../../utils/time.js';
import { TARGET_PRESETS, PER_SECTION_OPTIONS } from '../models/settingsModel.js';
Expand Down
16 changes: 8 additions & 8 deletions src/tests/courseStore.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ const {
} = await import('../data/courseStore.js');

const { getActiveSectionId, getActiveSectionIds } = await import('../utils/activeSection.js');
const { getAggregatedHistory } = await import('../utils/activityHistory.js');
const { buildWeeksForYear, intensity } = await import('../utils/calendarGrid.js');
const { DEFAULT_MOTIVATION_MESSAGES, pickDefaultMotivation } = await import('../utils/motivation.js');
const { verifyOpenAiApiKey } = await import('../utils/apiKey.js');
const { getAggregatedHistory } = await import('../features/streak/models/activityHistoryModel.js');
const { buildWeeksForYear, intensity } = await import('../features/streak/models/calendarGridModel.js');
const { DEFAULT_MOTIVATION_MESSAGES, pickDefaultMotivation } = await import('../features/motivation/models/motivationModel.js');
const { verifyOpenAiApiKey } = await import('../features/motivation/models/apiKeyModel.js');

const {
COMPLETION_STATUS,
Expand Down Expand Up @@ -726,7 +726,7 @@ describe('Course Flow & State Management Integration Tests', () => {
status: 200,
json: async () => ({ data: [{ id: 'gpt-4o' }, { id: 'gpt-4o-mini' }] }),
});
const okRes = await verifyOpenAiApiKey('mock-valid-openai-key');
const okRes = await verifyOpenAiApiKey('sk-mock-valid-key');
assert.equal(okRes.ok, true);
assert.equal(okRes.status, 200);
assert.ok(okRes.message.includes('verified and working'));
Expand All @@ -737,7 +737,7 @@ describe('Course Flow & State Management Integration Tests', () => {
status: 401,
json: async () => ({ error: { message: 'Incorrect API key provided' } }),
});
const unauthRes = await verifyOpenAiApiKey('mock-revoked-openai-key');
const unauthRes = await verifyOpenAiApiKey('sk-mock-revoked-key');
assert.equal(unauthRes.ok, false);
assert.equal(unauthRes.status, 401);
assert.ok(unauthRes.error.includes('invalid, expired, or was revoked'));
Expand All @@ -747,7 +747,7 @@ describe('Course Flow & State Management Integration Tests', () => {
status: 429,
json: async () => ({ error: { message: 'Rate limit or quota exceeded' } }),
});
const quotaRes = await verifyOpenAiApiKey('mock-overquota-openai-key');
const quotaRes = await verifyOpenAiApiKey('sk-mock-overquota-key');
assert.ok(quotaRes.error.includes('Quota exceeded'));
} finally {
globalThis.fetch = originalFetch;
Expand Down Expand Up @@ -790,7 +790,7 @@ describe('Course Flow & State Management Integration Tests', () => {
});

it('24. Course completion and streak milestone badges calculate, unlock, and isolate per course', async () => {
const { getBadgesStatus, getBadgeRank, COURSE_COMPLETION_BADGES, STREAK_BADGES, ALL_BADGES } = await import('../utils/badges.js');
const { getBadgesStatus, getBadgeRank, COURSE_COMPLETION_BADGES, STREAK_BADGES, ALL_BADGES } = await import('../features/badges/models/badgeModel.js');

// 1. Verify badge counts and threshold specifications
assert.equal(ALL_BADGES.length, 12, 'Must have exactly 12 total milestone badges');
Expand Down
39 changes: 0 additions & 39 deletions src/tests/mocks/localStorage.mock.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/utils/activityHistory.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/utils/apiKey.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/utils/badges.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/utils/calendarGrid.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/utils/motivation.js

This file was deleted.

Loading