Skip to content

📋 feat: In-app Questionnaire Popup and Management Endpoints - #15780

Open
kenzaelk98 wants to merge 4 commits into
LibreChat-AI:devfrom
leondape:feat/questionnaire
Open

kenzaelk98 wants to merge 4 commits into
LibreChat-AI:devfrom
leondape:feat/questionnaire

Conversation

@kenzaelk98

@kenzaelk98 kenzaelk98 commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds an optional in-app questionnaire modal plus server-side management (admin API + CLI), so operators can run feedback rounds.

Related: #14643

Behavior

  • Active questionnaire is shown as a modal (one or more pages, depending on configured questions/sections).
  • Users can complete it or dismiss it (when dismissible is enabled).
  • On dismiss: toast reflects the configured re-prompt — snooze after repromptIntervalHours, or permanent dismiss when that field is null.
  • Only one questionnaire is active at a time; others can stay draft/closed.
  • Content is server-driven (title, intro, questions, schedule window, thank-you copy, dismiss/reprompt, confetti).

Configurable options

  • dismissible (default true): show/hide dismiss (“Maybe later”). When false, users must complete (or wait for the display window to end).
  • repromptIntervalHours: positive hours to snooze after dismiss, or null for permanent dismiss.
  • showConfetti (default true): confetti animation on submit only. Optional thankYouMessage can include any emoji/copy; if omitted, a default thank-you string is used.

What’s included

  • Schemas/methods + user API (/api/questionnaire) + admin API (/api/admin/questionnaires)
  • Capabilities: read:questionnaires / manage:questionnaires
  • CLI: npm run update-questionnaire / delete-questionnaire
  • Example config: config/questionnaire.example.json

Follow-up

I opened a separate PR against LibreChat-AI/admin-panel for the admin UI to manage questionnaires (depends on the admin API in this PR). Here: LibreChat-AI/admin-panel#144

Screenshots

Example Modal (questions)
Example questionnaire
Example questionnaire part 2

Example Dismiss toast (snooze)
Example dismiss

Example Completion (with confetti)
Completion with confetti

Change Type

  • New feature (non-breaking change which adds functionality)
  • Translation update

Documentation

Happy to add docs (similar to banner CLI usage) in a follow-up if wanted. This PR includes config/questionnaire.example.json and CLI usage in the description for now.

Test plan

  • Rebase on upstream/dev; install; build changed packages/client as needed
  • Seed via npm run update-questionnaire -- --file=config/questionnaire.example.json (optionally --status=active)
  • Confirm only one active questionnaire; drafts do not show
  • Complete flow → thank-you message; confetti only when showConfetti: true
  • showConfetti: false + emoji in thankYouMessage → message/emoji only, no confetti
  • Dismiss with repromptIntervalHours: 48 → toast about 2 days; no re-show until interval
  • Dismiss with repromptIntervalHours: null → permanent dismiss toast; no re-show
  • dismissible: false → no dismiss control
  • Admin CRUD + CLI work with the new capabilities
  • Lint / static checks on changed files

Happy to add focused unit tests (validation / dismiss rules) in a follow-up if preferred.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings

@github-actions
github-actions Bot changed the base branch from main to dev September 9, 2026 12:48
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for the contribution! LibreChat merges all changes into dev first — main only moves at release time — so this pull request's base branch was switched from main to dev automatically.

Nothing is needed from you; your commits, reviews and discussion are unchanged. If the diff now shows files you did not touch, rebase onto dev:

git remote add upstream https://github.com/danny-avila/LibreChat.git
git fetch upstream dev
git rebase upstream/dev
git push --force-with-lease

Maintainers: apply the target: main label and restore the base branch if this one genuinely belongs on main.

This branch has not been deployed

No deployments
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