Skip to content

feat: open markdown attachments directly in the desktop document viewer#40915

Draft
jeanfbrito wants to merge 1 commit into
developfrom
feat/desktop-markdown-viewer
Draft

feat: open markdown attachments directly in the desktop document viewer#40915
jeanfbrito wants to merge 1 commit into
developfrom
feat/desktop-markdown-viewer

Conversation

@jeanfbrito

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Markdown attachment title clicks in the desktop app now open the document viewer directly via openDocumentViewer — the same flow PDF attachments already use — instead of relying on the desktop app intercepting will-download events.

The new branch is gated on a new optional desktop capability, supportedDocumentViewerFormats?: () => string[] (declared on IRocketChatDesktop), exposed by the desktop app in RocketChat/Rocket.Chat.Electron#3354. Behavior by environment:

  • New desktop + this change: title click opens the markdown viewer directly; the download button is never touched by viewer logic.
  • Older desktop (no capability): falls through to the existing anchor navigation, which older desktop builds intercept — current behavior preserved.
  • Browser: unchanged (no RocketChatDesktop).
  • Encrypted markdown files: unchanged, keep the existing encrypted download flow.

Why

The will-download interception in the desktop app cannot reliably distinguish view intent from download intent (see RocketChat/Rocket.Chat.Electron#3345 — download button opened the viewer and the download hung). Opening the viewer through the desktop API removes the viewer from the download path entirely.

Related

Markdown title clicks now call openDocumentViewer directly (like PDFs)
when the desktop app advertises markdown support via the new optional
supportedDocumentViewerFormats capability. Older desktops fall back to
the existing navigation path.
@dionisio-bot

dionisio-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 73d4db9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@rocket.chat/desktop-api Minor
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5a09fe15-18b7-4a20-adea-2493aead2a59

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 10.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.04%. Comparing base (a6bebd2) to head (73d4db9).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40915      +/-   ##
===========================================
- Coverage    70.04%   70.04%   -0.01%     
===========================================
  Files         3355     3355              
  Lines       129162   129172      +10     
  Branches     22372    22350      -22     
===========================================
+ Hits         90474    90475       +1     
- Misses       35396    35402       +6     
- Partials      3292     3295       +3     
Flag Coverage Δ
unit 69.92% <10.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant