Skip to content

Commit af12515

Browse files
committed
Address pr comments
1 parent 9a74cfd commit af12515

4 files changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
BUILD_FRONTEND=true
7171
echo "✅ Frontend version changed: $PREVIOUS_FRONTEND_VERSION → $FRONTEND_VERSION"
7272
else
73-
echo "❎ Frontend version unchanged: $FRONTEND_VERSION. Skip docker backend."
73+
echo "❎ Frontend version unchanged: $FRONTEND_VERSION. Skip docker frontend."
7474
fi
7575
fi
7676

.github/workflows/pr-bot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ jobs:
2222
aicore-service-key: ${{ secrets.AICORE_SERVICE_KEY }}
2323
model: anthropic--claude-4-sonnet
2424
exclude-files: package-lock.json, uv.lock
25+
footer-text: |
26+
Always critique what AI says. Do not let AI replace YOUR I.

frontend/generate-config.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
# Generate runtime configuration from environment variables
44
# This script runs at container startup to create config.json from environment variables
55

6+
# Validate required environment variables
7+
required_vars="BACKEND_URL BACKEND_WS_URL API_URL"
8+
for var in $required_vars; do
9+
if [ -z "$(eval echo \$$var)" ]; then
10+
echo "Warning: $var is not set, using default value"
11+
fi
12+
done
13+
614
# Set default values if environment variables are not provided
715
BACKEND_URL=${BACKEND_URL:-"http://localhost:8080"}
816
BACKEND_WS_URL=${BACKEND_WS_URL:-"ws://localhost:8080/agent"}

frontend/src/app/weight-dialog/weight-dialog.component.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ export class WeightDialogComponent implements OnInit {
3838
}
3939

4040
onSave() {
41+
// Validate weights before sending
42+
const invalidWeights = Object.entries(this.currentWeights)
43+
.filter(([_, weight]) => weight < 0 || !Number.isInteger(weight));
44+
45+
if (invalidWeights.length > 0) {
46+
this.snackBar.open('Please enter valid positive integers for all weights', '❌', {
47+
duration: 3000
48+
});
49+
return;
50+
}
51+
4152
const headers = new HttpHeaders({
4253
'X-API-Key': this.apiKey
4354
});

0 commit comments

Comments
 (0)