Skip to content

docs: plan functional conversation-card rendering - #1739

Merged
jbeda merged 2 commits into
mainfrom
plan/mecatui-functional-conversation-card-rendering
Sep 21, 2026
Merged

jbeda merged 2 commits into
mainfrom
plan/mecatui-functional-conversation-card-rendering

Conversation

@jbeda

@jbeda jbeda commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Plan / Interface

Introduces the proposed Bounded acceptance contract for functional, deterministic main-conversation card rendering in mecatui.

  • narrows scope to conversation rendering; modal/surface UI is explicitly excluded;
  • defines immutable card inputs, lockstep prepared lines/provenance rows, and a canonical 32-byte cache key;
  • keeps cache ownership, frame provenance, logical anchors, selection, and prefix reuse in the renderer;
  • records the landed status of the preceding card-layout plan.

Validation

  • bash .claude/skills/to-acceptance-plan/scripts/check-acceptance-plan.sh docs/acceptance/mecatui-functional-conversation-card-rendering.md
  • bash .claude/skills/to-acceptance-plan/scripts/check-acceptance-plan-test.sh
  • task docs

@jbeda

jbeda commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Non-binding implementation sketch

This is a durable starting point for implementation, not part of the acceptance contract. The approved contract governs observable behavior and ownership; implementation may rename, reshape, combine, or avoid these types and functions so long as it satisfies that contract.

// Illustrative only: internal package/type/function names are not committed.
type CacheKey [32]byte

type Prepared struct {
    Lines []string
    Rows  []Row
}

func PrepareTool(input ToolInput, layout Layout) Prepared
func ToolCacheKey(input ToolInput, layout Layout) CacheKey

Intended ownership split:

  • card preparation is stateless and consumes immutable input/layout snapshots;
  • Prepared carries final card-local lines plus lockstep structural rows;
  • the root renderer owns block identity, cache lifetime, the block.rev admission guard, frame adaptation, prefix reuse, selection, and logical-anchor restoration;
  • the 32-byte identity is derived only when a changed generation or cache miss needs preparation, rather than being recomputed for settled blocks on every frame;
  • per-family inputs and preparation functions are preferred over a generic mutable BlockInput union; tool cards establish the first seam, while hook, delivery, error, notice, turn-stat, and user-prompt semantics remain family-specific.

Use this comment as the implementation starting point, then defer to the accepted behavioral ACs when details conflict or new evidence appears.

@jbeda
jbeda merged commit 183bd78 into main Sep 21, 2026
34 checks passed
@jbeda
jbeda deleted the plan/mecatui-functional-conversation-card-rendering branch September 21, 2026 21:55
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Sep 22, 2026
2 tasks
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.

1 participant