Repository navigation
Sync Slack's native theme with Omarchy - #17113
Conversation
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummarySlack follows Omarchy themes through generated colors, inherited debugging pipes, and local native preference actions.
|
When Slack ships a build without the actions theme.js looks for, the observer stayed connected and walked all ~83,000 module exports on every DOM change, about 22 ms each time, for the life of the window. Measured on a signed-in Slack 4.52.182: 331 ms of main-thread time per 20 idle seconds, with nothing to stop it. Find the actions once and reuse them on theme changes, look at most once a second, and stop watching after a minute when they never turn up.
Slack's Clear Cache and Restart, Reset App Data and hardware acceleration toggle call app.relaunch(), which starts the original command line again without descriptors 3 and 4. Electron quits when --remote-debugging-pipe has no pipe behind it, so Slack closed about 10 seconds after the restart instead of coming back. Start Slack under omarchy-launch-slack's name so those restarts come back through it. The launcher drops the stale pipe flag and the theme launcher adds it again with a fresh pipe. Checked on Slack 4.52.182: the restarted Slack opens, has its pipe, and follows a live theme switch. Restarts that pass their own arguments (debug logs, net logs) still use Slack's binary path and still quit. Co-Authored-By: GPT-6.1 Sol <[email protected]>
|
Pushed two fixes on top of this after running it against a real, signed-in Slack 4.52.182. Theming and live switching work as described; these are the two problems that showed up. Slack's own restarts closed Slack (5a0787a) Clear Cache and Restart, Reset App Data and the hardware acceleration toggle call Slack now starts under Still open: "Restart with debug logs" and the net-log restart pass their own args, so Electron starts them from Slack's binary path and they still quit. Those are troubleshooting-only, and fixing them would need a different way to hand Slack its pipe. theme.js could scan forever (f97706c) If a Slack update renames any of the four actions theme.js looks for, It now finds the actions once and reuses them on theme changes, looks at most once a second, and stops watching after a minute if they never show up. The new test in Not changed, worth a look
🤖 Reviewed by Claude Opus 5.5 in T3 Code, second opinion GPT-6.1 Sol xhigh. |
Runtime.enable sent every Slack console message through the pipe into the launcher: about 7 MB at startup, then a message a second. Page events mark each new document without that, and the first apply runs on attach. A message the launcher can't handle no longer stops it reading, which left Slack queueing everything after it. Checked on Slack 4.52.182: 98 KB in the first 40 s and nothing while idle, the theme comes back after a reload, and a live switch to light still applies.
|
Pushed one more fix (fdf7ddc) for the console stream I flagged last time, so the only open item is now a product call, not code. The launcher no longer streams Slack's console
Checked on a signed-in Slack 4.52.182:
Restarts that pass their own args "Restart with debug logs" and the net-log restart still close Slack instead of restarting it. I'm calling that a known limitation, not a blocker. Both are troubleshooting-only, reopening Slack from the launcher works, and the only fixes are scraping Still not changed
🤖 Fixed and checked by Claude Opus 5.5 in T3 Code; no second-opinion round on this commit. |
The one-second guard skipped DOM changes without scheduling another look, so a Slack that finished loading inside that second and then went quiet kept its old colors. A skipped call now schedules one look for when the second is up.
* Sync Slack Desktop with Omarchy themes live * Fix Slack header contrast across themes * Fix Slack install and uninstall lifecycle and cover live updates * Theme packaged Slack over inherited pipes * Remove Slack-specific theming documentation * Use native Slack theme colors * Read Slack theme after connecting the watcher * Trim redundant Slack theme tests * Normalize RGBA colors for Slack * Stop Slack's theme lookup from scanning on every DOM change When Slack ships a build without the actions theme.js looks for, the observer stayed connected and walked all ~83,000 module exports on every DOM change, about 22 ms each time, for the life of the window. Measured on a signed-in Slack 4.52.182: 331 ms of main-thread time per 20 idle seconds, with nothing to stop it. Find the actions once and reuse them on theme changes, look at most once a second, and stop watching after a minute when they never turn up. * Bring Slack's restarts back through the theme launcher Slack's Clear Cache and Restart, Reset App Data and hardware acceleration toggle call app.relaunch(), which starts the original command line again without descriptors 3 and 4. Electron quits when --remote-debugging-pipe has no pipe behind it, so Slack closed about 10 seconds after the restart instead of coming back. Start Slack under omarchy-launch-slack's name so those restarts come back through it. The launcher drops the stale pipe flag and the theme launcher adds it again with a fresh pipe. Checked on Slack 4.52.182: the restarted Slack opens, has its pipe, and follows a live theme switch. Restarts that pass their own arguments (debug logs, net logs) still use Slack's binary path and still quit. Co-Authored-By: GPT-6.1 Sol <[email protected]> * Follow Slack's page loads without streaming its console Runtime.enable sent every Slack console message through the pipe into the launcher: about 7 MB at startup, then a message a second. Page events mark each new document without that, and the first apply runs on attach. A message the launcher can't handle no longer stops it reading, which left Slack queueing everything after it. Checked on Slack 4.52.182: 98 KB in the first 40 s and nothing while idle, the theme comes back after a reload, and a live switch to light still applies. * Look for Slack's actions again when the page goes quiet The one-second guard skipped DOM changes without scheduling another look, so a Slack that finished loading inside that second and then went quiet kept its old colors. A skipped call now schedules one look for when the second is up. --------- Co-authored-by: Ryan Hughes <[email protected]> Co-authored-by: GPT-6.1 Sol <[email protected]>
Omarchy now themes Slack through Slack's own theme store instead of a pasted string (omacom/omarchy#17113): background, accent, green and red as the four colours Slack's redesign takes. Slack keeps a custom theme in the account, so the manual carries those four for the one paste, in place of the ten colour string of the old Themes tab, which Slack now reduces to four anyway. The launcher that applies them live drives Slack over its debugging pipe from a Linux Python, so default/slack is set aside in the Omarchy classification.
Slack 4.53 refuses the debugging pipe the theme launcher starts it with, so themed Slack no longer opens. This reverts #17113 and returns existing installs to Slack's own launcher. Co-Authored-By: Claude Fable 5.2 <[email protected]>
* Give themed Slack a profile of its own Slack 4.53 refuses a debugging pipe on its default profile, so the themed launcher's Slack exited before opening a window. Co-Authored-By: Claude Fable 5.2 <[email protected]> * Revert "Give themed Slack a profile of its own" This reverts commit 54be7a5. * Remove Slack theme sync Slack 4.53 refuses the debugging pipe the theme launcher starts it with, so themed Slack no longer opens. This reverts #17113 and returns existing installs to Slack's own launcher. Co-Authored-By: Claude Fable 5.2 <[email protected]> --------- Co-authored-by: Claude Fable 5.2 <[email protected]>
Slack Desktop now follows Omarchy theme changes live. The standard template renderer stages
slack.json, and the normal app retint batch publishes it with the existing generation and ordering guards.Pass the theme's background, accent, green and red hex colors into Slack's native custom-theme fields, along with light/dark mode. Slack derives its shades and text contrast. Its standard light/dark surfaces keep their native styling; this does not replace the full Slack palette with Omarchy CSS.
Setup and removal use the existing Bash commands and package helpers. The packaged desktop entry retains its flags and URL handler. A system Python/Gio helper launches
/usr/bin/slackover inherited debugging pipes and watches theme files through filesystem events; a small renderer adapter applies local native preference actions. It handles startup, open windows and reloads, and exits with Slack. Existing installations activate withomarchy setup slackand fully reopen Slack once.Validation: focused Slack tests cover staged-theme publication, invalid-input preservation, inherited-pipe/file-event updates (including the startup race, new windows and reload), packaged-launcher fallback and cancellation-safe cleanup. Shared template, staging and launcher-removal suites cover the existing integration paths; all pass. Live packaged Slack was exercised across ten themes with the same renderer, and reload persistence was verified. Normal-interface frames were inspected, including readable light-theme headers. Executable/archive hashes remained unchanged during live testing, and no account preference API writes were observed. The demo video has been refreshed.
The native preference bridge uses internal Slack client actions rather than a public automation API, so Slack client changes may require an adapter update.