Skip to content

chore: target herdr 0.9.3 - #182

Merged
devswha merged 1 commit into
mainfrom
chore/target-herdr-0.9.3
Sep 29, 2026
Merged

devswha merged 1 commit into
mainfrom
chore/target-herdr-0.9.3

Conversation

@devswha

@devswha devswha commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Summary

First step of adapting to herdr 0.9.1–0.9.3. No runtime behavior changes.

  • CI installs checksum-pinned herdr 0.9.3 (was 0.9.1). SHA-256 18a8dc65…4dba7 computed from the v0.9.3 herdr-linux-x86_64 release asset.
  • scripts/herdr-schema.json and shared/herdr-api.generated.ts regenerated from herdr 0.9.3 (herdr api schema --json, byte-identical). Protocol is still 22. The generated types gain AgentInfo.completion_seq and PaneInfo.restore_error, both optional. Nothing web-ui calls was removed; the dropped pane.graphics.* definitions were never emitted.
  • generate:types --refresh now honors HERDR_WEB_HERDR_BIN, so the schema can be read from a herdr that isn't on PATH.
  • Docs that name the CI herdr version are updated. min_herdr_version, the installer gate and the README badges stay at 0.9.0.

Remote bundle (still herdr 0.9.1) is intentionally left for a later PR, after the events_lost collector fix.

Verification

  • bun run typecheck, bun run generate:types --check, bun run test:unit: 471 pass
  • bun run test:integration against herdr 0.9.3 in an isolated session: 131 pass, 0 fail
  • ESC timing through herdr terminal attach measured on 0.9.0, 0.9.2 and 0.9.3: byte-identical, lone ESC held ~150 ms. TYPED_SETTLE_MS = 300 stays.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: ed623451-52c7-4210-9343-dfcaeb50501f

📥 Commits

Reviewing files that changed from the base of the PR and between 7b32ec5 and 5c64cbf.

⛔ Files ignored due to path filters (1)
  • shared/herdr-api.generated.ts is excluded by !**/*.generated.*, !shared/herdr-api.generated.ts
📒 Files selected for processing (1)
  • .github/workflows/ci.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features
    • Added protocol support for clearing panes, resolving pane links, registering SSH agents, and reporting agent completion sequences and session resume arguments.
    • Pane information now includes restore-error details, and resolved links include their viewport region.
  • Changes
    • Removed the pane graphics set, clear, and info methods.
    • CI integration and browser checks now use herdr 0.9.3; the minimum supported version remains 0.9.0.
    • Protocol type generation can use a specified herdr executable.

Walkthrough

The protocol schema adds and removes API fields and methods. The type-generation script supports selecting a herdr binary. CI and documentation now reference herdr 0.9.3.

Changes

Herdr Protocol Refresh

Layer / File(s) Summary
Pane protocol updates
scripts/herdr-schema.json
The schema adds pane restore-error and link-resolution data, adds pane.clear, and removes graphics definitions and response variants. Pane request variants appear at updated positions.
Agent and SSH-agent protocol updates
scripts/herdr-schema.json
The schema adds agent resume and completion fields, SSH-agent registration parameters and request, and a registration capability flag.
Herdr version and type-generation alignment
scripts/generate-protocol-types.ts, .github/workflows/ci.yml, CHANGELOG.md, CONTRIBUTING.md, docs/development.md, .github/ISSUE_TEMPLATE/bug_report.yml
The generation script uses HERDR_WEB_HERDR_BIN when set and otherwise uses herdr. CI, changelog, development guidance, contribution guidance, and the bug-report example reference herdr 0.9.3.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other · Unblocks: 1 PR

Merge Risk: ⚪ Minimal · up to 5c64c

This change moves CI and generated protocol types to herdr 0.9.3 with no stated runtime behavior change. No merge-blocking risk was found.

Architecture Summary

Architecture risk: 🔵 Low · up to 7b32e

The change affects 4 systems.

Changed systems: scripts, CHANGELOG.md, CONTRIBUTING.md, docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — scripts (service) was modified; 2 changed files map to changed impact.
  • observed — CHANGELOG.md (service) was modified; 1 changed file maps to changed impact.
  • observed — CONTRIBUTING.md (service) was modified; 1 changed file maps to changed impact.
  • observed — docs (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in CHANGELOG.md: Added the tested herdr version, CI suites run against it, and the source of generated API types; herdr 0.9.0 or newer remains sufficient.
  • observed — Modified behavior in CONTRIBUTING.md: The minimum herdr version for integration tests changed from 0.9.1 to 0.9.3; the documented CI version remains 0.9.3.
  • observed — Modified behavior in docs/development.md: The documented herdr version for integration and browser checks changed from checksum-pinned 0.9.1 to 0.9.3; Node 22 and isolated state/session remain unchanged.
  • observed — Modified behavior in scripts/generate-protocol-types.ts: The usage comment now documents that HERDR_WEB_HERDR_BIN selects the herdr binary.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the primary change: targeting herdr 0.9.3.
Description check ✅ Passed The description explains the change and provides detailed validation results. It uses equivalent headings, "Summary" and "Verification", instead of the template headings "Change" and "Validation".
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

- CI installs checksum-pinned herdr 0.9.3 instead of 0.9.1.
- Regenerate the API schema snapshot and wire types from herdr 0.9.3
  (protocol 22 unchanged; adds AgentInfo.completion_seq and
  PaneInfo.restore_error, drops the unused pane.graphics.* types).
- generate:types --refresh honors HERDR_WEB_HERDR_BIN, so a schema can
  be read from a herdr that is not on PATH.
- Update docs that name the CI herdr version.

min_herdr_version stays 0.9.0. Integration suite passes 131/131 on 0.9.3.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@devswha
devswha force-pushed the chore/target-herdr-0.9.3 branch from 7b32ec5 to 5c64cbf Compare September 29, 2026 21:22
@devswha
devswha merged commit 2de96f7 into main Sep 29, 2026
9 checks passed
@devswha
devswha deleted the chore/target-herdr-0.9.3 branch September 29, 2026 21:24
devswha added a commit that referenced this pull request Sep 29, 2026
> Stacked on #182, which adds `restore_error` to the generated types.
Merge #182 first; GitHub then retargets this PR to `main`.

## Summary
herdr 0.9.3 sets `PaneInfo.restore_error` when a restart cannot bring a
pane back, for example when its saved folder was removed or its shell
fails to start. Such a pane has no terminal process. Reproduced on
0.9.3: `pane.read` answers "pane not found" and `herdr terminal attach`
exits with "terminal … not found". Until now the web UI showed a
terminal that ended immediately.

- **Sidebar:** the row shows a **NOT RESTORED** badge (danger tokens) in
place of the status badge, with herdr's reason on hover.
- **Pane view:** selecting the pane shows "herdr could not restore this
pane" and herdr's reason in the terminal area. App passes a null
`paneId`, so nothing attaches.
- **Server:** `terminalInfoFor` refuses such a pane with
`pane_not_restored` and herdr's reason instead of spawning `terminal
attach`. An attach can arrive before the client's snapshot does.
- Korean, Japanese and Chinese strings.

## Verification
- `bun run typecheck`; `bun run test:unit`: 471 pass (including i18n)
- `bun run test:integration` against herdr 0.9.3: 131 pass
- `bun run test:ui` against herdr 0.9.3: all pass
- Browser QA against a real unrestored pane on herdr 0.9.3. Setup:
create a pane in a temp folder, stop herdr, delete the folder, restart.
Checked:
- desktop 1280×800 and phone 390×844: the notice text and the sidebar
badge with its hover reason
  - no pty data or exit for that pane
  - a healthy pane on the same page still attaches
  - no page errors
- A direct WebSocket `attach` for the unrestored pane gets
`{"type":"error","code":"pane_not_restored","message":"Saved directory
is unavailable. Restore the directory and restart this session."}`.

No automated test covers `pane_not_restored` itself: producing a
`restore_error` requires restarting the shared test herdr server
mid-suite.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
devswha added a commit that referenced this pull request Sep 29, 2026
…#183)

## Summary
Since herdr 0.9.2, herdr closes an event subscriber that falls behind
(`events_lost`). A herdr restart closes every subscription too. Before
this PR, only the status stream recovered. The lifecycle and focus
streams reconnected after 5 s without reading back what they missed. A
pane created during that gap had no status subscription until the 60 s
backstop, so its working/blocked events, web push alerts and completion
marks were lost.

- **Lifecycle and focus streams** reopen right away, backing off from
250 ms to 5 s while herdr is unreachable. The backoff resets once a
stream starts. When the lifecycle stream comes back, the collector
reconciles from a snapshot and sends `session-changed`.
- **Status stream** now follows herdr's documented order: subscribe,
wait for `subscription_started`, then snapshot. After the status stream
was lost, that snapshot resyncs push baselines through the new
`push.resync`:
  - Only panes with no newer event are updated.
  - An alert that the new status overtook is called off.
  - Nothing is announced.
- `done` and `idle` both count as at rest, so one never replaces the
other.
- **Recovery triggers on the close, not the error code.** Against real
herdr 0.9.3, a lagging subscriber whose socket buffer was full was
closed without the `events_lost` frame ever arriving.
- `subscribeEvents` drops frames that belong to a subscription its
caller already closed.
- The collector takes `subscribe`/`snapshot` and its timings as an
injectable seam. New unit tests cover resubscribe, resync, an event
racing the snapshot, backoff and reset, the lifecycle restart, and stop
during recovery.

**Cost:** every time the status subscription is opened, the collector
takes one extra `session.snapshot` (herdr's documented order). It
converges and does not loop.

## Not addressed (all pre-existing)
- A `pane_exited` missed during a gap can't be recovered from a
snapshot, so `completions.forget` and `push.onEnded` don't run for it.
- A focus event lost during a focus-stream gap stays lost.
- Remote-PC panes: their push baselines come from relay snapshots
through `push.seed`. The remote bridge only gets this code with the next
remote bundle (herdr 0.9.3 bump, planned).
- `workspace.close` emitted no `pane_closed` in the smoke test. The 5 s
roster poll still covers it.

## Verification
- `bun run typecheck`; `bun run test:unit`: 480 pass. The collector
suite passed 5 runs in a row.
- Mutation checks: disabling the lifecycle restart, the clean-pane
filter, the resync gating, the backoff, or the `callOff` in
`push.resync` each fails at least one test.
- `bun run test:integration` against herdr 0.9.3: 131 pass.
- Real-path checks on herdr 0.9.3:
- A paused raw subscriber under pane churn was closed by herdr, and no
error frame could be read.
- A herdr `server stop` followed by a restart, with a pane created in
between: the collector subscribed to the new pane and resynced once,
about 130 ms after herdr returned. Live split and close events were
heard afterwards.

CI still pins herdr 0.9.1 until #182 lands. That's fine here: the change
works on any herdr version, and these unit tests need no herdr.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
devswha added a commit that referenced this pull request Sep 30, 2026
## Change

Installed apps are on v0.3.33. Prepare v0.3.34: bump the app and plugin
versions together and move the Unreleased notes into the dated release
section. The Fixed list is tidied: the duplicated remote-conversation
entry is removed, a stray blank line dropped, the wrapping evened out,
and the access entry names the two security fixes from #175.

This release includes:
- **Security:** a device that can only watch could read files on a
connected PC through `/api/machines/<id>//fs/file`. Also, alert
subscriptions made before any pairing kept receiving alerts after
pairing (#175).
- Device permissions and durable revocation (#175)
- Pane status and push recovery when herdr drops an event stream (herdr
0.9.2+ `events_lost`, and restarts) (#183)
- NOT RESTORED marking for panes herdr 0.9.3 could not restore (#184)
- Subscription usage accounts told apart, ordered and hidden in Settings
(#169)
- Draft settlement and delayed-alert fixes (#176), drag copy with a
blocked clipboard (#177), remote chat images and full tool output
(#174), keyboard after closing a pane from the sidebar (#173)
- CI on herdr 0.9.3 (#182), Actions updates (#172), and everything else
already in Unreleased since v0.3.33: OmO in the new-session dialog, the
website redesign, and the installer installing the latest release

## Validation

- `bun scripts/release-notes.ts 0.3.34` passes: package.json,
herdr-plugin.toml and a single CHANGELOG heading agree.
- The required Fast checks and Integration and browser checks must pass
before squash merge. Publish through release.yml after merge; it
validates the release commit again before creating the tag.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
devswha added a commit that referenced this pull request Sep 30, 2026
## Summary
This is the last step of the herdr 0.9.3 plan, after #182, #183 and
#184.

- The remote-PC runtime bundles **herdr 0.9.3** (was 0.9.1). The bundled
herdr is only used on PCs that have no herdr of their own; existing
installations are preserved.
- The SHA-256 of all four platform assets is pinned from the
`herdrdev/herdr` v0.9.3 release. The linux-x86_64 value matches the
checksum CI already pins in #182.
- `REMOTE_BUNDLE_VERSION` goes from 7 to 8, so remote bridges get the
server code merged since remote-v7, including the event-stream recovery
from #183.

## Release order (docs/remote-pcs.md)
Raising the number makes connected bridges ask for **Update bridge…**
once. herdr sessions keep running during the update. The order is:
1. merge this PR
2. push the `remote-v8` tag on the merge commit, which lets
`remote-bundles.yml` build, smoke-test and publish the four archives and
`manifest.json`
3. only then cut an app release that carries version 8

## Verification
- `bun run typecheck`; `bun run test:unit`: 511 pass
- `bun run build:remote` (linux-x64, native): herdr 0.9.3 checksum
verified. The bundle reports
`{"version":"8","herdr":"0.9.3","native_smoke_tested":true}` and the PTY
smoke test passes.
- `bun scripts/remote-bundle-smoke.ts`: packaged startup, isolated
socket and authentication pass
- CI builds all four platforms and runs the real SSH job

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant