Skip to content

Comments

git: stop tracking bundled build artifacts#2041

Closed
0oAstro wants to merge 7968 commits intoopenclaw:mainfrom
0oAstro:fix/git-bloat-cleanup
Closed

git: stop tracking bundled build artifacts#2041
0oAstro wants to merge 7968 commits intoopenclaw:mainfrom
0oAstro:fix/git-bloat-cleanup

Conversation

@0oAstro
Copy link
Contributor

@0oAstro 0oAstro commented Jan 26, 2026

This PR removes generated bundle files from git tracking to reduce repo bloat.

Changes

  • Remove dist/control-ui/ assets (JS/CSS bundles) from git
  • Remove src/canvas-host/a2ui/a2ui.bundle.js and index.html from git
  • Remove .serena/cache/ (LSP cache from another machine)
  • Remove apps/**/.build/ (Swift build artifacts)
  • Remove **/pdfjs-dist/ (bundled PDF.js worker)
  • Update .gitignore to prevent re-addition

Impact

  • 21,211+ deletions of generated/binary files
  • Prevents future bloat from accumulated bundle history
  • Actual source code is unchanged

Size reduction (actual after gc)

Metric Before After
.git/ size ~150MB ~55MB
Pack file ~145MB ~54MB
Reduction ~95MB (63%)

Removed artifacts:

  • ~87MB Serena LSP cache (DocumentSymbols)
  • ~10MB Swift .o build artifacts (.build/)
  • ~6MB PDF.js worker files
  • ~21K lines of control-ui bundles

Why this works

The files are generated at build time, not manually maintained:

  • pnpm ui:build (runs vite build) outputs directly to dist/control-ui/ (see ui/vite.config.ts)
  • pnpm canvas:a2ui:bundle generates src/canvas-host/a2ui/a2ui.bundle.js
  • The prepack script ensures they're built before npm publish
  • Swift build artifacts (.o, .dia, .swiftdeps) should never be committed
  • Serena LSP cache is machine-specific and useless in git

Generated files that change with every build should not be committed - they bloat the git history and provide no benefit since they're regenerated anyway.

steipete and others added 30 commits January 24, 2026 09:31
- Increase recommended memory to 2GB (512MB/1GB OOM)
- Add OOM symptoms (SIGABRT, v8 allocation errors)
- Fix lock file path (/data/gateway.*.lock)
- Add complete config example with failover, auth, bindings
- Document Discord token from env var vs config
- Add machine update commands for command/memory changes
- Add config writing tips (echo+tee, sftp caveats)

Learned from FLAWD deployment debugging.
…penclaw#1576)

* fix(agents): treat request-aborted as timeout for fallback

* test(e2e): add provider timeout fallback
…ements

When native slash commands are executed in Telegram topics/forums, the
originating topic context was not being preserved. This caused sub-agent
announcements to be delivered to the wrong topic.

Root cause: Native slash command context did not set OriginatingChannel
and OriginatingTo, causing session delivery context to fallback to the
user's personal ID instead of the group ID + topic.

Fix: Added OriginatingChannel and OriginatingTo to native slash command
context, ensuring topic information is preserved for sub-agent announcements.

Related session fields:
- lastThreadId: preserved via MessageThreadId
- lastTo: now correctly set to group ID via OriginatingTo
- deliveryContext: includes threadId for proper routing
tyler6204 and others added 20 commits January 25, 2026 13:24
…oxy (openclaw#1795)

* fix(gateway): prevent auth bypass when behind unconfigured reverse proxy

When proxy headers (X-Forwarded-For, X-Real-IP) are present but
gateway.trustedProxies is not configured, the gateway now treats
connections as non-local. This prevents a scenario where all proxied
requests appear to come from localhost and receive automatic trust.

Previously, running behind nginx/Caddy without configuring trustedProxies
would cause isLocalClient=true for all external connections, potentially
bypassing authentication and auto-approving device pairing.

The gateway now logs a warning when this condition is detected, guiding
operators to configure trustedProxies for proper client IP detection.

Also adds documentation for reverse proxy security configuration.

* fix: harden reverse proxy auth (openclaw#1795) (thanks @orlyjamie)

---------

Co-authored-by: orlyjamie <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
- Add resumeArgs to DEFAULT_CLAUDE_BACKEND for proper --resume flag usage
- Fix gateway not preserving cliSessionIds/claudeCliSessionId in nextEntry
- Add test for CLI session ID preservation in gateway agent handler
- Update docs with new resumeArgs default
CLI backends (claude-cli etc) don't emit streaming assistant events,
causing TUI to show "(no output)" despite correct processing. Now emits
assistant event with final text before lifecycle end so server-chat
buffer gets populated for WebSocket clients.
These files are generated at build time and shouldn't be committed:
- dist/control-ui assets (JS/CSS bundles)
- src/canvas-host/a2ui bundle files

This removes ~100MB+ of bloat from git history by no longer tracking
repeatedly regenerated bundle files. Add to .gitignore to prevent
accidental re-addition.

Co-Authored-By: Claude <[email protected]>
Copilot AI review requested due to automatic review settings January 26, 2026 03:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes generated bundle files from git tracking to reduce repository bloat. The changes remove approximately 21,000 lines of JavaScript/CSS bundle files and add .gitignore entries to prevent them from being re-committed.

Changes:

  • Removes dist/control-ui/ build artifacts (HTML, CSS, JS bundles) from git tracking
  • Removes src/canvas-host/a2ui/ generated files (a2ui.bundle.js and index.html) from git tracking
  • Updates .gitignore to prevent re-addition of these generated files

Reviewed changes

Copilot reviewed 1 out of 6 changed files in this pull request and generated no comments.

File Description
.gitignore Adds patterns to ignore a2ui bundle files and .bundle.hash file in src/canvas-host/a2ui/
src/canvas-host/a2ui/index.html Removes 307-line generated HTML file for canvas UI
dist/control-ui/index.html Removes generated HTML entry point for control UI
dist/control-ui/assets/index-08nzABV3.css Removes 1-line minified CSS bundle

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The previous commit missed the .map source map file for the control-ui bundle.
This ensures all generated build artifacts are excluded from git tracking.

Co-Authored-By: Claude <[email protected]>
@0oAstro 0oAstro closed this Jan 26, 2026
@0oAstro 0oAstro force-pushed the fix/git-bloat-cleanup branch from 97bf123 to 7e83c59 Compare January 26, 2026 03:37
@0oAstro
Copy link
Contributor Author

0oAstro commented Jan 26, 2026

sorry, forgot that git-filter-repo will lead to divergence of branches.
looking to fix this other way.

@0oAstro
Copy link
Contributor Author

0oAstro commented Jan 26, 2026

@steipete
I mean it is up to you if you wish to reduce the size of the repository (allowing faster installs and in general better experience).

Here are the options:

  1. Bundle-only PR (~11MB reduction)
  2. Full clean PR (~95MB reduction) - requires force-pushing my fork's main and asking you to git replace + graft or merge with --allow-unrelated-histories

@thewilloftheshadow
Copy link
Member

@0oAstro just do a PR fixing it in the future, lets not rewrite the git history for now

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.