~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/hud

A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts

0
0

A question's button may say its own words

Open
Open chadtmiller.com wants to merge into main from chadtmiller.com/hud:confirm-answer

An Action's or a Link's confirm alert can now give its button its own words (answer), so a long menu row isn't repeated as the button under its question. Grain wants it for Make galleries members-only, answered by Make members-only.

Claude Opus 5.5 · high

What changes

The catalog and the resolver. Action and Link take answer (since 0.32.0): words, or words made of the data, as a label is. It's sent only beside a question (confirm). Words that read nothing, or only blanks, leave it out, and the button keeps its label. Unlike confirm, an unreadable answer never hides the node, since a button with its label still asks. place.hud.ui's linkProps and actionProps gain answer, and the JSON Schemas are regenerated. A kit older than 0.32.0 ignores it and answers with the label, so kit::fit doesn't need to change.

The web. Ask's button reads answer where the Link has one, else its label. An Action uses it only for a trusted question; the untrusted "is this the record?" alert keeps the label.

iOS. LinkAsk.answer(p) reads it. LinkAsk.tap takes it for the dialog's button, inline, in a Bar and from a Menu row (.link gains its answer). ActionSpec.answer feeds the confirm dialog and the type-your-handle alert. The row, its accessibility label and the trust alert keep the label.

Android. ConfirmAlert takes answer, falling back to the label. askedOpen, MenuRow.Link and ActionSpec pass it.

Why

Grain's ⋯ on a group has "Make galleries members-only", a Link that asks first. Its alert repeated those words as the button, which wraps to two lines next to Cancel. A shorter menu label would read as a change to who can join, so the button needs its own words.

How it was checked

  • cargo test -p hud-core --lib: 843 passed, including a_question_is_answered_by_its_own_words (an Action and a Link with answer from the data, blank or missing answer leaving the label, no answer without a question). cargo fmt --check passes.
  • cd web && npm run check: 0 errors, 0 warnings. oxfmt is clean on the touched files.
  • just ios-test passes, including aConfirmsAnswerIsItsButtonsWords.
  • just android-test passes, including anInlineLinksAnswerIsItsAlertsButton, aMenusLinkRowsAnswerIsItsAlertsButton and anActionsAnswerIsItsAlertsButtonAndWithoutOneItsLabel.
  • just cov, just lint, just lex and e2e are left to CI. No just look pictures were taken: the button is Ask's own, with other words in it.

Shortcomings

  • On iOS the test checks the words handed to the dialog, not the SwiftUI dialog itself, as the existing Link test does.
  • The gallery's specimens don't show an answer.
chadtmiller.com added 1 commit
Approved an earlier version

This adds an optional answer to Action and Link. It is the words of the confirm alert's button, and the button falls back to the label when answer is missing or blank.

I found nothing that needs to change:

  • Resolver: answer is read only beside a question. Blank or unreadable words are dropped, and an unreadable answer never hides the node, which is the right asymmetry with confirm. The new test covers an Action and a Link, data-made words, blank and missing bindings, and the case with no question.
  • Web: the Link's Ask uses answer ?? label. The Action uses answer only when the view is trusted and has a confirm, so the untrusted "is this the record?" alert keeps the label.
  • iOS and Android: answer reaches every confirm path. That covers inline links, a Bar, a Menu row, the Action dialog, and the type-your-handle alert on iOS. The row and accessibility labels keep the label.
  • Catalog and docs: the catalog entries, docs/views.md, the lexicon description and the changeset (minor, since 0.32.0) are all updated together.

I did not read the regenerated schemas/json/*.json, which are generated and checked by a test, or the iOS and Android test files. I took their results from the PR body. The pull's checks were not examined.

chadtmiller.com added 1 commit
Approved

Nothing changed in behavior since my approval at 2602f0c. The only change is one docs sentence in docs/views.md, which now splits a clause into two sentences. My earlier approval stands.