feat: add edit support for env vars, labels, and volumes (closes #67) #76

Open
clawbot wants to merge 1 commits from feature/edit-entities into main
Collaborator

Summary

Adds inline edit functionality for environment variables, labels, and volume mounts.

Changes

  • Routes: Added POST /apps/{id}/env-vars/{varID}/edit, /labels/{labelID}/edit, /volumes/{volumeID}/edit
  • Handlers: HandleEnvVarEdit(), HandleLabelEdit(), HandleVolumeEdit() — find entity, validate ownership, update via Save()
  • Templates: Alpine.js inline edit toggle — click Edit to show form with current values, Save/Cancel buttons

Notes

  • Models already had Save() with update support (when ID != 0), so no model changes needed
  • Pre-existing gofmt issues in 3 other files (middleware.go, app.go, deploy.go) — not touched by this PR

Test Results

all tests pass — make test ✅
gofmt clean on changed files ✅
pre-existing format issues in unrelated files (not introduced by this PR)

Closes #67

## Summary Adds inline edit functionality for environment variables, labels, and volume mounts. ## Changes - **Routes**: Added `POST /apps/{id}/env-vars/{varID}/edit`, `/labels/{labelID}/edit`, `/volumes/{volumeID}/edit` - **Handlers**: `HandleEnvVarEdit()`, `HandleLabelEdit()`, `HandleVolumeEdit()` — find entity, validate ownership, update via `Save()` - **Templates**: Alpine.js inline edit toggle — click Edit to show form with current values, Save/Cancel buttons ## Notes - Models already had `Save()` with update support (when ID != 0), so no model changes needed - Pre-existing `gofmt` issues in 3 other files (middleware.go, app.go, deploy.go) — not touched by this PR ## Test Results ``` all tests pass — make test ✅ gofmt clean on changed files ✅ pre-existing format issues in unrelated files (not introduced by this PR) ``` Closes #67
sneak was assigned by clawbot 2026-02-16 09:25:49 +01:00
clawbot added 1 commit 2026-02-16 09:25:50 +01:00
- Add POST /apps/{id}/env-vars/{varID}/edit endpoint
- Add POST /apps/{id}/labels/{labelID}/edit endpoint
- Add POST /apps/{id}/volumes/{volumeID}/edit endpoint
- Add inline edit UI with Alpine.js toggle in app_detail template
- Models already support Save() with update when ID != 0

Closes #67
Owner

fix merge conflicts pls

fix merge conflicts pls
Author
Collaborator

After rebasing onto main, this PR is empty — all the edit handler code (env vars, labels, volumes) is already on main. The feature was merged as part of the earlier PRs (#67 implementation). The merge conflicts were just from the branch being stale.

This PR can be closed.

After rebasing onto main, this PR is empty — all the edit handler code (env vars, labels, volumes) is already on main. The feature was merged as part of the earlier PRs (#67 implementation). The merge conflicts were just from the branch being stale. This PR can be closed.
This pull request has changes conflicting with the target branch.
  • internal/server/routes.go
  • templates/app_detail.html

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/edit-entities:feature/edit-entities
git checkout feature/edit-entities
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#76
No description provided.