fix: pass notification settings from create form to service #160

Merged
sneak merged 1 commits from fix/issue-157-notification-settings into main 2026-03-10 01:01:33 +01:00
Collaborator

Summary

HandleAppCreate was not reading docker_network, ntfy_topic, or slack_webhook form values from the create app form. These fields were silently dropped during app creation, even though:

  • app_new.html had the form fields
  • CreateAppInput had the corresponding struct fields
  • CreateApp already handled them correctly

The edit/update flow was unaffected — the bug was exclusively in the create path.

Changes

  • Read docker_network, ntfy_topic, slack_webhook form values in HandleAppCreate
  • Pass them to CreateAppInput
  • Include them in template re-render data (preserves values on validation errors)

closes #157

## Summary `HandleAppCreate` was not reading `docker_network`, `ntfy_topic`, or `slack_webhook` form values from the create app form. These fields were silently dropped during app creation, even though: - `app_new.html` had the form fields - `CreateAppInput` had the corresponding struct fields - `CreateApp` already handled them correctly The edit/update flow was unaffected — the bug was exclusively in the create path. ## Changes - Read `docker_network`, `ntfy_topic`, `slack_webhook` form values in `HandleAppCreate` - Pass them to `CreateAppInput` - Include them in template re-render data (preserves values on validation errors) closes https://git.eeqj.de/sneak/upaas/issues/157 <!-- session: agent:sdlc-manager:subagent:1fb3582d-1eff-4309-b166-df5046a1b885 -->
clawbot added 1 commit 2026-03-06 12:42:08 +01:00
fix: pass notification settings from create form to service
All checks were successful
Check / check (pull_request) Successful in 3m40s
fd836b9210
HandleAppCreate was not reading docker_network, ntfy_topic, or
slack_webhook form values, so these fields were silently dropped
during app creation. The app_new.html template had the form fields,
and CreateAppInput/CreateApp already supported these fields, but the
handler never passed them through.

Also adds these values to the template re-render data so they are
preserved if a validation error occurs during creation.
clawbot added the botneeds-review labels 2026-03-06 12:42:21 +01:00
clawbot removed the needs-review label 2026-03-06 12:45:26 +01:00
Author
Collaborator

Review: PASS

Single-file, 9-line fix in internal/handlers/app.go — correctly addresses issue #157.

Checklist

  • docker_network form value read in HandleAppCreate
  • ntfy_topic form value read in HandleAppCreate
  • slack_webhook form value read in HandleAppCreate
  • All three values passed to CreateAppInput
  • All three included in template re-render data (preserves values on validation errors)
  • Edit/update flow (HandleAppUpdate) unchanged — no regression
  • No test assertions weakened (no test files changed)
  • No linter/CI config changed
  • docker build . passes (all tests pass, lint clean, build succeeds)

Analysis

The root cause was straightforward: HandleAppCreate read only 4 form fields (name, repo_url, branch, dockerfile_path) but silently ignored the 3 optional settings fields. The service layer (CreateAppInput struct and CreateApp method) already had full support for DockerNetwork, NtfyTopic, and SlackWebhook. The fix correctly wires the handler to read these form values and pass them through.

The branch is already up-to-date with main (no rebase needed). Clean, minimal, correct.

## Review: PASS ✅ Single-file, 9-line fix in `internal/handlers/app.go` — correctly addresses [issue #157](https://git.eeqj.de/sneak/upaas/issues/157). ### Checklist - [x] `docker_network` form value read in `HandleAppCreate` - [x] `ntfy_topic` form value read in `HandleAppCreate` - [x] `slack_webhook` form value read in `HandleAppCreate` - [x] All three values passed to `CreateAppInput` - [x] All three included in template re-render data (preserves values on validation errors) - [x] Edit/update flow (`HandleAppUpdate`) unchanged — no regression - [x] No test assertions weakened (no test files changed) - [x] No linter/CI config changed - [x] `docker build .` passes (all tests pass, lint clean, build succeeds) ### Analysis The root cause was straightforward: `HandleAppCreate` read only 4 form fields (`name`, `repo_url`, `branch`, `dockerfile_path`) but silently ignored the 3 optional settings fields. The service layer (`CreateAppInput` struct and `CreateApp` method) already had full support for `DockerNetwork`, `NtfyTopic`, and `SlackWebhook`. The fix correctly wires the handler to read these form values and pass them through. The branch is already up-to-date with `main` (no rebase needed). Clean, minimal, correct. <!-- session: agent:sdlc-manager:subagent:ed0ba76f-c177-4a51-8299-8692a59acbef -->
clawbot added merge-ready and removed bot labels 2026-03-06 12:49:39 +01:00
sneak was assigned by clawbot 2026-03-06 12:49:49 +01:00
sneak merged commit ab63670043 into main 2026-03-10 01:01:33 +01:00
sneak deleted branch fix/issue-157-notification-settings 2026-03-10 01:01:33 +01:00
Sign in to join this conversation.