please investigate why these settings would either not be getting saved, or would not show up on the edit page fields when the app is being edited.
@clawbot
Traced the full flow for slack/ntfy notification settings:
Database schema (001_initial.sql): Has ntfy_topic TEXT and slack_webhook TEXT columns. ✅
Model (models/app.go): Has NtfyTopic and SlackWebhook as sql.NullString fields, included in insert(), update(), and scan(). ✅
Service (service/app/app.go): CreateAppInput has NtfyTopic and SlackWebhook fields, and CreateApp correctly sets them on the model. ✅
Edit template (app_edit.html): Form fields with names ntfy_topic and slack_webhook, values rendered with {{if .App.NtfyTopic.Valid}}{{.App.NtfyTopic.String}}{{end}}. ✅
Edit handler (HandleAppEdit): Loads full app via FindApp and passes it to template. ✅
Update handler (HandleAppUpdate): Reads form values and saves them. ✅
Create handler (HandleAppCreate): ⚠️BUG FOUND — Does NOT read ntfy_topic, slack_webhook, or docker_network from the form, even though app_new.html has these fields and CreateAppInput supports them.
Root Cause
HandleAppCreate only read four form values (name, repo_url, branch, dockerfile_path) but ignored the three optional settings fields (docker_network, ntfy_topic, slack_webhook). When a user filled in notification settings during app creation, they were silently discarded. The edit/update flow was actually correct — the bug was exclusively in the create path.
This explains the reported behavior: settings entered during creation would not appear on the edit page because they were never saved to the database.
Fix
Added reading of docker_network, ntfy_topic, and slack_webhook form values in HandleAppCreate, passing them to CreateAppInput and including them in the template re-render data for validation error cases.
## Investigation Findings
Traced the full flow for slack/ntfy notification settings:
1. **Database schema** (`001_initial.sql`): Has `ntfy_topic TEXT` and `slack_webhook TEXT` columns. ✅
2. **Model** (`models/app.go`): Has `NtfyTopic` and `SlackWebhook` as `sql.NullString` fields, included in `insert()`, `update()`, and `scan()`. ✅
3. **Service** (`service/app/app.go`): `CreateAppInput` has `NtfyTopic` and `SlackWebhook` fields, and `CreateApp` correctly sets them on the model. ✅
4. **Edit template** (`app_edit.html`): Form fields with names `ntfy_topic` and `slack_webhook`, values rendered with `{{if .App.NtfyTopic.Valid}}{{.App.NtfyTopic.String}}{{end}}`. ✅
5. **Edit handler** (`HandleAppEdit`): Loads full app via `FindApp` and passes it to template. ✅
6. **Update handler** (`HandleAppUpdate`): Reads form values and saves them. ✅
7. **Create handler** (`HandleAppCreate`): ⚠️ **BUG FOUND** — Does NOT read `ntfy_topic`, `slack_webhook`, or `docker_network` from the form, even though `app_new.html` has these fields and `CreateAppInput` supports them.
### Root Cause
`HandleAppCreate` only read four form values (`name`, `repo_url`, `branch`, `dockerfile_path`) but ignored the three optional settings fields (`docker_network`, `ntfy_topic`, `slack_webhook`). When a user filled in notification settings during app creation, they were silently discarded. The edit/update flow was actually correct — the bug was exclusively in the create path.
This explains the reported behavior: settings entered during creation would not appear on the edit page because they were never saved to the database.
### Fix
Added reading of `docker_network`, `ntfy_topic`, and `slack_webhook` form values in `HandleAppCreate`, passing them to `CreateAppInput` and including them in the template re-render data for validation error cases.
<!-- session: agent:sdlc-manager:subagent:1fb3582d-1eff-4309-b166-df5046a1b885 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
please investigate why these settings would either not be getting saved, or would not show up on the edit page fields when the app is being edited.
@clawbot
maybe it's not being properly saved on app creation - that could be the issue
Investigation Findings
Traced the full flow for slack/ntfy notification settings:
001_initial.sql): Hasntfy_topic TEXTandslack_webhook TEXTcolumns. ✅models/app.go): HasNtfyTopicandSlackWebhookassql.NullStringfields, included ininsert(),update(), andscan(). ✅service/app/app.go):CreateAppInputhasNtfyTopicandSlackWebhookfields, andCreateAppcorrectly sets them on the model. ✅app_edit.html): Form fields with namesntfy_topicandslack_webhook, values rendered with{{if .App.NtfyTopic.Valid}}{{.App.NtfyTopic.String}}{{end}}. ✅HandleAppEdit): Loads full app viaFindAppand passes it to template. ✅HandleAppUpdate): Reads form values and saves them. ✅HandleAppCreate): ⚠️ BUG FOUND — Does NOT readntfy_topic,slack_webhook, ordocker_networkfrom the form, even thoughapp_new.htmlhas these fields andCreateAppInputsupports them.Root Cause
HandleAppCreateonly read four form values (name,repo_url,branch,dockerfile_path) but ignored the three optional settings fields (docker_network,ntfy_topic,slack_webhook). When a user filled in notification settings during app creation, they were silently discarded. The edit/update flow was actually correct — the bug was exclusively in the create path.This explains the reported behavior: settings entered during creation would not appear on the edit page because they were never saved to the database.
Fix
Added reading of
docker_network,ntfy_topic, andslack_webhookform values inHandleAppCreate, passing them toCreateAppInputand including them in the template re-render data for validation error cases.