Removed the diff view toggle from conversation diff entries so they always render inline, simplifying the conversation log UI. (#959)

**Changes**
- `frontend/src/components/NormalizedConversation/EditDiffRenderer.tsx:14` drops the global diff-mode store and toggle import so the conversation view no longer renders the inline/split selector bar.
- `frontend/src/components/NormalizedConversation/EditDiffRenderer.tsx:119` locks `DiffView` to `DiffModeEnum.Unified`, guaranteeing inline diffs regardless of other toggles elsewhere.

**Tests**
- `pnpm run frontend:check` (fails: repository missing `node_modules`; `tsc` command unavailable).

**Next Steps**
1. Reinstall frontend dependencies and rerun `pnpm run frontend:check` to verify the TypeScript build.
This commit is contained in:
Gabriel Gordon-Hall
2025-10-07 14:24:49 +01:00
committed by GitHub
parent 5b930d9a59
commit 0c8426ce72

View File

@@ -11,8 +11,6 @@ import { getHighLightLanguageFromPath } from '@/utils/extToLanguage';
import { getActualTheme } from '@/utils/theme'; import { getActualTheme } from '@/utils/theme';
import '@/styles/diff-style-overrides.css'; import '@/styles/diff-style-overrides.css';
import '@/styles/edit-diff-overrides.css'; import '@/styles/edit-diff-overrides.css';
import { useDiffViewMode } from '@/stores/useDiffViewStore';
import DiffViewSwitch from '@/components/diff-view-switch';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
type Props = { type Props = {
@@ -77,8 +75,6 @@ function EditDiffRenderer({
const effectiveExpanded = forceExpanded || expanded; const effectiveExpanded = forceExpanded || expanded;
const theme = getActualTheme(config?.theme); const theme = getActualTheme(config?.theme);
const globalMode = useDiffViewMode();
const { hunks, hideLineNumbers, additions, deletions, isValidDiff } = useMemo( const { hunks, hideLineNumbers, additions, deletions, isValidDiff } = useMemo(
() => processUnifiedDiff(unifiedDiff, hasLineNumbers), () => processUnifiedDiff(unifiedDiff, hasLineNumbers),
[path, unifiedDiff, hasLineNumbers] [path, unifiedDiff, hasLineNumbers]
@@ -121,20 +117,13 @@ function EditDiffRenderer({
{effectiveExpanded && ( {effectiveExpanded && (
<div className={'mt-2 border ' + hideLineNumbersClass}> <div className={'mt-2 border ' + hideLineNumbersClass}>
<div className="flex items-center justify-end border-b px-2 py-1">
<DiffViewSwitch />
</div>
{isValidDiff ? ( {isValidDiff ? (
<DiffView <DiffView
data={diffData} data={diffData}
diffViewWrap={false} diffViewWrap={false}
diffViewTheme={theme} diffViewTheme={theme}
diffViewHighlight diffViewHighlight
diffViewMode={ diffViewMode={DiffModeEnum.Unified}
globalMode === 'split'
? DiffModeEnum.Split
: DiffModeEnum.Unified
}
diffViewFontSize={12} diffViewFontSize={12}
/> />
) : ( ) : (