Skip to content

fix: enforce device revocation and recover stale pane selections - #79

Merged
devswha merged 2 commits into
mainfrom
fix/review-access-and-selection
Sep 27, 2026
Merged

devswha merged 2 commits into
mainfrom
fix/review-access-and-selection

Conversation

@devswha

@devswha devswha commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Revoking a paired device previously left its existing terminal socket usable, and an unreadable device registry could reopen an installation to unrecognized clients. This change closes the revoked device's local/remote terminal connections and roster stream, and keeps a damaged registry gated without overwriting it. Existing local, token and trusted Tailscale access remains available for recovery; Settings → Devices reports how to repair the registry.

The UI now offers Sign out for token/device authentication, using bridge health rather than the inverted auth.required flag. Closing a selected pane or restoring an obsolete selection falls back to a live pane. Missing selections are checked against the target PC before being discarded, so a newly created pane is preserved while the combined roster catches up, and disconnected PCs keep their selection.

Validation:

  • bun test: 439 tests passed, including active device revocation, unaffected peer connections, SSE termination, corrupt/unreadable registry handling and late revocation listeners.
  • bun run typecheck: passed.
  • bun run test:ui: passed; includes token/device sign-out, closed and obsolete pane selection recovery, and existing session creation/chat/mobile regressions. Also builds the production client.
  • git diff --check: passed.

Registry corruption requires restoring a valid devices.json or fixing its permissions and restarting. The original file is preserved, and normal use adds no authentication prompts or confirmation steps.

@devswha
devswha merged commit a712478 into main Sep 27, 2026
@devswha
devswha deleted the fix/review-access-and-selection branch September 27, 2026 07:08
@devswha devswha mentioned this pull request Nov 27, 2026
devswha added a commit that referenced this pull request Nov 27, 2026
Release 0.5.12 from `main` on the maintainer's go in the Dori session
2026-11-27 ("ㄱㄱ", to "release 0.5.12 and build Android 1.0.9 and iOS
1.0.4 from the same tag, up to internal testing"). It ships what `main`
holds at 12e9a21 (0d2c3c3, then #4883 on the maintainer's screen OK,
its fragment folded by hand): 79 commits since v0.5.11.

- `package.json` and `herdr-plugin.toml`: 0.5.11 -> 0.5.12.
- `REMOTE_BUNDLE_VERSION` 55 -> 56 (`shared/machines.ts`). After this
merges, `remote-v56` is tagged on the merge commit and **Remote PC
bundles** publishes it before the Release run.
- `CHANGELOG.md`: `bun scripts/changelog-fold.ts 0.5.12` folded 62
fragments (69 entries). `by @login` credits were added to the 22 links
of PRs from outside contributors: @todor-a, @chung-song, @jimbb,
@mdobro, @YuuuXie, @tung-dnt, @knightnemo, @Danipulok, @odfalik,
@iyuzhang, @ricardofelixb, @jiaoningbo, @imurfutur3.
- `release-summaries.json`: 0.5.12 in en, ko, ja and zh: 4 new, 4
improved, 5 fixed. Each English line is at most 70 characters.
- Android 1.0.9 (17) (`app/android/app/build.gradle`,
`app/store/android.md`) and iOS 1.0.4 (13) (`project.pbxproj`,
`app/store/ios.md`): both store builds are made from the v0.5.12 tag for
internal testing only.

## Checklist
1. Account service: production runs 26eabfd. The app's account routes
since v0.5.11 (`/v1/identities`, `/v1/identities/link`,
`/v1/safety-records`, ...) are all served there. Nothing on main reads
the `history` that ovis-sh/account#79 (migration 0040) adds. No deploy;
#79 waits for the maintainer.
2. Relay: since v0.5.11 only #4814 changed
`shared/relay-server-proof.ts`, swapping tweetnacl for @noble/curves.
The math is the same (X25519 shared secret, HMAC-SHA256 over the same
message), and low-order keys are still refused, so a 0.5.12 PC answers
the deployed relay's challenge as before. #4850 changes the PC and shell
side only. No relay deploy; #4814's deploy waits for the maintainer.
3. `MIN_SUPPORTED_CLIENT_VERSION` stays 0.4.20.

## Contract diff v0.5.11..main
Additive only. No HTTP route, WebSocket message `type` or relay frame
was removed or renamed, and `WIRE_VERSION`, `RELAY_PROTOCOL` and
`BRIDGE_PROTOCOL` are unchanged.
- `attach` and `pane-geometry` gain an optional `windows_fit`.
- `PaneSummary` gains an optional `copilot_processing`.
- `PUT /api/preferences` takes an optional `expected_revision` and
answers 409 `revision_conflict` only when it is given. A 0.5.11 server
ignores that key, and ignores the new `markdownStyle` setting, so a
0.5.12 shell on a 0.5.11 PC saves settings as before.
- Read with `git diff v0.5.11 origin/main -- shared/ server/`. No skew
test was run.

## Validation
- `bun run check fast` at 05480b3: every step ok (unit: 29194 pass, 0
fail, 259 skip).
- `bun scripts/release-guards.ts --base origin/main`: "Release 0.5.12:
remote bundle, telemetry Worker and release metadata are in order."
- `bun scripts/release-notes.ts 0.5.12` renders the notes.
- The release-notes, guard and app version tests: 180 pass, 0 fail.
- After merging main 12e9a21 (#4883) and folding its fragment: `bun
run check fast` at 3417dd7, every step ok (unit: 29198 pass, 0 fail,
259 skip).
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