v0.2.3 — update notifier + Modal/TUI overhaul + Windows update#3
Merged
Conversation
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.
Five additions, all in one release; backward-compatible — no CLI flag changes, no
TxBundleshape changes,--dry-run -o json --address …flows produce identical bytes to v0.2.2.Part 1 — Passive update notifier
src/version_check.rs. Runs at the top of every invocation exceptupdate/dashboardand whenNEST_NO_UPDATE_CHECK=1.~/.cache/nest-cli/version-check.json. If cachedlatest_version > CARGO_PKG_VERSION(semver) → one-line stderr notice (yellow ▲ on TTY, plain!otherwise).nestagents.io/downloads/version.json(3 s timeout) and rewrites the file. On failure (network/HTTP/parse) we still bumpchecked_atso we don't hammer a broken endpoint.nest updatenow writes the just-installed version into the cache so the very next invocation doesn't show a stale notice.pub(crate) fn cached_latest() -> Option<Version>for the planned v0.2.4 TUI banner.--version/--help) — single notification path, single cache file.Part 2 — Modal picker primitive
src/tui/widgets/modal.rs: genericModal<T>with centered Clear/Block/List,/filter mode, ↑↓/Enter/Esc semantics. ReturnsModalAction::{None, Selected(T), Cancelled}.Appgainedpub modal: Option<(ModalKind, Modal<ModalItem>)>. Keys are trapped while a modal is open.ModalKindvariants:VaultPicker,ChainPicker,AssetPicker,WithdrawMode,WithdrawVaultPicker,HistoryVaultPicker.ModalItemboxes large variants (Vault/Asset) to keep the enum small.Part 3 — Deposit & Withdraw form overhaul
DepositForm/WithdrawFormrewritten withOption<VaultDetailed>/Option<u64>(chainId) /Option<LiquidAsset>instead of typed strings;tui_input::Inputfor the amount/shares field (paste, cursor, MAX via Ctrl+M).tokio::sync::mpsc::UnboundedChannel: wallet ERC20 balance + native balance via on-chain multicall; vault share balance via Plume RPC; instant-redeem liquidity and claimable from the actions API. Throbber while loading.EvmActionsClient::mint_build_txunder the hood (debounced 300 ms after the last keystroke) — shows the API-computedshareAmount/shareDecimals.Request/Instant/Claim); Instant/Claim are omitted from the picker when their gating fetches resolve to zero. Withdraw vault picker filtered to vaults the user has positions in (app.positions); shows "No Nest positions — deposit first" if empty.ValidatedField+validate_amount(input, max, decimals)(Required / NotNumeric / ExceedsBalance / Other). Errors render in red below the field.tui-input = "0.15",throbber-widgets-tui = "0.11".Part 4 — History page redesign (Chart + axes)
Sparkline→ratatui::widgets::Chart+Axisper metric (APY %, TVLMMM DD(chrono); Y axis = min/mid/max ticks.vopens a vault picker (HistoryVaultPicker),[shifts the date window backward by half the currenthistory_days,]shifts forward.Part 5 — Windows
nest updateself-replace (rename trick)install_archiveis now#[cfg]-gated:.tar.gz→ stage alongside dest →rename(atomic)..zip(viazipcrate, deflate only) → rename currentnest.exetonest.exe.old(you can't overwrite a running.exebut you can rename it) → write new bytes asnest.exe.version_check::cleanup_old_exe()sweeps any stalenest.exe.old. No-op on Unix.Verification
cargo test— 61 passed (up from 32 before v0.2.3; new unit tests for the notifier cache/TTL/semver, Modal navigation/filter/commit, deposit/withdraw form validation, history offset).cargo clippy --all-targets -- -D warningsclean.cargo fmt -- --checkclean.Out of scope (per spec)
install.ps1will surface a clear "not yet supported" error; build target deferred.cached_latest()getter is in place so v0.2.4 can read state without re-implementing parsing.version.jsontonest-agents