Repository navigation
feat(agent): tolerate choice-card spellings models emit; fix(desktop): save dialogs ignore Enter - #1692
Merged
Conversation
A text field in a save dialog is the reader's own workspace: Enter there was wired to commit, so a half-typed name landed as the saved value. Every dialog that carries its own save button now keeps the key inside the field and writes only from the button. - thread / workspace rename, remote conversation rename, machine label, the approval rule editor and the workspace modal: Enter in the field no longer submits (the workspace modal also cancels the browser's implicit form submission). - mobile rename and machine-label dialogs: the keyboard's return key no longer stands in for the save button either. - tests assert the inert key and the button's write, instead of the old Enter-saves contract.
…llings it still gets wrong Three live replies from `future/deepseek-flash` wrote the choice card some other way than its fence — an untagged fence (2026-11-25), then a `<futureos-choice>` tag pair twice (2026-11-24, 2026-11-25), the second one sharing a paragraph with the sentence before it. The reader got the card's source: tags left in the text, `title:`/`option:` run together on one line. Prompt: the fence was only shown, never stated. It now says the block is a fence with the language on the opening line, alone in its own paragraph, and names the three spellings that reach the reader as source instead of a card. The section's line budget goes 53 → 58 for it. Client tolerance, mirrored in the renderer and the agent's badge so one block cannot draw a card on one reader and a code block on the other: - a tag pair that shares its paragraph with the prose before it is split off: the sentence keeps its marks, the pair becomes the card (a fence interrupts a paragraph there, so this is the same attempt); - an opening tag that ends the reply is read as the card whose closer was forgotten — nothing follows it, and the body must be card fields with two option rows; the same shape mid-reply still stays text and is logged as `choice card syntax without a card`; - the fence language folds case, surrounding space and `-`/`_` (`FutureOS-Choice`, `futureos_choice`); `futureos-choice-x` is still some other language. An untagged fence stays a code block on purpose: that is the one shape that can also be a quotation of the syntax, and the design's older-client degradation depends on it staying text.
huichen
enabled auto-merge (squash)
November 25, 2026 09:26
…ounds PR #1692's Windows `tui-cli` lane failed four tests, none of them in code this branch touches (`git log origin/main..dev-huichen -- cli/` is empty). All four failed on an inner wall-clock budget while the same job ran 15m53s against 8m52s for the previous run of it, and the job's own evidence says the runner was ~200x slower at one thing: `launch_ok_when_powershell_exits_zero` has no bound at all and *passed*, after 201.100s, in the same run where its sibling (`launch_reports_a_powershell_failure_without_starting_anything`, 180s budget) timed out. A real cold `powershell.exe` takes 2s on that lane normally. So the cold start, not the launcher and not the assertion, was the slow part. `scripts/ci/rust-checks.mjs` already states the rule these budgets broke: nextest adds no per-test deadline on purpose, "so a loaded runner cannot fail a slow-but-passing test where `cargo test` would not". A bound is still worth keeping for the local `cargo test` runs, so each one stays and says what it is: - `POWERSHELL_TEST_BUDGET` (600s) is one documented guard shared by the three Windows launcher tests across `browser/windows_process.rs` and `commands/browser_tools.rs`; raising 180s -> 600s only because 180s was measured on a real run. The assertions are untouched. - The two `configure` hand-off tests proved "fails against the local fixture, not the network" with a 5s deadline, and 5s is a latency assertion: the same call took 26s on that runner. The proof is now the error itself — it must name the fixture's endpoint (`http://127.0.0.1:1`, i.e. `Connection refused` from the fixture) — which is stricter than "returned an error inside 5s": a flow that reached the real platform either succeeds or names that platform, and both fail. The deadline becomes `LOGIN_HANDOFF_BUDGET` (300s), a hang guard. No assertion was weakened, nothing is skipped, and `-D warnings` is untouched. `cargo nextest run -p future-cli` on macOS: 1713 passed, 0 failed.
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.
The choice-card fence is the one block whose escaping the reader depends on, and live replies have been reaching it in other spellings. This branch makes the agent state the fence outright and teaches both readers (the desktop renderer and the agent's badge) to accept the near-miss spellings that previously landed as raw source, without turning an untagged fence into a card. It also stops save dialogs from committing on Enter, so a half-typed name can no longer be written by a stray keypress.
Commits
Verification
cargo fmt --all -- --check→ passedcargo clippy -p future-agent --all-targets -- -D warnings→ passedcargo test -p future-agent --lib→ 3146 passed, 0 failed, 7 ignorednpx vitest run(desktop, the five touched test files) → 126 passednpx vitest run --config ../packages/markdown/vitest.config.ts(fromdesktop/) → 793 passednpx tsc --noEmit(desktop) → passednpx jest src/screens/__tests__/DesktopLabelDialog.test.ts --runInBand(mobile) → 9 passedUser-visible changes
<futureos-choice>tag pair that shares a paragraph with the preceding prose is now split off and drawn as a card; an opening tag that ends the reply is read as a card whose closer was forgotten; the fence language folds case, surrounding space and-/_. Before: those shapes rendered as source text with the tags left in the reply. An untagged fence stays a code block on purpose. Rollback: revert 79a82bd.