Skip to content

Release v1.2.2#548

Merged
Power-Maverick merged 207 commits into
mainfrom
dev
May 25, 2026
Merged

Release v1.2.2#548
Power-Maverick merged 207 commits into
mainfrom
dev

Conversation

@Power-Maverick
Copy link
Copy Markdown
Contributor

Please fill in this template.

  • 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.

Copilot AI and others added 30 commits February 9, 2026 12:02
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
…otarization-errors

Fix macOS notarization failures for production and nightly builds
…ofile detection (#355)

* Initial plan

* Add browser profile support for interactive authentication

- Add browserType and browserProfile fields to DataverseConnection interface
- Implement browser-specific launch logic in AuthManager
- Update add/edit connection modals with browser selection UI
- Support Chrome, Edge, Firefox, and Brave browsers
- Fallback to default browser if profile not found

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Address code review feedback - use helper functions consistently

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Refactor: Extract browser logic into separate BrowserManager

- Create new BrowserManager class for browser detection and profile enumeration
- Remove browser-related code from AuthManager
- AuthManager now depends on BrowserManager via constructor injection
- Add IPC channels for browser detection and profile listing
- Update preload script to expose new browser APIs

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Implement dynamic browser profile detection in UI

- Replace text input with dropdown for browser profiles
- Dynamically detect browser installation on selection
- Automatically load and populate browser profiles
- Show warning when selected browser is not installed
- Support both add and edit connection modals
- Add modal-warning CSS for user feedback

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fix: Browser profile detection in modals

- Expose browser detection APIs in modalPreload.ts
- Fix browser type change event to properly trigger profile loading
- Set correct initial state for profile dropdown (No profile needed)
- Remove premature loadBrowserProfiles() call that ran before DOM ready

Fixes:
- Profile selector now loads data when browser is selected
- Browser detection APIs now available in modal context
- Initial dropdown state shows correct message
- Warning displays when browser not installed

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Enhance profile detection to show friendly names, support Chrome/Edge only

- Read actual profile names from Local State file (e.g., "Person 1", "Work")
- Fallback to reading individual Preferences files if Local State unavailable
- Remove Firefox and Brave browser support (Chrome and Edge only)
- UI now displays profile.name but stores profile.path for --profile-directory
- Update both add and edit connection modals

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Move browser settings to separate section available for all auth types

- Move browser type and profile selectors out of interactive-only section
- Create new "Browser Settings (Optional)" section below Environment selector
- Apply browser settings to all authentication types (interactive, clientSecret, usernamePassword, connectionString)
- Browser profile used when tools need to open URLs with authentication
- Updated both add and edit connection modals
- Updated connectionManagement to apply browser settings to all auth types

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fixed style issue and added logos

* Add browser profile tag to connection cards in sidebar

- Add browserProfileName field to DataverseConnection type
- Display browser icon and profile name as tag on connection cards
- Tag shows Chrome/Edge icon with friendly profile name (e.g., "My Cool Profile")
- Tag positioned next to environment badge
- Update form controllers to capture and store profile name
- Add CSS styling for connection-browser-tag with browser icon
- Browser icons loaded from renderer/icons/logos/

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fix modal hanging issue - improve browser profile name collection

- Fix collectFormData to safely handle empty profile selections
- Only capture browserProfileName when a profile is actually selected
- Add null-safe checks for selectedOptions array access
- Prevent attempting to read textContent from empty value options

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Revert "Fix modal hanging issue - improve browser profile name collection"

This reverts commit 607fde9.

* Revert "Add browser profile tag to connection cards in sidebar"

This reverts commit e1cab02.

* feat: add browser profile name support in connection forms and UI

* Update src/renderer/modules/connectionManagement.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/main/managers/browserManager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/main/managers/browserManager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/common/types/connection.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Co-authored-by: Power-Maverick <danish.naglekar@hotmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…derivation (#354)

* Initial plan

* Add optional filters parameter to saveFile function

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fix extension extraction to use path.extname for robust handling

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Co-authored-by: Power-Maverick <danish.naglekar@hotmail.com>
* fix: enable recursive file search for notarization in release workflows

* feat: add YAML regeneration steps for Windows, Linux, and macOS with correct SHA256 hashes

* feat: add repackaging step for portable ZIP with signed EXE in Windows workflows
* fix: Enhance Label structure compliance and add polymorphic lookup support

This commit addresses documentation review findings and adds support for polymorphic lookup attributes (Customer/Regarding fields) to complete metadata CRUD operations implementation for issue #319.

## Type Definitions (src/common/types/dataverse.ts)
- Added `IsManaged?: boolean` property to LocalizedLabel interface
  * Microsoft examples show IsManaged included in all attribute/relationship/optionset requests
  * Properly tracks whether label originates from managed solution
- UserLocalizedLabel remains optional in Label interface
  * Entity creation docs note it as read-only
  * However, Microsoft's own examples for attributes, relationships, and optionsets include it in POST requests
  * Implementation follows Microsoft's published examples

## DataverseManager Updates (src/main/managers/dataverseManager.ts)
- Updated buildLabel() helper method:
  * Now creates LocalizedLabel with IsManaged: false property
  * Includes UserLocalizedLabel property set to same LocalizedLabel instance
  * Matches Microsoft's published examples for attribute/relationship creation
  * Example output: { LocalizedLabels: [{ Label: "Text", LanguageCode: 1033, IsManaged: false }], UserLocalizedLabel: { Label: "Text", LanguageCode: 1033, IsManaged: false } }
- Added createPolymorphicLookupAttribute() method:
  * Enables creation of lookup fields that reference multiple entity types (Customer, Regarding scenarios)
  * Validates presence of non-empty Targets array with entity logical names
  * Automatically sets AttributeType="Lookup" and AttributeTypeName={ Value: "LookupType" }
  * Delegates to createAttribute() with proper polymorphic configuration
  * Returns { AttributeId: string } matching API contract
  * Comprehensive JSDoc with Customer (account/contact) and custom Regarding examples
- Enhanced createRelationship() JSDoc:
  * Added CascadeConfiguration example with all cascade behaviors (Assign, Delete, Merge, Reparent, Share, Unshare)
  * Shows proper RemoveLink delete behavior for lookup fields
- Enhanced updateRelationship() JSDoc:
  * Added example demonstrating cascade configuration updates (RemoveLink → Cascade)
  * Illustrates retrieve-modify-PUT pattern for relationship updates
- Added LocalizedLabel to imports from common types

## IPC Infrastructure (src/common/ipc/channels.ts, src/main/index.ts)
- Added CREATE_POLYMORPHIC_LOOKUP_ATTRIBUTE channel constant
  * Value: "dataverse.createPolymorphicLookupAttribute"
- Registered IPC handler in main process:
  * Supports both primary and secondary connection targets
  * Extracts connectionId from WebContents based on connectionTarget parameter
  * Wraps dataverseManager.createPolymorphicLookupAttribute() with error handling
  * Proper cleanup with removeHandler() on application quit

## Preload Bridge (src/main/toolPreloadBridge.ts)
- Exposed createPolymorphicLookupAttribute in toolboxAPI.dataverse
- Exposed createPolymorphicLookupAttribute in window.dataverseAPI
- Both accept (entityLogicalName, attributeDefinition, options?, connectionTarget?) parameters
- Properly wrapped with ipcInvoke using CREATE_POLYMORPHIC_LOOKUP_ATTRIBUTE channel

## Public API Types (packages/dataverseAPI.d.ts)
- Added createPolymorphicLookupAttribute method signature to DataverseAPI interface
- Comprehensive JSDoc documentation:
  * Customer lookup example (account/contact on new_order entity)
  * Multi-entity Regarding example (account/contact/custom entities on new_note)
  * Documents Targets array requirement
  * Notes metadata publish requirement
  * Shows buildLabel() usage in examples
- Method signature: (entityLogicalName, attributeDefinition, options?, connectionTarget?) => Promise<{ AttributeId: string }>

## Validation
- TypeScript compilation: ✅ No errors
- ESLint: ✅ 0 errors (TypeScript version warning acceptable)
- All 12 implementation tasks completed
- Documentation compliance verified against 5 Microsoft Learn articles

## Microsoft Documentation References
- Attribute creation: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/create-update-column-definitions-using-web-api
- Relationship creation: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/create-update-entity-relationships-using-web-api
- Option sets: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/create-update-optionsets
- Polymorphic lookups: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/multitable-lookup
- Entity creation: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/create-update-entity-definitions-using-web-api

Closes #319 metadata CRUD operations (enhancement for polymorphic lookups)

* fix: improve metadata CRUD error handling and add comprehensive documentation

FIXES (Code Review Issues):

1. **Metadata creation methods now throw descriptive errors on missing headers**
   - createEntityDefinition, createAttribute, createRelationship, createGlobalOptionSet
   - Previously returned empty strings silently when OData-EntityId header missing
   - Now throw explicit errors: "Failed to retrieve MetadataId from response. The OData-EntityId header was missing."
   - Guides users to identify real issues (network failures, API changes, etc.)

2. **GET_ATTRIBUTE_ODATA_TYPE IPC handler now enforces type safety**
   - Added runtime enum validation against AttributeMetadataType values
   - Removed unsafe `as any` cast that bypassed TypeScript's type system
   - Throws descriptive error listing all valid types when invalid value provided
   - Example: "Invalid attribute type: 'InvalidType'. Valid types are: String, Integer, Boolean, ..."

TECHNICAL DISCOVERY:

**Dataverse metadata operations return HTTP 204 No Content with NO response body**:
- Standard operations (entity, attribute, relationship, global option set): 204 No Content
- Only OData-EntityId header contains the created MetadataId
- Empty response body → makeHttpRequest returns `response.data = {}`
- Exception: CreateCustomerRelationships action returns 200 OK with JSON body containing AttributeId and RelationshipIds

This discovery led to abandoning a proposed "fallback to response body" approach, as responseData["MetadataId"] would always be undefined for metadata operations.

DOCUMENTATION IMPROVEMENTS:

1. **execute() method**: Added comprehensive JSDoc with examples for:
   - CreateCustomerRelationships action (customer lookup creation with 200 OK response)
   - InsertStatusValue action (status choice column values with StateCode)
   - UpdateStateValue action (state value metadata updates)
   - Bound vs unbound actions/functions

2. **queryData() method**: Added examples demonstrating:
   - Retrieving global option sets by name: `GlobalOptionSetDefinitions(Name='name')`
   - Retrieving all global option sets with filters
   - Retrieving by MetadataId

3. **createPolymorphicLookupAttribute()**: Added note about CreateCustomerRelationships alternative

4. **insertOptionValue()**: Added note about InsertStatusValue for status choice columns

5. **createGlobalOptionSet()**: Added retrieval example using queryData()

BENEFITS:

- **Fail-Fast Approach**: Clear errors replace silent failures, improving debuggability
- **Type Safety**: Runtime enum validation prevents invalid API calls
- **Complete Coverage**: All metadata operations from Microsoft documentation are supported via existing methods (execute, queryData)
- **Developer Guidance**: JSDoc examples show how to use actions like CreateCustomerRelationships, InsertStatusValue, UpdateStateValue
- **No New Methods Needed**: Generic execute() and queryData() methods handle all special cases

VALIDATION:

- ✅ TypeScript compilation passed (pnpm run typecheck)
- ✅ Linting passed (pnpm run lint - 0 errors)
- ✅ Application builds successfully (pnpm build)
- ✅ All 6 file edits applied successfully

* feat(dataverse): add whitelist-based header validation for metadata operations

Implemented comprehensive security validation for custom headers in metadata
operations to prevent header injection attacks and API compliance issues.

SECURITY ENHANCEMENTS:
- Added validateMetadataHeaders() method with whitelist-based validation
- Validates all custom headers against allowed list from Microsoft documentation
- Blocks attempts to override protected headers (Authorization, Content-Type, etc.)
- Case-insensitive header matching per HTTP specification (RFC 2616)
- Detailed error messages showing invalid headers and allowed alternatives

ALLOWED CUSTOM HEADERS (per Microsoft Dataverse Web API docs):
- MSCRM.SolutionUniqueName: Associates metadata changes with solutions
- MSCRM.MergeLabels: Controls label merging behavior (true/false)
- Consistency: Forces reading latest version (value: "Strong")
- If-Match: Standard HTTP header for optimistic concurrency control
- If-None-Match: Standard HTTP header for caching control

PROTECTED HEADERS (never allowed in customHeaders):
- Authorization, Accept, Content-Type, OData-MaxVersion, OData-Version,
  Prefer, Content-Length (all controlled by makeHttpRequest)

IMPLEMENTATION:
- Created ALLOWED_METADATA_HEADERS constant with whitelist (5 headers)
- Created PROTECTED_HEADERS constant with blacklist (7 headers)
- Integrated validation into buildMetadataHeaders() for automatic coverage
- All metadata operations now automatically validated:
  * createEntityDefinition / updateEntityDefinition
  * createAttribute / updateAttribute
  * createRelationship / updateRelationship
  * createGlobalOptionSet / updateGlobalOptionSet
  * createPolymorphicLookup

BENEFITS:
- Prevents header injection attacks and accidental header overrides
- Ensures API compliance with Microsoft's documented patterns
- Provides clear developer feedback when invalid headers are used
- Defense-in-depth validation even for type-safe inputs

DOCUMENTATION REFERENCES:
Based on thorough review of 6 Microsoft Learn articles covering all metadata
operation types (entity, attribute, relationship, option set operations).

Changes maintain backward compatibility - all existing code uses valid headers
through typed MetadataOperationOptions interface.

* fix(types): replace 'any' with MetadataOperationOptions in IPC handlers

Improved type safety in metadata operation IPC handlers by replacing all
occurrences of 'options?: any' with proper 'options?: MetadataOperationOptions'
type annotation.

CHANGES:
- Added MetadataOperationOptions to type imports from ../common/types
- Updated 9 IPC handler signatures to use MetadataOperationOptions:
  * CREATE_ENTITY_DEFINITION
  * UPDATE_ENTITY_DEFINITION
  * CREATE_ATTRIBUTE
  * UPDATE_ATTRIBUTE
  * CREATE_POLYMORPHIC_LOOKUP_ATTRIBUTE
  * CREATE_RELATIONSHIP
  * UPDATE_RELATIONSHIP
  * CREATE_GLOBAL_OPTION_SET
  * UPDATE_GLOBAL_OPTION_SET

BENEFITS:
- Eliminates use of 'any' type, maintaining TypeScript strict mode compliance
- Provides IntelliSense and autocomplete for options parameter
- Type safety ensures only valid options (solutionUniqueName, mergeLabels,
  consistencyStrong) can be passed through IPC layer
- Consistency with DataverseManager method signatures
- Compile-time validation of option properties

This change maintains backward compatibility while adding proper type checking
for all metadata operation options passed from tools via IPC.

* chore: update version to 1.0.19 in package.json

* feat(preload): sync metadata CRUD operations with toolPreloadBridge

Synchronized preload.ts with toolPreloadBridge.ts to ensure both the main
ToolBox UI and tool windows have identical metadata operation APIs available.
This maintains API parity and enables future metadata manipulation from the
main UI if needed.

ADDED METADATA OPERATIONS (22 new methods in dataverse namespace):

Metadata Helper Utilities:
- buildLabel: Build localized Label objects for metadata operations
- getAttributeODataType: Get OData type string for attribute type enums

Entity (Table) Metadata CRUD:
- createEntityDefinition: Create new entity/table definitions
- updateEntityDefinition: Update existing entity definitions (PUT)
- deleteEntityDefinition: Delete entity definitions

Attribute (Column) Metadata CRUD:
- createAttribute: Create new attributes/columns on entities
- updateAttribute: Update existing attribute definitions (PUT)
- deleteAttribute: Delete attributes from entities
- createPolymorphicLookupAttribute: Create multi-table lookup attributes

Relationship Metadata CRUD:
- createRelationship: Create 1:N, N:N, or polymorphic relationships
- updateRelationship: Update existing relationship definitions (PUT)
- deleteRelationship: Delete relationships

Global Option Set (Choice) Metadata CRUD:
- createGlobalOptionSet: Create new global option sets/choices
- updateGlobalOptionSet: Update existing global option sets (PUT)
- deleteGlobalOptionSet: Delete global option sets

Option Value Modification Actions (OData Actions):
- insertOptionValue: Insert new option values into option sets
- updateOptionValue: Update existing option values (labels, etc.)
- deleteOptionValue: Delete option values from option sets
- orderOption: Reorder option values within option sets

BENEFITS:
- API parity between main UI (preload.ts) and tool windows (toolPreloadBridge.ts)
- Main ToolBox UI can now perform metadata operations if needed in future
- Consistent API surface across all preload contexts
- Future-proofing for internal metadata management UI features
- All operations support primary/secondary connection targeting

IMPLEMENTATION NOTES:
- All methods maintain same signatures as toolPreloadBridge.ts
- Options parameter uses Record<string, unknown> for flexibility
- Connection targeting via optional connectionTarget parameter
- Validated header whitelisting enforced by DataverseManager layer

This synchronization ensures both contexts stay in sync as the metadata API
evolves and provides maximum flexibility for future UI enhancements.

---------

Co-authored-by: Power-Maverick <danish.naglekar@hotmail.com>
* Initial plan

* Fix loading screen to only block tool panel, not entire window

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Address code review: Fix listener leak and simplify null coalescing

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fix IPC listener cleanup: use ipcMain.on instead of once

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fix loading overlay bounds calculation and add close button

- Get bounds directly from active tool BrowserView instead of renderer
- Add getActiveToolBounds() method to ToolWindowManager
- Remove rounded corners from overlay container
- Add close button to manually dismiss loading overlay
- Make overlay window focusable and closable

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Improve close button accessibility and contrast

- Add aria-label for screen reader support
- Increase background opacity for better contrast (0.1 -> 0.15)
- Add visible focus indicator with blue border and shadow
- Improve border visibility (0.2 -> 0.3 opacity)

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fix overlay positioning and explicitly remove all rounded corners

- Use content bounds (screen coordinates) instead of incorrectly adding window bounds to BrowserView bounds
- Explicitly set border-radius:0 on overlay-container and close-button
- BrowserView bounds are content-relative, overlay BrowserWindow needs screen coordinates

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Address code review feedback: fix shutdown handling, HTML escaping, and error telemetry

- Add isMainWindowClosing flag to allow overlay to close during app shutdown
- Escape HTML in loading message to prevent injection attacks
- Improve error handling with captureException and full context (activeToolId, tags)
- Properly destroy overlay window in cleanup
- Add close listener on main window to set shutdown flag

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Refine code review fixes: use specific listener reference and clarify HTML escaping

- Store closeHandler reference to remove specific listener (not all listeners)
- Add comment explaining critical order of HTML entity replacements
- Prevent potential issues with removeAllListeners affecting other code

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Polish destroy logic for better clarity and consistency

- Move overlayWindow null assignment inside if block for logical consistency
- Set closeHandler to null after cleanup for better flow
- Clearer separation of window cleanup vs handler cleanup

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
)

* feat: add getCSDLDocument API for retrieving OData  endpoint (#384)

Add new getCSDLDocument() method to DataverseAPI that retrieves the complete
CSDL/EDMX metadata document from Dataverse's OData $metadata endpoint.

Key Features:
- Returns raw XML containing complete schema metadata (entities, attributes,
  relationships, actions, functions, complex types, enum types)
- Supports gzip/deflate compression for optimal transfer (70-80% size reduction)
- Automatic decompression handling using Node.js zlib module
- Multi-connection support (primary/secondary) for advanced tools
- Response size: 1-5MB typical, up to 10MB+ for complex environments

Implementation:
- Added GET_CSDL_DOCUMENT IPC channel to channels.ts
- Implemented getCSDLDocument() in DataverseManager with:
  - Custom HTTPS request handler (avoids JSON parsing)
  - Accept-Encoding: gzip, deflate headers
  - Automatic decompression via zlib.gunzip/inflate
  - Buffer-based response handling for binary data
- Registered IPC handler in index.ts with connection targeting support
- Exposed method in toolPreloadBridge.ts and preload.ts
- Added comprehensive TypeScript definitions in dataverseAPI.d.ts

Use Cases:
- Build Dataverse REST Builder (DRB) clone tools
- Create intelligent query builders and code generators
- Generate TypeScript interfaces from schema
- Explore entity relationships and metadata
- Validate action/function parameters

Naming Rationale:
Method named getCSDLDocument() (not getMetadata()) to avoid confusion with
existing entity metadata operations like getEntityMetadata() and
getAllEntitiesMetadata(). CSDL (Common Schema Definition Language) clearly
indicates it returns the OData service document.

Related: #384

* fix: expose getCSDLDocument on window.dataverseAPI for direct tool access

Fixed issue where getCSDLDocument was only accessible via
window.toolboxAPI.dataverse.getCSDLDocument but not directly on
window.dataverseAPI.getCSDLDocument like other Dataverse operations.

Changes:
- Added getCSDLDocument to toolPreloadBridge.ts dataverseAPI namespace
- Now consistent with other operations (getSolutions, queryData, etc.)
- Tools can call dataverseAPI.getCSDLDocument() directly as expected

This ensures getCSDLDocument follows the same exposure pattern as all
other Dataverse API methods.

* fix: decompress error responses in getCSDLDocument for readable error messages

Previously, error responses (non-200 status codes) were converted directly
from Buffer to UTF-8 string without checking for compression. Since the
request includes 'Accept-Encoding: gzip, deflate' header, Dataverse may
return compressed error responses, resulting in garbled error messages.

Changes:
- Added decompression logic to error response path
- Check content-encoding header (gzip/deflate/none)
- Decompress error body before converting to string
- Added try-catch to handle decompression failures gracefully
- Error messages now readable regardless of compression

This mirrors the success path's decompression logic and ensures consistent
handling of both success and error responses.
* fix: clean up toolboxAPI type definitions and improve connection handling

* fix: implement filesystem access management for tools with user consent model

* Fix filesystem access tracking to use instanceId instead of toolId (#390)

* Initial plan

* fix: track filesystem access per instance instead of per tool

This change fixes the issue where closing one instance of a tool would
revoke filesystem access for all other instances of the same tool.

Changes:
- Updated ToolFileSystemAccessManager to use instanceId as key instead of toolId
- Added getInstanceIdByWebContents() method to ToolWindowManager
- Updated all filesystem IPC handlers to use instanceId
- Updated closeTool() to revoke access only for the specific instance

This ensures that each tool instance maintains its own filesystem
permissions independently, allowing multiple instances of the same tool
to run simultaneously without interfering with each other.

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* refactor: eliminate code duplication in toolWindowManager methods

Refactor getToolIdByWebContents() to call getInstanceIdByWebContents()
and extract the toolId from the result, eliminating duplicated loop logic.

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
…aller (#397)

* Initial plan

* Add Windows multi-architecture support to latest.yml generation

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Apply Windows YAML merge fix to nightly-release workflow

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Add standalone script to generate merged Windows latest.yml

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Add buildScripts/latest.yml to gitignore and remove example file

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Add macOS multi-architecture support to latest-mac.yml generation

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Remove legacy build scripts and add new merge scripts for Windows and macOS

- Deleted old merge scripts: merge-macos-latest-yml.sh, merge-windows-latest-yml.sh, test-macos-build.sh, verify-build.sh
- Added new merge scripts for Windows and macOS with improved functionality and documentation.
- Created README for merge scripts detailing usage and troubleshooting.
- Implemented new test and verification scripts for macOS builds to ensure proper packaging and structure.

* fix: correct path to verify-build.sh script in build workflow

* Update buildScripts/sh/merge-latest-yml.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/prod-release.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/nightly-release.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Co-authored-by: Power-Maverick <danish.naglekar@hotmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add support for bundled SVG icons in tools with backward compatibility (#380)

* Initial plan

* Add SVG icon support with pptb-webview protocol for bundled icons

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Address code review feedback: fix recent tools icon handling and add HTML escaping

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Add comprehensive HTML escaping for XSS prevention in icon URLs

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Improve accessibility and eliminate code duplication in HTML escaping

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Add defensive URL validation to prevent JavaScript protocol injection

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fix CodeQL warning by blocking vbscript protocol in URL validation

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Remove HTTP(S) icon support, change path to dist/ relative, rename iconUrl to icon

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Update ToolManifest comment to reflect bundled icons only (no HTTP URLs)

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Add support for new Supabase 'icon' column with backward compatibility fallback to 'iconurl'

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fix CSP error by allowing HTTP(S) URLs for marketplace icon display

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Add pptb-webview protocol to CSP img-src to allow local SVG icon loading

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* feat: add SVG icon support and improve icon URL resolution

* feat: implement theme-aware SVG icon support with CSS masks and improve icon rendering

* refactor: remove tool icon configuration section from README.md

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Co-authored-by: Power-Maverick <danish.naglekar@hotmail.com>

* Move tool distribution from GitHub Releases to Azure Blob Storage (#400)

* Initial plan

* Add Azure Blob Storage support for tool distribution and registry fallback

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Remove hard-coded Azure Blob storage account name; resolve URLs at runtime from AZURE_BLOB_BASE_URL

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Simplify registry.json downloadUrl to filename-only; packages/ prefix added automatically at runtime

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Use per-tool version folder layout in Azure Blob, mirroring GitHub Releases structure

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Read download URL from new 'download' column in Supabase tools table, fall back to 'downloadurl'

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* fix: update Azure Blob Storage migration documentation to reflect new package structure

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Co-authored-by: Power-Maverick <danish.naglekar@hotmail.com>

* feat: enhance ToolManager to create tools from installed manifests and improve tool retrieval logic

* Update src/main/constants.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Azure Blob test download URL to dedicated test path (#404)

* Initial plan

* Update test tool download URL to /test/pptb-standard-sample-tool-download-test.tar.gz

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fix resolveDownloadUrl to include packages/ prefix for Azure Blob Storage paths (#405)

* Initial plan

* fix: include packages/ prefix in resolveDownloadUrl for Azure Blob Storage

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Fix: include `icon` field in `fetchAzureBlobRegistry` tool mapping (#406)

* Initial plan

* fix: include icon field in fetchAzureBlobRegistry mapping

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Update src/main/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Initial plan

* Add modern themed update notification modal dialog

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Address review comments: reword restart warning and extract highlights from release notes

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>

* Update src/renderer/modules/autoUpdateManagement.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Power-Maverick and others added 25 commits May 21, 2026 11:08
…erlayWindowManager, and deprecated UtilsAPI methods

Agent-Logs-Url: https://github.com/PowerPlatformToolBox/desktop-app/sessions/9533b0ba-911a-4e4b-ac3a-2dfdf994bfd1

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
…screen-api

remove deprecated loading screen API and associated handlers
- Add applyZoomLevelToAllTools() to ToolWindowManager to apply zoom to all tool views
- Apply main window's zoom level to newly launched tool BrowserViews
- Replace role-based zoom menu items with custom handlers that sync zoom to tools
- Rename Window menu 'Zoom' to 'Maximize Window' to avoid confusion with content zoom
- Use 0.5 zoom level steps (~10% per step) matching Electron default behaviour

Agent-Logs-Url: https://github.com/PowerPlatformToolBox/desktop-app/sessions/67f9177d-fcba-4d85-8aa2-4d16d45a7816

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
- Add 'mailto' to CspExceptions type so tools can declare they use mailto links
- Handle mailto: navigation events in toolWindowManager to open via shell.openExternal when consent was granted
- Set setWindowOpenHandler to intercept window.open('mailto:...') calls
- Update CSP exception consent modal to display mailto entries as 'Email links (mailto:)'
- Use dynamic modal title/description based on whether the permission is mailto-only, mixed, or web-only

Agent-Logs-Url: https://github.com/PowerPlatformToolBox/desktop-app/sessions/1d13b2f4-4369-4693-ba94-a27242b3979f

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
…ix comments

Agent-Logs-Url: https://github.com/PowerPlatformToolBox/desktop-app/sessions/1d13b2f4-4369-4693-ba94-a27242b3979f

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
…zoom

- Change Zoom In accelerator from Command/Ctrl+= to Command/Ctrl+Shift+=
  so pressing the physical + key (Shift+=) triggers zoom in, matching the
  symmetry of Zoom Out (Command/Ctrl+-) and user expectation
- Scale renderer-reported CSS pixel bounds by zoom factor in boundsResponseListener
  so BrowserView.setBounds() receives correct logical pixel values after zoom
- Call scheduleBoundsUpdate() in applyZoomLevelToAllTools() to re-fit the
  active tool BrowserView to its panel immediately after every zoom change

Agent-Logs-Url: https://github.com/PowerPlatformToolBox/desktop-app/sessions/fec4ad6f-b603-4629-a308-40ef888ded44

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
…ow-scaling-and-zooming

feat: sync zoom level across main window and all open tool BrowserViews
- Merge origin/dev (zoom sync feature) into this branch
- Move mailto event handlers before loadURL() to cover first navigation
- Use case-insensitive url.toLowerCase() for mailto: scheme check
- Remove PII URL from parse-failure warning log
- Filter 'mailto' key from CSP directive building in browserviewProtocolManager
- Preserve applyZoomLevelToAllTools() and zoom-factor bounds scaling from dev

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
FEAT: Alter colour of update icon and and filter
…es-mailto-links

feat: allow tools to open mailto: links with user consent
…able builds only and add insider tag to About modal
Agent-Logs-Url: https://github.com/PowerPlatformToolBox/desktop-app/sessions/a0a2ae7a-e1e0-451a-acbc-cd18a2266a85

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Agent-Logs-Url: https://github.com/PowerPlatformToolBox/desktop-app/sessions/a0a2ae7a-e1e0-451a-acbc-cd18a2266a85

Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
…ool-invocation-docs

docs: Add Inter-Tool Invocation developer documentation
Copilot AI review requested due to automatic review settings May 24, 2026 18:11
@github-actions
Copy link
Copy Markdown

Bundle Size Report 📦

Bundle Size
Main Process 958.57 KB
Renderer JS 547.4 KB
Renderer CSS 95.93 KB
Total 1.56 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.

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

Release PR for v1.2.2, spanning new end-user capabilities (tray, link handling, filters), a new inter-tool invocation surface for tool developers, and substantial build/release pipeline updates (stable vs insider channel, signing, notarization support).

Changes:

  • Add inter-tool invocation (launch-with-context + return data) across IPC, preload bridges, types, validator, and docs.
  • Improve UX: filter clear buttons + active-filter indicators, themed modal backdrop, update badge rendering, tool detail icon theming, and mcas.ms URL support.
  • Release/build updates: channel support (PPTB_CHANNEL), tray icon + insider branding, safer protocol handling, Windows signing workflow changes, and version bump to 1.2.2.

Reviewed changes

Copilot reviewed 52 out of 65 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
vite.config.ts Inject PPTB_CHANNEL at build time via Vite env defines.
src/renderer/styles.scss UI styling updates for filters, badges, modal backdrop, and various transitions/alignment tweaks.
src/renderer/modules/toolsSidebarManagement.ts Add “Update Available” filter + active-filter indicator/clear button behavior; update badge markup.
src/renderer/modules/toolManagement.ts Support inter-tool launch context via launchToolWithContext option path.
src/renderer/modules/themeManagement.ts Update tool-detail fallback icons when theme changes.
src/renderer/modules/marketplaceManagement.ts Filter indicator/clear button behavior; icon rendering via shared helper; add “new only” programmatic filter.
src/renderer/modules/initialization.ts Wire clear-filter buttons; remove legacy loading screen listener setup.
src/renderer/modules/homepageManagement.ts Navigate to marketplace with “new only” filter applied from banner.
src/renderer/modules/connectionManagement.ts Add .mcas.ms hostname support; filter indicator/clear button and clear helper.
src/renderer/modules/browserWindowModals.ts Add renderer-side modal backdrop show/hide behavior around BrowserWindow modals.
src/renderer/modules/aboutManagement.ts Extend About info model with insider flag.
src/renderer/modals/selectMultiConnection/view.ts Minor template whitespace adjustments.
src/renderer/modals/selectConnection/view.ts Minor template whitespace adjustments.
src/renderer/modals/importConnectionSource/view.ts Minor template whitespace adjustments.
src/renderer/modals/editConnection/view.ts Minor template whitespace adjustments.
src/renderer/modals/cspException/view.ts Improve CSP consent UX text; special-case mailto permission labeling.
src/renderer/modals/addConnection/view.ts Minor template whitespace adjustments.
src/renderer/modals/about/view.ts Add “Insider” badge styling and rendering in About modal.
src/renderer/index.html Add filter clear buttons + update-available checkbox; add modal backdrop element; remove legacy loading overlay DOM.
src/renderer/constants/index.ts Remove loading screen fade duration constant (legacy loading UI removed).
src/main/utilities/index.ts Re-export new feedback utilities.
src/main/utilities/feedback.ts Add environment diagnostics + feedback URL builders for ToolBox/tools.
src/main/toolPreloadBridge.ts Add invocation API + change tool utils URL-opening method; expose new IPC channels.
src/main/preload.ts Expose launchToolWithContext; remove deprecated loading utils; extend About payload.
src/main/managers/trayManager.ts New tray manager to keep app accessible (esp. macOS) + channel-aware tray icon.
src/main/managers/toolWindowManager.ts Add inter-tool invocation lifecycle + mailto consent enforcement + zoom/bounds fixes.
src/main/managers/protocolHandlerManager.ts Avoid protocol registration/instance lock for insider/dev; improve lock-failure UX.
src/main/managers/notificationWindowManager.ts Make notifications always-on-top.
src/main/managers/browserviewProtocolManager.ts Ignore non-CSP “mailto” directive when building CSP header.
src/main/index.ts Add tray integration, URL validation helpers, connection-browser opening IPC, zoom sync, feedback URL wiring, and dev mock updates.
src/common/types/common.ts Document and add mailto as a special CSP/permission directive in tool config types.
src/common/types/api.ts Update toolbox API typings: add launchToolWithContext, extend About payload, remove deprecated loading APIs.
src/common/ipc/channels.ts Add invocation IPC channels + open-in-connection-browser; remove legacy loading screen channels.
RELEASE_NOTES.md Update release notes to 1.2.2 (highlights/fixes/dev/build/install).
pnpm-lock.yaml Dependency lock updates (including version bumps and deprecation metadata).
packages/toolboxAPI.d.ts Update tool developer typings: add invocation APIs + openInConnectionBrowser.
packages/README.md Document invocation + optional pptb.config.json and update API reference.
packages/pptbConfig.d.ts New types for pptb.config.json invocation contract schema.
packages/package.json Publish @pptb/types as 1.2.2 and include new d.ts file.
packages/lib/validate.js Add validatePPTBConfig for pptb.config.json + export it.
packages/index.d.ts Reference and export pptbConfig declarations.
packages/bin/pptb-validate.js Auto-validate pptb.config.json alongside package.json; merge outputs.
package.json Bump app version to 1.2.2; add insider packaging scripts; remove build from package scripts (handled in package.js).
docs/INTER_TOOL_INVOCATION.md New detailed documentation for inter-tool invocation feature.
docs/azure-trusted-signing.md Update documentation for phased Windows signing approach.
buildScripts/package.js Add --insider support and inject PPTB_CHANNEL; run build before electron-builder.
buildScripts/electron-builder-win-insider.json New insider Windows electron-builder config.
buildScripts/electron-builder-win-arm64-insider.json New insider Windows ARM64 electron-builder config.
buildScripts/electron-builder-mac-insider.json New insider macOS electron-builder config.
buildScripts/electron-builder-linux-insider.json New insider Linux electron-builder config.
buildScripts/electron-builder-base.json Package icons/** instead of assets/**.
buildScripts/electron-builder-base-insider.json New shared base config for insider builds.
.gitignore Ignore .DS_Store.
.github/workflows/prod-release.yml Stable release pipeline updates incl. Windows prepackaged signing flow + stable channel env.
.github/workflows/nightly-release.yml Insider nightly pipeline updates incl. insider configs/channel env + Windows signing flow.
.github/workflows/merge-prs.yml New workflow to combine PRs via github/combine-prs.
.github/plans/plan-inter-tool-launch-context.md Added design/plan doc for inter-tool invocation work.
.env.example Add Azure blob base URL and mock updates env vars.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread src/main/toolPreloadBridge.ts
Comment on lines 116 to 131
@@ -124,6 +129,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: node ./buildScripts/package.js --config=${{ matrix.config }}
env:
Comment on lines 90 to 105
@@ -98,6 +103,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: node ./buildScripts/package.js --config=${{ matrix.config }}
env:
Comment thread src/main/index.ts
Comment on lines +424 to +440
private parseAndValidateExternalUrl(url: unknown, allowedProtocols: Set<string>, operation: "openExternal" | "openInConnectionBrowser"): URL | null {
if (typeof url !== "string") {
logWarn(`Blocked ${operation} call with non-string url`, { urlType: typeof url });
return null;
}

let parsedUrl: URL;
try {
parsedUrl = new URL(url);
} catch {
logWarn(`Blocked ${operation} call with invalid url`, { url });
return null;
}

if (!allowedProtocols.has(parsedUrl.protocol)) {
logWarn(`Blocked ${operation} call with disallowed protocol`, { url, protocol: parsedUrl.protocol });
return null;
@Power-Maverick Power-Maverick merged commit 2d337da into main May 25, 2026
11 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.

9 participants