build(ui): source-only main; build & embed UI at release time#99
Merged
Conversation
The built React UI was committed under internal/ui/dist. Switch to a source-only main: the dist is generated at release time and embedded into the tagged commit, not carried on the branch. - Untrack internal/ui/dist/** (built assets); track only a .gitkeep placeholder so `//go:embed all:dist` still compiles on a source-only checkout. .gitignore ignores everything in dist except .gitkeep. - internal/ui/ui.go: `//go:embed static/* dist` -> `static/* all:dist` (embeds the dotfile placeholder; a plain `go build` serves no SPA until the UI is built — release tags carry the real dist so `go install ...@<tag>` is UI-complete). - scripts/release.sh + `make release VERSION=...`: build the UI, create a detached release commit that includes dist, tag it, push only the tag. main stays artifact-free. ui-build/release re-touch .gitkeep (vite emptyOutDir wipes it). - README: document the source-only build + release flow. go build ./... compiles with only .gitkeep present; make build produces a UI-complete binary and leaves the tree clean (built assets ignored). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
aksOps
added a commit
that referenced
this pull request
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Why
The built React UI was committed under
internal/ui/dist. This switches to asource-only main: the dist is generated at release time and embedded into
the tagged commit, not carried on the branch.
go install <module>@<tag>only compiles Go (never runs vite), so the taggedcommit must carry the built dist for the installed binary to be UI-complete.
That's now handled by
scripts/release.sh— main stays artifact-free.Changes
internal/ui/dist/**; track only a.gitkeepplaceholder so//go:embed all:diststill compiles on a source-only checkout..gitignoreignores everything in
distexcept.gitkeep.internal/ui/ui.go://go:embed static/* dist→static/* all:dist.scripts/release.sh+make release VERSION=…: build the UI, create adetached release commit that includes
dist, tag it, push only the tag.ui-build/releasere-touch.gitkeep(viteemptyOutDirwipes it).Validation
go build ./...compiles with only.gitkeeppresent (CI'sgo buildpath).make buildproduces a UI-complete binary and leaves the tree clean (builtassets correctly ignored — no accidental-commit footgun).
distcontent.🤖 Generated with Claude Code