DEV Community

Daniel
Daniel

Posted on

I built a Windows notch overlay for my OpenCode sessions

Every time I ran more than one OpenCode session I lost the thread. Is the agent still working? Is it stuck? Is it waiting for me to approve a command? The only reliable way to know was alt-tabbing to the terminal, which also broke whatever I was doing in the editor.

So I built OpenCode Notch: a macOS-style notch overlay for Windows that watches OpenCode and only gets loud when it needs you.

OpenCode Notch panel

What it does

  • A collapsed pill at the top of the screen with one status dot per session: working, waiting for approval, finished, error.
  • Hover to expand: titles, project folders, elapsed time, the exact tool call in flight, and context usage.
  • Permission requests can be approved (once or always) or rejected straight from the notch.
  • Agent forms render as real inputs, so you can answer without leaving the app you are in.
  • Quick reply and interrupt for the session you are looking at.
  • A session center: project tabs, grouping, search, rename, archive/restore, and "open in TUI".
  • Ctrl/Cmd+K command palette for keyboard-first navigation.

It is a standalone Electron app. No plugin, no hooks, no API keys: it talks to the local OpenCode server the same way the TUI does, so it works with whatever you already have running. Settings live in %APPDATA%\OpenCode Notch\notch.json, and the app installs per-user without an admin prompt.

The bug that taught me something

Version 0.3.0 shipped a "responsive" panel. I sized it with viewport units:

width: min(440px, calc(100vw - 18px));
max-height: min(640px, calc(100vh - 18px));
Enter fullscreen mode Exit fullscreen mode

It looked reasonable. It was not.

OpenCode Notch measures its panel and resizes the native window to fit. Collapsed, that window is about 226x38 pixels. So 100vw was not the screen: it was the collapsed pill. On hover the panel was clamped to roughly 208x20 and rendered as a thin, clipped strip. The layout was a feedback loop between content size and window size.

The fix was to stop being clever:

width: 440px;
max-height: 640px;
Enter fullscreen mode Exit fullscreen mode

If a window's size is derived from its own content, viewport units inside it are almost always wrong. That is 0.3.1.

Try it

MIT licensed, Windows 10 and 11. I would especially like feedback on switching between projects when you have ten or more sessions open.

Top comments (0)