Skip to content

chore: add blob as allowed protocol for document viewer#3329

Open
nazabucciarelli wants to merge 1 commit into
masterfrom
add-blob-allowed-protocol
Open

chore: add blob as allowed protocol for document viewer#3329
nazabucciarelli wants to merge 1 commit into
masterfrom
add-blob-allowed-protocol

Conversation

@nazabucciarelli
Copy link
Copy Markdown

@nazabucciarelli nazabucciarelli commented May 13, 2026

Relates to RocketChat/Rocket.Chat#40517

Summary by CodeRabbit

  • Bug Fixes
    • Expanded document viewer support to accept additional document sources, enabling viewing of documents from a wider range of sources.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0dd67486-974c-466f-9871-93b68e173173

📥 Commits

Reviewing files that changed from the base of the PR and between c2b584b and bf462cb.

📒 Files selected for processing (1)
  • src/documentViewer/ipc.ts
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Use TypeScript for all new code in this codebase unless explicitly told otherwise
Use Fuselage components from @rocket.chat/fuselage for all UI work — only create custom components when Fuselage doesn't provide the needed functionality
Check Theme.d.ts for valid color tokens when working with Fuselage components
Use optional chaining with fallbacks for platform-specific APIs instead of mocks (e.g., process.getuid?.() ?? 1000) to ensure code works across all platforms without requiring mocks
TypeScript code must use strict mode
Use React functional components with hooks instead of class components
Redux actions must follow the FSA (Flux Standard Action) pattern
Use camelCase for file naming
Use PascalCase for component file names (React components)
Write self-documenting code through clear naming — avoid unnecessary comments

Files:

  • src/documentViewer/ipc.ts
🔇 Additional comments (1)
src/documentViewer/ipc.ts (1)

14-14: LGTM!


Walkthrough

The pull request expands the URL protocol allowlist in the document viewer's IPC handler to permit blob: protocol URLs. Previously, only http: and https: protocols were allowed; the change adds blob: to support blob-based document access.

Changes

Blob URL Protocol Support

Layer / File(s) Summary
Blob protocol support in document viewer IPC handler
src/documentViewer/ipc.ts
The document-viewer/open-window allowed URL protocols are updated from ['http:', 'https:'] to ['http:', 'https:', 'blob:'] to enable blob URL support.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

type: feature

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and concisely describes the main change: adding blob as an allowed protocol for the document viewer, which matches the actual code modification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 13, 2026

CLA assistant check
All committers have signed the CLA.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants