Skip to content

feat: Add product feedback modal for downvote workflow#2

Open
ForisKuang wants to merge 5 commits intocBioPortal:v0.8.2-custom-v3from
ForisKuang:update/librechat-v0.8.2
Open

feat: Add product feedback modal for downvote workflow#2
ForisKuang wants to merge 5 commits intocBioPortal:v0.8.2-custom-v3from
ForisKuang:update/librechat-v0.8.2

Conversation

@ForisKuang
Copy link

@ForisKuang ForisKuang commented Feb 25, 2026

When the product feedback feature is enabled (via FEEDBACK_ISSUE_SERVICE_URL env var), clicking thumbs-down on an assistant message opens a feedback modal instead of the default tag popover. The modal collects a categorized issue report that is submitted to an external issue creation service, enabling automated GitHub issue creation from user feedback.

Change Type

  • [ X] New feature (non-breaking change which adds functionality)

Testing

Tested locally by spinning up the local instance of LibreChat and clicking the thumbs down button and seeing the modal pop up. See image below.

Screenshot 2026-02-25 at 2 28 39 PM

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

Foris Chen Kuang added 5 commits February 25, 2026 14:36
When the product feedback feature is enabled (via FEEDBACK_ISSUE_SERVICE_URL
env var), clicking thumbs-down on an assistant message opens a feedback
modal instead of the default tag popover. The modal collects a categorized
issue report that is submitted to an external issue creation service,
enabling automated GitHub issue creation from user feedback.
…sues

Instead of proxying to an external service, the feedback route now calls
the GitHub API directly to create issues. This eliminates the need for a
separate middleware service. Configuration uses GITHUB_FEEDBACK_TOKEN and
GITHUB_FEEDBACK_REPO env vars. Issues are formatted with structured
markdown and labeled based on feedback reason.
…bmitted

The existing feedback storage endpoint was not being called when
submitting via the product feedback modal. Now handleFeedback is
invoked on modal submit to store the thumbs-down rating in MongoDB
alongside creating the GitHub issue.
…xt field

Instead of creating a separate ProductFeedback MongoDB collection,
serialize the entire feedback payload (reason, title, details,
suggested fix, conversation context) as a JSON string in the
existing message feedback `text` field. This avoids schema changes
while preserving all feedback data.
…d add agent routing

- Remove all GitHub API integration from feedbackIssues route; feedback
  is now stored in a new ProductFeedback MongoDB collection for manual review
- Add endpoint, model, and agent_id to the feedback payload so feedback
  can be attributed to the specific agent it was submitted against
- Thread agent identity from conversation through HoverButtons → Feedback
  → ProductFeedbackModal
- Change feature flag from GITHUB_FEEDBACK_TOKEN/GITHUB_FEEDBACK_REPO
  to a simple PRODUCT_FEEDBACK_ENABLED boolean env var
- Update response types from issue_url/issue_number to id/request_id
- Simplify success toast to a plain confirmation (no GitHub link)
inodb pushed a commit that referenced this pull request Mar 19, 2026
…anny-avila#12117)

* chore: Remove unused setValueOnChange prop from MCPServerMenuItem component

* fix: Resolve agent provider endpoint type for file upload support

When using the agents endpoint with a custom provider (e.g., Moonshot),
the endpointType was resolving to "agents" instead of the provider's
actual type ("custom"), causing "Upload to Provider" to not appear in
the file attach menu.

Adds `resolveEndpointType` utility in data-provider that follows the
chain: endpoint (if not agents) → agent.provider → agents. Applied
consistently across AttachFileChat, DragDropContext, useDragHelpers,
and AgentPanel file components (FileContext, FileSearch, Code/Files).

* refactor: Extract useAgentFileConfig hook, restore deleted tests, fix review findings

- Extract shared provider resolution logic into useAgentFileConfig hook
  (Finding #2: DRY violation across FileContext, FileSearch, Code/Files)
- Restore 18 deleted test cases in AttachFileMenu.spec.tsx covering
  agent capabilities, SharePoint, edge cases, and button state
  (Finding #1: accidental test deletion)
- Wrap fileConfigEndpoint in useMemo in AttachFileChat (Finding #3)
- Fix misleading test name in AgentFileConfig.spec.tsx (Finding #4)
- Fix import order in FileSearch.tsx, FileContext.tsx, Code/Files.tsx (Finding #5)
- Add comment about cache gap in useDragHelpers (Finding #6)
- Clarify resolveEndpointType JSDoc (Finding danny-avila#7)

* refactor: Memoize Footer component for performance optimization

- Converted Footer component to a memoized version to prevent unnecessary re-renders.
- Improved import structure by adding memo to the React import statement for clarity.

* chore: Fix remaining review nits

- Widen useAgentFileConfig return type to EModelEndpoint | string
- Fix import order in FileContext.tsx and FileSearch.tsx
- Remove dead endpointType param from setupMocks in AttachFileMenu test

* fix: Pass resolved provider endpoint to file upload validation

AgentPanel file components (FileContext, FileSearch, Code/Files) were
hardcoding endpointOverride to "agents", causing both client-side
validation (file limits, MIME types) and server-side validation to
use the agents config instead of the provider-specific config.

Adds endpointTypeOverride to UseFileHandling params so endpoint and
endpointType can be set independently. Components now pass the
resolved provider name and type from useAgentFileConfig, so the full
fallback chain (provider → custom → agents → default) applies to
file upload validation on both client and server.

* test: Verify any custom endpoint is document-supported regardless of name

Adds parameterized tests with arbitrary endpoint names (spaces, hyphens,
colons, etc.) confirming that all custom endpoints resolve to
document-supported through resolveEndpointType, both as direct
endpoints and as agent providers.

* fix: Use || for provider fallback, test endpointOverride wiring

- Change providerValue ?? to providerValue || so empty string is
  treated as "no provider" consistently with resolveEndpointType
- Add wiring tests to CodeFiles, FileContext, FileSearch verifying
  endpointOverride and endpointTypeOverride are passed correctly
- Update endpointOverride JSDoc to document endpointType fallback
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