Skip to content

Show a skill-and-image prompt as one message - #795

Merged
ivanfenenko merged 1 commit into
mainfrom
fix/skill-image-duplicate-prompt
Oct 23, 2026
Merged

ivanfenenko merged 1 commit into
mainfrom
fix/skill-image-duplicate-prompt

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • A skill slash send with an image was shown twice: once as the arguments plus the image, and again as [/skill] plus the same image.
  • The server stores that turn as one user message. The skill rides beside the arguments; the client was dropping skills, so the optimistic [/skill] row never matched the image-bearing echo and stayed in the timeline.
  • Both apps now keep the skill id and name, restore /name on that same row, and collapse it to [/name] so the echo replaces the optimistic copy. The skill body stays off the transcript.

Checks

  • Android: MessageDomainAdapterTest.projectV2_userSkillAndFile_keepsArgumentsAndSkillRefWithoutSkillBody and TimelineProjectorTest.project_skillPromptWithImage_collapsesOntoOneRowAndDropsOptimisticCopy passed.
  • iOS: MessageDomainAdapterTests.projectV2UserSkillAndFile_keepsArgumentsAndSkillRefWithoutSkillBody and SessionChatTimelineProjectorTests.skillPromptWithImage_collapsesOntoOneRowAndDropsOptimisticCopy passed.
  • No issue was filed for this bug.

Evidence

Unit tests cover the projection and the optimistic reconciliation. No live-app screenshots: the change is how an already-sent v2 user message is displayed, and a scenario harness run was not captured.

Issue

  • None.

Risks / Follow-ups

  • Reopen a session that already shows the duplicate so the transcript reloads. The leftover optimistic row is not rewritten in place.
  • A skill whose slash name is not in the loaded command catalog still shows as /name until the catalog arrives, then collapses.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need.

A v2 skill send stores the skill beside the arguments. The client dropped that field, so the optimistic [/skill] row never matched the image-bearing echo and both stayed.
@ivanfenenko
ivanfenenko marked this pull request as ready for review October 23, 2026 10:59
@ivanfenenko
ivanfenenko merged commit aad3686 into main Oct 23, 2026
4 checks passed
@ivanfenenko
ivanfenenko deleted the fix/skill-image-duplicate-prompt branch October 23, 2026 11:26
ivanfenenko added a commit that referenced this pull request Oct 23, 2026
Unify the skill read-back on main's PromptSkill and V2UserSkillDTO
(#795): PromptSkill carries the mention offsets, and the timeline
derives the `/name` spans from it for `[/name]` collapse.

Co-Authored-By: Claude Fable 5.1 <[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.

1 participant