Skip to content

Improve dark-mode code readability and build reliability#157

Merged
PureWeen merged 2 commits intoPureWeen:mainfrom
vitek-karas:fix/dark-codeblock-contrast
Feb 20, 2026
Merged

Improve dark-mode code readability and build reliability#157
PureWeen merged 2 commits intoPureWeen:mainfrom
vitek-karas:fix/dark-codeblock-contrast

Conversation

@vitek-karas
Copy link
Contributor

@vitek-karas vitek-karas commented Feb 20, 2026

Why

  • Dark-mode markdown code snippets were hard to read due to low contrast and an error-like red appearance.
  • Mac Catalyst publish surfaced noisy metadata warnings for the SDK's intermediate Copilot CLI binary.
  • Test builds were susceptible to CLI download timeouts because the SDK timeout value is interpreted in milliseconds.

What changed

1) Chat markdown code styling (PolyPilot/Components/ChatMessageList.razor.css)

  • Set inline and fenced code text to var(--text-bright) for stronger contrast on dark surfaces.
  • Added subtle borders to code surfaces for better visual separation.
  • Ensured pre code inherits fenced block colors and avoids duplicate styling.

2) Mac Catalyst publish metadata cleanup (PolyPilot/PolyPilot.csproj)

  • Excluded the intermediate SDK Copilot CLI artifact from publish item lists on Mac Catalyst.
  • Preserved explicit CLI copy behavior while preventing duplicate/noisy publish metadata entries.

3) Reliable CLI download timeout (Directory.Build.props)

  • Added CopilotCliDownloadTimeout=600000 so the SDK DownloadFile task gets a real 10-minute timeout.
  • This avoids the previous effective ~600ms timeout that caused flaky restore/build failures.

Validation

  • dotnet test --nologo in PolyPilot.Tests passed: 713 passed, 0 failed.
  • Relaunched PolyPilot and visually verified assistant markdown code blocks are readable in dark mode.

…warnings

- Add explicit text color (--text-bright) to inline code and pre blocks
  so they remain legible against dark backgrounds
- Add subtle borders to inline code and code blocks for visual separation
- Reset color/border on nested pre>code to avoid double-styling
- Add MSBuild targets to exclude the intermediate copilot CLI binary from
  Mac Catalyst publish metadata, suppressing spurious build warnings

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vitek-karas vitek-karas changed the title Fix dark-theme code block contrast Improve dark-mode code readability and Mac Catalyst publish metadata Feb 20, 2026
Set CopilotCliDownloadTimeout to 600000 in Directory.Build.props so the SDK DownloadFile task gets a real 10-minute timeout instead of 600ms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vitek-karas vitek-karas changed the title Improve dark-mode code readability and Mac Catalyst publish metadata Improve dark-mode code readability and build reliability Feb 20, 2026
@PureWeen PureWeen merged commit 45f6f85 into PureWeen:main Feb 20, 2026
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.

2 participants