Compare commits

...

3 Commits

Author SHA1 Message Date
jared 1662fbab2b chore: bump cinny submodule (poll TDS fix + avatar decoration in profile modal)
Build Lotus Chat Desktop / prepare (push) Successful in 16s
Build Lotus Chat Desktop / build-windows (push) Failing after 14m37s
Build Lotus Chat Desktop / build-linux (push) Successful in 27m15s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped
- Polls now use TDS accent-cyan tokens instead of hardcoded Cinny blue
- Avatar decorations now visible in user profile modal (UserHero)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 17:40:32 -04:00
jared 0eb0b223a2 fix(ci): resolve Windows Cargo SSL handshake failures on crates.io
Three changes to the build-windows job:

1. CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse — uses lightweight HTTPS
   per-crate fetching instead of a full git clone of the crates.io index.
   The git clone path triggers an SSL connection reset ([curl 35]) on
   Windows Schannel in this runner environment.

2. CARGO_HTTP_MULTIPLEXING=false — disables HTTP/2 ALPN negotiation which
   is another common source of Schannel SSL resets on Windows.

3. CARGO_NET_RETRY=5 — retry transient network errors up to 5 times before
   failing the build.

4. Add Swatinem/rust-cache for Windows (mirrors the Linux job) — after a
   successful build, compiled crates are cached so subsequent runs skip the
   crates.io download entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 17:39:50 -04:00
jared 524fa61c01 fix(desktop): taskbar badge transparent circle + larger size
The Windows overlay badge rendered as a black square because GDI drawing
functions do not write the alpha channel — all pixels stay at A=0, causing
Windows to fall back to the opaque monochrome mask and draw corner pixels
as solid black.

Fix: after all GDI calls, iterate the pixel buffer and set alpha=0xFF for
every non-zero pixel; corner pixels (zero) retain A=0 and composite as
transparent, giving a proper circular badge.

Also increased bitmap size 16→20 and font height 11→14 for better
legibility, especially for two-digit mention counts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 17:39:50 -04:00
3 changed files with 27 additions and 3 deletions
+11
View File
@@ -63,6 +63,10 @@ jobs:
$ver = '${{ needs.prepare.outputs.version }}'
node -e "const fs=require('fs');const d=JSON.parse(fs.readFileSync('src-tauri/tauri.conf.json','utf8'));d.version='$ver';fs.writeFileSync('src-tauri/tauri.conf.json',JSON.stringify(d,null,2),'utf8');"
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Install frontend deps
shell: powershell
run: cd cinny; npm ci
@@ -77,6 +81,13 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ''
NODE_OPTIONS: '--max_old_space_size=4096'
# Sparse registry avoids a full git clone of the crates.io index —
# eliminates the curl SSL handshake failures seen on Windows runners.
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
# Disable HTTP/2 multiplexing — ALPN negotiation can reset on Windows Schannel.
CARGO_HTTP_MULTIPLEXING: 'false'
# Retry transient network errors before failing.
CARGO_NET_RETRY: '5'
run: npm run tauri -- build --bundles nsis
- name: Upload to release
+1 -1
Submodule cinny updated: 388a934665...107921e0d0
+15 -2
View File
@@ -162,7 +162,7 @@ fn set_badge_count(count: u32, window: tauri::Window) -> Result<(), String> {
let mut label_wide: Vec<u16> = label.encode_utf16().chain(std::iter::once(0)).collect();
unsafe {
let size = 16i32;
let size = 20i32;
let hdc_screen = windows::Win32::Graphics::Gdi::GetDC(None);
let hdc = CreateCompatibleDC(Some(hdc_screen));
@@ -191,7 +191,7 @@ fn set_badge_count(count: u32, window: tauri::Window) -> Result<(), String> {
let _ = Ellipse(hdc, 0, 0, size, size);
let hfont = CreateFontW(
11,
14,
0,
0,
0,
@@ -226,6 +226,19 @@ fn set_badge_count(count: u32, window: tauri::Window) -> Result<(), String> {
let _ = DeleteObject(hpen.into());
let _ = DeleteObject(hfont.into());
// GDI drawing leaves the alpha channel at 0 for all pixels.
// Set alpha=255 for every painted pixel so Windows uses per-pixel
// alpha compositing instead of falling back to the opaque mask,
// which would render unpainted corner pixels as a black square.
let pixel_count = (size * size) as usize;
let pixels =
std::slice::from_raw_parts_mut(bits as *mut u32, pixel_count);
for pixel in pixels.iter_mut() {
if *pixel != 0 {
*pixel |= 0xFF00_0000u32;
}
}
let hbm_mask = CreateBitmap(size, size, 1, 1, None);
if hbm_mask.0 as usize == 0 {
let _ = DeleteObject(hbm_color.into());