GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(slack): attach Slack image file links as images by adampeterhiggins · Pull Request #576 · adampeterhiggins/t3code

Conversation

@adampeterhiggins

@adampeterhiggins adampeterhiggins commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Problem

A pasted Slack file link that points to an image (https://<team>.slack.com/files/<user>/<id>/image.png) attached only a description chip ("Slack file: image.png … Contents not downloaded."). There was no preview, and the agent never saw the image.

Fix

  • New slack.getFileImage RPC (packages/contracts, SlackApi.getFileImage). It reads files.info. When the file is a PNG, JPEG, GIF, or WebP within PROVIDER_SEND_TURN_MAX_IMAGE_BYTES, it downloads the bytes with the user's token. Otherwise it returns null.
  • Slack answers a download it will not serve with its sign-in page as HTTP 200. slackDownloadBytes therefore only accepts a response whose content type matches the file's mimetype.
  • The composer link resolver (web) tries this first for file links. An image becomes an ordinary composer image attachment, so it previews like a pasted screenshot and every provider gets it as an image. Any other file falls through to the existing slack.getResource chip.
  • Mobile doesn't convert pasted links into chips, so it has no change. Agent read_context_link still returns the description.
  • Docs: docs/user/slack.md and docs/fork-differences.md.

Testing

  • SlackApi.test.ts: downloads an image's bytes; returns null for Slack's sign-in page; returns null for a non-image without downloading it.
  • useResolveComposerObjectLink.browser.test.tsx: an image file link becomes an image attachment, and a non-image falls back to the slack-resource chip. This change also fixes the file's existing unused-screen lint errors.
  • Checked against the real Slack API with a connected token: files.info reports image/png, and url_private_download returns 200 image/png, 311,523 bytes.
  • vp run check:changed: everything passes except useResolveComposerObjectLink.browser.test.tsx > pull request comment links > asks the host again for a comment newer than the shared read. That test fails the same way on main ('#42 page.tsx L12' vs 'page.tsx L12') and is unrelated.

Screenshots

Before: the file link attaches as a description with "Contents not downloaded."

After: not captured yet. A dev server would need the live Slack token, and refreshing it there would rotate the refresh token out from under the live install.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adampeterhiggins
adampeterhiggins force-pushed the ah/fix-slack-image-paste-error branch from 9673c68 to 42b4eb8 Compare November 13, 2026 15:09
@adampeterhiggins @claude
feat(slack): attach Slack image file links as images
743784e
A pasted Slack file link to an image only attached a description ("Contents
not downloaded"), so there was no preview and the agent never saw the image.

The new slack.getFileImage RPC downloads PNG, JPEG, GIF, and WebP files up to
the provider image limit with the user's token. The composer turns the link
into an ordinary image attachment; other files keep the slack-resource chip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@adampeterhiggins
adampeterhiggins force-pushed the ah/fix-slack-image-paste-error branch from 42b4eb8 to 743784e Compare November 13, 2026 15:20
@adampeterhiggins
adampeterhiggins merged commit 1f27a68 into main Nov 13, 2026
@adampeterhiggins
adampeterhiggins deleted the ah/fix-slack-image-paste-error branch November 13, 2026 15:25
@adampeterhiggins adampeterhiggins mentioned this pull request Nov 13, 2026
chore: merge upstream/main into fork (2026-11-13) #577
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@adampeterhiggins
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.