Abstract UAT keywords feedback#814
Conversation
|
@kelockhart Would you see if the video demo looks good before I include Tim for the code review? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #814 +/- ##
========================================
- Coverage 62.1% 62.1% -0.0%
========================================
Files 317 317
Lines 36552 36552
Branches 1646 1645 -1
========================================
- Hits 22664 22663 -1
- Misses 13851 13852 +1
Partials 37 37 🚀 New features to boost your workflow:
|
|
@shinyichen the functionality looks good! But I wonder if the little icon will be noticed. Can you try adding "feedback" or something next to the icon? |
0f546cd to
95df1c0
Compare
|
@kelockhart Please see updated screen capture. |
|
@shinyichen yes! Looks great, no more feedback on my end. |
There was a problem hiding this comment.
Pull request overview
Adds a “Feedback” entry point from the Abstract UAT Keywords section that routes users to the General Feedback form with a prefilled subject and record identifier.
Changes:
- Add a “Feedback” button to the UAT Keywords block on abstract details and navigate to the general feedback route with query params.
- Update the General Feedback page to prefill the comment body and email subject from
router.query. - Expand feedback
_subjecttyping to include the new UAT-specific subject.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/pages/feedback/general.tsx |
Reads subject/id from query to prefill comments and _subject during submission. |
src/components/AbstractDetails/AbstractDetails.tsx |
Adds UAT “Feedback” button that routes to general feedback with record id + subject. |
src/api/feedback/types.ts |
Updates _subject typing to allow the new UAT feedback subject (and currently any string). |
Comments suppressed due to low confidence (2)
src/pages/feedback/general.tsx:125
_subject: !!subject ? subject : 'Nectar Feedback'can pass astring[]through to the API if the query contains repeatedsubjectparams. Normalizesubjectto a single string before using it, and consider whitelisting allowed subjects so this endpoint isn't accepting arbitrary query-controlled subject lines.
{
name,
_replyto: email,
_subject: !!subject ? subject : 'Nectar Feedback',
'feedback-type': 'feedback',
'user-agent-string': globalThis?.navigator?.userAgent,
origin: 'bbb_feedback', // indicate general feedback
'g-recaptcha-response': recaptchaToken,
src/pages/feedback/general.tsx:88
useForm({ defaultValues })only appliesdefaultValueson the first mount. On client-side navigation,router.querymay be empty untilrouter.isReadyis true, so the comments prefill can be skipped. Consider callingreset(...)in an effect whenrouter.isReadyand the normalizedsubject/idare available (or passvaluestouseFormif you intend it to be reactive).
const initialFormValues: FormValues = {
name: '',
email: userEmail ?? '',
comments: !!subject && subject === 'UAT keywords feedback' ? `UAT Keywords feedback on record: ${id}\n\n` : '',
};
const formMethods = useForm<FormValues>({
defaultValues: initialFormValues,
resolver: zodResolver(validationSchema),
mode: 'onSubmit',
reValidateMode: 'onBlur',
shouldFocusError: true,
});
thostetler
left a comment
There was a problem hiding this comment.
I think the changes look generally pretty good. If we end up doing this sort of then again, we'll want to generalize it more so that we don't have the logic for this one case in the main email config.
I just have one small thing I mentioned
|
@thostetler Please see my updates. |
95df1c0 to
b9bdf8b
Compare
thostetler
left a comment
There was a problem hiding this comment.
I think this looks good to go

Add a feedback button link in abstract UAT keywords. When clicked, link to general feedback prefilled with subject and record ID
Screen.Recording.2026-02-27.at.2.25.46.PM.mov