Skip to content

Compose conversation cards by payload - #57

Merged
VolkerChristian merged 2 commits into
masterfrom
polish/pr7-conversation-card-composition
Aug 27, 2026
Merged

Compose conversation cards by payload#57
VolkerChristian merged 2 commits into
masterfrom
polish/pr7-conversation-card-composition

Conversation

@VolkerChristian

Copy link
Copy Markdown
Member

Summary\n\n- compose conversation cards directly from their typed payload variants instead of maintaining parallel card-kind construction, update, and comparison switches\n- colocate each payload's construction and update logic while retaining the existing shared ConversationCard ownership and folding behavior\n- reconcile user-message image thumbnails by path so text-only updates retain unchanged thumbnails\n- preserve generated-image reload behavior because an image may become available later at the same path\n\n## Measurements\n\nRelease build, median of five representative runs:\n\n| Scenario | Before | After |\n| --- | ---: | ---: |\n| Mixed card construction | 302.625 us | 303.405 us |\n| Agent-message update | 12.6386 us | 12.6158 us |\n| 80-card no-op reconciliation | 2.39619 us | 2.39586 us |\n| One changed card among 80 | 2310.98 us | 2308.48 us |\n| Text update with unchanged image | 7613.13 us | 11.5443 us |\n\nThe unchanged-thumbnail path is approximately 660x faster. The remaining differences are measurement noise.\n\n## Simplification\n\n- removes three parallel decision trees in favor of payload-directed composition\n- production code is net 12 lines smaller\n- adds no controllers, repositories, caches, event systems, or duplicated application state\n- keeps card identity, folding, command output, generated-image, and LocalPrompt-to-UserMessage behavior intact\n\n## Tests\n\n- focused conversation-card tests passed after each commit\n- complete suite: 7/7 passed, 0 failures\n\nFocused coverage includes unchanged image retention, path replacement, deletion, recreation, and unavailable-image placeholders.\n\n## Scope\n\nThis PR intentionally excludes:\n\n- PR8: information/approval orange-card behavior and placement\n- PR9: background-activity spinner/notification\n- PR10: intermittent first-response card overlap/layout settlement\n- protocol changes\n- child-thread ownership or hierarchy changes\n- unrelated styling and features\n

@VolkerChristian
VolkerChristian merged commit cb1241a into master Aug 27, 2026
1 check passed
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