Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
95bbd90
Add native code viewer with syntax highlighting and tree expansion
Xueyang-Song May 7, 2026
af797ae
fix: wrap tree ItemTemplate in ContentControl to resolve TreeViewNode…
Xueyang-Song May 8, 2026
325c4d5
feat(code-viewer): broad language support via direct Lexilla CreateLexer
Xueyang-Song May 8, 2026
bba666e
feat(code-viewer): UI/UX polish — search, GridSplitter, README auto-o…
Xueyang-Song May 8, 2026
e9384d9
fix(code-viewer): polish GridSplitter, Markdown image constraint, and…
Xueyang-Song May 8, 2026
224f171
fix(code-viewer): center Markdown at 860px max-width and fix image le…
Xueyang-Song May 8, 2026
14cc69c
fix(code-viewer): clear explicit image Height to prevent Markdown let…
Xueyang-Song May 8, 2026
d5e6d30
fix(code-viewer): fix Markdown image empty space via LayoutUpdated hook
Xueyang-Song May 8, 2026
0ef1937
fix(code-viewer): add Default theme dict and improve dark mode Markdo…
Xueyang-Song May 8, 2026
525421a
fix(code-viewer): replace ThemeDictionaries with imperative color inj…
Xueyang-Song May 8, 2026
8362dbd
fix(code-viewer): inject Markdown theme colors into ThemeDictionaries…
Xueyang-Song May 8, 2026
bc32c2e
fix(code-viewer): create separate ResourceDictionary instance for Def…
Xueyang-Song May 8, 2026
5cf88e8
fix(code-viewer): use MarkdownConfig.Themes API for correct per-theme…
Xueyang-Song May 8, 2026
fcc0453
fix(code-viewer): fix Markdown image overflow and eliminate theme-cha…
Xueyang-Song May 8, 2026
cf5c05c
fix(code-viewer): trigger file tree filter on each keystroke
Xueyang-Song May 8, 2026
e93ee65
perf(code-viewer): debounce and off-thread file tree search
Xueyang-Song May 8, 2026
b85b1a2
fix(code-viewer): Markdown image MaxWidth grows back when window is w…
Xueyang-Song May 8, 2026
0c9a41d
ci: remove VS Code editor asset sync from CI workflows
Xueyang-Song May 8, 2026
2f6c2e2
fix(code-viewer): remove YamlDotNet to ensure AOT compatibility
Xueyang-Song May 8, 2026
1db19b9
test(code-viewer): add comprehensive unit test suite for code viewer …
Xueyang-Song May 8, 2026
128d206
fix(slnx): add platform mappings for JitHub.WinUI.Tests project
Xueyang-Song May 8, 2026
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
52 changes: 52 additions & 0 deletions .github/workflows/code-viewer-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Code Viewer Unit Tests

on:
push:
branches:
- 'agents/native-code-viewer-integration'
- 'main'
pull_request:
branches:
- 'main'

permissions:
contents: read

jobs:
unit-tests:
name: Run code viewer unit tests
runs-on: windows-latest
timeout-minutes: 15

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json

- name: Restore dependencies
run: dotnet restore JitHub.WinUI.Tests/JitHub.WinUI.Tests.csproj -p:Platform=x64

- name: Build test project
run: dotnet build JitHub.WinUI.Tests/JitHub.WinUI.Tests.csproj -c Debug -p:Platform=x64 --no-restore

- name: Run unit tests
run: >
dotnet test JitHub.WinUI.Tests/JitHub.WinUI.Tests.csproj
-c Debug
-p:Platform=x64
--no-build
--logger "trx;LogFileName=test-results.trx"
--collect:"XPlat Code Coverage"

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
**/*.trx
**/coverage.cobertura.xml
32 changes: 0 additions & 32 deletions .github/workflows/jithub-store-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ on:
description: Four-part Store package version (for example 1.6.5.0)
required: true
type: string
editor_assets_ref:
description: jithub-vs-code ref to build for artifacts\EditorAssets\dist
required: false
default: master
type: string
use_signing_certificate:
description: Sign the package with the configured PFX before Store upload. Leave false to match the existing Store-upload flow where Partner Center re-signs the submitted package.
required: false
Expand Down Expand Up @@ -69,45 +64,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout jithub-vs-code
uses: actions/checkout@v4
with:
repository: nerocui/jithub-vs-code
ref: ${{ inputs.editor_assets_ref }}
path: editor-assets

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
cache-dependency-path: editor-assets/yarn.lock

- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json

- name: Install editor asset dependencies
working-directory: editor-assets
shell: pwsh
run: yarn --frozen-lockfile

- name: Set up Microsoft Store CLI
uses: microsoft/microsoft-store-apppublisher@v1.3

- name: Verify Microsoft Store CLI
shell: pwsh
run: msstore --help

- name: Build editor assets
shell: pwsh
run: >
.\eng\Sync-JitHubVsCodeAssets.ps1
-VsCodeRepoPath "${{ github.workspace }}\editor-assets"
-DestinationPath "${{ github.workspace }}\artifacts\EditorAssets\dist"
-SkipInstall

- name: Patch Store manifest values
shell: pwsh
run: >
Expand Down
38 changes: 1 addition & 37 deletions .github/workflows/winapp-cli-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@ on:
workflow_dispatch:
inputs:
verify_debug_build:
description: Build JitHub.WinUI after installing winapp. This also builds editor assets from jithub-vs-code.
description: Build JitHub.WinUI after installing winapp.
required: false
default: false
type: boolean
editor_assets_ref:
description: jithub-vs-code ref to build when verify_debug_build is true.
required: false
default: master
type: string

permissions:
contents: read
Expand Down Expand Up @@ -41,37 +36,6 @@ jobs:
winapp create-debug-identity --help
winapp ui --help

- name: Checkout jithub-vs-code
if: ${{ inputs.verify_debug_build }}
uses: actions/checkout@v4
with:
repository: nerocui/jithub-vs-code
ref: ${{ inputs.editor_assets_ref }}
path: editor-assets

- name: Set up Node.js
if: ${{ inputs.verify_debug_build }}
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
cache-dependency-path: editor-assets/yarn.lock

- name: Install editor asset dependencies
if: ${{ inputs.verify_debug_build }}
working-directory: editor-assets
shell: pwsh
run: yarn --frozen-lockfile

- name: Build editor assets
if: ${{ inputs.verify_debug_build }}
shell: pwsh
run: >
.\eng\Sync-JitHubVsCodeAssets.ps1
-VsCodeRepoPath "${{ github.workspace }}\editor-assets"
-DestinationPath "${{ github.workspace }}\artifacts\EditorAssets\dist"
-SkipInstall

- name: Build WinUI debug app
if: ${{ inputs.verify_debug_build }}
shell: pwsh
Expand Down
40 changes: 40 additions & 0 deletions JitHub.WinUI.Tests/JitHub.WinUI.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<Platform Condition="'$(Platform)' == ''">x64</Platform>
<Platforms>x86;x64;ARM64</Platforms>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == '' and '$(Platform)' == 'x86'">win-x86</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == '' and '$(Platform)' == 'x64'">win-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == '' and '$(Platform)' == 'ARM64'">win-arm64</RuntimeIdentifier>
<!-- Suppress warnings about Windows-specific APIs in test context -->
<NoWarn>$(NoWarn);CA1416</NoWarn>
</PropertyGroup>

<ItemGroup>
<!-- Link pure C# service/model source files from JitHub.WinUI (no WinUI/XAML deps) -->
<Compile Include="..\JitHub.WinUI\Models\CodeViewer\*.cs" Link="Models\%(Filename)%(Extension)" />
<Compile Include="..\JitHub.WinUI\Services\CodeViewer\IFilePreviewResolver.cs" Link="Services\%(Filename)%(Extension)" />
<Compile Include="..\JitHub.WinUI\Services\CodeViewer\ILanguageIdResolver.cs" Link="Services\%(Filename)%(Extension)" />
<Compile Include="..\JitHub.WinUI\Services\CodeViewer\IRepoFileCacheService.cs" Link="Services\%(Filename)%(Extension)" />
<Compile Include="..\JitHub.WinUI\Services\CodeViewer\FilePreviewResolver.cs" Link="Services\%(Filename)%(Extension)" />
<Compile Include="..\JitHub.WinUI\Services\CodeViewer\LanguageIdResolver.cs" Link="Services\%(Filename)%(Extension)" />
<Compile Include="..\JitHub.WinUI\Services\CodeViewer\RepoFileCacheService.cs" Link="Services\%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>
7 changes: 7 additions & 0 deletions JitHub.WinUI.Tests/NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
Loading
Loading