Skip to content

Comments

fix: handle paginated documents response and non-localhost auth guard (issue 378 and 379)#389

Open
Tyrannius wants to merge 2 commits intomorphik-org:mainfrom
Tyrannius:Tyrannius-issue-378,379
Open

fix: handle paginated documents response and non-localhost auth guard (issue 378 and 379)#389
Tyrannius wants to merge 2 commits intomorphik-org:mainfrom
Tyrannius:Tyrannius-issue-378,379

Conversation

@Tyrannius
Copy link

Fixes #378
Fixes #379

Changes

PDFViewer.tsx — handle paginated /documents response
The PDF Viewer assumed POST /documents returns a plain array.
The backend now returns { documents: [...] }. This fix handles both formats.

ChatSection.tsx — fix document selector in non-localhost deployments
The fetch guard apiBaseUrl.includes("localhost") silently blocked
document loading for all non-localhost deployments with bypass_auth_mode.
Changed to apiBaseUrl which is sufficient since the function already
guards against falsy apiBaseUrl internally.

@CLAassistant
Copy link

CLAassistant commented Feb 19, 2026

CLA assistant check
All committers have signed the CLA.

@Tyrannius
Copy link
Author

on a note: @DevDesai444 made a PR on those issues I posted 3 days ago (inluding the fix) but closed them again. I reopened them now as they helped me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants