Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion moon/apps/web/components/CodeView/BlobView/BlobEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export default function BlobEditor({ fileContent, filePath, fileName, onCancel }
<FileDiff
fileDiff={fileDiffMetadata}
options={{
theme: { dark: 'github-dark', light: 'github-light' },
theme: { dark: 'min-dark', light: 'min-light' },
diffStyle: 'split',
diffIndicators: 'classic',
overflow: 'wrap',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@
background-color: rgb(61, 19, 0);
}

.codeContainer :global(*::selection),
.blameContainer :global(*::selection),
.previewContainer :global(*::selection) {
background-color: #0969da;
color: #fff;
.blameContainer span::selection,
.codeContainer span::selection {
color: inherit;
}

.blameContainer span::-moz-selection,
.codeContainer span::-moz-selection {
color: inherit;
}
23 changes: 11 additions & 12 deletions moon/apps/web/components/CodeView/BlobView/CodeContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const CodeContent = ({
setIsShikiLoading(true)
codeToTokens(fileContent, {
lang: detectedLanguage as any,
theme: 'github-light'
theme: 'min-light'
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

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

The theme is hardcoded to 'min-light' without dark mode support. While FileDiff.tsx and BlobEditor.tsx properly use theme objects with both light and dark variants (e.g., { dark: 'min-dark', light: 'min-light' }), this component only uses the light theme. This creates an inconsistent user experience where code highlighting won't respond to dark mode preferences.

Suggested change
theme: 'min-light'
theme: { dark: 'min-dark', light: 'min-light' }

Copilot uses AI. Check for mistakes.
})
.then((result) => {
if (!cancelled) {
Expand Down Expand Up @@ -405,7 +405,7 @@ const CodeContent = ({
try {
const result = await codeToTokens(blockContent, {
lang: detectedLanguage as any,
theme: 'github-light'
theme: 'min-light'
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

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

The theme is hardcoded to 'min-light' without dark mode support. While FileDiff.tsx and BlobEditor.tsx properly use theme objects with both light and dark variants (e.g., { dark: 'min-dark', light: 'min-light' }), this component only uses the light theme. This creates an inconsistent user experience where code highlighting won't respond to dark mode preferences.

Suggested change
theme: 'min-light'
theme: { dark: 'min-dark', light: 'min-light' }

Copilot uses AI. Check for mistakes.
})

return { block, tokens: result.tokens }
Expand Down Expand Up @@ -603,16 +603,15 @@ const CodeContent = ({
{line.lineNumber}
</div>

<div
className='flex items-center py-1 pl-3 pr-4 font-mono text-sm'
style={{ whiteSpace: 'pre' }}
>
{lineTokens.map((token, key) => (
// eslint-disable-next-line react/no-array-index-key
<span key={key} style={{ color: token.color, display: 'inline' }}>
{token.content}
</span>
))}
<div className='py-1 pl-3 pr-4 font-mono text-sm' style={{ whiteSpace: 'pre' }}>
<span style={{ display: 'inline' }}>
{lineTokens.map((token, key) => (
// eslint-disable-next-line react/no-array-index-key
<span key={key} style={{ color: token.color, display: 'inline' }}>
{token.content}
</span>
))}
</span>
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion moon/apps/web/components/DiffView/FileDiff.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default function FileDiff({
<PierreFileDiff
fileDiff={fileDiffMetadata}
options={{
theme: { dark: 'github-dark', light: 'github-light' },
theme: { dark: 'min-dark', light: 'min-light' },
diffStyle: 'unified',
diffIndicators: 'classic',
overflow: 'wrap',
Expand Down
9 changes: 9 additions & 0 deletions moon/apps/web/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ html {
scrollbar-color: var(--scrollbar-color) transparent;
}

/* Global text selection color */
*::selection {
background-color: rgb(191 219 254 / 0.8);
}

*::-moz-selection {
background-color: rgb(191 219 254 / 0.8);
}

#__next {
/* @apply isolate flex h-full min-h-[100svh] flex-1 flex-col overflow-auto; */
/*@apply isolate flex min-h-[100svh] flex-1 flex-col overflow-auto;*/
Expand Down
Loading