fix(aiui): bundle demo/aiui in self-update and ISO builds so updates never wipe it
Every OTA self-update and every ISO capture was implicitly relying on /opt/archipelago/web-ui/aiui/ already being present on disk. Any node that had its web-ui directory atomically swapped (for example by a manual deployment shipping only neode-ui dist output) lost aiui entirely and the AI Assistant tab fell through to the "needs to be enabled" placeholder. self-update.sh: drop the rsync --exclude aiui preservation trick and instead stage demo/aiui into the freshly-built dist tree before rsync. demo/aiui in the repo is now the source of truth; every update overwrites the on-disk copy with a matching version rather than carrying forward whatever stale bundle happened to survive. build-auto-installer-iso.sh: prepend demo/aiui to the AIUI search list so ISO builds from a fresh repo clone pick it up automatically, without requiring a side-checkout of the AIUI project or a live dev server. This matches create-release-manifest.sh which already bakes demo/aiui into the release tarball (lines 86-89).
This commit is contained in:
@@ -157,12 +157,23 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install frontend (preserve aiui and claude-login.html)
|
||||
# Install frontend (always ship fresh AIUI from demo/aiui; preserve claude-login.html)
|
||||
BUILT_WEB="$REPO_DIR/web/dist/neode-ui"
|
||||
if [ -d "$BUILT_WEB" ]; then
|
||||
# Sync new files, preserving aiui/ and claude-login.html
|
||||
# Bake AIUI into the built tree so rsync --delete does not wipe it.
|
||||
# demo/aiui is the canonical AIUI bundle checked into the repo; copying
|
||||
# it here means every self-update ships a matching AIUI version instead
|
||||
# of preserving whatever stale copy happened to be on disk (which is
|
||||
# empty on nodes where an earlier ad-hoc deploy blew it away).
|
||||
if [ -d "$REPO_DIR/demo/aiui" ] && [ -f "$REPO_DIR/demo/aiui/index.html" ]; then
|
||||
log "Staging AIUI bundle from demo/aiui into frontend dist..."
|
||||
rm -rf "$BUILT_WEB/aiui"
|
||||
cp -r "$REPO_DIR/demo/aiui" "$BUILT_WEB/aiui"
|
||||
else
|
||||
warn "demo/aiui not found in repo; existing /opt/archipelago/web-ui/aiui will be wiped by rsync --delete"
|
||||
fi
|
||||
# Sync new files, preserving claude-login.html (per-node admin bookmark)
|
||||
sudo rsync -a --delete \
|
||||
--exclude 'aiui' \
|
||||
--exclude 'claude-login.html' \
|
||||
"$BUILT_WEB/" "$INSTALL_WEB/"
|
||||
ok "Frontend installed"
|
||||
|
||||
Reference in New Issue
Block a user