Repository navigation
fix(choice-cards): draw a five-row card instead of fenced source - #1663
Merged
Merged
Conversation
A live reply (2026-11-20) closed with a five-option `futureos-choice` block
and reached the phone as `option:` source in a monospace block, clipped at the
right edge and readable only by panning: the prompt asks for 2–4 rows, and the
parser's `CHOICE_MAX_OPTIONS` had been the same 4, so the whole card was lost to
a row count only the guidance cared about.
The client and the prompt now answer two different questions. The prompt still
asks for 2–4 — that is the test of *whether* a block should be a card. The
client draws up to six: it decides whether a block that already exists can be
drawn at all, and a writer who slipped by a row still wrote a card.
`agent/src/prompt/choice_card.rs` mirrors the same bound, so the "waiting on
you" badge cannot promise a card the client refuses to draw. History is not
rewritten, but historical replies are re-parsed, so the card that exposed this
draws correctly without anything being migrated.
What the tolerance table still degrades now reads. A `futureos-choice` fence
that cannot be drawn folds its lines instead of hiding them behind a sideways
scroll, and stops printing the fence's own language label — `futureos-choice`
is the parser's notation, not something a reader was ever meant to see. That is
the promise §3 already made ("the reader sees the option list; nothing is
lost") and a 390pt phone could not keep.
Prompt budget 51 → 53: the row-count bound changes what the model writes on
every card, the same reason the earlier raises were taken.
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.
What
A
futureos-choiceblock with five or six options now draws as a card on the phone and the desktop instead of arriving asoption:source in a monospace block, clipped at the right edge and readable only by panning. The prompt still asks for 2–4 rows — that is the test of whether a block should be a card — while the client's own ceiling moved to six, because a writer who slipped by a row still wrote a card.agent/src/prompt/choice_card.rsmirrors the same bound, so the "waiting on you" badge cannot promise a card the client refuses to draw. Afutureos-choicefence that still cannot be drawn now folds its lines instead of hiding them behind a sideways scroll, and stops printing the fence's own language label.Commits
Verification
Local run in a throwaway worktree at
origin/dev-huichen31c2b9d, Rust toolchain pinned to 1.99.1,ulimit -n 8192:cargo fmt --all -- --check→ cleancargo clippy -p future-agent --all-targets -- -D warnings→ cleancargo test -p future-agent --lib→ 3114 passed, 5 failed; all five aresandbox::tests/sandbox::windows_plan::teststhat assert on$HOMEand interfere under parallel execution. Re-runningcargo test -p future-agent --lib 'sandbox::' -- --test-threads=1→ 225 passed, 0 failed. This branch touches no file underagent/src/sandbox/(git diff origin/main...origin/dev-huichen -- agent/src/sandbox/is empty), so the parallel failures are not this change.make check-docs→ 425 docs OK; channel matrix 13 rows OKnpx tsc --noEmitclean,npx eslinton the 4 changed files clean,npx vitest runonMarkdownContent.test.tsx+CodeBlock.test.tsx→ 27 passednpm run typecheckclean,npx eslinton the 2 changed files clean,npx jest --runInBand src/components/__tests__/MarkdownText.test.ts→ 49 passed@future-os/markdown:npx vitest run --config ../packages/markdown/vitest.config.tsfromdesktop/→ 34 files, 775 tests passedUser-visible changes
option:source. The prompt still asks for 2–4 rows; blocks with 2–6 rows are drawn, fewer than 2 or more than 6 still fall back to source. Revert 012ab6c.futureos-choicefence the client cannot draw now wraps its lines instead of scrolling horizontally, and thefutureos-choicelanguage label is no longer printed above it. Revert 012ab6c.Notes
The choice prompt budget moves 51 → 53 because the row-count bound changes what the model writes on every card, the same reason earlier raises were taken.