Repository navigation
feat(remote-peer): rename a machine from its row, and grey out its settings - #1325
Merged
Merged
Conversation
[profile.local] (added in 464b75b) keeps release optimisation but drops ThinLTO and reuses the incremental cache. It had no make wrapper, so using it meant remembering the exact cargo invocation and package name. Add two targets that are pure additions; no existing target changes: build-cli-local: cargo build --profile local -p future-cli build-desktop-local: cargo build --profile local -p futureos They exist for local verification only and deliberately stay out of `install*` and `package-desktop`: what ships must keep coming from the unchanged `release` profile. They also do not wrap the frontend build or the Tauri bundling `build-desktop` does — they produce the Rust binaries under target/local/ only. Measured in a fresh worktree (cold target directory, sccache warm): build-cli-local 244 s cold, 4.5 s after a one-line edit; build-desktop-local 4 m 42 s cold, 20.6 s after a one-line edit. `cargo build --release` on the same one-line edit takes ~137 s for the CLI, almost all of it ThinLTO.
The closed magnifier was 28px and the field that replaced it 32px, so clicking it grew the row 4px: the list below jumped and the compact device picker beside it re-centred 2px down. The field now takes the glyph's height, which is also the switch band's and the picker's.
…show The crash-log unit tests render and append by hand, so a hook that is never installed — or installed before the home can be resolved — still looked covered. The new case runs this same test binary as a child with its own `FUTURE_HOME`, panics in it, and asserts the file exists with `file:line`, the payload, the startup step and exit code 101 — the code Windows reports as no crash at all, and the reason the file has to be there. Also fixes `the_crash_log_is_a_sibling_of_the_host_log`, which read the process-global home twice: a sibling fixture publishing its own `HOME` between the reads made it fail in the full suite while passing alone. It now holds `HomeGuard`'s lock, the same way the other home-comparing fixtures do.
A launch that panics leaves `<root>/app/logs/crash.log`; the troubleshooting section named only `desktop.log` and `desktop.prev.log`, so the file a reader needs after "it never came up" was undocumented.
…ation
`make install` already builds `future` and `futureos` together — through
scripts/build/build-desktop.mjs, so they share one dependency graph and one
feature unification — but it runs the release profile, and release carries
`lto = "thin"`, which makes every edit recompile the graph under LTO.
`build-local` gives the same selection on the LTO-free `local` profile:
cargo build --profile local -p future-cli -p futureos --bin future --bin futureos
One invocation matters for the same reason it matters in build-desktop.mjs:
selecting both packages at once keeps shared crates compiled once and keeps
feature unification aligned with the shipping build, instead of two runs that
disagree and recompile each other's dependencies.
It writes target/local/{future,futureos} only. It does not install into PREFIX,
stage the Desktop sidecar, build the frontend or bundle — `make install*` and
`make package-desktop` keep owning those, unchanged.
Measured in a fresh worktree: 327 s cold for both binaries; afterwards a
one-line CLI edit rebuilds both in 3.7-3.8 s and a one-line Desktop edit in
3.4 s.
No platform-specific syntax: the target is the same three lines on Windows,
macOS and Linux, and `profile.local` lives in the root Cargo.toml.
…ttings The name and the icon are this machine's own record of a paired computer — `remote_peer_set_label` writes the local credential book and never reaches the desktop — so editing them belonged on the row that shows them, not on a page that is otherwise entirely "read the host, write the host". There they read as one more remote setting, and were unusable exactly when someone renames a machine: while it is offline. Edits now open from a pencil beside the name and save one patch with only what changed, then re-read the list so the row shows it. The dialog is the only place these two values are edited; the settings page's copy is gone, so two surfaces can no longer disagree about one name. With nothing local left on it, that page needs a live connection to be worth opening at all, so the row's Settings button is also disabled when the machine is not connected — with the reason on the wrapping span, the same way the takeover hint works, because a disabled button receives no pointer events of its own.
# Conflicts: # Makefile
…keys The shortcuts page listed seven categories in taxonomy order, three of them one or two rows long, with the Vibe panel's thirty-odd keys in the middle of the scroll. Sections now follow frequency instead: conversation and navigation first, the small groups sharing a heading (panels + terminal; palette + Settings), and the panel last, closed until asked for. A section heading folds its rows and reports how many keys are behind it, and how many of them have been changed — a folded section must not be able to hide the customisation this page exists to report. A search opens every section before it filters, so a match is never folded away and read as 'no matches'. The cheat sheet walks the same sections, so the sheet and the page that edits it list the keyboard in one order.
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.
Renaming a machine and picking its icon were the only two things on the remote
machine's settings page that never reach that machine:
remote_peer_set_labelwrites the local credential book. So they now live on the machine's own row, and
the row is where you would look when the machine is switched off.
What changed
Inline editing (
RemotePeersView.tsx)PeerRowgains a pencil button (aria-label= new keyeditLabel) beside thename and badge, opening a small dialog with a name field and the existing
PeerIconPickergrid. Saving sends one patch carrying only the fields thatactually changed, goes through
setRemotePeerLabel, then re-reads the list sothe row shows the new value. The label control keeps working while the machine
is offline — the one control on the row that does.
RemotePeerSettings.tsxloses the "this computer only" section, along withonUpdateLabeland the state behind it. Two surfaces for one value meant one ofthem could show the old name after the other had changed it, and a local field
among the remote rows read as one more remote setting — one that greyed out with
the rest whenever the host was not connected.
Settings button
Disabled condition becomes
busy || held || !peer.connected(revokedimpliesnot connected). The hint reuses
settingsOfflineHintfor the new offline caseand sits on the wrapping
<span title>, astakeOverHintalready does, becausea disabled button receives no pointer events.
i18n
zh/en/remotePeer.jsonaddeditLabel("修改名称与图标" / "Edit name and icon");drop
localSectionand the now-deadiconSectionHint. The dialog reusesnameHint,nameLabel,namePlaceholder,icons.label,save,saving,cancel. Checked the other references to the removed section: only these twolocale files and three tests;
docs/has none; mobile uses its owndesktops.nameHint(the phone's local naming, a different thing) and is untouched.Verification
tsc --noEmit: passeseslintoversrc/**,shot/**,vite.shot.config.ts: 0 errors; onepre-existing warning in
recentOrder.ts, unrelated to this changevitest run(desktop, full): 375 files / 5220 tests passdisables Settings on a machine that is not connected(greyed +hint text + click opens nothing),
renames a machine from its own row while it is offline(offline rename + icon -> one {icon, name}patch, list re-read, dialog closed),saves a label only once something has changed,reports a label the local book refused`; the "only machine-level actions onthe row" button list was updated.