For the curious

Under the hood

Don’t read about how CoolDesk works. Poke it. Every toy below runs the app’s real rules with its real numbers.

CoolDesk architectureThe browser extension talks to the desktop app over a WebSocket on localhost. The desktop app is a Rust core with a web UI, and it talks to the operating system. An AI agent can read CoolDesk data through a read-only MCP endpoint.Your browserChrome · Edge · BraveExtensionservice workerIndexedDBnew tab pageDesktop appTauri 2Web UIReactSpotlightspacesRust coreaxum serversamplerapp scannerJSON on diskYour OSwindows + focusinstalled appsfile systemaudio sessionsSpaces (macOS)AI agent (Claude Code CLI)reads via MCP · read-onlyWebSocket127.0.0.1HTTP poll 1snative APIs
Your tabs, history, files and time tracking stay on your computer. Nothing in this picture talks to a CoolDesk server.

01 · Extension ⇄ app

One jump, three deliveries

The app and the extension talk over a WebSocket on 127.0.0.1. Chrome naps idle extensions, so there’s a once-a-second HTTP poll as backup. Belt, braces, and a gate so the browser doesn’t act three times.

Try it · jump to a tab
Desktop app · SpotlightBrowser · extension
WebSocket push
HTTP poll (1 s)
Sync socket
Nothing sent yet
The same tab within 10 s counts as already handled.

02 · Extension

The new tab has a guest list

It tracks time only on the tab you’re looking at, pauses when you go idle, and keeps everything in IndexedDB. Custom widgets run in a sandbox with no browser APIs. And it can only call seven hosts.

Try it · can the new tab call this?
Blocked. It isn’t on the list, so the browser refuses the connection.
Enforced by the browser through the page’s content security policy, not by our code.

04 · What comes first

Yesterday matters more than last week

Usage counts half as much every 3 days, and it’s log-scaled so 5 hours vs 3 barely differs but 20 minutes vs none does. Drag the sliders.

Try it · how much an item counts
today14 days
63%
of that time still counts
4.34
ranking score
Score = ln(1 + minutes × 0.5^(days ÷ 3)) + 2 if it’s open now.

05 · Apps

Ten asks, one scan

Opening Spotlight makes several parts of the UI ask for your apps at the same moment. A lock lets one of them scan; the rest wait and share the answer.

Try it · 10 parts of the UI ask at once
#1
#2
#3
#4
#5
#6
#7
#8
#9
#10
total scans: 0
Click again within 10 s: nobody scans at all.

06 · Your day

Open isn’t used

Every 30 seconds the app checks three things: what’s focused, when you last touched the keyboard or mouse, and what’s making sound. Flip them.

Try it · one sample every 30 s (sped up)
This sample
Active time, full credit
0m 00s
active
0m 00s
media
0m 00s
passive
Samples taken: 0

07 · Files

A download is five events pretending to be one

The file manager watches the folder you’re in. It waits for things to go quiet for 300 ms before refreshing, so you see one update, not five.

Try it · a file lands in Downloads
  1. 0 mscreate report.pdf.crdownload
  2. 120 mswrite +2 MB
  3. 240 mswrite +2 MB
  4. 360 mswrite +1 MB
  5. 480 msrename → report.pdf
  6. 780 ms✓ file list refreshes once
5
refreshes without settling
0
refreshes with it
Every event restarts a 300 ms timer; the list refreshes when it runs out.

08 · Data

Boring sync, on purpose

Plain JSON on your disk, IndexedDB in the browser. Records merge by id, the newest edit wins, and URLs are normalised first so www and a trailing slash don’t make duplicates.

Try it · the same note, edited in two places
In the browser extension
https://www.github.com/acme/app/
“Ship v2 Friday”
edited 10:02
In the desktop app
github.com/acme/app
“Ship v2 Monday”
edited 10:41

09 · macOS

The hack Apple didn’t document

Apple’s public API can’t put a window over another app’s fullscreen Space. So, like Alfred, Raycast and yabai, CoolDesk uses the private CGS API in SkyLight.framework.

Try it · press Alt+K over a fullscreen app
VS Code · fullscreen Space
> my-app
Desktop 1

Spotlight joins the Space you’re looking at, right on top of VS Code.

10 · AI

The agent can look, not touch

The AI agent reads your CoolDesk data through a read-only MCP endpoint. It can propose changes; only you can apply them.

Try it · ask the agent
Which of my tabs belong to the launch?
→ tools/call list_tabs (read-only)
← 23 tabs
These 5 look like the launch: Product Hunt draft, landing page, Stripe, analytics and the changelog.
proposed: add 5 links to “Launch”
Nothing changes until you press it.

11 · Cheat sheet

Every cache, from 300 ms to forever-ish

Each one exists for a reason. Usually that reason is “something was asking too often”.

Every cache · log scale
  • Folder change events
    300 ms
  • Apps list
    10 s
  • Jump-to-tab deliveries
    10 s
  • Browsing activity reads
    30 s
  • Projects with dev servers
    60 s
  • Usage scores for ranking
    5 min
  • Latest release (this site)
    5 min
  • App categories, shell PATH
    session
0.1 s1 s10 s1 min1 h
Hover a row for why it exists.

Still curious?

CoolDesk is open source. Everything above is in the repo, comments and all.

Read the code on GitHub