Skip to content

ERA-11250 Swap in new cookie manager by Osano#1526

Merged
chrisj-er merged 4 commits intodevelopfrom
ERA-11250-A
Apr 9, 2026
Merged

ERA-11250 Swap in new cookie manager by Osano#1526
chrisj-er merged 4 commits intodevelopfrom
ERA-11250-A

Conversation

@chrisj-er
Copy link
Copy Markdown
Contributor

feat: update config in vite.
ix: A osanoPlugin() Vite plugin in vite.config.js that uses transformIndexHtml to inject the Osano snippet. It checks ctx.server — when
present, the dev server is running (local dev), so it skips injection. During vite build (used by all CI/CD deployments), ctx.server is
undefined, so the script gets injected.

feat: update config in vite.
ix: A osanoPlugin() Vite plugin in vite.config.js that uses transformIndexHtml to inject the Osano snippet. It checks ctx.server — when
  present, the dev server is running (local dev), so it skips injection. During vite build (used by all CI/CD deployments), ctx.server is
  undefined, so the script gets injected.
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

Updates the Vite build pipeline to inject the Osano cookie consent manager snippet during production builds (and avoid injecting during local dev), replacing the previous template-based injection in the legacy public/index.html.

Changes:

  • Added a custom Vite transformIndexHtml plugin to inject the Osano script/style snippet during vite build.
  • Removed the old environment-gated Osano snippet block from public/index.html.

Reviewed changes

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

File Description
vite.config.js Adds an osanoPlugin() that injects the Osano snippet into the built index.html.
public/index.html Removes the old Osano snippet that was previously injected via template logic.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

🚀 PR Environment Deployed

App Sync Health Image
pr-web-era-11250-a ✅ Synced ✅ Healthy 9fa219316313b3c486ec44fe04eb18f1ce7ed6d9

Access: https://era-11250-a.dev.pamdas.org

View in ArgoCD

… the tags API instead of string replacement
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

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

…style hiding .osano-cm-widget should go in <head> to prevent a flash of the

  widget before the CSS applies
@chrisj-er chrisj-er requested review from luixlive April 6, 2026 20:28
Copy link
Copy Markdown
Contributor

@luixlive luixlive left a comment

Choose a reason for hiding this comment

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

No blockers, the code seems fine. I just added 2 small recommendations to better align with our code standards.

fix: reorder the osanoPlugin() to be at end of plugin list.
@chrisj-er chrisj-er merged commit ba3de2e into develop Apr 9, 2026
6 checks passed
@chrisj-er chrisj-er deleted the ERA-11250-A branch April 9, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants