Summary
Admin trial row PDF actions currently open the raw PDF bytes endpoint directly. Public trial views open the shared stacked PDF viewer page instead.
Cleanup
- Change
AdminTrialEntryActions to use getTrialPdfPageHref(trialEntryId) instead of getTrialPdfApiHref(trialEntryId).
- Keep
/api/trials/[trialEntryId]/pdf as the canonical PDF bytes endpoint.
- Update
admin-trial-entry-actions.test.tsx to expect /beagle/trials/pdf?trialEntryId=....
- Update
docs/features/admin-trial-management.md so it no longer says admin opens /api/trials/[trialId]/pdf directly.
Context
The public PDF page handles the viewer behavior and settings, including the shared page shell and stacked rendering behavior. Admin should use the same viewer unless direct raw PDF opening is intentionally required.
Acceptance criteria
- Admin trial PDF action opens
/beagle/trials/pdf?trialEntryId=<id> in a new tab.
- PDF bytes are still fetched from
/api/trials/[trialEntryId]/pdf by the viewer.
- Tests and admin trial management docs match the new flow.
Summary
Admin trial row PDF actions currently open the raw PDF bytes endpoint directly. Public trial views open the shared stacked PDF viewer page instead.
Cleanup
AdminTrialEntryActionsto usegetTrialPdfPageHref(trialEntryId)instead ofgetTrialPdfApiHref(trialEntryId)./api/trials/[trialEntryId]/pdfas the canonical PDF bytes endpoint.admin-trial-entry-actions.test.tsxto expect/beagle/trials/pdf?trialEntryId=....docs/features/admin-trial-management.mdso it no longer says admin opens/api/trials/[trialId]/pdfdirectly.Context
The public PDF page handles the viewer behavior and settings, including the shared page shell and stacked rendering behavior. Admin should use the same viewer unless direct raw PDF opening is intentionally required.
Acceptance criteria
/beagle/trials/pdf?trialEntryId=<id>in a new tab./api/trials/[trialEntryId]/pdfby the viewer.