Skip to content

Conversation

@Fikitti
Copy link
Contributor

@Fikitti Fikitti commented Dec 30, 2025

All importers now use global references, new UUIDs and milestones.


Note

Adds new export capability and aligns metadata/importers with global references and UUIDs.

  • USFM round‑trip export: New exporter integrated into Rebuild Export; detects USFM by importer/corpus markers and resolves original filenames with multiple fallbacks; uses experimental exportUsfmRoundtrip with lineMappings when available.
  • Biblica importer overhaul: Imports notes-only (no translated Bible dependency), generates note cells with globalReferences, UUIDs, and milestones; updates exporter to merge segmented paragraphs, enforce UTF‑8, and preserve unmodified IDML resources.
  • Audio importer refactor: Centralized cell metadata builder with UUIDs/attachments; notebooks include importContext; adds saveFile command to provider.
  • Metadata & migration: New migration hoists per‑cell documentContext into metadata.importContext, promotes consistent importerType/originalFileName; adds tests; stops normalizing corpusMarker; improves Macula fileDisplayName handling.
  • Types/UI: Extends notebook metadata with originalFileName and importContext; export UI lists USFM; plugin selection shows “in BETA”; improves webview refresh matching.

Written by Cursor Bugbot for commit d015813. This will update automatically on new commits. Configure here.

All importers now use milestones, globalReferences and randomUUIDs.
All importers now also have a separate "cellMetadata.ts" file containing all the added metadata fileds to the actual codex cells needed for the specific file importer.
It should work now hopefully
@LeviXIII LeviXIII changed the base branch from main to 384-miga-task December 30, 2025 14:53
LeviXIII and others added 9 commits December 30, 2025 10:14
- Introduced `migration_hoistDocumentContextToNotebookMetadata` to consolidate per-cell documentContext into notebook-level metadata.
- Updated `extension.ts` to include the new migration function.
- Enhanced `migrationUtils.ts` with logic to handle hoisting and ensure idempotency.
- Added tests to validate the migration behavior and ensure consistent handling of documentContext across cells.
- Updated type definitions to include new metadata fields for originalFileName and importContext.
- Updated `createTempNotebook` function to use the workspace folder path as the base directory for temporary notebook files instead of the system's temporary directory.
- This change ensures that temporary files are created within the context of the current workspace, improving organization and accessibility.
- Added importContext to various importer forms and cell metadata functions, consolidating file-related information such as fileName, originalFileName, fileSize, and importTimestamp.
- Removed redundant documentContext from cell metadata to streamline data handling.
- Ensured consistent implementation across audio, biblica, docx, ebibleCorpus, indesign, macula, markdown, obs, pdf, plaintext, recursiveTextSplitter, spreadsheet, subtitles, tms, and usfm importers.
console.warn(`[USFM Export] Skipping ${fileName} - not imported with USFM importer (importerType: ${importerType}, corpusMarker: ${corpusMarker})`);
vscode.window.showWarningMessage(`Skipping ${fileName} - not imported with USFM importer`);
continue;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USFM export validation mismatches detection criteria

Medium Severity

The USFM file detection logic (lines 1280-1292) routes files to the USFM exporter based on several criteria: importerType === 'usfm', NT/OT corpus markers with USFM file extensions, or any file with a .usfm/.sfm extension. However, the export function's validation (line 906) only accepts files where importerType === 'usfm-experimental' OR corpusMarker === 'usfm'. Files detected through the other criteria (like importerType === 'usfm' or NT/OT with USFM extension) will be routed to the exporter but then skipped with a warning, effectively failing silently.

Additional Locations (1)

Fix in Cursor Fix in Web

LeviXIII and others added 4 commits January 7, 2026 13:42
…ferences in metadata

- Updated the JSON and spreadsheet importers to generate unique UUIDs for each cell ID instead of relying on legacy naming conventions.
- Introduced global references in the metadata structure for both JSON and spreadsheet cells, allowing for better tracking and linking of content.
- Refactored the handling of global references in the spreadsheet importer to improve alignment and mapping of imported content.
- Adjusted type definitions to reflect changes in column mapping and metadata structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants