Skip to content

ci(widget): Next widget version - #856

Open
eybbus wants to merge 6 commits into
mainfrom
eybbus/feat-next-widget-version
Open

eybbus wants to merge 6 commits into
mainfrom
eybbus/feat-next-widget-version

Conversation

@eybbus

@eybbus eybbus commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Ref

Well... this is awkward...

Description

So my ci: Improve widget release process has a claring issue that I did not take into account. Staging...

bilde

If a person wanted to do the widget release via the automatic way it would be impossible to tests widget on staging before release.
Also doesn't help that the widget is kinda screwed up in in vercel in the release pr. (Different problem and a different solution in the making)

So this is the solution to that problem... this still will all be solved with our new repo that is specifically for the widget. But no eta on that one yet.

Back to the solution. We make staging always build the widget and store it under version "next". version "next" is walways build from main and is only deployed to staging. Production wont have it. Staging will have a way switch between a released version and a "next" version.

So testing on staging is possible again... yay. Staging will always have the latest version 😄

I am aware that the amount of scripts is building up. Will most likely soon refactor those scripts I feel they can be one script with arguments instead of multiple scripts.

Am also considering if we should name this "canary" or something else? Don't like next so much but its used. Would use latest but feel like that could lead to confusion when somebody talks about the "latest version" 🤷

Modified Diagram based on previous diagram

flowchart TD
    M[PR merged to main] --> N[Staging deployment builds<br/>unreleased widget 'next']
    N --> O[unreleased widget available <br/> on staging for testing]
    M --> A[Release PR opened or updated]
    A --> B[Build widget for all orgs]
    B --> C{Changed since<br/>last version?}
    C -->|Yes| E[Commit widget to release PR]
    C -->|No| D{force-widget-release<br/>label?}
    D -->|Yes| E
    D -->|No| F[Discard build]
    E --> G[Merge release PR]
    F --> G
    O -.-> G
    G --> H[Released to prod<br/>without next]
Loading

Demo

widgetPage - Without next version
bilde

WidgetPage - with next version

bilde

@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
planner-web Ready Ready Preview Nov 13, 2026 2:38pm UTC

Request Review

@github-actions

Copy link
Copy Markdown

Widget size

Size (gzip) Limit Change
✅ Widget JS 12.61 kB 13.00 kB No change
✅ Widget CSS 9.54 kB 13.00 kB No change

@eybbus
eybbus marked this pull request as ready for review November 11, 2026 12:35
@eybbus eybbus self-assigned this Nov 11, 2026
@eybbus eybbus changed the title feat: Next widget version ci(widget): Next widget version Nov 11, 2026
@gorandalum
gorandalum requested a balanced review from Copilot November 12, 2026 14:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The staging Docker build fails because Bash is unavailable, while production can expose unreleased widget assets and the preview labels unreleased installation snippets as the latest released version.

2 open issues
What changed in this PR

Adds an unreleased next widget build so staging can test widget changes before the release-PR process publishes a version.

Changes:

  • Builds next for non-production Docker deployments and adds a local generation command.
  • Defaults the widget demo to next when available, with links to switch to the latest release.
  • Excludes next from release metadata and version control, and adds a cache override for its assets.
File Description
src/​widget/​vite.config.js Supports overriding the widget version and output directory.
src/​pages/​widget/​index.tsx Selects the demo version and adds release-switching links.
src/​page-modules/​widget/​widget.module.css Styles the version information banner.
src/​page-modules/​widget/​server/​index.ts Exposes unreleased widget metadata when available.
src/​page-modules/​widget/​index.ts Exports the unreleased widget type.
scripts/​release-widgets.sh Excludes non-release directories from version comparisons.
scripts/​generate-widget-stat.js Limits manifest entries to released versions.
scripts/​build-widget-next.sh Builds and processes unreleased widget assets.
scripts/​build-docker.sh Invokes the widget build for non-production environments.
README.md Documents staging previews and local unreleased builds.
package.json Adds generate-widget-next.
next.config.js Detects unreleased assets and sets their cache policy.
.gitignore Excludes generated next assets.

Review effort: Balanced

Comment thread scripts/build-docker.sh Resolved
Comment thread src/pages/widget/index.tsx Resolved

This branch was successfully deployed

1 active deployment
Preview — 2e417d1b Deployed Nov 13, 2026 by vercel[bot]
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.

2 participants