From bee70fdcdec7ab4136f8e29e6a275efa49c53d86 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 27 Aug 2026 11:07:33 +0000 Subject: [PATCH 1/3] fix(web): remove duplicate DocumentFragment declaration and orphaned escapeHtml replace Two JavaScript syntax errors in public/index.html broke the entire web UI (the page hung on 'Loading...'): - Duplicate 'const fragment' declaration when rendering the staged file list - An orphaned '.replace()' after a terminated statement in escapeHtml() Both caused a SyntaxError that halted script execution before any data could load. Removed the redundant lines so the frontend initializes correctly. Co-authored-by: Prax Lannister --- public/index.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/public/index.html b/public/index.html index cd715a1..9d62d07 100644 --- a/public/index.html +++ b/public/index.html @@ -1140,12 +1140,10 @@

No Staged Changes

container.innerHTML = ''; - // Create a DocumentFragment to batch DOM insertions + // Create a DocumentFragment to batch DOM insertions to prevent O(N) layout thrashing const fragment = document.createDocumentFragment(); // Enhanced file processing with better icons and metadata - // ⚡ Bolt: Batch DOM insertions using a DocumentFragment to prevent O(N) layout thrashing - const fragment = document.createDocumentFragment(); data.files.forEach((file, index) => { const fileId = file.replace(/[^a-zA-Z0-9]/g, '_'); const fileExt = file.substring(file.lastIndexOf('.')).toLowerCase(); @@ -1696,7 +1694,6 @@

No Staged Changes

.replace(/>/g, '>') .replace(/"/g, '"') .replace(/'/g, '''); - .replace(/'/g, '''); } // Keyboard shortcuts From ae43f9b4c944bd4ec8523d072dcc101a87ede78b Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 27 Aug 2026 11:07:33 +0000 Subject: [PATCH 2/3] chore(env): add Cloud Agent development environment config Adds .cursor/environment.json using the default base image (Node 22 + git): - install: npm ci - terminals: npm start (Express web server on port 3002) - ports: expose 3002 Co-authored-by: Prax Lannister --- .cursor/environment.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .cursor/environment.json diff --git a/.cursor/environment.json b/.cursor/environment.json new file mode 100644 index 0000000..701c2d9 --- /dev/null +++ b/.cursor/environment.json @@ -0,0 +1,17 @@ +{ + "name": "AI Visual Code Review", + "install": "npm ci", + "terminals": [ + { + "name": "server", + "command": "npm start", + "description": "Express web server for the AI Visual Code Review app, served at http://localhost:3002" + } + ], + "ports": [ + { + "name": "web", + "port": 3002 + } + ] +} From eff7af513f900c819fff00447c74eded7fe35654 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 27 Aug 2026 12:03:46 +0000 Subject: [PATCH 3/3] feat(env): link vendored agent skills into home dirs on boot Adds scripts/link-agent-skills.sh and calls it from the install step so the repo-vendored skill packs under .claude/skills/ and .agents/skills/ are symlinked into ~/.claude/skills and ~/.agents/skills, making them active globally on the VM (not only from this repo's working tree). The script is idempotent and skips gracefully when the skill directories are absent. Co-authored-by: Prax Lannister --- .cursor/environment.json | 2 +- scripts/link-agent-skills.sh | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 scripts/link-agent-skills.sh diff --git a/.cursor/environment.json b/.cursor/environment.json index 701c2d9..6226e4b 100644 --- a/.cursor/environment.json +++ b/.cursor/environment.json @@ -1,6 +1,6 @@ { "name": "AI Visual Code Review", - "install": "npm ci", + "install": "npm ci\nbash scripts/link-agent-skills.sh", "terminals": [ { "name": "server", diff --git a/scripts/link-agent-skills.sh b/scripts/link-agent-skills.sh new file mode 100755 index 0000000..d09cdc9 --- /dev/null +++ b/scripts/link-agent-skills.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# +# link-agent-skills.sh +# +# Symlinks the repo-vendored agent skill packs into the user's home skill +# directories so they are active for agents that read ~/.claude/skills +# (Claude Code, Cursor) and ~/.agents/skills (Codex, Prime Agent) globally, +# not just from this repo's working tree. +# +# Idempotent and safe to run on every boot: it skips gracefully when the +# repo skill directories are not present (e.g. before the skills PR is merged). +# +# Called from `.cursor/environment.json` install after `npm ci`. +set -euo pipefail + +REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +HOME_DIR="${HOME:-/home/ubuntu}" + +link_packs() { + local repo_dir="$1" home_dir="$2" + [ -d "$repo_dir" ] || { echo "link-agent-skills: $repo_dir not present, skipping"; return 0; } + mkdir -p "$home_dir" + local pack name + for pack in "$repo_dir"/*/; do + [ -d "$pack" ] || continue + name="$(basename "$pack")" + ln -sfn "${pack%/}" "$home_dir/$name" + echo "link-agent-skills: linked $home_dir/$name -> ${pack%/}" + done +} + +link_packs "$REPO_ROOT/.claude/skills" "$HOME_DIR/.claude/skills" +link_packs "$REPO_ROOT/.agents/skills" "$HOME_DIR/.agents/skills" + +echo "link-agent-skills: done"