Repository navigation
feat(host,desktop,build): save a launch panic to disk, title chats from plain text - #1322
Merged
Merged
Conversation
`capture-mobile chat` had been failing with "the badge carries no glyph" since #1314 replaced the emoji machine marks with the shared icon component (`PeerIconGlyph`). The assertion looked for `💻` in the badge's text, which is where an emoji would have been — the picture changed, the check kept reading text. The same assertion in `capture-desktop remote-conversation` looked for `💻` too and was still passing only by accident: the desktop badge's emoji had already become an icon, so it was one glyph away from the same failure. Both now check the fact the assertion was ever about: that the mark rendered. The badge must contain an `<svg>` at least 8x8 carrying at least one shape. That still fails when the icon stops drawing — verified by removing it, which turns both captures red ("draws no machine icon") — and no longer cares whether the mark is an emoji, a line icon, or something else later. The two spots are the only glyph lookups in the scenario table; the remaining single-character assertions all match real copy (中 / 你 / 接管 / 本机 / …), so nothing else changed. `scripts/screenshots/scenarios.json` is the only file, two lines replaced. Not in scope, for the record: the shot scripts run in no workflow, which is why this assertion could rot from #1314 until now with nothing noticing. Whether to put them in CI is a cost decision for the product side, not something this change should slip in.
A Windows GUI launch has no console, so a panic prints to a stderr nobody reads and exits 101 — a code Windows Error Reporting does not record, which is why the 2026-10-23 failed restart left no event-log entry and no dump. Append the panic (time, thread, file:line, payload, startup step) to <future home>/app/logs/crash.log, which is never trimmed, so a later launch can say what killed the earlier one. Also report each startup step as it is entered: the stall watchdog only speaks after 20s, so a launch that dies sooner left no step name at all.
…markdown The placeholder title the Desktop mints for a fresh conversation was cut from the composer's raw markdown source, so a first message carrying a picked conversation read as '[关闭应用未清理锁文件](futureos:...' in the sidebar -- brackets and a URL instead of a topic. Add plainTitleText to @future-os/markdown, the TypeScript sibling of uture_rpc::title::plain_title_text which the Agent, the host prompt path and the importer already apply: a conversation reference contributes nothing (its label is the *other* conversation's name), any other link contributes its label, an image its alt text, whitespace collapses to one line, and a message that is nothing but a reference keeps the label it points at. Derive the seed title through it.
huichen
enabled auto-merge (squash)
October 23, 2026 13:47
[profile.release] sets `lto = "thin"`, so every edit re-runs whole-graph ThinLTO even when a single crate changed. Measured on this 20-thread Windows machine, touching one line of `future-cli` and rebuilding `--release` takes ~137 s, of which the linker accounts for ~1.5 s (which is why swapping in LLD gains almost nothing). The same edit with LTO off and the incremental cache reused takes 2.8-3.6 s, after one 236 s cold build. [profile.local] inherits `release`, so it stays optimised, but sets `lto = false`, `incremental = true`, `debug = 0` and `strip = false`. This is a local-iteration profile, not a release profile: nothing selects it implicitly, and `cargo build --release`, `make build` and CI keep building the unchanged `release` profile, so shipped binaries cannot drift from it. Use it with `cargo build --profile local -p future-cli`.
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.
Four commits from
dev-huichen, each already verified on its own task branch. The theme: make two "the process just vanished" incidents from tonight diagnosable, and stop a conversation from being named after its message's markdown source.Crash evidence for a windowless launch
futureos.exeonce disappeared mid-launch with nothing recorded — no WARN/ERROR, no crash dump, no Windows event-log entry. A Rust panic in a GUI build has no console, so its text went to a stderr nobody sees.host/src/crash_log.rsinstalls astd::panic::set_hookthat appends message, location and backtrace to~/.future/app/logs/desktop.panic.logbefore forwarding to the default hook, so the next launch can say what killed the previous one. The hook is installed unconditionally at process preparation rather than at a later startup stage, because the launch that panics may die before that stage runs.Previous log tail and timestamps
host/src/environment.rsmoves the previous run's log todesktop.prev.logbefore opening the current one, andreport()now stamps its output with UTC time on both the log and stderr. Without a timestamp, two launches wrote adjacent lines that read like one launch starting twice.Conversation titles from plain text
A new conversation's placeholder title truncated the first message's raw markdown, so a session reference
[label](futureos://session/<id>)landed in the title as brackets plus URL.@future-os/markdowngainsplainTitleText(), mirroring the Rustfuture_rpc::title::plain_title_text: references contribute nothing, links keep their label, images keep their alt text, whitespace collapses.deriveThreadTitlepasses the message through it before truncating.Local build profile and a screenshot assertion
[profile.local]inheritsreleasewithlto = falseandincremental = true: editing one line offuture-cliand rebuilding--releasespends most of its ~137 s in whole-graph ThinLTO. Nothing selects the profile implicitly —cargo build --release,make buildand CI keep usingrelease. The screenshot harness now asserts the machine mark actually rendered instead of probing for an emoji.Commits
feat(host): record a panicking launch in a crash log (d2b27027b)fix(desktop): name a new conversation from plain text, not reference markdown (9cef8cfcf)build(cargo): add an LTO-freelocalprofile for fast iteration (464b75bda)fix(screenshots): check the machine mark rendered, not for an emoji (0ec5fa9b6)Verification
Local, at the tip of this branch (
d92578d3b, rustc 1.97.0):cargo fmt --all -- --check— cleancargo clippy -p future-host --all-targets -- -D warnings— cleancargo test -p future-host --lib -- crash_log environment startup— 32 passed, 0 failednpx vitest run src/components/layout/hooks/flows.test.tsx(desktop) — 32 passednpx vitest run --config ../packages/markdown/vitest.config.ts(fromdesktop/) — 22 files, 615 tests passedCI at this head: every reported context green (Rust on Linux, Windows, macOS; TypeScript check and test for desktop, mobile and
@future-os/markdown) as of the last poll; the mobile and Windowstui-cli/host-remotejobs were still running.Notes
~/.future/app/logs/:desktop.panic.log(appended per panic) anddesktop.prev.log(the previous run's log, replacing it each launch).[profile.local]is opt-in only; no build path selects it implicitly..github/workflows/**change.