fix invalid titlebar color string format#1987
fix invalid titlebar color string format#1987tarik02 wants to merge 4 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved Single-line fix converting a titlebar color constant from hex to rgba format for Linux compatibility. The change is purely cosmetic/display-related with no runtime logic changes. You can customize Macroscope's approvability policy. Learn more. |
|
wait, it doesn't crash but it doesn't make the bar transparent |
|
wait, it doesn't crash, but doesn't seem to work too |
|
Actually it works well (but still crashes on debug build). I would say, it's good to merge this + I will prepare MR with fix to electron repo. |
|
@juliusmarminge may I tag you in such cases? Or this is not necessary? |
if it still crashes what does it fix that we should merge it? I tested only windows and mac though, not Linux |
Dismissing prior approval to re-evaluate 5b39fbf
but actually - we can leave it as is for now |
What Changed
Just changed
titleBarOverlayto valid format.Why
I was running debug electron build and noticed that it is crashing with any 8-digit color hex string. After further investigation I discovered that function used to parse
colorfromtitleBarOverlaydoes not support 8-digit hex strings: https://source.chromium.org/chromium/chromium/src/+/main:content/public/common/color_parser.h;l=16But it supports
rgbaformat, so we are good. It worked before because it couldn't parse failing back to default value from that struct (0, 0, 0, 0).UI Changes
None.
Checklist
Note
Low Risk
Low risk: a single constant change to the desktop window
titleBarOverlaycolor format to prevent crashes (notably on Linux) with no behavioral changes beyond titlebar rendering.Overview
Fixes the desktop app’s window
titleBarOverlayconfiguration by replacing the 8-digit hexTITLEBAR_COLORvalue with anrgba(...)string, avoiding Chromium/Electron parsing issues (and crashes) while keeping the overlay effectively transparent (with a non-zero red channel to prevent Linux fallback).Reviewed by Cursor Bugbot for commit 7462f30. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix invalid titlebar color string format in desktop app
Changes
TITLEBAR_COLORin main.ts from an 8-digit hex string (#01000000) torgba(1,0,0,0), which is the correct format for the titlebar color API. The value uses1instead of0for the red channel becausergba(0,0,0,0)falls back to the default color on Linux.Macroscope summarized 7462f30.