Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 8, 2025

PR Checklist

  • Functionality has been tested, no obvious bugs
  • Code style follows project conventions
  • Documentation/comments updated (if applicable)

Brief Description of Changes

The OfficeViewer plugin now prompts users once for their preference when handling protected files, then remembers their choice.

Implementation:

  • Added ProtectedViewDialog with "Remember my choice" checkbox
  • Store preference as nullable bool in AlwaysUnblockProtectedView setting
  • Skip dialog when preference exists, apply saved choice directly
  • Support remembering both "Yes" (auto-unblock) and "No" (remain blocked) choices

Behavior:

First encounter → Show dialog with checkbox
User checks "Remember" + "Yes" → All future protected files auto-unblock
User checks "Remember" + "No" → All future protected files skip unblock
User unchecked → Dialog appears for each file

Related Issue (if any)

Discussion #1831

Additional Notes

Uses nullable bool (bool?) to distinguish "no preference set" from "preference set to false".

Original prompt

This section details on the original issue you should resolve

<issue_title>Prevent the protected view notice!</issue_title>
<issue_description>

Discussed in #1831

Originally posted by cruisermaxx December 7, 2025
When preview some .docx file, there is a messagebox about protected view.
Is it possible to remember the choice Yes or No? Don't popup very time.

PC1 Snipaste_2025-12-07_12-56-27

<agent_instructions>add a bool option to if remember the Yes choice</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 8, 2025 02:17
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
Copilot AI changed the title [WIP] Add option to remember protected view choice Add "Remember my choice" option for protected view notice Dec 8, 2025
Copilot AI requested a review from emako December 8, 2025 02:24
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.

Prevent the protected view notice!

2 participants