byabhay.com
Back to work

Case study

Crane

Don't switch apps for a sentence in your head — a holding pen for the thoughts you catch mid-flow.

SwiftUI · SwiftData · AppKit

Why

You're three layers deep in a Figma file, or rereading a paragraph of a paper, or untangling a function that almost compiles, and your brain does the thing it always does:

"I should email Maya about Friday." "What was that link Jay sent me?" "Add a tag system to crane."

Three options, all bad:

  1. Hold the thought. Now you're juggling two things, and the original task is degraded.
  2. Switch apps to write it down properly (Notes, Linear, a journal). The switch costs you the flow you were protecting in the first place.
  3. Let it go. It comes back at 11pm, in the shower, three days later — the wrong moment, every time.

crane is the fourth option. A global Cmd+Shift+Space anywhere, a one-line capture pill in the upper third of your screen, hit Enter, the pill dismisses, you're back in your editor. Total elapsed time: roughly 2 seconds.

This is not a notes app. It's a holding pen between flow and proper capture. The history is meant to be skimmed at the end of a session and either acted on or discarded.

Cmd+Shift+Space

Hit the hotkey from anywhere.

1. Hit the hotkey

Cmd+Shift+Space drops a 620×88pt panel at the upper third of the active screen. The text field is already focused. No Dock animation, no app switch, no warm-up — registered via Carbon's RegisterEventHotKey, so it works inside the App Sandbox.

Cmd+Shift+Space
Drop your thought…
Email Maya about Friday try the late slot
Press EnterEnter

2. Drop a thought

Type a fragment or paste a URL. Cmd+L toggles link mode — a LINK badge appears and the URL is parsed at save-time. crane doesn't care what you put in; it cares that putting it in took zero context-switch.

Cmd+Shift+Space
Drop your thought…
Email Maya about Friday — try the late slot
SavedEnter

3. Save and vanish

Return saves the drop and dismisses the pill with a quick checkmark blip. The window collapses, the drop joins your history, and you're back in the document you were reading two seconds ago.

What it does

  • Cmd+Shift+Space anywhere — toggle the capture pill on the active screen's upper third
  • Type → Enter — persist the drop, dismiss the pill
  • Cmd+L — toggle link mode; URLs render as clickable rows in history
  • Cmd+H — expand the same panel into a searchable history list, newest-first, with per-row delete on hover
  • Menu-bar dashboard — TOTAL / TODAY / STREAK cards, a 14-day activity sparkline, thoughts-vs-links breakdown, and three most recent drops
  • Stays out of your way — no Dock icon, no Cmd-Tab entry; crane lives in your menu bar and behind a global keystroke

A small history of what you saved

Every drop goes into a local SwiftData store you can search and delete from. There's no sync, no account, no LLM rephrasing your sentence — it's a flat list with a search box on top.

  • Email Maya about Friday — try the late slot

    text · just now

  • https://linear.app/issue/CRN-204

    link · 2m ago

  • Try a tag system for crane — maybe locally with mlx

    text · 11m ago

Recent drops, with a small visual cue distinguishing thoughts from links.

Architecture

The capture pill and history list live inside the same borderless NSPanel, not separate windows. Switching between views animates the panel's frame downward from 620×88 (pill) to 620×480 (history) while the SwiftUI hierarchy cross-fades.

The menu-bar dashboard and the overlay panel point to the same shared ModelContainer. A drop captured via Cmd+Shift+Space lights up the dashboard's TOTAL/TODAY/STREAK numbers and the recent list live — both surfaces consume drops via @Query.

Architecturetext
craneApp (SwiftUI scene + MenuBarExtra)
  │
  ├── AppDelegate ──── GlobalHotkey (⌘⇧Space)
  │       │
  │       └── OverlayController ──── NSPanel (borderless, .floating)
  │                                       │
  │                                       └── NSHostingView<ContentView>
  │                                               ├── DropInputBar
  │                                               └── HistoryView
  │
  └── DashboardView (menu-bar popover)

Design system

crane is built to feel like one coordinated surface, not a bag of views. Three shared tokens carry that: one motion language, one corner radius, one edge highlight — all in Design.swift.

  • Two springs, not five. craneSpring for big transitions (input ⇄ history, panel resize); craneSnappy for hover, press, and the save checkmark.
  • Continuous corners at 22pt for primary surfaces (pill, history card). Always .continuous — never .circular.
  • Specular border — a 0.5pt linear-gradient stroke from white-at-22% top-leading to white-at-4% bottom-trailing. Reads as a highlight on the lit side of glass, not an outline.
  • Liquid Glass where safe. Dashboard stat cards and row hover states use .glassEffect(); the capture pill uses .regularMaterial instead — focused text fields inside a glass surface get an unavoidable focus halo on macOS 26, and there's no public API to opt out.

Keyboard

| Where | Combo | Action | |---|---|---| | Anywhere | Cmd+Shift+Space | Toggle the capture pill | | Capture pill | Enter | Save the drop, dismiss | | Capture pill | Cmd+L | Toggle link mode | | Capture pill | Cmd+H | Switch to history view | | Capture pill | Esc | Dismiss | | History | Esc | Back to capture pill | | Anywhere | Cmd+Q | Quit |

Development

Requires macOS 26.4 (Tahoe) and Xcode 26 — the app leans on @Model / @Query (SwiftData), Liquid Glass tokens, and MenuBarExtra features from this era. There's no release artifact yet; building from source is the supported path.

installbash

git clone https://github.com/abhay-cs/crane.git cd crane open crane.xcodeproj

⌘R in Xcode

See the live site at crane.byabhay.com or the full README on GitHub.