Skip to content

Add a VHS demo, and sync positions before jumping - #1

Merged
clobrano merged 2 commits into
mainfrom
claude/trusting-einstein-irj8o2
Nov 26, 2026
Merged

clobrano merged 2 commits into
mainfrom
claude/trusting-einstein-irj8o2

Conversation

@clobrano

Copy link
Copy Markdown
Owner

VHS demo

demo/demo.tape records the main workflow:

  1. annotate a character selection (r.Client.Update(ctx, obj))
  2. annotate a whole line
  3. jump between annotations with [a / ]a
  4. add an import above them, so the boxes move with the code
  5. :Annotate preview of what the agent gets

It runs Neovim with demo/init.lua (plugin from the repo, a temporary annotation store, demo keymaps) on a copy of demo/reconcile.go in a throwaway git repo, so sources come out as pkg/controller/reconcile.go:… and real annotations are untouched.

  • .github/workflows/demo.yml renders the tape on workflow_dispatch and on PRs touching demo/, and uploads demo.gif as an artifact.
  • The README embeds demo/demo.gif and explains how to regenerate it.

⚠️ The GIF is not committed yet and the tape has not been run: vhs and Neovim weren't available where this was written. The workflow run on this PR should produce it; check the recording, then commit demo/demo.gif (the README image is broken until then).

Fix: [a / ]a after unsaved edits

jump() read line numbers from the store, which only learns about moved annotations on write or BufLeave, so after unsaved edits it jumped to the old positions. It now calls render.sync() first, like add() does. New test: "jump follows unsaved edits".

Tests not run here (no Neovim); please run:

nvim --headless -u NONE -c "luafile tests/run.lua"

Generated by Claude Code

demo/demo.tape records annotating a selection and a line, jumping between
annotations, editing above them and previewing the export, using a minimal
config on a throwaway git repo. A workflow renders it and uploads the GIF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UziUydFCq3bTmV3VrX2Keo
jump() read line numbers from the store, which only learns about moved
annotations on write or buffer leave, so after unsaved edits [a and ]a
landed on the old positions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UziUydFCq3bTmV3VrX2Keo
@clobrano
clobrano merged commit c2944de into main Nov 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants