Skip to content

Conversation

@notgiorgi
Copy link
Contributor

@notgiorgi notgiorgi commented Nov 12, 2025

Description:

Added support for displaying referenced artifacts in Slack responses. When an AI agent references artifacts in its response, these are now shown as clickable buttons in the Slack message, allowing users to easily access the referenced data.

The implementation includes:

  • New function getReferencedArtifactsBlocks to generate Slack blocks for referenced artifacts
  • Added handler for artifact view button clicks in Slack
  • Updated the message composition logic to fetch and include referenced artifacts

CleanShot 2025-11-12 at 16.55.03@2x.png

Copy link
Contributor Author

notgiorgi commented Nov 12, 2025

@github-actions
Copy link

github-actions bot commented Nov 12, 2025

Your preview environment pr-18058 has been deployed with errors.

@github-actions
Copy link

@github-actions
Copy link

You can ssh into the preview environment by running: ./scripts/okteto-ssh.sh 18058

Copy link
Contributor Author

notgiorgi commented Nov 13, 2025

Merge activity

  • Nov 13, 8:10 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Nov 13, 8:14 AM UTC: Graphite rebased this pull request as part of a merge.
  • Nov 13, 8:15 AM UTC: @notgiorgi merged this pull request with Graphite.

@notgiorgi notgiorgi changed the base branch from feat_add_view_detail_page_for_verified_artifacts to graphite-base/18058 November 13, 2025 08:10
@notgiorgi notgiorgi changed the base branch from graphite-base/18058 to main November 13, 2025 08:12
@notgiorgi notgiorgi force-pushed the feat_add_referenced_artifacts_display_in_Slack_responses branch from 658b095 to ee992cc Compare November 13, 2025 08:13
@notgiorgi notgiorgi merged commit c4119a8 into main Nov 13, 2025
20 of 23 checks passed
@notgiorgi notgiorgi deleted the feat_add_referenced_artifacts_display_in_Slack_responses branch November 13, 2025 08:15
Comment on lines +44 to +53
return {
type: 'button',
url,
text: {
type: 'plain_text',
text: `📊 ${title}`,
emoji: true,
},
action_id: 'view_artifact',
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Slack buttons cannot have both url and action_id properties. When a url is present, the button becomes a link button that opens the URL directly and never triggers the action_id handler. This means handleViewArtifact() will never be called.

Impact: Analytics tracking (mentioned in TODO) will never work, and any future logic added to handleViewArtifact() will never execute.

Fix: Remove either url or action_id:

// Option 1: Keep as URL button (remove action_id)
return {
    type: 'button',
    url,
    text: {
        type: 'plain_text',
        text: `📊 ${title}`,
        emoji: true,
    },
};

// Option 2: Make it an action button (remove url, handle navigation in the action handler)
return {
    type: 'button',
    text: {
        type: 'plain_text',
        text: `📊 ${title}`,
        emoji: true,
    },
    action_id: 'view_artifact',
    value: JSON.stringify({ url }),
};
Suggested change
return {
type: 'button',
url,
text: {
type: 'plain_text',
text: `📊 ${title}`,
emoji: true,
},
action_id: 'view_artifact',
};
return {
type: 'button',
text: {
type: 'plain_text',
text: `📊 ${title}`,
emoji: true,
},
action_id: 'view_artifact',
value: JSON.stringify({ url }),
};

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

lightdash-bot pushed a commit that referenced this pull request Nov 13, 2025
# [0.2165.0](0.2164.5...0.2165.0) (2025-11-13)

### Bug Fixes

* update tooltip text and rename "Referenced artifacts" to "Referenced answers" ([#18067](#18067)) ([92852b7](92852b7))

### Features

* add a page to view a single verified answer from a link ([#18057](#18057)) ([c1de74a](c1de74a))
* display referenced artifacts in slack response ([#18058](#18058)) ([c4119a8](c4119a8))
@lightdash-bot
Copy link
Collaborator

🎉 This PR is included in version 0.2165.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

agha4to pushed a commit to agha4to/lightdash that referenced this pull request Nov 17, 2025
<!-- Thanks so much for your PR, your contribution is appreciated! ❤️ -->

### Description:

Added support for displaying referenced artifacts in Slack responses. When an AI agent references artifacts in its response, these are now shown as clickable buttons in the Slack message, allowing users to easily access the referenced data.

The implementation includes:

- New function `getReferencedArtifactsBlocks` to generate Slack blocks for referenced artifacts
- Added handler for artifact view button clicks in Slack
- Updated the message composition logic to fetch and include referenced artifacts

![CleanShot 2025-11-12 at [email protected]](https://app.graphite.com/user-attachments/assets/a0d94ad8-171a-4f7a-acb2-e87c54e61d6d.png)
agha4to pushed a commit to agha4to/lightdash that referenced this pull request Nov 17, 2025
# [0.2165.0](lightdash/lightdash@0.2164.5...0.2165.0) (2025-11-13)

### Bug Fixes

* update tooltip text and rename "Referenced artifacts" to "Referenced answers" ([lightdash#18067](lightdash#18067)) ([92852b7](lightdash@92852b7))

### Features

* add a page to view a single verified answer from a link ([lightdash#18057](lightdash#18057)) ([c1de74a](lightdash@c1de74a))
* display referenced artifacts in slack response ([lightdash#18058](lightdash#18058)) ([c4119a8](lightdash@c4119a8))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants