Repository navigation
Add fleetdeck update, an install script, and pause refresh on focus loss - #2
Merged
Merged
Conversation
- `fleetdeck update` installs the latest GitHub Release over the running binary with self_update. It picks the archive for the build target, checks it against the release's SHA256SUMS, runs the new binary with --version, and renames it into place. `--check` only reports. - install.sh detects OS and CPU, checks SHA256SUMS, and installs to ~/.local/bin or $FLEETDECK_INSTALL_DIR. CI runs ShellCheck on it. - The TUI enables focus reporting. On focus loss the timed refresh stops and the status bar shows "paused"; on focus gain it refreshes at once. - Bump the version to 0.2.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
fleetdeck updateinstalls the latest GitHub Release over the running binary. It uses theself_updatecrate (GitHub backend, ureq + rustls, no token).fleetdeck-<version>-<target>.tar.gzby exact name for the target that the binary was built for.SHA256SUMS(checksum_from_asset) before extraction.--version(verify_binary), then renames it over the old one. If any step fails, the old binary stays.fleetdeck update --checkonly reports whether a newer release exists.install.sh(POSIX sh, forcurl -fsSL …/main/install.sh | sh) detects OS and CPU, reads the latest tag from thereleases/latestredirect, checksSHA256SUMS, and installs to~/.local/binor$FLEETDECK_INSTALL_DIR. It says when that directory is not onPATH.FLEETDECK_VERSIONselects a version. CI now runs ShellCheck on it.EnableFocusChange). OnFocusLostthe timed refresh stops and the status bar showspaused. OnFocusGainedfleetdeck reads every home at once and the timer starts again.rstill works while paused. A terminal that sends no focus events never pauses, so the old behavior stays.fleetdeck update, and the pause behavior.Tests
update.rs: version comparison (vprefix,0.9.0<0.10.0, bad input), archive selection for the four release targets (and no match for musl), andSHA256SUMSparsing in the exactsha256sumformat ofrelease.yml(right digest, tampered digest differs, missing entry is an error).app.rs: focus loss pauses the timer,rstill refreshes, focus gain refreshes once and resumes the timer.cli.rs:update,update --check, bad arguments.cargo fmt --check,cargo clippy -D warnings,cargo test --all --lockedand ShellCheck pass locally.Verified on this Mac (aarch64)
0.0.1:update --checkreported 0.1.0, thenupdatedownloaded v0.1.0, passed theSHA256SUMScheck, replaced itself, and--versionprintedfleetdeck 0.1.0.install.shwithFLEETDECK_INSTALL_DIRin a scratch directory installed 0.1.0 and printed the PATH hint. A copy that corrupts the archive after download stopped withchecksum mismatchand installed nothing. A version that does not exist stopped on the 404.~/.local/bin/fleetdeck(0.1.0) cannot runfleetdeck update, because 0.1.0 has noupdatecommand. Update it once withinstall.sh(or replace it manually).fleetdeck updatethen works for later releases.Focus events: herdr, Kaku, Ghostty
All three terminals implement focus reporting (DECSET 1004). I checked their binaries; I did not run a live focus test, because a live test moves the focus of windows on the captain's desktop.
ESC[?1004hto the outer terminal, handlesOuterFocusLost/OuterFocusGained, and keeps a per-panefocus_reportinginput state. So herdr forwards focus events to a pane that enables them.FocusTrackingmode and afocus_changed: focus-tracking responsepath.focus_eventmode.To check live: run
fleetdeck, click another window, and look forpausedin the status bar. Click back:pausedgoes away and the status bar showsreading….