Repository navigation
fix(webapp): keep the .jsonl filename when a transcript media type differs in case - #5038
sreecharan-desu wants to merge 1 commit into
Conversation
…ffers in case Media types are case-insensitive, but the download compared the stored Content-Type exactly. A different case saved the file as .json instead of .jsonl.
|
|
Hi @sreecharan-desu, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 3
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| // Media type and subtype are case-insensitive (RFC 9110). Parameters after ";" are ignored. | ||
| const filename = | ||
| contentType.split(";")[0]?.trim() === TRANSCRIPT_BLOB_CONTENT_TYPE | ||
| contentType.split(";")[0]?.trim().toLowerCase() === TRANSCRIPT_BLOB_CONTENT_TYPE |
There was a problem hiding this comment.
🔍 Pagination still rejects mixed-case media types
For a mixed-case stored media type, readSuffix skips ranged reads. Dashboard pagination then fetches the whole transcript on every page, despite the download recognizing its format.
Was this helpful? React with 👍 or 👎 to provide feedback.
Fixes #4982
✅ Checklist
Testing
Ran
pnpm run test ./app/services/realtime/transcriptDownload.server.test.ts --runinapps/webapp(8 passed). Webapp typecheck, oxlint, oxfmt, and knip passed.Changelog
Chat transcript downloads keep the .jsonl filename when the stored media type differs only in letter case.
Screenshots
N/A