Skip to content

Replace blocking About dialog with custom modal BrowserWindow#477

Merged
Power-Maverick merged 4 commits intodevfrom
copilot/create-custom-about-dialog
Mar 22, 2026
Merged

Replace blocking About dialog with custom modal BrowserWindow#477
Power-Maverick merged 4 commits intodevfrom
copilot/create-custom-about-dialog

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 21, 2026

The About dialog used dialog.showMessageBoxSync() — a native OS dialog that is not modal relative to the app window, can hide behind it, and blocks the main process while open.

Replaces it with a custom BrowserWindow-based modal following the same pattern as the update notification dialog.

Changes

  • IPC plumbing — Added SHOW_ABOUT event channel; added onShowAbout to ToolboxAPI type and preload. Removed unused GET_ABOUT_INFO util channel, its IPC handler, and preload exposure.

  • Main process (index.ts) — showAboutDialog() now mirrors the sendWhatsNewRequest pattern: captures webContents, guards with isDestroyed(), and defers the send via once('did-finish-load', ...) when the renderer is still loading; removed unused clipboard import

  • New modal (src/renderer/modals/about/) — view.ts renders a styled panel with Environment, System, and Diagnostics sections; controller.ts handles close and copy-to-clipboard via modalBridge

  • New module (src/renderer/modules/aboutManagement.ts) — builds and shows the modal BrowserWindow; handles the copy channel by calling toolboxAPI.utils.copyToClipboard and shows a success notification ("Copied to Clipboard") as user feedback after the copy completes

  • Initialization (initialization.ts) — registers onShowAbout listener to open the modal on menu trigger

  • Use a meaningful title for the pull request.

  • Follow the guidelines from the CONTRIBUTING.md.

  • Mention the bug or the feature number the PR will be targeting.

  • Test the change in your own code. (Compile and run)

  • Resolve all GH Copilot comments.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug]: About dialog blocks UI</issue_title>
<issue_description>### What happened?

The ToolBox about dialog in not modal, and as a result it can end up hidden behind the ToolBox and then blocks elements of the UI

What version of the PPTB are you using?

v1.1.2-dev.20260203

Relevant log output

```</issue_description>

<agent_instructions>Similar to the Update dialog we need a custom About dialog.</agent_instructions>

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

<comments>
</comments>

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

The About dialog previously used dialog.showMessageBoxSync which is
not modal relative to the main app window and can be hidden behind it.

Now it sends a SHOW_ABOUT IPC event to the renderer which shows a
custom BrowserWindow-based modal (same pattern as the update dialog)
with version info, environment details, and a copy-to-clipboard button.

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Agent-Logs-Url: https://github.com/PowerPlatformToolBox/desktop-app/sessions/51cb116a-9705-4972-8e3b-242f5767550e
Copilot AI changed the title [WIP] Add custom about dialog to resolve UI blocking issue Replace blocking About dialog with custom modal BrowserWindow Mar 21, 2026
Copilot AI requested a review from Power-Maverick March 21, 2026 02:30
@github-actions
Copy link
Copy Markdown

Bundle Size Report 📦

Bundle Size
Main Process 954.08 KB
Renderer JS 509.18 KB
Renderer CSS 93.99 KB
Total 1.52 MB

Bundle Analysis Reports

The detailed bundle analysis reports are available in the workflow artifacts:

  • 📊 Main Process: stats-main.html
  • 📊 Renderer Process: stats-renderer.html

Download the artifacts from the workflow run to view interactive visualizations.


Bundle size tracking is now active! This helps prevent bundle bloat.

@Power-Maverick
Copy link
Copy Markdown
Contributor

@copilot show the info notification that the text was copied when clicking the copy to clipboard; otherwise there is no feedback to the user.

@Power-Maverick Power-Maverick added the unit-testing Unit testing is in process. Dev was completed label Mar 21, 2026
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 21, 2026

@copilot show the info notification that the text was copied when clicking the copy to clipboard; otherwise there is no feedback to the user.

Done in 99afac5. After the clipboard write succeeds, aboutManagement.ts now calls showPPTBNotification with a "success" type, title "Copied to Clipboard", and a 3-second duration — the same notification system used elsewhere in the app.

@github-actions
Copy link
Copy Markdown

Bundle Size Report 📦

Bundle Size
Main Process 954.45 KB
Renderer JS 522.06 KB
Renderer CSS 94.43 KB
Total 1.53 MB

Bundle Analysis Reports

The detailed bundle analysis reports are available in the workflow artifacts:

  • 📊 Main Process: stats-main.html
  • 📊 Renderer Process: stats-renderer.html

Download the artifacts from the workflow run to view interactive visualizations.


Bundle size tracking is now active! This helps prevent bundle bloat.

@Power-Maverick Power-Maverick marked this pull request as ready for review March 21, 2026 20:14
Copilot AI review requested due to automatic review settings March 21, 2026 20:14
@Power-Maverick Power-Maverick added pr-in-review Reviewing the changes. May have requested changes. and removed unit-testing Unit testing is in process. Dev was completed labels Mar 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Replaces the blocking, non-app-modal native About dialog with a BrowserWindow-backed modal, aligning About UX with the existing modal framework used for update notifications and preventing main-process blocking.

Changes:

  • Added new IPC channels (EVENT_CHANNELS.SHOW_ABOUT, UTIL_CHANNELS.GET_ABOUT_INFO) and wired a new onShowAbout listener through the preload + shared API types.
  • Updated the main process About flow to send version/system info to the renderer instead of calling dialog.showMessageBoxSync().
  • Introduced a new renderer modal implementation (modals/about/*) and a management module to open it and handle copy-to-clipboard + notifications.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/renderer/modules/initialization.ts Registers onShowAbout and opens the About modal with theme-aware rendering.
src/renderer/modules/aboutManagement.ts Creates/shows the About BrowserWindow modal and handles copy events + success notification.
src/renderer/modals/about/view.ts Renders the About modal HTML + styles (Environment/System/Diagnostics sections).
src/renderer/modals/about/controller.ts Modal controller script for close/OK and copy-to-clipboard message emission.
src/main/preload.ts Exposes onShowAbout and adds utils.getAboutInfo() binding.
src/main/index.ts Implements GET_ABOUT_INFO handler and switches About menu action to SHOW_ABOUT event.
src/common/types/api.ts Extends ToolboxAPI type with onShowAbout.
src/common/ipc/channels.ts Adds the new util/event channel constants.

…nused GET_ABOUT_INFO IPC

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Agent-Logs-Url: https://github.com/PowerPlatformToolBox/desktop-app/sessions/a4e390e5-c47b-4e65-b9a4-6e47ed1385d3
@Power-Maverick Power-Maverick removed the pr-in-review Reviewing the changes. May have requested changes. label Mar 22, 2026
@Power-Maverick Power-Maverick merged commit 87524a8 into dev Mar 22, 2026
3 checks passed
@Power-Maverick Power-Maverick deleted the copilot/create-custom-about-dialog branch March 22, 2026 02:09
@github-actions
Copy link
Copy Markdown

Bundle Size Report 📦

Bundle Size
Main Process 954.12 KB
Renderer JS 522.06 KB
Renderer CSS 94.43 KB
Total 1.53 MB

Bundle Analysis Reports

The detailed bundle analysis reports are available in the workflow artifacts:

  • 📊 Main Process: stats-main.html
  • 📊 Renderer Process: stats-renderer.html

Download the artifacts from the workflow run to view interactive visualizations.


Bundle size tracking is now active! This helps prevent bundle bloat.

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