Skip to content

Commit e07ee94

Browse files
AThraenclaude
andcommitted
fix: ship terminal-init.js + transparent variant in MSI, guard Assets drift
The MSI shipped only terminal.html / xterm.js / xterm.css / xterm-addon-fit.js even though terminal.html has loaded terminal-init.js since commit 75280b1 and transparent sessions load terminal-transparent.html. Installed users therefore got a blank terminal pane — portable ZIP users were unaffected because the ZIP mirrors the whole publish output. - WiX now lists terminal-init.js and terminal-transparent.html as components. - A new CI step diffs src/CodeShellManager/Assets/ against the <File Source> refs in the WiX manifest and fails the build if they drift, so adding a new Asset file without updating WiX can't slip through again. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b70862c commit e07ee94

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,27 @@ jobs:
2828
with:
2929
dotnet-version: '10.x'
3030

31+
# ── Guard: WiX must reference every file in src/CodeShellManager/Assets.
32+
# Portable ZIP ships the whole publish output, so this only bites MSI users
33+
# (e.g. v0.4.1 silently dropped terminal-init.js → blank terminals).
34+
- name: Verify WiX manifest covers all Assets files
35+
shell: pwsh
36+
run: |
37+
$assetFiles = (Get-ChildItem 'src/CodeShellManager/Assets' -File).Name | Sort-Object
38+
$wxs = Get-Content 'installer/CodeShellManager.wxs' -Raw
39+
$matches = [regex]::Matches($wxs, '\$\(var\.PublishDir\)\\Assets\\([^"]+)')
40+
$wxsRefs = ($matches | ForEach-Object { $_.Groups[1].Value } | Sort-Object -Unique)
41+
$diff = Compare-Object $assetFiles $wxsRefs
42+
if ($diff) {
43+
Write-Host "::error::installer/CodeShellManager.wxs is out of sync with src/CodeShellManager/Assets/"
44+
$diff | ForEach-Object {
45+
$side = if ($_.SideIndicator -eq '<=') { 'missing from WiX' } else { 'not present in Assets/' }
46+
Write-Host " $($_.InputObject) — $side"
47+
}
48+
exit 1
49+
}
50+
Write-Host "WiX/Assets in sync ($($assetFiles.Count) files)"
51+
3152
# ── Build (every push / PR) ──────────────────────────────────────────────
3253
- name: Restore & Build
3354
run: dotnet build src/CodeShellManager/CodeShellManager.csproj -c Release

installer/CodeShellManager.wxs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,18 @@
5454
<File Source="$(var.PublishDir)\Assets\app.ico" KeyPath="yes" />
5555
</Component>
5656

57-
<!-- Assets — one component per file so auto-GUID works -->
57+
<!-- Assets — one component per file so auto-GUID works.
58+
If you add a new file to src/CodeShellManager/Assets, also add it here
59+
or it will be missing from MSI installs (portable ZIP ships everything). -->
5860
<Component Directory="AssetsFolder" Guid="*">
5961
<File Source="$(var.PublishDir)\Assets\terminal.html" KeyPath="yes" />
6062
</Component>
63+
<Component Directory="AssetsFolder" Guid="*">
64+
<File Source="$(var.PublishDir)\Assets\terminal-transparent.html" KeyPath="yes" />
65+
</Component>
66+
<Component Directory="AssetsFolder" Guid="*">
67+
<File Source="$(var.PublishDir)\Assets\terminal-init.js" KeyPath="yes" />
68+
</Component>
6169
<Component Directory="AssetsFolder" Guid="*">
6270
<File Source="$(var.PublishDir)\Assets\xterm.js" KeyPath="yes" />
6371
</Component>

0 commit comments

Comments
 (0)