Skip to content

Module + App combined generation#5958

Draft
allisonschiang wants to merge 32 commits intoviamrobotics:mainfrom
allisonschiang:RSDK-13773-module-app-both
Draft

Module + App combined generation#5958
allisonschiang wants to merge 32 commits intoviamrobotics:mainfrom
allisonschiang:RSDK-13773-module-app-both

Conversation

@allisonschiang
Copy link
Copy Markdown
Member

Summary

Generates a module with embedded webapp support. When user selects 'both':

  • Runs full module generation pipeline
  • Adds webapp.go (vmodutils HTTP server with is_local cookie)
  • Creates dist/index.html placeholder
  • Adds applications[] to meta.json
  • Registers webapp model in cmd/module/main.go
  • Updates Makefile to include dist in tar
  • Adds vmodutils to go.mod

Currently only supports Go modules. Blocked on language-agnostic local server solution for Python/C++.

Test plan

  • Run viam module generate and select "both" for module type
  • Verify generated module compiles and runs
  • Verify webapp.go is generated with HTTP server
  • Verify dist/index.html placeholder exists
  • Verify meta.json contains applications[] entry
  • Verify Makefile includes dist in tar target
  • Run existing unit tests: go test ./cli/...

🤖 Generated with Claude Code

allisonschiang and others added 30 commits April 16, 2026 17:49
Replace inlined HTTP server + cookie injection code with
github.com/erh/vmodutils.NewWebModuleAndStart(). The vmodutils
package is actively maintained and handles the server lifecycle.

make setup fetches the latest vmodutils version via go get.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Apr 22, 2026
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Apr 22, 2026
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test This pull request is marked safe to test from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants