chore: remove compiled UI assets, build at release time#2
Merged
Conversation
Compiled UI assets should not be tracked in git. This change: - Adds .gitignore to exclude internal/ui_dist/* (keeping placeholder index.html) - Fixes Makefile ui target to output to internal/ui_dist/ (not repo root) - Updates release workflow to build UI from source before Go compilation - Removes stale ui_dist copy from install target (assets are embedded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
There was a problem hiding this comment.
Pull request overview
This PR stops committing compiled admin UI build artifacts and instead builds the UI during release, keeping only a lightweight placeholder HTML file in the repo to satisfy //go:embed during development builds.
Changes:
- Adds
.gitignorerules to ignore compiled UI assets underinternal/ui_dist/while keeping a tracked placeholderindex.html. - Updates
Makefileto build UI assets intointernal/ui_dist/and removes copyingui_dist/duringinstall. - Updates the release workflow to build the admin UI from the
GoCodeAlone/workflowrepo before compiling Go binaries.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
internal/ui_dist/index.html |
Replaces placeholder HTML with a minimal page used for dev builds/embedding. |
Makefile |
Removes UI asset copying from install and changes ui target output to internal/ui_dist/. |
.gitignore |
Ignores compiled UI artifacts under internal/ui_dist/ while keeping a tracked placeholder file. |
.github/workflows/release.yml |
Builds the UI during releases prior to Go compilation. |
Comments suppressed due to low confidence (3)
internal/ui_dist/index.html:4
internal/ui_dist/index.htmlis missing a closing</body>tag, which makes the placeholder HTML invalid. Consider adding</body>(and optionally a minimal<head>/charset) so opening the placeholder in a browser renders consistently.
<!DOCTYPE html>
<html>
<body>Run 'make ui' to build admin UI</body>
</html>
Makefile:23
- The
uitarget clones via SSH (git@github.com:...), which will fail for contributors who don't have an SSH key configured. Consider switching to an HTTPS clone (optionally supporting aGH_TOKEN/GITHUB_TOKENenv var for private access) to makemake uiwork in more environments.
cd /tmp && rm -rf workflow-ui-build && git clone --depth 1 git@github.com:GoCodeAlone/workflow.git workflow-ui-build
cd /tmp/workflow-ui-build/ui && npm ci && npx vite build
Makefile:24
- This target now writes built UI assets to
internal/ui_dist, but the repo documentation still refers toui_dist/at the repo root as the built UI directory. Please update the docs accordingly to avoid confusing contributors about where UI assets live and how//go:embedpicks them up.
rm -rf internal/ui_dist && cp -r /tmp/workflow-ui-build/ui/dist internal/ui_dist
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No GH_TOKEN secret needed — GoCodeAlone/workflow is a public repo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
.gitignoreto stop tracking compiled UI assets ininternal/ui_dist/(keeps a placeholderindex.htmlfor//go:embedcompatibility during dev builds)Makefileuitarget to output tointernal/ui_dist/instead ofui_dist/at repo rootnpm ci && vite build) before Go compilation, usingGH_TOKENfor private repo accessui_distcopy frominstalltarget since assets are embedded in the binaryTest plan
go build ./...succeeds with the placeholderindex.html(no full UI build needed)make uibuilds the UI intointernal/ui_dist/GH_TOKENsecret is configured in repo settings for CI access toGoCodeAlone/workflow🤖 Generated with Claude Code