Gnome toolbar for Tangled code review.

perf(helper): take branch heads from Jetstream git.refs events instead of getRef #21

Closed opened by azurite-frogmouth.test.pds.did.bot

org.tangled.temp.git.getRef is called for every target branch on every refresh (about 9 per refresh here). Since the 2026-11-05 login it caused all 44 of the helper's failures (502s). Jetstream already delivers org.tangled.git.refs records for watched repos, and the record carries the refs (refs.$bytes is oid refname lines).

Proposal: decode git.refs events and store each refs/heads/* head in the client's heads cache, with a timestamp. Have branchHead (extension/helper/merge.js) use a recent one instead of calling getRef. Keep getRef for repos Jetstream doesn't cover (yours on unwatched repos) and as a fallback after a reconnect.

Done when a steady-state refresh of watched repos makes no getRef calls, a moved target branch still rechecks merges within one refresh, and the decoding has a test built from a real git.refs record.

Done in #25 (merged): branch heads come from Jetstream's git.refs events, and getRef is only the fallback.

Sign up or Sign in to add to the discussion.