Skip to content

Commit dce1196

Browse files
ashokDevsclaude
andcommitted
fix: show code view instead of all-green diff
Since original file content isn't available, show a clean code viewer with line numbers instead of a misleading all-green diff. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f11f8b5 commit dce1196

1 file changed

Lines changed: 10 additions & 40 deletions

File tree

frontend/app/jobs/[id]/page.tsx

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -342,46 +342,16 @@ export default function JobDetailPage() {
342342
</div>
343343

344344
<div className="flex-1 overflow-auto bg-[#0d1117] relative group border-t border-zinc-800/20">
345-
<ReactDiffViewer
346-
oldValue=""
347-
newValue={selectedFileContent}
348-
splitView={false}
349-
useDarkTheme={true}
350-
styles={{
351-
variables: {
352-
dark: {
353-
diffViewerBackground: '#0d1117',
354-
diffViewerColor: '#e6edf3',
355-
addedBackground: '#12261e',
356-
addedColor: '#7ee787',
357-
addedGutterBackground: '#0f2d1a',
358-
wordAddedBackground: '#1a4721',
359-
removedBackground: '#2d1214',
360-
removedColor: '#ff7b72',
361-
removedGutterBackground: '#3c1618',
362-
wordRemovedBackground: '#5d1214',
363-
gutterBackground: '#0d1117',
364-
gutterColor: '#484f58',
365-
codeFoldBackground: '#161b22',
366-
codeFoldGutterBackground: '#161b22',
367-
codeFoldContentColor: '#8b949e',
368-
emptyLineBackground: '#0d1117',
369-
}
370-
},
371-
line: {
372-
fontFamily: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',
373-
fontSize: '13px',
374-
lineHeight: '20px',
375-
},
376-
gutter: {
377-
minWidth: '50px',
378-
padding: '0 10px',
379-
},
380-
contentText: {
381-
padding: '0 12px',
382-
}
383-
}}
384-
/>
345+
<pre className="p-0 m-0">
346+
<code className="block text-[13px] leading-[20px]" style={{ fontFamily: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace' }}>
347+
{selectedFileContent.split('\n').map((line, i) => (
348+
<div key={i} className="flex hover:bg-[#161b22] transition-colors">
349+
<span className="select-none text-[#484f58] text-right min-w-[50px] px-[10px] py-0 inline-block">{i + 1}</span>
350+
<span className="text-[#e6edf3] px-3 flex-1">{line || ' '}</span>
351+
</div>
352+
))}
353+
</code>
354+
</pre>
385355
</div>
386356
</>
387357
)}

0 commit comments

Comments
 (0)