59 Commits
Author SHA1 Message Date
Kit Langton 6b48f9dcff feat(screenshots): Export asks where to save, and recordings dim around their target (#2297)
* Screenshots: Export opens a save panel; recordings dim around their target

* Gate the dim windows to macOS

* Screenshot name test: the date is macOS-only
2026-11-21 17:18:56 -08:00
Dax 2ac5e4b582 annotate: agent tools for captures (labs) (#2220)
* Annotate: agent tools that read a capture from the CLI

Adds Labs › Agent tools for captures (off by default, every OS, Annotate
group, labs.annotate_agent_tools) behind four new `hex annotate` commands
that run in the CLI process rather than over the control socket, so they
work with Hex closed and only read files and decode the bundle's video:

- `inspect [<capture>] [--marks] [--json]` prints summary.md, one line per
  mark (or No marks), scrawl.json pretty, or the marks as JSON.
- `zoom [<capture>] (--at <M:SS|secs|phrase> | --mark <n|id> [--frame N])
  [--span secs] [--frames N] [--full]` writes a dense sheet around a moment
  or a mark into <bundle>/zoom/ and prints its path, each cell's time, and
  what was said; a mark prints the mark's line first.
- `frames [<capture>] --from <M:SS|secs> --to <M:SS|secs> [--fps 4]` writes
  one PNG per frame and prints each path.
- `skill` prints the new skills/hex-annotate guide, installed with
  `npx skills add anomalyco/hex --skill hex-annotate`.

They reuse the engine's own primitives (zoom, agent_context, handoff,
sketch) and capture_host::library's bundle resolution, and leave everything
outside <bundle>/zoom/ alone. While the lab is off they refuse naming
`hex labs on annotate-agent-tools`; a build without the capture engine
answers unsupported like the other annotate commands.

Also adds the settings key to the registry, translations for the card, the
skill docs, docs/cli.md, the capture and labs feature maps, the maps'
checks and proof limits, and the four labs goldens the new card moves.

* Annotate agent tools: review fixes

- frames loads the bundle, clamps --to to its durationMs, and refuses a range
  over 240 frames with `invalid` (the count is (to - from) * fps / 1000 + 1),
  so one call can't write a whole recording; the cap is in the skill and both
  docs, and checked_range is tested at the cap, the clamp, and a start past
  the end.
- The hex-annotate skill no longer claims an Install action, says only
  inspect/zoom/frames take a bundle (skill takes none), shows a --mark run
  printing the mark line first with real curly-quoted Said lines, says frames
  falls back to frames/ keyframes without a video, and states the 240 cap.
- The Labs row takes the same Annotate policy lock as Copy a capture as one
  file.
- The capture() doc comment says the four agent reads run in the CLI process
  on every OS.
- crates/router parse_clock_ms multiplies and adds with checked arithmetic, so
  absurd minutes read as no time instead of overflowing; tested.

* Annotate agent tools: Annotate lock and clock bounds

- An organization's DisableAnnotate lock now covers the agent tools lab:
  labs_lock maps it to Lock::Annotate, switches(Lock::Annotate) includes its
  switch, and the gate reads off under the lock through a policy-parameterized
  annotate_agent_tools_under (the same shape as voice_prompt_under). The new
  policy test proves the managed card, setting_lock, the gate under a forced
  lock, enforce turning it off, and keep_saved leaving the saved switch alone.
- parse_clock_ms refuses NaN, infinities, negatives, and values at or past
  u64's range in both the M:SS and bare-seconds branches (seconds_ms), with
  the new 0:1e300, 1e300, 0:NaN, inf, and 0:-1 cases.
- docs/cli.md and the capture map note that frames extracts with ffmpeg from
  PATH when one is installed, as the engine already does.

* Annotate agent tools: count frames as the engine's decoder does

`frames` capped a range by (to - from) * fps / 1000 + 1, but the engine's
own decoder steps inclusively by max(1000 / fps, 1) ms, which asks for more
frames when fps doesn't divide 1000: 240 fps steps 4 ms, so 999 ms is 250
frames, not 240, and the cap let it through.

`checked_range` now counts frame_count's larger of the two formulas, so the
240-frame cap holds whichever decoder runs. The test adds 0-999 ms at
240 fps (refused: 250 frames) and 0-959 ms at 240 fps (allowed: exactly 240
frames, 231 at the rate), and the capture map states both counts.
2026-11-21 13:59:43 -05:00
Kit Langton 3f374f4200 Show the microphone's level on the recording toolbar and capsule (t1607) (#2217) 2026-11-21 10:04:34 -08:00
Kit Langton 4f3a45e03a feat(screenshots): a recording toolbar, smaller movies with sound, and playback in the editor (#2166)
* Screenshots recordings: quality settings, copy as a file, export size (t1607)

Labs › Screenshots gets a Recording group (Scale Retina to 1x, Max resolution, Frame rate, Quality), each with a hex settings key; defaults 1x, Original, 30 fps, High (HEVC 0.50). The editor copies a recording's movie file, and its export-size pop-up (Original, 1080p, 720p) shows an estimate for the span kept, re-encoding off the UI thread with progress on the pressed button. (t1607)

* Screenshots: ⌘⇧5 recording toolbar with microphone and computer audio mixed into the movie (t1607)

* Screenshots: compact recording toolbar, editor playback and tidier toolbar (t1607)

* Screenshots: simplify the toolbar still, export-size save and playhead tick (t1607)

* docs: the compact recording toolbar and editor playback (t1607)

* Screenshots: filmstrip cells keep the movie's shape; mic-off icon is macOS-only (t1607)

* Screenshots: trim editor goldens for the transport and filmstrip (t1607)

* Screenshots: a trimmed export keeps a whole video track; reencode has a deadline (t1607)

* Screenshots: recording sound isn't silenced; toolbar choices apply at once and save in order (t1607)

* Screenshots: Return and Escape reach an open toolbar menu (t1607)

* Screenshots: a menu-only open of the chosen microphone; no microphone keeps no audio; Annotate may take the record key while the Lab is off (t1607)

* Screenshots: an export lands whole or not at all, and reports only to the recording it came from (t1607)

* Screenshots: keep the exact-device open and partial exports macOS-only (t1607)
2026-11-21 08:26:36 -08:00
Dax de7b012035 prefer a wsl opencode service when the lab is on (#2112)
* prefer a wsl opencode service with the lab on

* fix labs wsl diagram wording

* address review: wsl budget test and doc accuracy
2026-11-20 19:14:28 -05:00
Kit Langton 9f078b9a40 feat(history): find dictations and captures together on Mac (#1932)
* Stage clipboard-preserving capture insertion for Paste Last on Mac

* Update Rune and its Nix source hash for the picker work

* Select the latest ready paste by owner identity and revalidate it

* Exercise a held mixed paste picker with real bundles and a private Mac pasteboard

* Publish ready Annotate identity and queue owner-specific paste requests

* Wire the existing Mac paste shortcut and controls to the opt-in mixed picker

* Recheck the selected field and cover Paste Last with a disposable Mac receiver

* Refresh the Rune revision for the unified History pane

* Unify Mac History and keep only spoken words after a deliberate dictation cancel

* History and Paste Last call a Hex capture an annotation (t1612)

A finished Hex capture is an Annotation in History, its details and the
Paste Last picker, and the type filter is Annotations. The Captures pane no
longer rewrites its own label when the unified History is on, and the search
index drops the old synonym. Scrawl stays only as Scrawl.app and the on-disk
.scrawl format; a Hex-owned format is separate file and engine work.

* Gate the unified History behind a Labs toggle and give it one row shape (t1612)

Labs › Paste Last picker (labs.paste_last_picker; macOS, Dev audience, off by
default) replaces HEX_EXPERIMENTAL_PASTE_LAST and is read where the work
starts: the picker and its gesture, History's unified list, and the cancel
path's word writer. Off, Paste Last and History behave exactly as before.

History's rows now share one shape for dictations, annotations, screenshots
and recordings; a capture's detail card carries its picture, words, facts and
actions; a search or the type filter never leaves a stale card open; an empty
History has one empty state; and the type filter shows only when there is more
than one kind to filter.

The picker's rows sit on its title's left edge.

* Show the Paste Last picker card on macOS only (t1612)

* Refresh the Labs goldens for the Paste Last picker card (t1612)

* Keep the unified History's capture helpers to macOS builds (t1612)

* Keep the unified History's fixture pictures behind the Mac capture gate (t1612)

* Point the docs at the Paste Last picker lab (t1612)
2026-11-19 19:52:09 -08:00
Kit Langton 434acbdf6b fix(annotate): show Paste and ask before sending suggestions (#1945)
* Separate local annotation paste from a routed send

* Render the Paste chip with the capsule theme

* Exercise the ready capsule fixtures on the Linux golden runner

* Keep the displayed result on handoff and test pointer and keyboard selection

* Preserve matched rules through finalization and update checked capsule goldens

* Give the ready annotation one named action and a quiet search control

* Check the two ready surfaces, their accessible names and delivery states

* Put the ready line and its list on shared edges, with Paste a 28 pt button

The preview sat 12 pt from the wall while the list's header and names sat
16 pt in, and Paste was a 32 pt fill 4 pt from the top and bottom beside
28 pt icon boxes. The preview now starts on the list's edge, and Paste,
Search, Inspect and the close button are one row of 28 pt boxes 6 pt apart
and 6 pt from the walls. Paste's 32 pt chip still takes the click.

* Update the Linux references for the ready capsule's shared edges

* Nest the annotation preview in the capsule's left corners

The preview sat 16 pt from the left wall and 10 pt from the top and bottom,
so its 4 pt corners turned about a point 6 pt from where the shell's 14 pt
corners do. It now clears all three walls by 10 pt, the shell's radius less
its own, and the list's 16 pt margin stays for words. The guard that held
the preview on that margin now checks the corner centres instead.

* Update the Linux references for the nested annotation preview
2026-11-17 20:35:10 -08:00
Dax 9a79a25475 make the labs card copy plain (#1929)
* make the labs card copy plain

Rewrite the Labs card titles and lines in words a regular user understands:
YOLO mode says the message sends itself, Live text and Failure notices name
the small recording indicator, Vocabulary help says which speech models it
affects, and the key-side cards name Option, Command, Shift, and Control.
Audit every other card, updating the CLI descriptions, all nine translated
languages, the website lab catalog, the feature docs, and the render goldens.

* fix labs copy review findings

Restore the ISO qualifier on the section-key card, spell out that
double-tap and hold-through shortcuts contain no letter or number key,
cover all Global mode stages in the API text card, and name the print
command in the print-start copy. Restore the developer API card titles,
fix the Annotate capture wording, and retranslate the affected strings.
Remove every replaced translation key and stale lab-name reference.

* fix second labs copy review

Update the live typing test and YOLO goldens. Add a Windows variant of the
hold-through-keys copy naming Ctrl, Alt, Shift, and the Windows key. Remove
the last unused rewrite-by-voice translation key, keep Annotate untranslated
in the replay title, and clean the remaining old lab-name comments.

* use the Polish Annotate pane name in its replay title

Polish calls the Annotate pane Adnotacje, so the Annotate last 15 seconds
title says Ostatnie 15 sekund w Adnotacjach again. Other languages keep
Annotate because their pane name is Annotate.
2026-11-16 22:32:02 -05:00
Dax 8cffd94db7 annotate: count words from transcript text when the model has no word timings (#1918)
* annotate: count words from transcript text when the model has no word timings

A model that requests no timestamps (GigaAM v3) returns its text with an
empty word list, so `transcript.words.len()` read 0: lists and JSON said
"0 words" and the capsule called it "no speech". `transcribe::word_count`
counts the model's own word times, or the words in the text when it has
none, and every capture count goes through it (finished captures, the
iPhone and screen paths, replay, and `hex capture list|show`).

* annotate: spread untimed words over the clip for the editor

A model that gives no word times (GigaAM v3) left a capture's words empty,
so a recording or annotation opened from the Captures pane read "Nothing
was said" and its Send used the placeholder text. The words path now
spreads the text over the clip with estimated times, as `hex` does out of
process, and the pane spreads a bundle already on disk the same way.
`word_count` still counts those bundles when they are listed.

* annotate: spread each untimed piece over its own audio

A model with no word times (GigaAM v3) had a multi-minute capture's whole
text spread over the entire clip, so words landed minutes away from where
they were said. Each `audio.wav` piece now spreads its own untimed text
over its own 30 s, on the same offset base as measured words, and the
estimate reaches `transcript()` so it never spreads the text again; a clip
held in memory still spreads over the whole of it.

Also fix the Captures pane's wording: an annotation's times stay on the
capture's clock, not the movie's.
2026-11-16 16:15:24 -05:00
Dax cdb96f585e capture: keep all audio in long captures (#1795) (#1894)
* capture: stream audio to disk so long captures keep all of it

A capture's timeline now writes 16 kHz mono PCM16 to its bundle's
audio.wav as it records, with the leading offset and gaps as silence, so
memory stays flat and the 20-minute drop is gone. An 8-hour guard bounds
disk use only; past it the rest is one recorded gap.

A finished capture is transcribed from the WAV in 30 s pieces, the
reader hex transcribe already used (lifted to transcription/pieces.rs),
and each piece's words move onto the capture clock. The Parakeet, Apple
(path-based), and GGUF paths keep every word without holding the
session. The pipeline never rewrites a streamed audio.wav from empty
samples, an iPhone narration is read back where it must be re-based,
and a cancelled capture closes and removes its file.

* capture: say where a capture's audio stopped

A streamed capture keeps all of its audio, but the 8-hour disk guard (or
a failed audio write) still stops it early, and only the process log
said so. The timeline now carries the stop point onto RecordedAudio,
the bundle stores it as audioStoppedAtMs (serde default, so old bundles
load unchanged), and three places say it plainly: summary.md, `hex
capture show`, and `hex capture status`.

The guard records its point at a 1 s test limit, and the summary line is
tested at 12:34 and 8:00:00 so both clock shapes are covered.

* capture: fill the replay's stop point from its bundle

The 15 s replay builds Written too, on macOS only, so the new field
broke the macOS clippy job while Linux never compiled that function.

* capture: keep a recording out of recovery until it stops

Review fixes for the streamed timeline.

A capture now streams to `audio.wav.partial` and renames it to `audio.wav`
in `Timeline::finish`, so a bundle with a movie and an in-progress audio
file is never mistaken for a capture whose build never ran (recover's
orphan rule, Scrawl.app's `scrawl recover`) and retention cleans a crashed
one like any other bundle. Cancel and discard remove the partial; a failed
publish reads it back into memory rather than pointing at a missing file.

Also: a write failure's stop point is the last sample that reached the
file, not the end of the failed chunk; a trim failure counts every written
sample; the capture's words keep one running frame total instead of
adding truncated per-piece millis; an iPhone narration's `since` drains the
decoded samples instead of copying them and treats a missing file as no
audio; the phone and replay paths carry the audio stop point into their
bundles; and empty audio answers `source: "none"`, as `transcribe_with`
does.

Tests: a movie plus partial audio is never owed, retention trashes a
crashed bundle's media, a write failure records its stop point, a missing
streamed file shifts to no samples, and the replay shift moves the stop
point with the clock.

* capture: publish audio.wav only once its build journals the capture

Follow-ups from review.

A capture now streams to audio.wav.partial and keeps that name after it
stops: the partial is renamed to audio.wav right after the build writes
unfinished.json, so audio.wav never exists without a journal, and a
stopped capture waiting in the finish queue no longer looks like an
orphan to Scrawl.app's recover. A partial that cannot take the name is
read back and written by the build, and its partial name removed; the
replay removes the unshifted partial once the narration is read for
shifting.

Also: a periodic header flush error is now a write failure (the rest of
the capture is a gap) rather than a log line; the midpoint of a failed
write records where the file stopped; and the words test cuts pieces at
odd sample counts and computes offsets from the running frame total, so
per-piece millisecond drift would fail it.

Tests: a streamed audio takes its final name only when the build settles
it (and falls back when it cannot), a capture that has not been
journaled is never owed a rebuild, a mid-capture write failure stops
where the file stopped, and the word offsets are exact at odd piece
lengths.

* capture: consume a streamed recording's partial when it is read

Follow-ups from review.

`RecordedAudio::since` and `into_memory` now remove the partial once its
samples are read: an iPhone narration (capture.rs's `host_narration`
path) used to leave the whole streamed file in the finished bundle. The
replay relies on the same path instead of removing it by hand, and the
light zip leaves `audio.wav.partial` out defensively. A read that fails
is an error to `into_memory` (so a build keeps the only copy) while
`since` still treats a missing file as no audio for an iPhone.

A failed publish now reads the audio back only when it produced the
samples the recording had; a failed read keeps the partial and removes
any half-copied `audio.wav`. `publish_audio` takes `&mut self` and points
the recording at the published file.

A journaled bundle whose `audio.wav` is missing adopts `audio.wav.partial`
before rebuilding. Docs say the guarantee is a streamed capture's, and
that a crash while recording or queued is retention's job, not
recovery's.

Tests: reading a streamed recording consumes the partial; a finished
iPhone bundle keeps none; a streamed audio is published only when its
build settles it, including the read-back and unreadable-partial cases; a
journaled capture adopts its partial.

* capture: keep a failed audio publish recoverable

Follow-ups from review.

The publish fallback read the partial with `into_memory`, which deletes
it, and then ignored whether its own write landed: a failed write left
the audio nowhere. It now reads through `read_streamed` (no deletion),
writes `audio.wav` and checks the result, and removes the partial only
once that write succeeded. A failed read or write removes any half
`audio.wav` and fails the build, which is the pipeline's existing failed
path: `recover::finished` runs only for an `Ok` build, so `unfinished.json`
stays and the next launch's recovery adopts the partial instead of the
capture quietly finishing without its audio.

`publish_audio` also treats a landed copy as success even when deleting
the partial fails, logging it rather than reporting failure and letting
the fallback overwrite a good `audio.wav`.

Tests: a blocked target keeps the partial and fails the build; a
fallback write that lands consumes the partial and writes `audio.wav`;
an unreadable partial is kept.
2026-11-16 10:28:54 -05:00
Kit Langton 8b15f56055 fix(capture): Undo, marks and Copied only claim what really happened (#1669)
* Undo on a saved rule's send lasts exactly as long as the send waits (t1509)

* A shot whose marks can't be drawn is never exported plain (t1509)

Export::png() refused to fall back silently: when the marks couldn't be
drawn it now fails with MarksNotDrawn, and the editor keeps its error
note in danger ink beside a Retry button until the next export. Nothing
is copied, saved or sent.

* Copied says what reached the clipboard, and only once it did (t1509)

Screenshot cards show their note after the clipboard write returns:
"Copied" for a shot, "Movie copied" for a recording, or "Couldn't
copy". The capsule's finished capture reads "Summary copied", since its
clipboard carries the summary, and "Couldn't copy" with a warning when
the write failed (SettledCapture.copy_error).

* test(screenshots): goldens for the editor's couldn't-draw state (t1509)

* goldens: screenshot editor's couldn't-draw state on the new Rune
2026-11-12 18:52:42 -08:00
Kit Langton 6ffecd04d2 test(capture): give the terminal-rule test absolute paths on Windows (t1546) (#1762) 2026-11-12 18:20:19 -08:00
Kit Langton 804c2af789 feat(capture): Annotate suggests the OpenCode session open in a Ghostty pane, and never guesses between two (#1514)
* Annotate: route Ghostty captures by the terminal's OpenCode session and folder

* fix(capture): build the argv parser only where it's used (t1451)

* fix(capture): a TUI that moved off its command line's session names none (t1509)
2026-11-12 16:47:14 -08:00
Kit Langton f7a741cc8b fix(settings): preserve other writers' changes when saving (#1747)
* fix(settings): merge edits through one persistence owner (t1533)

* fix(modes): focus the adopted correction without duplicating it (t1533)

* fix(settings): publish reversions even before the host saw the save (t1533)
2026-11-12 12:57:21 -08:00
Kit Langton 8ce167876a refactor: derive hand-kept lists and literals from one source (t1539) (#1749) 2026-11-12 11:58:11 -08:00
Kit Langton 75c93094d7 chore(fixtures): remove personal data from preview fixtures (#1676)
* scrub personal data from preview and scene fixtures (t1510)

Replace the personal email, full name, personal site/host, home-directory
paths, named microphone and demo signature that shipped inside the preview
fixtures with generic stand-ins. Fixture text only; no behavior changes.

* regenerate the bluetooth microphone golden (t1510)

The fixture note now names a generic microphone; the new render differs
from the checked-in image only along that line.
2026-11-10 20:11:38 -08:00
Dax 08df53e71a fix(screenshots): keep the record picker through the permission step and block shortcut collisions (#1631)
* fix(screenshots): keep the record picker through permissions and split its key from annotate's

a clip capture's permission refusal now reopens the screenshots picker
instead of ending the recording, and the picker holds through that step.

screenshots.record_hotkey and annotate's capture/replay shortcuts never
share a chord, whether annotate or the lab is on, so turning either on
can't leave the record shortcut dead while a whole-screen recording takes
its key. settings saved before that rule are repaired when they load: a
record shortcut on capture.hotkey or capture.replay_hotkey is cleared with
a warning, beside the left-click repair. that also fixes a record shortcut
saved on the replay chord turning replay off with the lab off.

* fix(screenshots): clear a shared record shortcut after the repairs that reset annotate's key

with labs › mouse shortcuts off, repair_mouse_shortcuts puts a mouse-button
annotate shortcut back on its default ⌥⇧S, so a record shortcut saved on that
chord was cleared before the reset and survived the load, sharing annotate's
key. the clear now runs from read_saved_from after every repair that can
reset capture.hotkey, and still counts as a migration so the file is
written back. the load test covers the mouse-button case and the write-back.
2026-11-10 08:41:33 -05:00
Kit Langton 4ac1a79dbf fix(capture): a page that names its session beats a site rule for its host (#1627) 2026-11-09 19:37:11 -08:00
Kit Langton a65a5e375f feat(screenshots): record the screen, and keep captures until you close them (#1371)
* Talk over a screenshot: dictation words go with the shot

* Regenerate the screenshot editor goldens with the words row

* Cover the card held while someone talks over it

* Add the listening card's goldens

* Record the screen from Screenshots, ending in the corner card and a trim editor

* Move the capture timeline out, add the recording goldens and feature map

* Keep the replay's start on Windows quiet

* Keep the timeline move's imports and the replay start quiet off macOS

* Clear the record shortcut without returning its change

* Fix the macOS lints the recording left

* screenshots: only the open editor takes a dictation

A dictation taken while only the corner card showed used to talk over the
shot: the card held, showed "Listening…", and the words opened the shot in
the editor. That took the shortcut's normal paste away from everyone who
never asked for it.

Now only an open editor takes the words. While the card shows, a dictation
pastes as it did before the Lab, the card keeps its few seconds, and its
listening pill, hold and the narration path that opened the shot are gone.
The card's own card/listen/heard API goes with it, so nothing else can reach
the shot but the editor.

The i18n Screenshots rows move to i18n/labs.rs, where the Labs rows live,
so the main table stays under the source cap after dev's merge.

* screenshots: the editor's pieces come from the kit, and a shot grows in from where it was taken

The editor's toolbar was hand-made: five canvas-drawn tool glyphs in bespoke
hover chips, a bare ✕, a bare microphone, and action buttons stretched past
the kit's own height. The card's ✕ was a filled button beside them. They now
come from the rest of Hex: the tools are line icons beside the theme's own,
drawn by rune-kit icon buttons that fill while a tool is picked, ✕ and the
microphone and clear-words are the kit's ghost icon buttons like a capsule's,
and Copy, Save and Send to… are the kit's buttons at their own size. The
trim handles take the kit's corner.

A shot now grows in from the rectangle it was taken from. The card's overlay
is the whole display, so it can start anywhere on it: an area or window shot
starts at exactly the rectangle captured, at that size and place, and springs
into its corner slot on one spring that never overshoots its size, leaving
the same way. A whole-display shot keeps the slide in from the edge, and
Reduce Motion still only fades.

* screenshots: regenerate the editor and card goldens for the look pass

* docs: the card grows in from the shot's rectangle, and the editor is the kit's

* screenshots: a recording saves itself to the screenshots folder, as a shot does

* screenshots: cards stay until closed, stack in the corner, and take CleanShot's keys

* screenshots: Restore Last Capture in the menu bar brings back the card closed last

* screenshots: a Captures pane lists the last 30 days of shots and recordings

* screenshots: goldens for the card stack and the Captures pane, and its playground paths

* screenshots: the card's Return and the editor's file are macOS-only

* screenshots: pin that cards of any shape share the corner's right edge

* screenshots: keep macos_rune.rs and app_settings.rs under the file cap
2026-11-09 08:18:56 -08:00
Dax ac27c1aeaf keep a newer screen recording check from being overwritten by an older one (#1598) 2026-11-09 11:12:25 -05:00
Dax ceb07a1a5c annotate: use OpenCode in WSL when the lab is on (#1586)
* annotate: send through OpenCode in WSL when the lab is on

* annotate: address review

* annotate: dropped wsl replies read as no answer
2026-11-09 08:08:57 -05:00
Dax 1099e264ca fix: stop re-reading screen recording every 2s while idle (#1592) 2026-11-09 07:53:27 -05:00
Kit Langton cda028af6a Capture routing: a later answer never moves a listed session row (#1433)
The capsule's Send to list was rebuilt from each background answer: the
deterministic judgement listed recent sessions newest first, then Jev's
pick replaced the answer wholesale, landing on top and re-sorting the
recent rows by their latest activity, so a click hit another session.
Rows already listed now keep their place; a row takes its new reason,
and sessions new to the list come last. A rule's own session still leads.
2026-11-05 15:06:37 -08:00
Kit Langton b729aab22e feat(screenshots): a click on the card opens a floating editor with pen, arrow, box, text, crop, Copy, Save and Send to… (t1344) 2026-11-04 23:29:34 -08:00
Kit Langton 081b252f2c feat(annotate): add 15 s replay buffer Lab on macOS 27 (t1289) (#1342)
* feat(annotate): prototype 15 s rolling replay buffer on macOS 27 (t1289)

* fix(capture): gate macOS-only replay imports and helpers on non-macOS (t1289)
2026-11-04 19:05:17 -08:00
Dax afb11de5e3 dev green: split capture_host routing session naming, regenerate labs link goldens (#1339)
* split session naming out of capture_host/routing.rs

* regenerate the mac-labs-link goldens for the live auto-scroll lab (#1334)

* capture: Linux frames are pixels too in the capture size test

* fmt
2026-11-04 18:39:40 -05:00
Kit Langton f294a437a5 fix(capture): typing over the Send to suggestions searches every session by title, folder, or id (t1326) (#1322) 2026-11-04 14:36:54 -08:00
Kit LangtonandKit Langton 3a1de64a8f Capture capsule: name the session, never its ses id (#1327)
A saved rule to a session ID is answered before the session server
answers, so the router had only the id: the pill read
"Sent to ses_e853… · too late" and the bundle's summary did too, while
the routing record had the title.

Every destination now carries a title: the name the router read, else
the capture's own session list, else OpenCode's title for that session,
else "session". The bundle, the delivery and the capsule all read it,
and the capsule's short() refuses a raw ses id from any host.

Co-authored-by: Kit Langton <kit@kitlangton.com>
2026-11-04 12:57:23 -08:00
Kit Langton 632bbe13ce Merge remote-tracking branch 'origin/dev' into annotate-words-undo
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
#
# Conflicts:
#	src/rune_ui/capture_capsule/mod.rs
2026-11-04 12:10:02 -08:00
Kit Langton 5c98c48253 Labs: ⌘⇧4 screenshots on macOS (t1300) (#1296)
* Labs: ⌘⇧4 screenshots on macOS (t1300)

* Fix the thumbnail golden's render (t1300)

* Round the thumbnail's size; list its scene in the playground (t1300)

* Keep rune_ui.rs under the size limit (t1300)

* Thumbnail goldens (t1300)

* Allow macOS-only re-exports elsewhere (t1300)
2026-11-04 11:56:24 -08:00
Kit Langton 11d6d87c03 Capture capsule: the pointer holds the Undo countdown and a rule's send (t1296) 2026-11-04 10:44:29 -08:00
Luke Parker 3a7a712315 Keep a benchmarked Hex's Annotate folders in its own home on Windows; build strobe.json on any commit (#1214) 2026-11-03 16:58:59 -06:00
Kit Langton fb1e06bc54 perf(annotate): show destinations while routing finishes (#1204)
* perf(annotate): show routes before remote preparation finishes

* test(annotate): refresh countdown snapshots and check remote identity
2026-11-03 13:56:25 -08:00
Kit Langton 9af39c0add Speed up Annotate routing lookups and remote checks (#1199) 2026-11-03 12:31:51 -08:00
DaxandHex issue pipeline cfe30da71a Fix #1131: Annotate capture routing to OpenCode (Windows/WSL) (#1132)
Automated fix from the Hex issue pipeline (run 1131-2026-11-03t13-35-50-619z).

Fixes #1131

Co-authored-by: Hex issue pipeline <noreply@anoma.ly>
2026-11-03 08:39:09 -05:00
Dax 8104af6932 Managed feature locks for macOS (#985) (#994)
* Managed feature locks for macOS (#985)

* drop unused import

* test: string status

* Document managed feature locks and loopback-only transforms (#985)
2026-11-02 07:47:47 -05:00
Kit Langton af5a419d97 fix(macos): clear stale permission rows and offer one-click recovery (#715)
* fix(macos): clear stale permission rows and offer one-click recovery

* test(rune_ui): add Linux goldens for stale permission rows

* refactor(rune_ui): keep rune_ui.rs under code-shape ceiling
2026-10-31 20:53:36 -07:00
Kit Langton 2844ab692e Fold desktop shell, onboarding, and OpenCode client modules into desktop/ 2026-10-31 16:12:40 -07:00
Dax 154b4d402e Talk only to a running OpenCode service; quiet mic meter (#598)
* Talk only to a running OpenCode service; never spawn or probe a CLI

* wip

* wip

* Golden for OpenCode not running

* clippy

* fmt

* General's microphone meter wakes the window only while its bars show a level

* Feature map: the microphone meter rests in a quiet room
2026-10-31 12:33:36 -04:00
Kit Langton 1e241ea593 Captures: rule offers count the session picked, not its repository (#560) 2026-10-30 22:02:22 -07:00
Dax df47117bb9 Annotate on Windows: capture host, drawing overlay, and send to OpenCode (#539) 2026-10-30 22:13:11 -04:00
Kit Langton 668e981441 Capture: a permission helper instead of a silent failure, and no fake screen (#519)
* Capture: a permission helper instead of a silent failure, and no fake screen

A capture that starts without Screen Recording, Microphone, or
Accessibility is refused before it records, and the capsule opens a
helper: what's needed and why, Allow (macOS's prompt or System Settings
with the floating guide), Restart Hex when macOS needs one, then Capture.
A real capture never ships a synthetic frame: one written with no frames
goes out with its voice and marks, a 'No screen' note, and no contact
sheet.

* Allow the macOS-only capture needs on Linux
2026-10-30 15:50:16 -07:00
Kit Langton 1c333029cf Captures: ⌥⇧S searches every session from the suggestions; no number keys (t1057) (#506) 2026-10-30 14:05:27 -07:00
Kit Langton 52dc182b93 Captures: Screen Recording follows a grant made while Hex runs (#497)
* Captures: Screen Recording follows a grant made while Hex runs (t1057)

CGPreflightScreenCaptureAccess keeps its first answer for the life of the
process, so after a grant the Annotate pane still asked to Allow and a
failed capture said Screen Recording is off. While the preflight says no,
read the grant from a fresh scrawl-helper and probe one frame: granted and
usable shows Allowed, granted but unusable offers Restart Hex.

* Playground: a path for the Screen Recording restart scene (t1057)
2026-10-30 11:23:38 -07:00
Kit Langton 2ea4d0f3b5 Captures: an always-rule sends to the session picked, not its checkout's newest (t1057) (#495) 2026-10-30 10:07:21 -07:00
Dax 2962074bfa Captures on Linux (portal, PipeWire, VA-API); capture compiled into macOS and Linux builds (#320)
* Captures on Linux: portal, PipeWire and VA-API behind the engine's platform seam; capture compiled into macOS and Linux builds

The capture engine's OS adapter gains capture/linux.rs: the screen-cast
portal (zbus) picks the screen (remembered with its restore token) or a
window, libpipewire and libva are loaded at run time, frames are imported
as DMA-BUFs and scaled and H.264-encoded on the GPU, and ffmpeg muxes and
reads movies back. Software x264 is the fallback.

capture_host, the capsule, the pane, routing and the CLI are shared; the
Linux listener feeds a ListenerTimeline, its portal or X11 grabs bind the
capture shortcut, and the summary goes through Hex's Linux clipboard.
The capture feature flag is gone: macOS and Linux always compile the
experiment, off by default.

* Docs: captures on Linux, the experiment in every macOS and Linux build; token path from Hex

* Capture portal: register Hex's app id so the desktop keeps its screen choice

* Fix macOS test build after the capture seam

* Linux: size X11 shortcut state for the capture shortcut; keep macOS-layout capsule tests on macOS

* Windows: the capture word timestamps field is Linux's
2026-10-28 20:58:27 -04:00
Kit Langton f1a008c566 feat(capture): Shift saves a rule, plain reasons, a rounded-rect capsule (t56) (#241)
* Capture capsule polish: a calm top line, moves at once, quiet hints, frame thumbnail, footer

Rebased onto dev's capsule-esc commits (e2e5b1df, b298ae4b), keeping their behaviour:
Escape never undoes a send, Undo is click-only, the capsule hides when the
Undo window ends, and Elsewhere… is gone. The list shortcut's hints are gone
too (no "⌥⇧V Search").

* Capture capsule: five flows to compare after a capture (capture.capsule_flow)

list (today, default), toast, menu_bar, cursor and notch, live behind the
setting and in the playground, with a flow script for headless clips.

* Capture capsule: key hints in a rect, five guesses, shorter copy

Each hint's keys sit in one small rounded rect (tuning key_box: Filled or
Outlined), and the cursor's and notch's cards end in a "Send 1–N" hint.
The suggestions show up to five guesses, numbered 1–5. The finished
capsule drops "Copied" for the lead alone, the footer reads "Send ⏎",
"Keep esc" and "Always ⇧⏎", and status notes are shorter.

* Capture capsule: Filled keys only, no "guess", Shift saves a rule

Shift+digit or Shift+click sends and saves the site or app rule (the
checkbox row is gone); while Shift is down the footer reads "Always send
<site> to…" and the highlighted row "always". Sent reads "saved rule",
and Undo takes back the rule with the send. Reasons are plain words or
nothing.

* Capture capsule: Shift's footer names the site and the row in badges

* Capture capsule: Shift's badges are rounded rects with a globe, app, or chat icon

* Capture capsule: a rounded rect with the list's corners, cleaner Paste and Inspect icons (t56)
2026-10-27 18:08:40 -07:00
Kit Langton 80f65326d0 Capture sends: review fixes
Cache the machine ID; keep .deliver.json out of bundles copied to the agent
host, and let a copied marker stop holding back retention once its Mac
would have given up; show 'session not found' for a 404 whatever OpenCode
said; test opencode2 discovery with injected paths; bound opencode2's
stdout, stderr, and the body read for OpenCode's message.
2026-10-27 07:57:00 -07:00
Kit Langton 4e5c8d6c74 Capture sends: say why one queued, log it, and retry only this Mac's markers
When OpenCode refuses a send, its message (the JSON body, which opencode2
api prints to stdout) now reaches the error, the capsule, and process.log.
'Unable to read attachment' with no agentHost shows 'OpenCode can't see
this Mac's files' and warns to set capture.routing.agentHost: the server
reads the contact sheet from its own disk. Other reasons show as 'session
not found', 'couldn't reach OpenCode', 'opencode2 not found', or what
OpenCode said, instead of 'couldn't reach SEER'.

The router's deliver: lines log at info, and the capture engine's lines
now use the voice_control target, so the default filter keeps them.

opencode2 is also found where dictation finds it (~/.bun/bin and the rest),
since Hex opened from the Dock has launchd's PATH.

.deliver.json records the Mac that wrote it (hardware UUID); another Mac
leaves it alone, and old markers without one still retry.
2026-10-27 07:57:00 -07:00
Kit Langton 1aca589408 Capture Undo: never commit over new input or leave a revert staged
The commit could delete a subagent result or a turn that arrived after the
revert was staged, and a failed commit left the revert staged while
reporting it reverted, so the next prompt deleted everything after it.

Undo now looks again after staging and commits only if nothing came in.
Anything else, including a busy or failed commit (never retried), clears
the staged revert (DELETE /revert) and then disowns, since a prompt commits
a staged revert. If even the clear fails it says nothing more and reports
`unfinished`, unsaved so it can be tried again. Files go back only when the
turn ran an edit tool, so editor edits made meanwhile survive. Stage
retries stop at the caller's deadline.
2026-10-26 23:11:43 -07:00