Repository navigation
feat(desktop,remote,make): composer history, a told control winner, sh-safe installs - #1329
Merged
Merged
Conversation
Four gaps against Codex and OpenCode, all of them controls a pointer could reach and a keyboard could not: - Up/Down in the composer put this conversation's already-sent messages back in the box (`composerHistory`, one sessionStorage entry per conversation). The key belongs to the editor, like Enter: on an empty box Up has no caret to move, and the walk ends at the first real edit. - mod+alt+c copies the last reply's prose. The reply's own hover button and this key now share `replyCopyText`, so the two can never copy different things -- including the reading setting that folds the work away. - mod+alt+g jumps to the live end of the transcript, the corner's button from the keys. - mod+shift+o opens the composer's file picker. The approval card gains the wider answer on the pair it already had: mod+shift+Enter approves and stops asking here -- saving the capability rule outright where the request offers one, opening the path editor where it does not. The fixed-key list in Settings says so.
install-cli, install-desktop and install-desktop-headless wrote their Windows
branch in cmd syntax: `@if not exist ".." mkdir ".."` plus unquoted
`target\release\future.exe`. make hands every recipe to SHELL, and SHELL is
sh.exe whenever Git for Windows is on PATH, so on such a machine the documented
install commands died with `/usr/bin/bash: syntax error` before copying
anything. install-local already copies through node for exactly this reason; the
three older targets now do the same through one shared `copy_win_binaries`
macro.
Scope is the copy only: same PREFIX, same filenames, same targets, same
$(SUDO) usage. The POSIX branches are byte-identical - `git diff` touches only
lines inside `ifeq ($(OS),windows)`. The macro also creates PREFIX itself, which
the old mkdir did not: it hard-coded `$(USERPROFILE)\.future\bin` while the copy
went to `$(PREFIX)`, so any overridden PREFIX failed on the missing directory.
The default is unchanged ($(PREFIX) is $(USERPROFILE)/.future/bin on Windows).
Verified on Windows with temporary PREFIXes, never the live one:
make install-cli PREFIX=D:\tmp\r1 427 s cold, future.exe 70 MB,
`future --version` ok
make install-desktop PREFIX=D:\tmp\r2 build 13m48s, installed
future.exe 70 MB + futureos.exe 63.3 MB,
`future --version` and `futureos --help` ok
make -o <build> install-{cli,desktop,desktop-headless,local} PREFIX=D:\tmp\pN
each recipe alone installs the expected
files (this is the shell-agnostic check;
`make -n` is useless here because this
machine's GNU make 3.81 evaluates
$(shell) empty under -n, which flips the
platform branch)
`make check-docs` passes. `make desktop-sidecars` has the same cmd syntax and is
left alone: it is not an install target and is only reachable through the
release packaging path.
… loses Pressing "take over" on a device that was in standby moved the machine on the host immediately, but the device that asked was told nothing: only the previous controller was sent `control: standby`. The claimant had to read control back from its next presence heartbeat, which repeats it every three seconds — so for up to that long the page still drew the machine as somebody else's, and the takeover it had just made read as granted, withdrawn and granted again. Both paths that hand a connected device the machine now announce it on the winner's own channel as well, exactly as the desktop-side `takeover` command already did: the client's `takeover` command and the first pairing confirmation (whose answer is built before its claim, so a pairing that took a machine nobody held was answered `standby` too). The announcement is skipped when the device was already driving, so a controller pressing take over twice still sends no handoff it did not make. Tests drive both commands over the fake broker and assert the packet the claimant receives; both fail without the change.
huichen
enabled auto-merge (squash)
October 23, 2026 15:57
…the transcript tail A send whose prompt never reached the agent (network/IPC failure) is persisted nowhere, so its optimistic bubble stays local-only for good. The history reconcile appended every local-only row after the freshly loaded tail, so an exchange from 40 minutes ago kept reappearing below the newest reply and the transcript read newest-first. Merge local-only rows into the loaded history by createdAt (stable, and an undated row still lands last) instead of concatenating them at the end.
…lack one The composer-history suite failed on CI (TypeScript test / @futureos/desktop) with `ReferenceError: sessionStorage is not defined` while passing locally. `desktop/vite.config.ts` sets no `test.environment`, so a file without a `// @vitest-environment` directive runs in Vitest's `node` environment, and Node only gained an experimental `sessionStorage` in 26: CI pins Node 24, which has neither Web Storage global. A portability defect, not a flake. Extend the existing Web Storage shim in `src/test/i18nTestSetup.ts` — it already provided `localStorage`, because jsdom does not reliably expose Web Storage — so whichever global the runtime is missing gets an in-memory `Storage`. The shim only fills in an absent global, so jsdom keeps its real storage, and `composerHistory` now runs the same code path on every Node version instead of quietly returning an empty history through its defensive catch. Chosen over adding `// @vitest-environment jsdom` to the test file: the module needs no DOM, and one shim for both storages removes the asymmetry that turned into this bug, for any future storage-backed test as well. Verified on Node 22.22.3, where `sessionStorage` and `localStorage` are both undefined (the CI situation): the suite reproduces the same ReferenceError before the change and passes 9/9 after; `src/features/agent/` 86 files / 1276 tests green under Node 22 and Node 26.3.0; the full desktop suite 378 files / 5254 tests green under both; `npm run lint` (eslint + tsc) clean.
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 commits merged into
dev-huichenfrom separate worktrees, each verified on itsown; this PR carries them to
main.feat(desktop): composer history, reply copy, jump to latest, attach keyThe composer now keeps a per-thread edit history (Up/Down through what you sent),
a reply can be copied as Markdown, a jump-to-latest affordance appears when the
transcript is scrolled away, and the attach action carries a keyboard shortcut
that the shortcuts catalog and cheat sheet agree on.
fix(make): run the Windows install targets under sh.exe againinstall-cli/install-desktophad drifted into cmd syntax, which make cannotrun when Git for Windows puts
sh.exeon PATH; the recipes are portable againand
install-localkeeps its node-based copy.fix(remote): tell the device that wins control, not only the one that losesA control handover notified the losing peer and stayed silent towards the winner,
so a device that won could keep showing the old state until the next poll. The
event now goes to both sides.
fix(desktop): a local-only exchange keeps its own timeA send whose prompt never reached the agent (network or IPC failure) is persisted
nowhere, so its optimistic bubble stays local-only for good. The history
reconcile appended every local-only row after the freshly loaded tail, which put
an exchange from forty minutes ago below the newest reply. Local-only rows now
merge into the loaded history by
createdAt, so the transcript reads in order.test(desktop): the composer-history suite gets asessionStorageeverywhereThat suite touches the global
sessionStorage, which exists on Node 26 (thismachine) but not on the Node 24 that CI pins, so all nine tests failed with
ReferenceError: sessionStorage is not defined. The shared test setup alreadyshimmed
localStorage; it now shims both storages, still only when the global ismissing. No assertion,
skiporonlychanged.Commits
feat(desktop): composer history, reply copy, jump to latest, attach keyfix(make): run the Windows install targets under sh.exe againfix(remote): tell the device that wins control, not only the one that losesfix(desktop): place a local-only exchange at its own time instead of the transcript tailtest(desktop): give the suite a sessionStorage on Node versions that lack oneVerification
cargo clippy -p future-host -p future-remote-server --all-targets -- -D warnings: cleancargo test -p future-host --lib remote: 576 passed, 0 failed (8 ignored)cargo test -p future-remote-server --lib: 172 passed, 0 failed (5 ignored)npx tsc --noEmit: cleannpm run lint(eslint + tsc): 0 errors (one pre-existing jsdoc warning in an untouched file)(Node 22 lacks both storage globals, i.e. the same starting point as CI's Node 24)
npx vitest run src/features/agent/composerHistory.test.tson Node 22: 9 failedbefore the setup change, 9 passed after it
git diff --stat origin/main...dev-huichen: 27 files, 1084 insertions, 62 deletions