feat: diff tool to see discrepancies

This commit is contained in:
2026-02-15 21:29:38 +01:00
parent 8b70214d15
commit 3679750dbc
12 changed files with 1807 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ import { TagsView } from '../TagsView';
import { TagInput } from '../TagInput';
import { ChatPanel } from '../ChatPanel';
import { ImportAnalysisView } from '../ImportAnalysisView';
import { MetadataDiffPanel } from '../MetadataDiffPanel';
import { AutoSaveManager } from '../../utils';
import { parseMacros, getMacro } from '../../macros/registry';
import { InsertModal } from '../InsertModal';
@@ -2319,6 +2320,7 @@ export const Editor: React.FC = () => {
const showTags = activeTab?.type === 'tags';
const showChat = activeTab?.type === 'chat';
const showImport = activeTab?.type === 'import';
const showMetadataDiff = activeTab?.type === 'metadata-diff';
// Clear selectedPostId if the post doesn't exist (e.g., after project switch)
useEffect(() => {
@@ -2407,6 +2409,17 @@ export const Editor: React.FC = () => {
);
}
// Show metadata diff if metadata-diff tab is active
if (showMetadataDiff) {
return (
<div className="editor">
<MetadataDiffPanel />
{renderErrorModal()}
{renderConfirmDeleteModal()}
</div>
);
}
// Show post editor if a post tab is active
if (showPost && activeTabId) {
return (