Add PDF and CSV previews and fix Codex Windows spawn#372
Conversation
QuanCheng-QC
commented
May 7, 2026
- Add PDF detection and blob-based in-app PDF preview
- Add CSV detection, parsing, table rendering, and 1000-row truncation
- Make chat PDF/CSV attachments open the file preview instead of downloading
- Fix Codex adapter spawning on Windows by avoiding cmd/stdin pipe issues
…ter spawn on Windows
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
zomux
left a comment
There was a problem hiding this comment.
Two items to address before merge:
1. Security: PDF iframe missing sandbox attribute
The CSV preview iframe correctly uses sandbox="allow-scripts allow-same-origin", but the PDF iframe (around line 330) has no sandbox at all. A malicious PDF could potentially trigger navigation or run embedded JS. Please add at minimum sandbox="" or sandbox="allow-same-origin".
2. Windows CI failures
The test (windows-latest, 20) and test (windows-latest, 22) checks are failing — these are directly relevant to the Codex spawn changes in this PR and should be investigated.
Minor notes (non-blocking):
- Codex prompt passed as trailing CLI arg could hit OS argument length limits (~32KB on Windows). Consider a length check or fallback.
- Empty
catch {}blocks in_resolveToNodeCmdcould use a debug log. - CSV parser and React text rendering are fine — no XSS risk there.
|
Hi @QuanCheng-QC — friendly follow-up on the review from May 17. The two blocking items are still open:
Let me know if you need help resolving either of these! |
|
Hi @QuanCheng-QC — following up again on the two open items from the review:
We can fix the sandbox issue ourselves, but the Windows test failures need your attention since they're tied to the Codex spawn changes. Let us know if you need any help! |
|
Hi @zomux , thanks for the review. I’ve addressed the requested changes and pushed the updates. Could you please take another look when you have time? |