Skip to content

Modernize pacx wr setEnvImage to use CustomThemeDefinition (env/app scope) with local theme support#196

Draft
Copilot wants to merge 4 commits into
masterfrom
copilot/update-setenvimage-command
Draft

Modernize pacx wr setEnvImage to use CustomThemeDefinition (env/app scope) with local theme support#196
Copilot wants to merge 4 commits into
masterfrom
copilot/update-setenvimage-command

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

pacx wr setEnvImage was still using legacy theme mechanics and did not support per-app modern theme overrides. This updates the command to manage logo changes through CustomThemeDefinition, including app-scoped usage and local theme.xml workflows.

  • Command surface update

    • Added optional --appId / --appName to target app-level setting values.
    • Added optional --localThemeFile to update and reuse a local theme.xml.
    • Added argument validation for mutually exclusive app selectors and GUID format checks for --appId.
  • Modern theme setting flow (CustomThemeDefinition)

    • Resolves scope automatically:
      • environment-level (default)
      • app-level (when --appId or --appName is provided)
    • Reads CustomThemeDefinition setting value from organizationsetting or appsetting.
    • When setting already points to a theme webresource:
      • loads XML
      • updates logo node to the selected image webresource
      • persists (and optionally updates local file)
    • When setting is missing/empty:
      • with --localThemeFile: updates local theme XML, pushes it as webresource, updates setting value
      • without --localThemeFile: creates theme.xml under publisherprefix_/themes/, optionally saves locally in .wr.pacx context, pushes it, updates setting value
  • Dataverse integration consistency

    • Reuses established webresource upsert and solution-association patterns.
    • Publishes the updated/created theme webresource after write.
    • Normalizes publisher-prefix folder behavior to avoid malformed prefix__ paths.
  • Focused test coverage

    • Added parser/validation tests for new options and constraints.
    • Added executor tests for:
      • existing CustomThemeDefinition webresource update path
      • missing-setting + missing-default-solution failure path
# environment-level logo update
pacx webresources setEnvImage -n new_logo.png

# app-level logo update
pacx webresources setEnvImage -n new_logo.png --appName SalesHub
# or
pacx webresources setEnvImage -n new_logo.png --appId 00000000-0000-0000-0000-000000000000

# local theme file workflow
pacx webresources setEnvImage -n new_logo.png --localThemeFile .\new_\themes\theme.xml

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • learn.microsoft.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • www.tompivny.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue May 19, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update pacx wr setEnvImage command for new method Modernize pacx wr setEnvImage to use CustomThemeDefinition (env/app scope) with local theme support May 19, 2026
Copilot AI requested a review from neronotte May 19, 2026 18:10
- va testato meglio
- c'è già un problema: se non viene settato il tema "completamente", l'immagine non si vede.

Suggerisco di:
- mantenere questo comando come era prima, ma settarlo deprecato
- fare un nuovo comando pacx wr setTheme che consenta di settare il tema passando tutti i parametri.
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.

pacx webresources setEnvImage to update

2 participants