Skip to content

Conversation

@rohan-uiuc
Copy link
Collaborator

Refresh expired S3 presigned URLs and non-presigned S3 object URLs in chat messages to prevent broken links and access errors.

The previous implementation did not refresh S3 presigned URLs, causing inline citations and file links to become inaccessible after their expiration time. This change introduces client-side logic to proactively refresh these URLs upon rendering and again on click, ensuring continuous access to linked content.


Slack Thread

Open in Cursor Open in Web

Co-authored-by: rohanmarwaha222 <rohanmarwaha222@gmail.com>
@cursor
Copy link

cursor bot commented Oct 6, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Oct 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
uiuc-chat-frontend Ready Ready Preview Comment Oct 7, 2025 7:18pm

@rohan-uiuc
Copy link
Collaborator Author

@cursor fix the build (npm run build:self-hosted)

@cursor
Copy link

cursor bot commented Oct 6, 2025

I updated several dependencies and refined URL parsing logic within the chat component. These changes ensure better dependency management and more robust handling of URL hash fragments.

  • I updated the @swc/helpers package from 0.5.2 to 0.5.17 and its tslib dependency from ^2.4.0 to ^2.8.0 in package-lock.json. This also resulted in next pulling in its own version of @swc/helpers at 0.5.2.
  • I refined the URL parsing logic within the ChatMessage component in src/components/Chat/ChatMessage.tsx. The targetHref.split('#') operation was enhanced to correctly extract the base URL and hash fragment, specifically handling URLs with multiple hash symbols or no hash at all, improving robustness.

Open in Cursor Open in Web

Learn more about Cursor Agents

Co-authored-by: rohanmarwaha222 <rohanmarwaha222@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants