29 files changed,
+72,
-55
1@@ -1,6 +1,6 @@
2 <script lang="ts">
3- import { changes, mainChange, currentChange, selectChange } from '$lib/stores/changes.ts';
4- import { vcs } from '$lib/stores/files.ts';
5+ import { changes, mainChange, currentChange, selectChange } from '$lib/stores/changes';
6+ import { vcs } from '$lib/stores/files';
7
8 let busy = $state<string | null>(null);
9
1@@ -1,6 +1,6 @@
2 <script lang="ts">
3- import { commentingLine } from '$lib/stores/ui.ts';
4- import { addComment } from '$lib/stores/review.ts';
5+ import { commentingLine } from '$lib/stores/ui';
6+ import { addComment } from '$lib/stores/review';
7
8 interface Props {
9 filePath: string;
1@@ -1,6 +1,6 @@
2 <script lang="ts">
3- import type { ReviewThread } from '$lib/types/index.ts';
4- import { resolveThread, deleteThread } from '$lib/stores/review.ts';
5+ import type { ReviewThread } from '$lib/types/index';
6+ import { resolveThread, deleteThread } from '$lib/stores/review';
7 import CommentEditor from './CommentEditor.svelte';
8
9 interface Props {
1@@ -1,6 +1,6 @@
2 <script lang="ts">
3- import { showCommitDialog } from '$lib/stores/ui.ts';
4- import { uncommittedCount, loadUncommittedFiles, vcs } from '$lib/stores/files.ts';
5+ import { showCommitDialog } from '$lib/stores/ui';
6+ import { uncommittedCount, loadUncommittedFiles, vcs } from '$lib/stores/files';
7
8 let message = $state('');
9 let commitMode = $state<'approved' | 'all'>('approved');
10@@ -79,7 +79,7 @@
11 <div class="p-5 space-y-4">
12 <!-- Commit scope -->
13 <div>
14- <label class="block text-sm text-tertiary mb-2">What to commit</label>
15+ <div class="block text-sm text-tertiary mb-2">What to commit</div>
16 <div class="flex gap-2">
17 <button
18 class="flex-1 text-left px-3 py-2 rounded-lg border text-sm transition-colors {commitMode === 'approved' ? 'border-green-600 bg-accent-green/10 text-accent-green' : 'border-border-strong text-tertiary hover:border-border-strong'}"
+6,
-6
1@@ -1,9 +1,9 @@
2 <script lang="ts">
3- import type { DiffFile, DiffLine, DiffHunk } from '$lib/types/index.ts';
4- import type { ReviewThread } from '$lib/types/index.ts';
5- import { viewMode, commentingLine } from '$lib/stores/ui.ts';
6- import { threadsByFile } from '$lib/stores/review.ts';
7- import { resetHunk, diffFiles, vcs } from '$lib/stores/files.ts';
8+ import type { DiffFile, DiffLine, DiffHunk } from '$lib/types/index';
9+ import type { ReviewThread } from '$lib/types/index';
10+ import { viewMode, commentingLine } from '$lib/stores/ui';
11+ import { threadsByFile } from '$lib/stores/review';
12+ import { resetHunk, diffFiles, vcs } from '$lib/stores/files';
13 import CommentEditor from './CommentEditor.svelte';
14 import CommentThread from './CommentThread.svelte';
15
16@@ -372,7 +372,7 @@
17 </div>
18
19 <script lang="ts" module>
20- import type { DiffLine as DL } from '$lib/types/index.ts';
21+ import type { DiffLine as DL } from '$lib/types/index';
22
23 interface SplitPair {
24 old: DL | null;
1@@ -1,6 +1,6 @@
2 <script lang="ts">
3- import { showExportDialog } from '$lib/stores/ui.ts';
4- import { sendReviewToClaude } from '$lib/stores/terminal.ts';
5+ import { showExportDialog } from '$lib/stores/ui';
6+ import { sendReviewToClaude } from '$lib/stores/terminal';
7
8 let exporting = $state(false);
9 let result = $state<{ success: boolean; path?: string; message?: string; text?: string } | null>(null);
+1,
-1
1@@ -1,5 +1,5 @@
2 <script lang="ts">
3- import { files, selectedFile, fileCommentCounts, toggleApproval, resetFile, contextFiles, toggleContextFile } from '$lib/stores/files.ts';
4+ import { files, selectedFile, fileCommentCounts, toggleApproval, resetFile, contextFiles, toggleContextFile } from '$lib/stores/files';
5
6 const statusColors: Record<string, string> = {
7 added: 'text-accent-green',
+19,
-2
1@@ -6,8 +6,8 @@
2 stopClaudeSession,
3 restartSession,
4 hasPendingReview
5- } from '$lib/stores/terminal.ts';
6- import { theme } from '$lib/stores/ui.ts';
7+ } from '$lib/stores/terminal';
8+ import { theme } from '$lib/stores/ui';
9 import { onDestroy } from 'svelte';
10
11 let isResizing = $state(false);
12@@ -200,6 +200,18 @@
13 (globalThis as any).__lcr_ws = ws;
14 }
15
16+ function handleResizeKey(e: KeyboardEvent) {
17+ if (e.key === 'ArrowUp') {
18+ e.preventDefault();
19+ $terminalHeight = Math.min(window.innerHeight * 0.8, $terminalHeight + 16);
20+ requestAnimationFrame(() => fitAddon?.fit());
21+ } else if (e.key === 'ArrowDown') {
22+ e.preventDefault();
23+ $terminalHeight = Math.max(100, $terminalHeight - 16);
24+ requestAnimationFrame(() => fitAddon?.fit());
25+ }
26+ }
27+
28 function startResize(e: MouseEvent) {
29 e.preventDefault();
30 isResizing = true;
31@@ -230,10 +242,15 @@
32 style="height: {minimized ? 'auto' : `${$terminalHeight}px`}"
33 >
34 {#if !minimized}
35+ <!-- svelte-ignore a11y_no_noninteractive_element_interactions, a11y_no_noninteractive_tabindex (focusable resize separator) -->
36 <div
37 class="h-1 cursor-row-resize hover:bg-blue-500/50 transition-colors {isResizing ? 'bg-blue-500/50' : ''}"
38 onmousedown={startResize}
39+ onkeydown={handleResizeKey}
40 role="separator"
41+ aria-orientation="horizontal"
42+ aria-label="Resize terminal panel"
43+ tabindex="0"
44 ></div>
45 {/if}
46
+4,
-4
1@@ -1,8 +1,8 @@
2 <script lang="ts">
3- import { viewMode, showCommitDialog, showExportDialog, theme } from '$lib/stores/ui.ts';
4- import { stats, reviewStatus, submitReview } from '$lib/stores/review.ts';
5- import { diffMode, diffScope, baseBranch, approvedCount, uncommittedCount, diffStats, vcs, loadAllDiffs, setDiffScope, loadUncommittedFiles } from '$lib/stores/files.ts';
6- import { changes, currentChange, approveChange } from '$lib/stores/changes.ts';
7+ import { viewMode, showCommitDialog, showExportDialog, theme } from '$lib/stores/ui';
8+ import { stats, reviewStatus, submitReview } from '$lib/stores/review';
9+ import { diffMode, diffScope, baseBranch, approvedCount, uncommittedCount, diffStats, vcs, loadAllDiffs, setDiffScope, loadUncommittedFiles } from '$lib/stores/files';
10+ import { changes, currentChange, approveChange } from '$lib/stores/changes';
11
12 let showReviewMenu = $state(false);
13 let toast = $state<string | null>(null);
+1,
-1
1@@ -1,4 +1,4 @@
2-import type { DiffFile, DiffHunk } from '$lib/types/index.ts';
3+import type { DiffFile, DiffHunk } from '$lib/types/index';
4
5 export function parseDiff(raw: string): DiffFile[] {
6 if (!raw.trim()) return [];
+1,
-1
1@@ -1,7 +1,7 @@
2 import { writeFile } from 'fs/promises';
3 import { join } from 'path';
4 import { spawn } from 'child_process';
5-import type { ReviewExport, ReviewExportFile, ReviewExportThread } from '$lib/types/index.ts';
6+import type { ReviewExport, ReviewExportFile, ReviewExportThread } from '$lib/types/index';
7 import { readFile } from 'fs/promises';
8 import { getRepoDir, getRepoInfo, getStatus, getFileContent } from './vcs.ts';
9 import { getReview, getThreads, getContextFiles } from './review-store.ts';
+1,
-1
1@@ -1,5 +1,5 @@
2 import simpleGit, { type SimpleGit } from 'simple-git';
3-import type { ChangeStack, FileChange, DiffMode, DiffScope } from '$lib/types/index.ts';
4+import type { ChangeStack, FileChange, DiffMode, DiffScope } from '$lib/types/index';
5 import { getWorktreeApprovals, approveWorktreeFile, unapproveWorktreeFile } from './review-store.ts';
6 import { getRepoDir } from './repo.ts';
7
+1,
-1
1@@ -6,7 +6,7 @@ import type {
2 FileChange,
3 DiffMode,
4 DiffScope
5-} from '$lib/types/index.ts';
6+} from '$lib/types/index';
7 import { parseDiff } from './diff-parser.ts';
8 import { getRepoDir } from './repo.ts';
9 import {
+1,
-1
1@@ -1,4 +1,4 @@
2-import type { ReviewThread, ReviewComment, Review } from '$lib/types/index.ts';
3+import type { ReviewThread, ReviewComment, Review } from '$lib/types/index';
4 import { randomUUID } from 'crypto';
5
6 const threads = new Map<string, ReviewThread>();
+1,
-1
1@@ -1,6 +1,6 @@
2 import { existsSync } from 'fs';
3 import { join } from 'path';
4-import type { ChangeStack, FileChange, DiffMode, DiffScope } from '$lib/types/index.ts';
5+import type { ChangeStack, FileChange, DiffMode, DiffScope } from '$lib/types/index';
6 import { getRepoDir } from './repo.ts';
7 import * as git from './git.ts';
8 import * as jj from './jj.ts';
+1,
-1
1@@ -1,5 +1,5 @@
2 import { writable } from 'svelte/store';
3-import type { ChangeInfo, ChangeStack } from '$lib/types/index.ts';
4+import type { ChangeInfo, ChangeStack } from '$lib/types/index';
5 import { loadFiles, loadAllDiffs } from './files.ts';
6
7 export type StackResponse = ChangeStack & { vcs?: string; error?: string };
+1,
-1
1@@ -1,5 +1,5 @@
2 import { writable, derived } from 'svelte/store';
3-import type { FileChange, DiffFile, DiffScope } from '$lib/types/index.ts';
4+import type { FileChange, DiffFile, DiffScope } from '$lib/types/index';
5 import { checkOutdated } from './review.ts';
6
7 export type DiffMode = 'full' | 'unstaged';
+1,
-1
1@@ -1,5 +1,5 @@
2 import { writable, derived } from 'svelte/store';
3-import type { ReviewThread, Review } from '$lib/types/index.ts';
4+import type { ReviewThread, Review } from '$lib/types/index';
5 import { fileCommentCounts } from './files.ts';
6
7 export const threads = writable<ReviewThread[]>([]);
+5,
-5
1@@ -8,11 +8,11 @@
2 import CommitDialog from '$lib/components/CommitDialog.svelte';
3 import ExportDialog from '$lib/components/ExportDialog.svelte';
4 import TerminalPanel from '$lib/components/TerminalPanel.svelte';
5- import { files, selectedFile, selectedDiff, selectedFileData, loadFiles, loadAllDiffs, loadRepoInfo, toggleApproval, diffScope, diffMode, vcs } from '$lib/stores/files.ts';
6- import { loadComments } from '$lib/stores/review.ts';
7- import { loadChanges, lastStackSignature } from '$lib/stores/changes.ts';
8- import { sidebarOpen, commentingLine } from '$lib/stores/ui.ts';
9- import { toggleTerminal } from '$lib/stores/terminal.ts';
10+ import { files, selectedFile, selectedDiff, selectedFileData, loadFiles, loadAllDiffs, loadRepoInfo, toggleApproval, diffScope, diffMode, vcs } from '$lib/stores/files';
11+ import { loadComments } from '$lib/stores/review';
12+ import { loadChanges, lastStackSignature } from '$lib/stores/changes';
13+ import { sidebarOpen, commentingLine } from '$lib/stores/ui';
14+ import { toggleTerminal } from '$lib/stores/terminal';
15
16 let loading = $state(true);
17 let error = $state<string | null>(null);
+1,
-1
1@@ -1,5 +1,5 @@
2 import { json } from '@sveltejs/kit';
3-import { getChangeStack, getVcsKind, selectChange, approveChange } from '$lib/server/vcs.ts';
4+import { getChangeStack, getVcsKind, selectChange, approveChange } from '$lib/server/vcs';
5 import type { RequestHandler } from './$types.ts';
6
7 export const GET: RequestHandler = async () => {
+2,
-2
1@@ -7,8 +7,8 @@ import {
2 deleteThread,
3 getStats,
4 markOutdated
5-} from '$lib/server/review-store.ts';
6-import { getRepoDir } from '$lib/server/vcs.ts';
7+} from '$lib/server/review-store';
8+import { getRepoDir } from '$lib/server/vcs';
9 import { readFile } from 'fs/promises';
10 import { join } from 'path';
11 import type { RequestHandler } from './$types.ts';
+2,
-2
1@@ -1,6 +1,6 @@
2 import { json } from '@sveltejs/kit';
3-import { commitStaged, commitAll } from '$lib/server/vcs.ts';
4-import { clearAll } from '$lib/server/review-store.ts';
5+import { commitStaged, commitAll } from '$lib/server/vcs';
6+import { clearAll } from '$lib/server/review-store';
7 import type { RequestHandler } from './$types.ts';
8
9 export const POST: RequestHandler = async ({ request }) => {
1@@ -1,5 +1,5 @@
2 import { json } from '@sveltejs/kit';
3-import { addContextFile, removeContextFile, getContextFiles } from '$lib/server/review-store.ts';
4+import { addContextFile, removeContextFile, getContextFiles } from '$lib/server/review-store';
5 import type { RequestHandler } from './$types.ts';
6
7 export const GET: RequestHandler = async () => {
+2,
-2
1@@ -1,6 +1,6 @@
2 import { json } from '@sveltejs/kit';
3-import { getRepoDir } from '$lib/server/vcs.ts';
4-import { highlightLines } from '$lib/server/highlighter.ts';
5+import { getRepoDir } from '$lib/server/vcs';
6+import { highlightLines } from '$lib/server/highlighter';
7 import { readFile } from 'fs/promises';
8 import { join } from 'path';
9 import type { RequestHandler } from './$types.ts';
+4,
-4
1@@ -1,8 +1,8 @@
2 import { json } from '@sveltejs/kit';
3-import { getDiffByMode, parseDiff, getFileContent, getOldRef, getNewRef, getRepoDir } from '$lib/server/vcs.ts';
4-import type { DiffMode } from '$lib/types/index.ts';
5-import type { DiffFile, DiffScope } from '$lib/types/index.ts';
6-import { highlightLines } from '$lib/server/highlighter.ts';
7+import { getDiffByMode, parseDiff, getFileContent, getOldRef, getNewRef, getRepoDir } from '$lib/server/vcs';
8+import type { DiffMode } from '$lib/types/index';
9+import type { DiffFile, DiffScope } from '$lib/types/index';
10+import { highlightLines } from '$lib/server/highlighter';
11 import { readFile } from 'fs/promises';
12 import { join } from 'path';
13 import type { RequestHandler } from './$types.ts';
+1,
-1
1@@ -1,5 +1,5 @@
2 import { json } from '@sveltejs/kit';
3-import { exportJSON, exportMarkdown, exportToClaude, getExportPrompt } from '$lib/server/export.ts';
4+import { exportJSON, exportMarkdown, exportToClaude, getExportPrompt } from '$lib/server/export';
5 import type { RequestHandler } from './$types.ts';
6
7 export const POST: RequestHandler = async ({ request }) => {
+2,
-2
1@@ -1,6 +1,6 @@
2 import { json } from '@sveltejs/kit';
3-import { getStatus, getWorktreeStatus, getBaseBranchInfo, approveFile, unapproveFile, resetFile, resetHunk } from '$lib/server/vcs.ts';
4-import type { DiffScope } from '$lib/types/index.ts';
5+import { getStatus, getWorktreeStatus, getBaseBranchInfo, approveFile, unapproveFile, resetFile, resetHunk } from '$lib/server/vcs';
6+import type { DiffScope } from '$lib/types/index';
7 import type { RequestHandler } from './$types.ts';
8
9 export const GET: RequestHandler = async ({ url }) => {
+1,
-1
1@@ -1,5 +1,5 @@
2 import { json } from '@sveltejs/kit';
3-import { getRepoInfo, getVcsKind } from '$lib/server/vcs.ts';
4+import { getRepoInfo, getVcsKind } from '$lib/server/vcs';
5 import type { RequestHandler } from './$types.ts';
6
7 export const GET: RequestHandler = async () => {
+1,
-1
1@@ -1,5 +1,5 @@
2 import { json } from '@sveltejs/kit';
3-import { getReview, setReviewStatus, setReviewSummary } from '$lib/server/review-store.ts';
4+import { getReview, setReviewStatus, setReviewSummary } from '$lib/server/review-store';
5 import type { RequestHandler } from './$types.ts';
6
7 export const GET: RequestHandler = async () => {