Skip to content

Devcontainer: install and expose vite-plus - #33302

Closed
mafes wants to merge 9 commits into
evcc-io:masterfrom
mafes:fix/issue-33295
Closed

mafes wants to merge 9 commits into
evcc-io:masterfrom
mafes:fix/issue-33295

Conversation

@mafes

@mafes mafes commented Aug 30, 2026

Copy link
Copy Markdown

fixes #33295

Update the devcontainer setup to install Vite Plus during container creation and make its binaries available in subsequent sessions.

  • Install Vite Plus before installing UI and Go dependencies.
  • Persist the Vite Plus binary paths through remoteEnv.

🤖 Generated with Claude Code

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions github-actions Bot added the infrastructure Basic functionality label Aug 30, 2026
@Maschga

Maschga commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Thanks for fixing it!

Can this be automatically tested by the pipeline?

@mafes

mafes commented Aug 30, 2026

Copy link
Copy Markdown
Author

Thanks for fixing it!

Can this be automatically tested by the pipeline?

Sure. Take a look at the new workflow file. Feel free to customize it to suit your needs.

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

Lifecycle commands run twice, and the smoke test does not reliably validate the persisted PATH.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Installs Vite Plus during devcontainer setup and adds CI coverage for container initialization.

Changes:

  • Installs Vite Plus before project dependencies.
  • Persists Vite Plus paths across sessions.
  • Adds a devcontainer smoke-test workflow.

🤖 Generated with GitHub Copilot

File summaries
File Description
.devcontainer/devcontainer.json Installs and exposes Vite Plus.
.github/workflows/devcontainer.yml Builds and smoke-tests the devcontainer.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/devcontainer.yml Outdated
Comment thread .github/workflows/devcontainer.yml Outdated
@github-actions github-actions Bot removed the stale Outdated and ready to close label Sep 10, 2026
mafes and others added 2 commits September 10, 2026 22:21
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Code review

.devcontainer/devcontainer.json — ${containerEnv:HOME} likely resolves to empty, breaking the PATH persistence fix

"GOTOOLCHAIN": "auto",
"PATH": "${containerEnv:HOME}/.vite-plus/bin:${containerEnv:HOME}/.local/share/vite-plus/bin:${containerEnv:PATH}"
}

containerEnv:VAR substitution in devcontainer.json is resolved from the container image's baked-in Config.Env, not the runtime $HOME of the remote/exec user. Base devcontainer images (e.g. mcr.microsoft.com/devcontainers/go) don't bake HOME into the image env — it's derived per-process from /etc/passwd. So ${containerEnv:HOME} would expand to empty, making this resolve to:

/.vite-plus/bin:/.local/share/vite-plus/bin:${containerEnv:PATH}

i.e. dead path entries, meaning vp would not actually stay on PATH in later sessions — which is the whole point of this change. (The postCreateCommand's own export PATH="$HOME/..." only affects that one shell and doesn't fix this.)

Suggested fix: use a literal home path (e.g. /home/vscode/...) instead of ${containerEnv:HOME}.

@mafes

mafes commented Sep 10, 2026

Copy link
Copy Markdown
Author

@sourcery-ai review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. The devcontainer now executes a remote installer directly with curl | bash, so a compromised or incorrect vite.plus response could run arbitrary code in developer and CI environments and potentially expose credentials or workspace data. Reverting prevents future installations, but it does not undo any compromise or data exposure that already occurred.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@premultiply

Copy link
Copy Markdown
Member

Replaced by #33564

@mafes
mafes deleted the fix/issue-33295 branch September 14, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Basic functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Devcontainer: Vite+ CLI is not installed before make install-ui

4 participants