Skip to content

Implement sidebar toggle and enhance file preview handling - #142

Merged
ritwikshanker merged 6 commits into
mainfrom
feature/mobile-ui
Aug 17, 2026
Merged

ritwikshanker merged 6 commits into
mainfrom
feature/mobile-ui

Conversation

@ritwikshanker

@ritwikshanker ritwikshanker commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a significant security improvement to the file preview proxy by replacing the in-memory allowlist with signed preview URLs, ensuring that only URLs generated by the server can be used for previews. It also improves error handling for expired or invalid preview links, enhances placeholder handling for the search input on small screens, and fixes some UI responsiveness issues.

File preview security and error handling:

  • Replaces the in-memory PREVIEWABLE_URLS allowlist with a stateless signature-based system for preview URLs. The server now signs each file download URL it emits with a secret, and the preview proxy verifies this signature before allowing access, preventing request forgery and improving security for scaled deployments. (server.ts, docker-compose.yml, src/lib/coordinatorApi.ts, src/components/dataplayer/FilePreviewModal.tsx) [1] [2] [3] [4] [5] [6] [7] [8]
  • Adds explicit error handling for expired preview links (HTTP 410), allowing the UI to distinguish between unavailable previews and expired links and prompting the user to reload for a fresh signature. (src/components/dataplayer/FilePreviewModal.tsx, src/lib/coordinatorApi.ts) [1] [2] [3] [4] [5]

API and backend robustness:

  • Refactors query parameter handling to ensure only string values are accepted, preventing unexpected types from causing errors in downstream code. (server.ts) [1] [2] [3]
  • Improves handling of repeated content-type headers from upstream sources, ensuring the correct media type is set for file previews. (server.ts)

Frontend UI/UX improvements:

  • Adds a useMediaQuery React hook and updates the search input to use shorter placeholders on narrow screens, improving usability on mobile devices. (src/hooks/useMediaQuery.ts, src/components/SearchInput.tsx) [1] [2] [3] [4] [5] [6]
  • Fixes sidebar and feedback component responsiveness for better appearance on different screen sizes. (src/components/ConversationSidebarItem.tsx, src/components/SearchFeedback.tsx) [1] [2]

Comment thread src/lib/server/previewSigning.ts Fixed
Comment thread src/lib/server/previewSigning.ts Fixed
Comment thread src/lib/server/previewSigning.ts Fixed
@ritwikshanker
ritwikshanker merged commit 6263c75 into main Aug 17, 2026
6 checks passed
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.

2 participants