verify-on-mac.md
Language Markdown4.2 KB77 lines
# Checking Cortex on a Mac with a real keyEverything in this repository runs against a local stand-in server in CI.A few things can only be checked on a Mac with a real DeepInfra key, becausethey depend on the provider's live behavior or on macOS itself. This takesabout five minutes. Each step says what you should see.## 1. Build and open it```bashnpm cinpm run tauri build -- --bundles appopen target/release/bundle/macos/Cortex.app```Or install the `.dmg` from the `macos` workflow's artifact. It is ad-hocsigned, so macOS asks once: System Settings, Privacy & Security, "Open Anyway".- [ ] The window opens with frosted, translucent panels over the desktop (vibrancy).- [ ] Settings, Appearance: switching "Window material" changes the frost at once,and lowering "Panel tint" lets more of the desktop color through. macOSfixes the blur strength per material, so these are the two dials there are.- [ ] The sidebar sits clear of the red/yellow/green window buttons.## 2. The key goes to the KeychainSettings, DeepInfra, paste the key, Save. Cortex checks the key withDeepInfra before storing it.- [ ] A good key: one message, "Key saved. DeepInfra accepted it."- [ ] A wrong key (change one character): "DeepInfra rejected this key, so it was not saved", and nothing is stored.- [ ] macOS may ask Cortex to use the Keychain: choose Always Allow.- [ ] Keychain Access shows an item named `com.mattrguerra.cortex`, account `provider:deepinfra`.- [ ] Quit and reopen: the key field says "Saved in your keychain", and the app asks the Keychain at most once per launch.## 3. Live pricesOpen the model picker.- [ ] The footer says "Prices from DeepInfra, updated ..." (not "offline copy").- [ ] A model you know shows its current price per million tokens.## 4. A real reply is billed correctlySend a short message to a cheap model (say `google/gemma-3-12b-it`).- [ ] The reply streams in word by word.- [ ] The line under it reads like `NN in, NN out, $0.0000x` with **no** "est." badge. That confirms DeepInfra sent its usage block, and that Cortex found it.- [ ] The number matches the arithmetic: in x input price + out x output price, per million.- [ ] DeepInfra's dashboard shows the same request (its total may differ slightly if it bills cached tokens).## 5. Stop, reasoning and images- [ ] Ask something long, press Stop (or Esc): the partial reply stays, marked "Stopped", with an "est." cost.- [ ] Pick a reasoning model (tagged `reasoning`) and ask a puzzle: a collapsed "Reasoning" section appears above the answer.- [ ] Pick a vision model, paste a screenshot into the composer: it attaches as a chip, and the answer describes the image.## 6. The quick prompt- [ ] Press Cmd+Shift+Space anywhere: the small frosted prompt appears, centered on the screen under the pointer.- [ ] Ask something: the window grows to fit the answer, with its cost.- [ ] Cmd+Enter opens the same chat in the main window. Esc hides the prompt.- [ ] Clicking elsewhere hides it.- [ ] Settings, Quick prompt, record another shortcut: the new one works and the old one no longer does.## 7. Tray, closing and export- [ ] The menu bar icon's menu shows "This month: $X.XX of $10.00".- [ ] Closing the main window hides it; Cortex keeps running in the menu bar. Cmd+Q quits.- [ ] Settings, Export, choose your vault folder. Then, in a chat, ... menu, "Export to vault": a note appears with frontmatter (tokens, cost, models) and any images in `attachments/`.## If something is off- **Costs marked "est." on DeepInfra.** The final usage block did not arrive or was not recognized. Run cortex-core's parser tests (`cargo test -p cortex-core openai`) against a captured chunk, and add that chunk as a fixture.- **"Rejected this key" for a key that works elsewhere.** Paste it into a terminal: `curl -H "Authorization: Bearer $KEY" https://api.deepinfra.com/v1/openai/models -o /dev/null -w "%{http_code}"`. A 401 there means DeepInfra refuses it too; make a new key.- **No vibrancy.** Check that `macOSPrivateApi` is still true in `src-tauri/tauri.conf.json`.- **The shortcut does nothing.** Another app may own it; macOS does not always report the conflict. Record a different one.