Skip to content

Add clickable board links to Slack notifications#827

Closed
devin-ai-integration[bot] wants to merge 6 commits intomainfrom
devin/1759347049-link-slack-board-names
Closed

Add clickable board links to Slack notifications#827
devin-ai-integration[bot] wants to merge 6 commits intomainfrom
devin/1759347049-link-slack-board-names

Conversation

@devin-ai-integration
Copy link
Contributor

Add clickable board links to Slack notifications

Summary

Updates Slack notification messages to make board names clickable links instead of plain text. Previously messages showed "in {boardName}" but now use Slack's link format <URL|board name> to link directly to the board.

Changes:

  • Updated 4 Slack formatting functions in lib/slack.ts to accept boardId and baseUrl parameters
  • Changed board name display from plain text to clickable Slack links using <${baseUrl}/boards/${boardId}|${boardName}> format
  • Updated all API route call sites to pass the new parameters using getBaseUrl(request) for URL construction
  • Affects all Slack notification types: new notes, todo additions, todo completions, and note archive/unarchive

Review & Testing Checklist for Human

  • Test actual Slack notifications - Create a board with Slack integration enabled and verify that board names appear as clickable links that navigate to the correct board
  • Verify URL construction - Check that getBaseUrl(request) produces correct URLs in your deployment environment (both staging and production)
  • Test all notification types - Verify new note creation, todo item completion, and note archiving all produce working clickable links
  • Check for regressions - Ensure existing Slack notification functionality still works as expected (message format, timing, etc.)

Notes

  • Uses Slack's standard link format <URL|display text> which should render as clickable links
  • Reuses existing getBaseUrl utility function for consistent URL construction across environments
  • No breaking changes to existing functionality - only enhances board name display in Slack messages

Requested by: Sahil Lavingia (@slavingia)
Devin session: https://app.devin.ai/sessions/4ea42d60d173415ba79cc6540cb514da

- Update formatNoteForSlack to include board URL in link format
- Update formatTodoForSlack to include board URL in link format
- Update updateSlackMessage to include board URL in link format
- Update sendTodoNotification to pass board URL parameters
- Add getBaseUrl import to API routes for URL construction
- Use Slack's <URL|text> format for clickable board names

Co-Authored-By: Sahil Lavingia <sahil@gumroad.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@slavingia
Copy link
Contributor

update specs

devin-ai-integration bot and others added 4 commits October 1, 2025 19:47
…ck messages

Co-Authored-By: Sahil Lavingia <sahil@gumroad.com>
- Reduced from 3 tests to 1 comprehensive test
- Fixed issue where empty notes don't trigger Slack notifications
- Fixed issue where DB-created notes don't render in UI for E2E testing
- Now creates note through UI and adds content via textarea
- Follows pattern from existing notes.spec.ts for proper note creation
- Unit tests comprehensively cover all three Slack formatting functions

Co-Authored-By: Sahil Lavingia <sahil@gumroad.com>
The E2E test is not compatible with the app architecture:
- Note creation Slack notifications require content at POST time
- UI creates empty notes first (POST), then adds content via PUT
- PUT with content doesn't trigger note creation notifications

The comprehensive unit tests (18 tests in lib/__tests__/slack.test.ts)
provide sufficient coverage for all Slack formatting functions and
verify clickable board links work correctly.

Co-Authored-By: Sahil Lavingia <sahil@gumroad.com>
@slavingia slavingia closed this Oct 1, 2025
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