Skip to content

#797 Keep skill spans on iOS user messages after live updates - #826

Merged
ivanfenenko merged 1 commit into
mainfrom
fix/797-ios-skill-span-highlight
Oct 25, 2026
Merged

ivanfenenko merged 1 commit into
mainfrom
fix/797-ios-skill-span-highlight

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Note: this PR was squash-merged with only its first commit (the reload fix). The live fix, described below, is in #797 Project v2 prompt skills from the inbox event on iOS #829.
  • On iOS, a v2 prompt with inline skills showed raw /tdd-check text in Session Chat, both live and after a reload, instead of highlighted [/tdd-check] spans. Android was already correct.
  • Live: a v2 prompt reaches the store through session.inbox.enqueued, and EventDomainAdapter projected it without its skills. It now projects the skill ids and mentions into the user info (not the model-facing skill body). MessageInfoDTO decodes them, MessageDomainAdapter.message(info:) maps them, and the store keeps them when the later session.inbox.delivered info omits them.
  • Reload: the store rebuilt the message without promptSkills in three places, so the REST copy's skills were dropped:
    • InMemoryMessageStore: merging live parts onto the REST copy.
    • Message.withMetadata(from:): filling a partial live info from the REST copy (it now falls back to the base copy's skills).
    • SessionRunningContext.stamp: filling in the running agent and model.
  • Android needs no change: it renders the same server data correctly, both live and from history.

Checks

  • New PromptSkillCarryOverTests (7 tests) failed before each fix and pass after it. They cover the part merge, withMetadata, stamp, the enqueue projection, live enqueue followed by delivery, and the end-to-end [/name] collapse.
  • Full iOS unit suite: 2691 tests in 260 suites pass.
  • Scenario harness, v2 dev, iPhone 16 Pro Max, two inline skills: the sent bubble and the reloaded history both show highlighted [/tdd-check] and [/security-check]. (The draft reads "Can" instead of "fix" because of simulator autocorrect.)
Live, after sendReloaded

Issue

Risks / Follow-ups

  • The session cache (SessionCacheCodec) still doesn't save promptSkills. Android's cache doesn't either. A cold open from cache may show raw text until the REST refresh replaces it (not checked).

🤖 Generated with Claude Code

The message store rebuilt a v2 prompt three ways without its skills: merging
live parts, filling metadata from the REST copy, and stamping the running
agent and model. Session Chat then showed raw /name text instead of [/name]
spans, live and after reload. Carry promptSkills through all three.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: no finding that 2+ of 3 passes agreed on.

opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.064

@ivanfenenko
ivanfenenko merged commit f1d56da into main Oct 25, 2026
2 checks passed
@ivanfenenko
ivanfenenko deleted the fix/797-ios-skill-span-highlight branch October 25, 2026 18:32
ivanfenenko added a commit that referenced this pull request Oct 25, 2026
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