Skip to content

Ask a question in words only through a thread message, not a widgetless lf-ask - #4366

Merged
max-sixty merged 13 commits into
mainfrom
catch-up
Oct 27, 2026
Merged

max-sixty merged 13 commits into
mainfrom
catch-up

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Leaf had two ways to ask the user a question answered in words: an agent thread message with --obligation, and an lf-ask holding no answering widget, which was itself an obligation answered by the user's next message in its thread or a comment anchored inside it. The maintainer asked that Leaf not encourage the second form and never require an lf-ask to put a question on On me. This removes it, so --obligation is the one way to ask in words. Follow-ups to lf-deck (#4331) ride along.

lf-ask frames, and never asks

  • lf-ask declares a new registry key, x-encloses: true, instead of x-awaits: {reply, encloses}. A frame gives the widgets inside it their heading and arrival, and asks nothing itself. x-awaits now always names value and answered; reply and encloses are gone from its fields.
  • page check and message markup refuse an lf-ask that holds no asking widget (empty-question), and the finding now points to --obligation. A widget counts inside every frame around it, so an outer lf-ask holding only an inner one that asks is not empty; the nearest frame still gives the obligation its prompt and arrival.
  • Python: obligations.replied, holds_obligations and the page loop that settled a bare ask from a comment are deleted; answered_in_words(record) is true only for a message's obligation, and the registry parameters that only fed it (waiting_about, queues) are dropped. The runtime's answeredInWords matches.
  • lf-deck's Reply control served only such cards, so it is removed, along with the executeCommand export only it used.
  • Protocol 30 → 31: vendored registries and the public package API change, so older pages re-vendor.

Shipped instructions

The lf-ask entry and authoring-on-me.md no longer teach the widgetless form; the entry sends a question in words to --obligation. A new eval case, words-question-takes-a-thread, scores it: at the merge base, agents asked a free-text question as a bare lf-ask in 6/6 runs (3 Claude Code, 3 Codex); with the change, they used --obligation in 6/6, and kept the accompanying choice a widget in every run. Two rubric lines in assessment-surfaces-pending-decisions that said a thread registers a question "only through an lf-ask" now accept --obligation.

Other changes

  • Tally wording: tallyWords reads "4 left to answer" (and "· 1 on Claude"), not "4 of 5 to answer", which beside lf-deck's cards read as the fifth card's position. lf-tally shares it.
  • Status explanation: kinds that share words now share a count, so a widget question and a message question read "2 to answer", not "1 to answer, 1 to answer".
  • lf-deck: its controls take focus on a press like every other Leaf control. Build every control by its role, and remove what no task needs at rest #4323 draws a role control's frame only when reached by key, so the mousedown handler that kept focus off them bought nothing.

Tests

Three model tests that protected only the removed behavior are deleted (a page question answered by commenting on it; a restated bare ask asked again; a display-only widget beside one). Tests that used a bare lf-ask as a convenient question now send an obligation: true message, with message: ids, or give the ask an answering widget. Ran: tests/model and tests/process (2132 passed), pnpm run test:runtime (675 passed), pnpm run check, the deck tests, and 33 targeted browser/journey tests covering each changed fixture.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 9 commits October 26, 2026 21:25
The deck kept a mouse press from focusing Back, Reply or forward, so a
pressed control couldn't keep a focus frame the others lacked. Since #4323
a role-built control draws its frame only when reached by key, so the
press handler bought nothing. A pressed control now takes focus as every
other Leaf control does, still without a frame; Tab from it shows one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The lf-ask entry and authoring-on-me.md described an lf-ask holding no
answering widget as a question the user answers in words, a second way to
do what a thread message with --obligation already does. The user asked
that Leaf not encourage that form, and never require an lf-ask to put a
question on On me. The entry now describes lf-ask as the frame around
widgets that ask, and sends a question in words to --obligation. The
assessment case's rubric no longer says a thread registers a question
only through an lf-ask.

words-question-takes-a-thread scores it: at 57a2881 base wrote a bare
lf-ask for a free-text question in 6/6 runs (Claude Code and Codex); the
candidate used --obligation in 6/6.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	dist/kernel/kernel.json

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nested question frames are now rejected even when they contain an answering widget; the inline finding describes the validation mismatch.

Comment thread packages/default/registry.json Resolved
max-sixty and others added 2 commits October 27, 2026 00:02
# Conflicts:
#	dist/kernel/kernel.json
#	dist/kernel/leaf.js
#	dist/kernel/runtime/bundle-data.js
leaf-agent
leaf-agent previously approved these changes Oct 27, 2026
# Conflicts:
#	dist/kernel/kernel.json
#	dist/kernel/runtime/widget-api.js
leaf-agent
leaf-agent previously approved these changes Oct 27, 2026
# Conflicts:
#	dist/kernel/kernel.json
#	dist/kernel/runtime/bundle-data.js
#	dist/kernel/runtime/widget-api.js
@max-sixty
max-sixty merged commit 2d529ff into main Oct 27, 2026
4 checks passed
@max-sixty
max-sixty deleted the catch-up branch October 27, 2026 07:42
leaf-agent added a commit that referenced this pull request Oct 28, 2026
The photo-question seeds in the feature and thread-panel galleries still
used prose-only `lf-ask` markup after #4366 made it a frame for
answering widgets. Both seeds now put the same question in their message
text with `obligation: true`, so the question remains on On me after the
later agent reply without weakening validation. On screen, the question
moves into the message above its photo and uses the message's Waiting on
me state.

The existing seed-admission test now submits messages carrying
obligations as well as markup through `thread reply`, including their
actual text. It failed on current main, then exposed the second
gallery's identical failure after the first seed was corrected; it
passes with both fixes. The focused reply-declaration and
question-settlement tests also pass (3 tests total). Python compilation
and `git diff --check` passed; Ruff was unavailable in this environment.

Closes #4455 — automated triage

Co-authored-by: leaf-agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants