Skip to content

feat(tools): add user feedback support to search_issues - #697

Merged
dcramer merged 2 commits into
getsentry:mainfrom
jshchnz:feat/user-feedback-support
Dec 30, 2025
Merged

dcramer merged 2 commits into
getsentry:mainfrom
jshchnz:feat/user-feedback-support

Conversation

@jshchnz

@jshchnz jshchnz commented Dec 23, 2025

Copy link
Copy Markdown
Member

Summary

Adds user feedback support to the search_issues tool, enabling natural language queries for User Feedback Widget submissions stored as issues with issueCategory: feedback.

Key Changes

  • System prompt updates (config.ts): Added issueCategory field to BUILT-IN FIELDS section with guidance for querying feedback. Added common query patterns (issueCategory:feedback, issueCategory:feedback lastSeen:-7d) and examples.

  • Output formatting (formatters.ts): Display issue category for non-error types (feedback, performance, metric). Added feedback-specific guidance in Next Steps section when results contain feedback issues.

  • Tool description (handler.ts): Added user feedback use case and example to tool description.

  • Test fixtures (feedback-issue.json, fixtures.ts, index.ts): Created feedback issue fixture with factory function createFeedbackIssue() for testing.

  • Tests (formatters.test.ts): Added comprehensive tests for category display, feedback guidance, empty results, and output format.

Breaking Changes

  • None

Co-Authored-By: Claude Code noreply@anthropic.com

Enable querying User Feedback Widget submissions via search_issues tool
by adding issueCategory field support to the AI agent's system prompt.

Changes:
- Added issueCategory to system prompt BUILT-IN FIELDS with feedback guidance
- Added common query patterns for feedback searches
- Added feedback query examples to agent prompt
- Updated formatters to display issue category for non-error types
- Added feedback-specific guidance in search results Next Steps
- Added user feedback use case to tool description and examples
- Created feedback issue fixture and factory for testing
- Added comprehensive tests for formatter changes

Co-Authored-By: Claude Code <noreply@anthropic.com>
Comment thread packages/mcp-core/src/tools/search-issues/formatters.test.ts
Changed formatDate() from toLocaleDateString() to toISOString().split("T")[0]
to ensure consistent output across all timezones. This fixes CI test failures
where the inline snapshot expected locale-dependent dates.

The rest of the codebase consistently uses ISO 8601 format for dates.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dcramer
dcramer merged commit ee02721 into getsentry:main Dec 30, 2025
7 of 9 checks passed
dcramer added a commit that referenced this pull request Dec 30, 2025
## Summary

Fixes failing checks on fork PRs (like #697) caused by GitHub's security
model restricting write permissions for fork PRs.

### Problem

Fork PRs cannot have write permissions to the repository. This causes:
- `eval` workflow → "Create eval status check" step fails
- `measure-tokens` workflow → "Create check run" and "Comment on PR"
steps fail

Both fail with: `HttpError: Resource not accessible by integration`
(403, requires `checks=write`)

### Solution

1. **Conditional skip** - Only attempt write operations for pushes and
same-repo PRs:
   ```yaml
if: github.event.pull_request.head.repo.full_name == github.repository
   ```

2. **Fallback safety** - Add `continue-on-error: true` in case other
edge cases arise

### What Still Works for Fork PRs

- ✅ Tests run
- ✅ Evals run  
- ✅ Token measurement runs
- ✅ Results visible in job logs and summaries
- ❌ Custom check annotations (skipped)
- ❌ PR comments (skipped)

Co-Authored-By: Claude Code <noreply@anthropic.com>

---------

Co-authored-by: Claude Code <noreply@anthropic.com>

This branch had an error being deployed

1 failed deployment
Actions — 9376a2c1 Deployed Dec 23, 2025 by jshchnz via eval #688
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.

2 participants