feat: edit existing env vars, labels, and volume mounts (closes #67) #77

Merged
sneak merged 2 commits from feature/edit-config-entities into main 2026-02-16 09:33:47 +01:00
Collaborator

Summary

Adds inline editing for environment variables, labels, and volume mounts on the app detail page.

Changes

  • 3 new POST endpoints: /apps/{id}/env-vars/{varID}/edit, /apps/{id}/labels/{labelID}/edit, /apps/{id}/volumes/{volumeID}/edit
  • Inline edit UI: Alpine.js toggle on each row — click Edit to reveal form, Save/Cancel
  • Path validation: ValidateVolumePath ensures absolute, clean paths for volume edits
  • Restart warning: Env var edit form shows amber warning about container restart
  • Tests: TestValidateVolumePath covering empty, relative, unclean, and valid paths

Test Results

make test — all packages pass
golangci-lint run ./... — 0 issues

Closes #67

## Summary Adds inline editing for environment variables, labels, and volume mounts on the app detail page. ## Changes - **3 new POST endpoints**: `/apps/{id}/env-vars/{varID}/edit`, `/apps/{id}/labels/{labelID}/edit`, `/apps/{id}/volumes/{volumeID}/edit` - **Inline edit UI**: Alpine.js toggle on each row — click Edit to reveal form, Save/Cancel - **Path validation**: `ValidateVolumePath` ensures absolute, clean paths for volume edits - **Restart warning**: Env var edit form shows amber warning about container restart - **Tests**: `TestValidateVolumePath` covering empty, relative, unclean, and valid paths ## Test Results ✅ `make test` — all packages pass ✅ `golangci-lint run ./...` — 0 issues Closes #67
sneak was assigned by clawbot 2026-02-16 09:26:24 +01:00
clawbot added 1 commit 2026-02-16 09:26:25 +01:00
Add inline edit functionality for environment variables, labels, and
volume mounts on the app detail page. Each entity row now has an Edit
button that reveals an inline form using Alpine.js.

- POST /apps/{id}/env-vars/{varID}/edit
- POST /apps/{id}/labels/{labelID}/edit
- POST /apps/{id}/volumes/{volumeID}/edit
- Path validation for volume host and container paths
- Warning banner about container restart after env var changes
- Tests for ValidateVolumePath

fixes #67
Author
Collaborator

CI Results

make test

All 10 packages pass

golangci-lint run ./...

0 issues

New test coverage

  • TestValidateVolumePath: 8 cases (empty, relative, dotdot, trailing slash, double slash, dot, valid absolute, root)
## CI Results ### `make test` ✅ All 10 packages pass ### `golangci-lint run ./...` ✅ 0 issues ### New test coverage - `TestValidateVolumePath`: 8 cases (empty, relative, dotdot, trailing slash, double slash, dot, valid absolute, root)
sneak added 1 commit 2026-02-16 09:28:35 +01:00
sneak merged commit b83e68fafd into main 2026-02-16 09:33:47 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/upaas#77
No description provided.