Skip to content

fix(slack): restore gap image DataContent in thread hydration - #583

Merged
Aaronontheweb merged 1 commit into
devfrom
fix/slack-thread-backfill-images
Apr 10, 2026
Merged

fix(slack): restore gap image DataContent in thread hydration#583
Aaronontheweb merged 1 commit into
devfrom
fix/slack-thread-backfill-images

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Summary

  • The prior "drop gap image bytes" optimization (merged in feat(slack): backfill thread history on mid-thread mention #576) stripped images from hydrated thread history unconditionally. This broke vision on prior-thread context for image-capable models — exactly the feature the spec documents with "Backfilled messages SHALL include inline multimodal content (images as DataContent) so the LLM receives them as vision content."
  • The modality decision belongs to the session actor, not the channel binding actor. `LlmSessionActor` already has a capability gate (`src/Netclaw.Actors/Sessions/LlmSessionActor.cs:1620`) that strips image media refs and notifies the user when the resolved model can't handle vision.
  • This restores the original merge behavior: gap `DataContent` items flow through to the session, the session's gate decides based on `IModelCapabilityResolver`.

Test plan

  • `dotnet build`
  • `dotnet slopwatch analyze` — 0 issues
  • `dotnet test` — all 122 Slack tests pass, including the restored `Backfill_messages_are_merged_into_single_user_turn` assertion that gap `DataContent` reaches the session.

The prior "drop gap image bytes" change unconditionally stripped
images from hydrated thread history, breaking vision on prior-thread
context for image-capable models. The modality check is not the
binding actor's job — LlmSessionActor already has a capability gate
that strips image media refs when the resolved model can't handle
them. Hand the session the DataContent and let its gate decide.
@Aaronontheweb
Aaronontheweb merged commit 06a87dc into dev Apr 10, 2026
3 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/slack-thread-backfill-images branch April 10, 2026 19:47
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