A simple self-host service providing API keys for tightly scoped alterations to your atproto records blinkers.dev

feat: see and test an account's lenses at /manage #26

Merged byjp.me
targeting main from manage-lenses
Merged opened by and assigned to byjp.me
targeting main from manage-lenses

I couldn't remember which lenses I'd published, so this adds a page that lists them and lets you try them out. /manage/byjp.me/ lists an account's lenses by the collection and rkey they target, and /manage/at://<did>/dev.blinkers.lens/<rkey>/ opens one of them. When you're signed in, your handle in the header links to your own.

For the open lens it shows the target record (fetched straight from the account's PDS, with the parts the lens selects marked) beside the view the lens gives of it. That view is simulated in the browser, so it works with no key and no instance; with a host and a key you can make a real getView or putView to your own instance instead. The key is never stored (you paste it each visit, though password managers can fill it in), but hosts that have answered are remembered for the dropdown.

The simulation runs blinkers' own lens code compiled to WebAssembly, so it can't drift from what an instance returns:

  • the crate gets a default server feature, so lens and expr build for wasm32-unknown-unknown without tokio, axum and friends

  • wasm/ is a small workspace crate around Lens::parse and the new Lens::view_of, which getView now shares (its responses are unchanged)

  • ci/site.sh builds it from the newest v* tag that has wasm/, and the view is labelled with that version

  • _redirects sends /manage/* to the one prerendered page

On phones the header now folds into a menu (a native popover, so the only script closes it after navigation), which also gives phone readers a way to their lenses.

The design context moves from .impeccable.md to PRODUCT.md, where impeccable looks for it, and the design and plan for this are in docs/superpowers/.

⚠️ No release has wasm/ yet, so until the next one ships the site simulates from main and the view just says "simulated here". After the first deploy it's worth a curl -I on /manage/byjp.me/ and on an at:// address too, since wisp's docs don't say how it matches paths with : and // in them.

Commits 0