Hypernote interactivity: submit disable, button variants, checklists, response suppression#302
Merged
futurepaul merged 6 commits intomasterfrom Feb 26, 2026
Merged
Hypernote interactivity: submit disable, button variants, checklists, response suppression#302futurepaul merged 6 commits intomasterfrom
futurepaul merged 6 commits intomasterfrom
Conversation
…sts, response suppression - Replace formState with interactionState in HypernoteRenderer; disable all inputs/buttons after submit with "Response sent" confirmation - Add SubmitButton variants (primary/secondary/danger) with post-submit visual feedback (checkmark on selected, fade on unselected) - Add ChecklistItem JSX component with name/checked attributes bound to form state - Add HYPERNOTE_ACTION_RESPONSE_KIND (kind 9468) so chat action responses are stored by MDK but hidden from the chat timeline - Track kind in LocalOutgoing so local outbox also suppresses 9468 messages - Add default_state support: "state" tag on hypernotes seeds interactionState on appear, wired through daemon SendHypernote and CLI --state flag - Add defaultState param threading from Rust HypernoteData through Swift - Update hypernote-bot-guide.md with ChecklistItem docs, button variants, response suppression, default state, and "one form per hypernote" guidance Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e6c957c to
caed476
Compare
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.
Hypernote: Project Overview (This Branch)
Hypernote is the branch’s answer to “generative UI” for Pika: an LLM can emit interactive UI as message content, and clients render/respond without a custom SPA runtime per feature.
The model is intentionally hypermedia-first:
Why this exists
The goal is to let bots/agents ship useful UI on demand (forms, checklists, polls, confirmations) while keeping:
Core protocol
Hypernote v1 is two message kinds:
9467: Hypernote note (MDX + optional metadata tags).9468: Hypernote action response ({"action":"...","form":{...}}) withetag pointing to the target note.Important behavior:
9468is hidden from chat timeline UI.9468in Rust.End-to-end architecture
send_hypernote.9467with optionaltitle/statetags.SubmitButton(or poll option).9468action response.message_receivedwithkind, so action responses can be handled explicitly.This keeps the interaction loop message-native and avoids introducing a parallel imperative UI protocol.
Code ownership boundaries
hypernote-mdx: parsing/AST layer.crates/hypernote-protocol: canonical protocol contract in Rust (kinds, component registry, action registry, catalog helpers, response helpers, poll builder).rust/): message semantics, response processing, unread/chat-list correctness.ios/): rendering and obvious local interaction state only.A central theme of this branch is lowering ambiguous logic out of Swift and into shared Rust definitions.
Current v1 capabilities
submitfamily viaSubmitButton).hypernote_catalog,hypernote-catalog).statetag.pika-hypernotehypernotehnmdBot interaction extensions (Waffle request)
To support richer bot participation in group UX (including bot-to-bot hypernote flows), this branch now includes:
react:{ cmd: "react", nostr_group_id, event_id, emoji }etag to target event.submit_hypernote_action:{ cmd: "submit_hypernote_action", nostr_group_id, event_id, action, form }etag to target hypernote event.message_receivednow includesevent_id(raw Nostr event id hex) in addition to legacymessage_id, so bots can reliably target reactions/action submissions.sendReaction(...)submitHypernoteAction(...)EventId, so agent/tool layers can act on exact target events.This closes a key interoperability gap: bots can acknowledge with lightweight emoji reactions and can participate in hypernote interactions authored by users or other bots.
Simplicity / complexity posture in this branch
This branch intentionally trades breadth for clarity:
9468).What’s mature vs. what’s still early
Mature enough for practical bot UI:
Still early / expected follow-ups:
submit,Canonical spec
docs/hypernote-bot-guide.mdis now the branch’s canonical v1 spec and prompt guidance source for bots.