From 67fc708b3b8ac1c4e11907590f627890e59ea9e2 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Mon, 5 Oct 2026 01:16:20 -0700 Subject: [PATCH] Group CSV editor modules and tests in their own folder (#25476) --- config/scripts/ci-shard-timings.json | 2 +- .../src/components/editor/{ => csv}/CsvCellValue.tsx | 0 .../components/editor/{ => csv}/CsvColumnResizeHandle.tsx | 0 .../src/components/editor/{ => csv}/CsvGrid.test.tsx | 0 src/renderer/src/components/editor/{ => csv}/CsvGrid.tsx | 0 .../src/components/editor/{ => csv}/CsvGridCell.tsx | 0 .../src/components/editor/{ => csv}/CsvPagedViewer.tsx | 6 +++--- .../src/components/editor/{ => csv}/CsvTableToolbar.tsx | 0 .../editor/{ => csv}/CsvViewer.delimiter.test.tsx | 0 .../components/editor/{ => csv}/CsvViewer.editing.test.tsx | 4 ++-- src/renderer/src/components/editor/{ => csv}/CsvViewer.tsx | 2 +- .../src/components/editor/{ => csv}/csv-byte-index.test.ts | 0 .../src/components/editor/{ => csv}/csv-byte-index.ts | 0 .../src/components/editor/{ => csv}/csv-cell-clipboard.ts | 4 ++-- .../src/components/editor/{ => csv}/csv-cell-links.test.tsx | 0 .../src/components/editor/{ => csv}/csv-cell-selection.ts | 0 .../components/editor/{ => csv}/csv-column-width-limits.ts | 0 .../editor/{ => csv}/csv-column-width-preferences.test.ts | 2 +- .../editor/{ => csv}/csv-column-width-preferences.ts | 2 +- .../components/editor/{ => csv}/csv-delimiter-detection.ts | 0 .../components/editor/{ => csv}/csv-delimiter-picker.tsx | 0 .../{editor-csv-file-content.ts => csv/csv-file-content.ts} | 2 +- .../src/components/editor/{ => csv}/csv-file-limits.ts | 0 .../src/components/editor/{ => csv}/csv-grid-interaction.ts | 0 .../src/components/editor/{ => csv}/csv-grid-keyboard.ts | 0 .../src/components/editor/{ => csv}/csv-inspection.ts | 0 .../src/components/editor/{ => csv}/csv-link-routing.ts | 2 +- .../components/editor/{ => csv}/csv-paged-preview.test.ts | 0 .../src/components/editor/{ => csv}/csv-paged-preview.ts | 4 ++-- .../components/editor/{ => csv}/csv-parse-budget.test.ts | 0 .../src/components/editor/{ => csv}/csv-parse.test.ts | 0 src/renderer/src/components/editor/{ => csv}/csv-parse.ts | 0 .../components/editor/{ => csv}/csv-pending-save.test.ts | 6 +++--- .../editor/{ => csv}/csv-preview-save-safety.test.ts | 4 ++-- .../editor/{ => csv}/csv-preview-worker-client.ts | 0 .../editor/{ => csv}/csv-preview-worker-protocol.ts | 0 .../src/components/editor/{ => csv}/csv-preview.worker.ts | 0 .../src/components/editor/{ => csv}/csv-serialization.ts | 0 .../src/components/editor/{ => csv}/csv-source-record.ts | 0 .../components/editor/{ => csv}/csv-table-edit-budget.ts | 0 .../editor/{ => csv}/csv-table-interactions.test.ts | 0 .../src/components/editor/{ => csv}/csv-text-cell-edits.ts | 2 +- .../components/editor/{ => csv}/csv-text-document.test.ts | 0 .../src/components/editor/{ => csv}/csv-text-document.ts | 2 +- .../src/components/editor/{ => csv}/useCsvClipboard.ts | 0 .../src/components/editor/{ => csv}/useCsvColumnWidths.ts | 0 .../components/editor/{ => csv}/useCsvPagedPreview.test.tsx | 0 .../src/components/editor/{ => csv}/useCsvPagedPreview.ts | 2 +- .../src/components/editor/{ => csv}/useCsvPendingCell.ts | 4 ++-- .../src/components/editor/{ => csv}/useCsvTableEditor.ts | 0 src/renderer/src/components/editor/editor-lazy-views.ts | 4 ++-- .../src/components/editor/editor-panel-content-types.ts | 2 +- .../components/editor/useEditorPanelFileContentLoader.ts | 2 +- src/renderer/src/runtime/runtime-file-range-client.test.ts | 2 +- 54 files changed, 30 insertions(+), 30 deletions(-) rename src/renderer/src/components/editor/{ => csv}/CsvCellValue.tsx (100%) rename src/renderer/src/components/editor/{ => csv}/CsvColumnResizeHandle.tsx (100%) rename src/renderer/src/components/editor/{ => csv}/CsvGrid.test.tsx (100%) rename src/renderer/src/components/editor/{ => csv}/CsvGrid.tsx (100%) rename src/renderer/src/components/editor/{ => csv}/CsvGridCell.tsx (100%) rename src/renderer/src/components/editor/{ => csv}/CsvPagedViewer.tsx (95%) rename src/renderer/src/components/editor/{ => csv}/CsvTableToolbar.tsx (100%) rename src/renderer/src/components/editor/{ => csv}/CsvViewer.delimiter.test.tsx (100%) rename src/renderer/src/components/editor/{ => csv}/CsvViewer.editing.test.tsx (99%) rename src/renderer/src/components/editor/{ => csv}/CsvViewer.tsx (98%) rename src/renderer/src/components/editor/{ => csv}/csv-byte-index.test.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-byte-index.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-cell-clipboard.ts (96%) rename src/renderer/src/components/editor/{ => csv}/csv-cell-links.test.tsx (100%) rename src/renderer/src/components/editor/{ => csv}/csv-cell-selection.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-column-width-limits.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-column-width-preferences.test.ts (97%) rename src/renderer/src/components/editor/{ => csv}/csv-column-width-preferences.ts (98%) rename src/renderer/src/components/editor/{ => csv}/csv-delimiter-detection.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-delimiter-picker.tsx (100%) rename src/renderer/src/components/editor/{editor-csv-file-content.ts => csv/csv-file-content.ts} (93%) rename src/renderer/src/components/editor/{ => csv}/csv-file-limits.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-grid-interaction.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-grid-keyboard.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-inspection.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-link-routing.ts (93%) rename src/renderer/src/components/editor/{ => csv}/csv-paged-preview.test.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-paged-preview.ts (97%) rename src/renderer/src/components/editor/{ => csv}/csv-parse-budget.test.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-parse.test.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-parse.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-pending-save.test.ts (95%) rename src/renderer/src/components/editor/{ => csv}/csv-preview-save-safety.test.ts (91%) rename src/renderer/src/components/editor/{ => csv}/csv-preview-worker-client.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-preview-worker-protocol.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-preview.worker.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-serialization.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-source-record.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-table-edit-budget.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-table-interactions.test.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-text-cell-edits.ts (97%) rename src/renderer/src/components/editor/{ => csv}/csv-text-document.test.ts (100%) rename src/renderer/src/components/editor/{ => csv}/csv-text-document.ts (98%) rename src/renderer/src/components/editor/{ => csv}/useCsvClipboard.ts (100%) rename src/renderer/src/components/editor/{ => csv}/useCsvColumnWidths.ts (100%) rename src/renderer/src/components/editor/{ => csv}/useCsvPagedPreview.test.tsx (100%) rename src/renderer/src/components/editor/{ => csv}/useCsvPagedPreview.ts (97%) rename src/renderer/src/components/editor/{ => csv}/useCsvPendingCell.ts (95%) rename src/renderer/src/components/editor/{ => csv}/useCsvTableEditor.ts (100%) diff --git a/config/scripts/ci-shard-timings.json b/config/scripts/ci-shard-timings.json index 73d0226943b..34ba98f2566 100644 --- a/config/scripts/ci-shard-timings.json +++ b/config/scripts/ci-shard-timings.json @@ -5375,7 +5375,7 @@ "src/renderer/src/components/editor/combined-diff/scroll-viewport/combined-diff-restore-signal-equivalence.test.tsx": 552, "src/renderer/src/components/editor/combined-diff/scroll-viewport/combined-diff-scrollbar-drag.test.ts": 59, "src/renderer/src/components/editor/conflict-review-file-tree-windowing.test.tsx": 2238, - "src/renderer/src/components/editor/csv-parse.test.ts": 122, + "src/renderer/src/components/editor/csv/csv-parse.test.ts": 122, "src/renderer/src/components/editor/details-markdown-html.test.ts": 99, "src/renderer/src/components/editor/diff-editor-hide-unchanged-options.test.ts": 35, "src/renderer/src/components/editor/diff-editor-line-number-options.test.ts": 48, diff --git a/src/renderer/src/components/editor/CsvCellValue.tsx b/src/renderer/src/components/editor/csv/CsvCellValue.tsx similarity index 100% rename from src/renderer/src/components/editor/CsvCellValue.tsx rename to src/renderer/src/components/editor/csv/CsvCellValue.tsx diff --git a/src/renderer/src/components/editor/CsvColumnResizeHandle.tsx b/src/renderer/src/components/editor/csv/CsvColumnResizeHandle.tsx similarity index 100% rename from src/renderer/src/components/editor/CsvColumnResizeHandle.tsx rename to src/renderer/src/components/editor/csv/CsvColumnResizeHandle.tsx diff --git a/src/renderer/src/components/editor/CsvGrid.test.tsx b/src/renderer/src/components/editor/csv/CsvGrid.test.tsx similarity index 100% rename from src/renderer/src/components/editor/CsvGrid.test.tsx rename to src/renderer/src/components/editor/csv/CsvGrid.test.tsx diff --git a/src/renderer/src/components/editor/CsvGrid.tsx b/src/renderer/src/components/editor/csv/CsvGrid.tsx similarity index 100% rename from src/renderer/src/components/editor/CsvGrid.tsx rename to src/renderer/src/components/editor/csv/CsvGrid.tsx diff --git a/src/renderer/src/components/editor/CsvGridCell.tsx b/src/renderer/src/components/editor/csv/CsvGridCell.tsx similarity index 100% rename from src/renderer/src/components/editor/CsvGridCell.tsx rename to src/renderer/src/components/editor/csv/CsvGridCell.tsx diff --git a/src/renderer/src/components/editor/CsvPagedViewer.tsx b/src/renderer/src/components/editor/csv/CsvPagedViewer.tsx similarity index 95% rename from src/renderer/src/components/editor/CsvPagedViewer.tsx rename to src/renderer/src/components/editor/csv/CsvPagedViewer.tsx index 78fd46d16ae..968a2420e28 100644 --- a/src/renderer/src/components/editor/CsvPagedViewer.tsx +++ b/src/renderer/src/components/editor/csv/CsvPagedViewer.tsx @@ -4,12 +4,12 @@ import { translate } from '@/i18n/i18n' import { detectCsvDelimiter } from './csv-parse' import { CsvFooter, csvChosenDelimiter } from './CsvViewer' import { CsvGrid } from './CsvGrid' -import type { CsvFilePreview } from './editor-csv-file-content' +import type { CsvFilePreview } from './csv-file-content' import type { CsvDelimiterChoice } from './csv-delimiter-picker' import { useCsvPagedPreview } from './useCsvPagedPreview' -import { EditorFileLoadErrorView } from './EditorFileLoadErrorView' +import { EditorFileLoadErrorView } from '../EditorFileLoadErrorView' import { useCsvColumnWidths } from './useCsvColumnWidths' -import { buildFileViewPreferenceKey } from './file-view-preference-storage' +import { buildFileViewPreferenceKey } from '../file-view-preference-storage' import { openCsvHttpLink } from './csv-link-routing' export default function CsvPagedViewer({ diff --git a/src/renderer/src/components/editor/CsvTableToolbar.tsx b/src/renderer/src/components/editor/csv/CsvTableToolbar.tsx similarity index 100% rename from src/renderer/src/components/editor/CsvTableToolbar.tsx rename to src/renderer/src/components/editor/csv/CsvTableToolbar.tsx diff --git a/src/renderer/src/components/editor/CsvViewer.delimiter.test.tsx b/src/renderer/src/components/editor/csv/CsvViewer.delimiter.test.tsx similarity index 100% rename from src/renderer/src/components/editor/CsvViewer.delimiter.test.tsx rename to src/renderer/src/components/editor/csv/CsvViewer.delimiter.test.tsx diff --git a/src/renderer/src/components/editor/CsvViewer.editing.test.tsx b/src/renderer/src/components/editor/csv/CsvViewer.editing.test.tsx similarity index 99% rename from src/renderer/src/components/editor/CsvViewer.editing.test.tsx rename to src/renderer/src/components/editor/csv/CsvViewer.editing.test.tsx index ae8c8aea6eb..01e37f89155 100644 --- a/src/renderer/src/components/editor/CsvViewer.editing.test.tsx +++ b/src/renderer/src/components/editor/csv/CsvViewer.editing.test.tsx @@ -5,9 +5,9 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import CsvViewer from './CsvViewer' import { useCsvTableEditor } from './useCsvTableEditor' import { parseCsvTextDocument } from './csv-text-document' -import { flushPendingEditorChange, hasPendingEditorChange } from './editor-pending-flush' +import { flushPendingEditorChange, hasPendingEditorChange } from '../editor-pending-flush' import { APP_MENU_PASTE_EVENT } from '@/lib/app-menu-paste' -import { ORCA_EDITOR_FILE_SAVED_EVENT } from './editor-autosave' +import { ORCA_EDITOR_FILE_SAVED_EVENT } from '../editor-autosave' vi.mock('@tanstack/react-virtual', () => ({ useVirtualizer: ({ diff --git a/src/renderer/src/components/editor/CsvViewer.tsx b/src/renderer/src/components/editor/csv/CsvViewer.tsx similarity index 98% rename from src/renderer/src/components/editor/CsvViewer.tsx rename to src/renderer/src/components/editor/csv/CsvViewer.tsx index 6561df099aa..c6264f1c3d3 100644 --- a/src/renderer/src/components/editor/CsvViewer.tsx +++ b/src/renderer/src/components/editor/csv/CsvViewer.tsx @@ -10,7 +10,7 @@ import { useCsvTableEditor } from './useCsvTableEditor' import { CsvTableToolbar } from './CsvTableToolbar' import { remapCsvColumnWidths } from './csv-column-width-preferences' import { useCsvColumnWidths } from './useCsvColumnWidths' -import { buildFileViewPreferenceKey } from './file-view-preference-storage' +import { buildFileViewPreferenceKey } from '../file-view-preference-storage' export default function CsvViewer({ content, diff --git a/src/renderer/src/components/editor/csv-byte-index.test.ts b/src/renderer/src/components/editor/csv/csv-byte-index.test.ts similarity index 100% rename from src/renderer/src/components/editor/csv-byte-index.test.ts rename to src/renderer/src/components/editor/csv/csv-byte-index.test.ts diff --git a/src/renderer/src/components/editor/csv-byte-index.ts b/src/renderer/src/components/editor/csv/csv-byte-index.ts similarity index 100% rename from src/renderer/src/components/editor/csv-byte-index.ts rename to src/renderer/src/components/editor/csv/csv-byte-index.ts diff --git a/src/renderer/src/components/editor/csv-cell-clipboard.ts b/src/renderer/src/components/editor/csv/csv-cell-clipboard.ts similarity index 96% rename from src/renderer/src/components/editor/csv-cell-clipboard.ts rename to src/renderer/src/components/editor/csv/csv-cell-clipboard.ts index 1a4bf3cbae2..48334b252cf 100644 --- a/src/renderer/src/components/editor/csv-cell-clipboard.ts +++ b/src/renderer/src/components/editor/csv/csv-cell-clipboard.ts @@ -2,9 +2,9 @@ import { CLIPBOARD_TEXT_WRITE_MAX_BYTES, assertClipboardTextWithinLimit, assertClipboardTextWriteWithinLimit -} from '../../../../shared/clipboard-text' +} from '../../../../../shared/clipboard-text' import { CSV_MAX_COLUMNS, CSV_RECORD_BYTES } from './csv-byte-index' -import { measureUtf8ByteLength } from '../../../../shared/utf8-byte-limits' +import { measureUtf8ByteLength } from '../../../../../shared/utf8-byte-limits' import { parseCsv } from './csv-parse' import { serializeCsvRecord } from './csv-serialization' import { csvSelectionBounds, type CsvCellSelection } from './csv-cell-selection' diff --git a/src/renderer/src/components/editor/csv-cell-links.test.tsx b/src/renderer/src/components/editor/csv/csv-cell-links.test.tsx similarity index 100% rename from src/renderer/src/components/editor/csv-cell-links.test.tsx rename to src/renderer/src/components/editor/csv/csv-cell-links.test.tsx diff --git a/src/renderer/src/components/editor/csv-cell-selection.ts b/src/renderer/src/components/editor/csv/csv-cell-selection.ts similarity index 100% rename from src/renderer/src/components/editor/csv-cell-selection.ts rename to src/renderer/src/components/editor/csv/csv-cell-selection.ts diff --git a/src/renderer/src/components/editor/csv-column-width-limits.ts b/src/renderer/src/components/editor/csv/csv-column-width-limits.ts similarity index 100% rename from src/renderer/src/components/editor/csv-column-width-limits.ts rename to src/renderer/src/components/editor/csv/csv-column-width-limits.ts diff --git a/src/renderer/src/components/editor/csv-column-width-preferences.test.ts b/src/renderer/src/components/editor/csv/csv-column-width-preferences.test.ts similarity index 97% rename from src/renderer/src/components/editor/csv-column-width-preferences.test.ts rename to src/renderer/src/components/editor/csv/csv-column-width-preferences.test.ts index 9fc1eb38c33..2acb92c4ac4 100644 --- a/src/renderer/src/components/editor/csv-column-width-preferences.test.ts +++ b/src/renderer/src/components/editor/csv/csv-column-width-preferences.test.ts @@ -6,7 +6,7 @@ import { writeCsvColumnWidths, remapCsvColumnWidths } from './csv-column-width-preferences' -import { buildFileViewPreferenceKey } from './file-view-preference-storage' +import { buildFileViewPreferenceKey } from '../file-view-preference-storage' afterEach(() => { vi.restoreAllMocks() diff --git a/src/renderer/src/components/editor/csv-column-width-preferences.ts b/src/renderer/src/components/editor/csv/csv-column-width-preferences.ts similarity index 98% rename from src/renderer/src/components/editor/csv-column-width-preferences.ts rename to src/renderer/src/components/editor/csv/csv-column-width-preferences.ts index be732ca7047..38a99ed61fd 100644 --- a/src/renderer/src/components/editor/csv-column-width-preferences.ts +++ b/src/renderer/src/components/editor/csv/csv-column-width-preferences.ts @@ -1,6 +1,6 @@ import { CSV_MAX_COLUMNS } from './csv-byte-index' import { CSV_MAX_COLUMN_WIDTH, CSV_MIN_COLUMN_WIDTH } from './csv-column-width-limits' -import { readFileViewPreference, writeFileViewPreference } from './file-view-preference-storage' +import { readFileViewPreference, writeFileViewPreference } from '../file-view-preference-storage' import type { CsvTableMutation } from './csv-text-document' export const CSV_COLUMN_WIDTHS_STORAGE_KEY = 'orca.csv.column-widths.v1' diff --git a/src/renderer/src/components/editor/csv-delimiter-detection.ts b/src/renderer/src/components/editor/csv/csv-delimiter-detection.ts similarity index 100% rename from src/renderer/src/components/editor/csv-delimiter-detection.ts rename to src/renderer/src/components/editor/csv/csv-delimiter-detection.ts diff --git a/src/renderer/src/components/editor/csv-delimiter-picker.tsx b/src/renderer/src/components/editor/csv/csv-delimiter-picker.tsx similarity index 100% rename from src/renderer/src/components/editor/csv-delimiter-picker.tsx rename to src/renderer/src/components/editor/csv/csv-delimiter-picker.tsx diff --git a/src/renderer/src/components/editor/editor-csv-file-content.ts b/src/renderer/src/components/editor/csv/csv-file-content.ts similarity index 93% rename from src/renderer/src/components/editor/editor-csv-file-content.ts rename to src/renderer/src/components/editor/csv/csv-file-content.ts index 00731afb58d..c78b0214414 100644 --- a/src/renderer/src/components/editor/editor-csv-file-content.ts +++ b/src/renderer/src/components/editor/csv/csv-file-content.ts @@ -4,7 +4,7 @@ import { statRuntimeReadTarget, type RuntimeFileSnapshot } from '@/runtime/runtime-file-range-client' -import type { FileContent } from './editor-panel-content-types' +import type { FileContent } from '../editor-panel-content-types' import { CSV_PAGED_PREVIEW_BYTES } from './csv-file-limits' export { CSV_PAGED_PREVIEW_BYTES } from './csv-file-limits' diff --git a/src/renderer/src/components/editor/csv-file-limits.ts b/src/renderer/src/components/editor/csv/csv-file-limits.ts similarity index 100% rename from src/renderer/src/components/editor/csv-file-limits.ts rename to src/renderer/src/components/editor/csv/csv-file-limits.ts diff --git a/src/renderer/src/components/editor/csv-grid-interaction.ts b/src/renderer/src/components/editor/csv/csv-grid-interaction.ts similarity index 100% rename from src/renderer/src/components/editor/csv-grid-interaction.ts rename to src/renderer/src/components/editor/csv/csv-grid-interaction.ts diff --git a/src/renderer/src/components/editor/csv-grid-keyboard.ts b/src/renderer/src/components/editor/csv/csv-grid-keyboard.ts similarity index 100% rename from src/renderer/src/components/editor/csv-grid-keyboard.ts rename to src/renderer/src/components/editor/csv/csv-grid-keyboard.ts diff --git a/src/renderer/src/components/editor/csv-inspection.ts b/src/renderer/src/components/editor/csv/csv-inspection.ts similarity index 100% rename from src/renderer/src/components/editor/csv-inspection.ts rename to src/renderer/src/components/editor/csv/csv-inspection.ts diff --git a/src/renderer/src/components/editor/csv-link-routing.ts b/src/renderer/src/components/editor/csv/csv-link-routing.ts similarity index 93% rename from src/renderer/src/components/editor/csv-link-routing.ts rename to src/renderer/src/components/editor/csv/csv-link-routing.ts index a1188860d87..239f6435a3c 100644 --- a/src/renderer/src/components/editor/csv-link-routing.ts +++ b/src/renderer/src/components/editor/csv/csv-link-routing.ts @@ -1,6 +1,6 @@ import { getConnectionIdForFile } from '@/lib/connection-context' import { openHttpLink, type HttpLinkSourceOwner } from '@/lib/http-link-routing' -import { resolveMarkdownPreviewHttpOpenOptions } from './markdown-preview-links' +import { resolveMarkdownPreviewHttpOpenOptions } from '../markdown-preview-links' export function openCsvHttpLink( url: string, diff --git a/src/renderer/src/components/editor/csv-paged-preview.test.ts b/src/renderer/src/components/editor/csv/csv-paged-preview.test.ts similarity index 100% rename from src/renderer/src/components/editor/csv-paged-preview.test.ts rename to src/renderer/src/components/editor/csv/csv-paged-preview.test.ts diff --git a/src/renderer/src/components/editor/csv-paged-preview.ts b/src/renderer/src/components/editor/csv/csv-paged-preview.ts similarity index 97% rename from src/renderer/src/components/editor/csv-paged-preview.ts rename to src/renderer/src/components/editor/csv/csv-paged-preview.ts index 05ce6b5340b..87c7be35c48 100644 --- a/src/renderer/src/components/editor/csv-paged-preview.ts +++ b/src/renderer/src/components/editor/csv/csv-paged-preview.ts @@ -1,6 +1,6 @@ -import { MAX_FILE_RANGE_READ_BYTES } from '../../../../shared/file-range-read' +import { MAX_FILE_RANGE_READ_BYTES } from '../../../../../shared/file-range-read' import { readRuntimeFileRange, statRuntimeReadTarget } from '@/runtime/runtime-file-range-client' -import type { CsvFilePreview } from './editor-csv-file-content' +import type { CsvFilePreview } from './csv-file-content' import { CSV_MAX_PAGE_BYTES, csvPageForRow, diff --git a/src/renderer/src/components/editor/csv-parse-budget.test.ts b/src/renderer/src/components/editor/csv/csv-parse-budget.test.ts similarity index 100% rename from src/renderer/src/components/editor/csv-parse-budget.test.ts rename to src/renderer/src/components/editor/csv/csv-parse-budget.test.ts diff --git a/src/renderer/src/components/editor/csv-parse.test.ts b/src/renderer/src/components/editor/csv/csv-parse.test.ts similarity index 100% rename from src/renderer/src/components/editor/csv-parse.test.ts rename to src/renderer/src/components/editor/csv/csv-parse.test.ts diff --git a/src/renderer/src/components/editor/csv-parse.ts b/src/renderer/src/components/editor/csv/csv-parse.ts similarity index 100% rename from src/renderer/src/components/editor/csv-parse.ts rename to src/renderer/src/components/editor/csv/csv-parse.ts diff --git a/src/renderer/src/components/editor/csv-pending-save.test.ts b/src/renderer/src/components/editor/csv/csv-pending-save.test.ts similarity index 95% rename from src/renderer/src/components/editor/csv-pending-save.test.ts rename to src/renderer/src/components/editor/csv/csv-pending-save.test.ts index 0d1bbb28812..59f1139c1c8 100644 --- a/src/renderer/src/components/editor/csv-pending-save.test.ts +++ b/src/renderer/src/components/editor/csv/csv-pending-save.test.ts @@ -1,10 +1,10 @@ import { afterEach, expect, it, vi } from 'vitest' -import { createEditorSaveQueue } from './editor-save-queue' -import { registerPendingEditorFlush } from './editor-pending-flush' +import { createEditorSaveQueue } from '../editor-save-queue' +import { registerPendingEditorFlush } from '../editor-pending-flush' import { createEditorStore, stubEditorWindowWithDisk -} from './editor-autosave-controller-test-fixture' +} from '../editor-autosave-controller-test-fixture' afterEach(() => vi.unstubAllGlobals()) diff --git a/src/renderer/src/components/editor/csv-preview-save-safety.test.ts b/src/renderer/src/components/editor/csv/csv-preview-save-safety.test.ts similarity index 91% rename from src/renderer/src/components/editor/csv-preview-save-safety.test.ts rename to src/renderer/src/components/editor/csv/csv-preview-save-safety.test.ts index e382550d437..fe2e247c966 100644 --- a/src/renderer/src/components/editor/csv-preview-save-safety.test.ts +++ b/src/renderer/src/components/editor/csv/csv-preview-save-safety.test.ts @@ -1,8 +1,8 @@ // @vitest-environment happy-dom import { expect, it, vi } from 'vitest' import { createEditorStore } from '@/store/slices/editor-slice-test-harness' -import { createEditorSaveQueue } from './editor-save-queue' -import { canAutoSaveOpenFile } from './editor-autosave' +import { createEditorSaveQueue } from '../editor-save-queue' +import { canAutoSaveOpenFile } from '../editor-autosave' const { writeFile } = vi.hoisted(() => ({ writeFile: vi.fn() })) vi.mock('@/runtime/runtime-file-client', () => ({ writeRuntimeFile: writeFile })) diff --git a/src/renderer/src/components/editor/csv-preview-worker-client.ts b/src/renderer/src/components/editor/csv/csv-preview-worker-client.ts similarity index 100% rename from src/renderer/src/components/editor/csv-preview-worker-client.ts rename to src/renderer/src/components/editor/csv/csv-preview-worker-client.ts diff --git a/src/renderer/src/components/editor/csv-preview-worker-protocol.ts b/src/renderer/src/components/editor/csv/csv-preview-worker-protocol.ts similarity index 100% rename from src/renderer/src/components/editor/csv-preview-worker-protocol.ts rename to src/renderer/src/components/editor/csv/csv-preview-worker-protocol.ts diff --git a/src/renderer/src/components/editor/csv-preview.worker.ts b/src/renderer/src/components/editor/csv/csv-preview.worker.ts similarity index 100% rename from src/renderer/src/components/editor/csv-preview.worker.ts rename to src/renderer/src/components/editor/csv/csv-preview.worker.ts diff --git a/src/renderer/src/components/editor/csv-serialization.ts b/src/renderer/src/components/editor/csv/csv-serialization.ts similarity index 100% rename from src/renderer/src/components/editor/csv-serialization.ts rename to src/renderer/src/components/editor/csv/csv-serialization.ts diff --git a/src/renderer/src/components/editor/csv-source-record.ts b/src/renderer/src/components/editor/csv/csv-source-record.ts similarity index 100% rename from src/renderer/src/components/editor/csv-source-record.ts rename to src/renderer/src/components/editor/csv/csv-source-record.ts diff --git a/src/renderer/src/components/editor/csv-table-edit-budget.ts b/src/renderer/src/components/editor/csv/csv-table-edit-budget.ts similarity index 100% rename from src/renderer/src/components/editor/csv-table-edit-budget.ts rename to src/renderer/src/components/editor/csv/csv-table-edit-budget.ts diff --git a/src/renderer/src/components/editor/csv-table-interactions.test.ts b/src/renderer/src/components/editor/csv/csv-table-interactions.test.ts similarity index 100% rename from src/renderer/src/components/editor/csv-table-interactions.test.ts rename to src/renderer/src/components/editor/csv/csv-table-interactions.test.ts diff --git a/src/renderer/src/components/editor/csv-text-cell-edits.ts b/src/renderer/src/components/editor/csv/csv-text-cell-edits.ts similarity index 97% rename from src/renderer/src/components/editor/csv-text-cell-edits.ts rename to src/renderer/src/components/editor/csv/csv-text-cell-edits.ts index 3523eedb851..a8f77bbce7a 100644 --- a/src/renderer/src/components/editor/csv-text-cell-edits.ts +++ b/src/renderer/src/components/editor/csv/csv-text-cell-edits.ts @@ -1,4 +1,4 @@ -import { measureUtf8ByteLength } from '../../../../shared/utf8-byte-limits' +import { measureUtf8ByteLength } from '../../../../../shared/utf8-byte-limits' import { assertCsvTableEditBytes } from './csv-table-edit-budget' import { CSV_RECORD_BYTES } from './csv-byte-index' import { csvRecordTokens } from './csv-source-record' diff --git a/src/renderer/src/components/editor/csv-text-document.test.ts b/src/renderer/src/components/editor/csv/csv-text-document.test.ts similarity index 100% rename from src/renderer/src/components/editor/csv-text-document.test.ts rename to src/renderer/src/components/editor/csv/csv-text-document.test.ts diff --git a/src/renderer/src/components/editor/csv-text-document.ts b/src/renderer/src/components/editor/csv/csv-text-document.ts similarity index 98% rename from src/renderer/src/components/editor/csv-text-document.ts rename to src/renderer/src/components/editor/csv/csv-text-document.ts index f7d2836e90d..f02dcba33ae 100644 --- a/src/renderer/src/components/editor/csv-text-document.ts +++ b/src/renderer/src/components/editor/csv/csv-text-document.ts @@ -1,4 +1,4 @@ -import { measureUtf8ByteLength } from '../../../../shared/utf8-byte-limits' +import { measureUtf8ByteLength } from '../../../../../shared/utf8-byte-limits' import { parseCsv } from './csv-parse' import { CSV_MAX_COLUMNS, CSV_RECORD_BYTES } from './csv-byte-index' import { assertCsvTableEditBytes } from './csv-table-edit-budget' diff --git a/src/renderer/src/components/editor/useCsvClipboard.ts b/src/renderer/src/components/editor/csv/useCsvClipboard.ts similarity index 100% rename from src/renderer/src/components/editor/useCsvClipboard.ts rename to src/renderer/src/components/editor/csv/useCsvClipboard.ts diff --git a/src/renderer/src/components/editor/useCsvColumnWidths.ts b/src/renderer/src/components/editor/csv/useCsvColumnWidths.ts similarity index 100% rename from src/renderer/src/components/editor/useCsvColumnWidths.ts rename to src/renderer/src/components/editor/csv/useCsvColumnWidths.ts diff --git a/src/renderer/src/components/editor/useCsvPagedPreview.test.tsx b/src/renderer/src/components/editor/csv/useCsvPagedPreview.test.tsx similarity index 100% rename from src/renderer/src/components/editor/useCsvPagedPreview.test.tsx rename to src/renderer/src/components/editor/csv/useCsvPagedPreview.test.tsx diff --git a/src/renderer/src/components/editor/useCsvPagedPreview.ts b/src/renderer/src/components/editor/csv/useCsvPagedPreview.ts similarity index 97% rename from src/renderer/src/components/editor/useCsvPagedPreview.ts rename to src/renderer/src/components/editor/csv/useCsvPagedPreview.ts index e7827b4cce6..fceb2dc6c05 100644 --- a/src/renderer/src/components/editor/useCsvPagedPreview.ts +++ b/src/renderer/src/components/editor/csv/useCsvPagedPreview.ts @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef, useState } from 'react' -import type { CsvFilePreview } from './editor-csv-file-content' +import type { CsvFilePreview } from './csv-file-content' import { CsvPagedPreview } from './csv-paged-preview' import type { CsvIndex } from './csv-byte-index' diff --git a/src/renderer/src/components/editor/useCsvPendingCell.ts b/src/renderer/src/components/editor/csv/useCsvPendingCell.ts similarity index 95% rename from src/renderer/src/components/editor/useCsvPendingCell.ts rename to src/renderer/src/components/editor/csv/useCsvPendingCell.ts index fb9eed9f756..c59dfc47888 100644 --- a/src/renderer/src/components/editor/useCsvPendingCell.ts +++ b/src/renderer/src/components/editor/csv/useCsvPendingCell.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useLayoutEffect, useRef, type RefObject } from 'react' -import { registerPendingEditorFlush } from './editor-pending-flush' -import { ORCA_EDITOR_FILE_SAVED_EVENT } from './editor-autosave' +import { registerPendingEditorFlush } from '../editor-pending-flush' +import { ORCA_EDITOR_FILE_SAVED_EVENT } from '../editor-autosave' import type { CsvTextDocument } from './csv-text-document' import { editCsvTextCells } from './csv-text-cell-edits' import type { CsvCellEditSession } from './csv-grid-interaction' diff --git a/src/renderer/src/components/editor/useCsvTableEditor.ts b/src/renderer/src/components/editor/csv/useCsvTableEditor.ts similarity index 100% rename from src/renderer/src/components/editor/useCsvTableEditor.ts rename to src/renderer/src/components/editor/csv/useCsvTableEditor.ts diff --git a/src/renderer/src/components/editor/editor-lazy-views.ts b/src/renderer/src/components/editor/editor-lazy-views.ts index 0a9812389f1..15673c6966e 100644 --- a/src/renderer/src/components/editor/editor-lazy-views.ts +++ b/src/renderer/src/components/editor/editor-lazy-views.ts @@ -12,6 +12,6 @@ export const MarkdownPreview = lazy(() => import('./MarkdownPreview')) export const ImageViewer = lazy(() => import('./ImageViewer')) export const ImageDiffViewer = lazy(() => import('./ImageDiffViewer')) export const MermaidViewer = lazy(() => import('./MermaidViewer')) -export const CsvViewer = lazy(() => import('./CsvViewer')) -export const CsvPagedViewer = lazy(() => import('./CsvPagedViewer')) +export const CsvViewer = lazy(() => import('./csv/CsvViewer')) +export const CsvPagedViewer = lazy(() => import('./csv/CsvPagedViewer')) export const IpynbViewer = lazy(() => import('./IpynbViewer')) diff --git a/src/renderer/src/components/editor/editor-panel-content-types.ts b/src/renderer/src/components/editor/editor-panel-content-types.ts index 8e23c9ad6e6..af621f509c7 100644 --- a/src/renderer/src/components/editor/editor-panel-content-types.ts +++ b/src/renderer/src/components/editor/editor-panel-content-types.ts @@ -1,5 +1,5 @@ import type { GitDiffResult } from '../../../../shared/git-diff-compare-types' -import type { CsvFilePreview } from './editor-csv-file-content' +import type { CsvFilePreview } from './csv/csv-file-content' /** * Thrown when a worktree's host owner is not yet known (the backing repo has diff --git a/src/renderer/src/components/editor/useEditorPanelFileContentLoader.ts b/src/renderer/src/components/editor/useEditorPanelFileContentLoader.ts index 578c9e55e3b..ed773660390 100644 --- a/src/renderer/src/components/editor/useEditorPanelFileContentLoader.ts +++ b/src/renderer/src/components/editor/useEditorPanelFileContentLoader.ts @@ -4,7 +4,7 @@ import { getConnectionIdForFile, isWorktreeConnectionResolved } from '@/lib/conn import { useAppStore } from '@/store' import { getDiskBaselineSignature } from './diff-content-signature' import { getRuntimeFileReadScope } from '@/runtime/runtime-file-client' -import { readEditorCsvFileContent } from './editor-csv-file-content' +import { readEditorCsvFileContent } from './csv/csv-file-content' import { RuntimeRpcCallError, settingsForRuntimeOwner } from '@/runtime/runtime-rpc-client' import { findWorkspaceFileRoute } from '@/lib/runtime-workspace-file-route' import { selectWorktreeHostConnectionPhase } from '@/lib/worktree-host-connection-phase' diff --git a/src/renderer/src/runtime/runtime-file-range-client.test.ts b/src/renderer/src/runtime/runtime-file-range-client.test.ts index 5bb98eefb3b..7b8c9aa937d 100644 --- a/src/renderer/src/runtime/runtime-file-range-client.test.ts +++ b/src/renderer/src/runtime/runtime-file-range-client.test.ts @@ -3,7 +3,7 @@ import { readRuntimeFileRange, statRuntimeReadTarget } from './runtime-file-rang import { readEditorCsvFileContent, CSV_PAGED_PREVIEW_BYTES -} from '../components/editor/editor-csv-file-content' +} from '../components/editor/csv/csv-file-content' import { fsReadFile, fsReadFileChunk,