Skip to content

Instantly share code, notes, and snippets.

View dsriseah's full-sized avatar

DSri Seah dsriseah

View GitHub Profile
@dsriseah
dsriseah / zulip-dark-sri.css
Last active February 27, 2026 23:51
Zulip Desktop App Custom CSS
/*/
Sri's Dark Mode Zulip Desktop Custom CSS
Makes default dark mode theme hurt Sri's eyes less!
blog post: https://dsriseah.com/journal/2026/0226/
-
Inspired by github.com/botder/zulip-discord-css
Tested on Zulip Desktop Mac v5.12.3
License: MIT

Part of URSYS: Sri's Universal Realtime System for Javascript

A PhaseMachine maintains the idea of named "Phase Groups" consisting of "Phases", and are referred to by name. They are used to ensure a particular order of operational completion of Javascript code.

In this example, the server creates an URSYS PhaseMachine which then runs each PhaseGroup to completion in order of the definition (ur-server-init.mts)

For modules that want to participate in the URSYS PhaseMachine lifecycle, they can use HookPhase() to express their interest during runtime load (srv-comments.mts); the PhaseMachine is smart enough to queue the hooks for machines that have not yet been instantiated, so this simplifies having to worry about module dependency trees which is a pain in the ass.

PhaseMachine will eventually be enhanced with other state machine features for looping machines. It does actually implement 'enter', 'exec', and 'exit' groups...the default is 'exec' currently when not