Skip to content

v0.6.3 - Fix reminder toggle when editing subscriptions#120

Merged
bscott merged 1 commit into
mainfrom
v0.6.3
Jun 8, 2026
Merged

v0.6.3 - Fix reminder toggle when editing subscriptions#120
bscott merged 1 commit into
mainfrom
v0.6.3

Conversation

@bscott

@bscott bscott commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #119 — enabling/disabling reminders while editing a subscription is now persisted correctly.

The edit form submits a hidden reminder_enabled=false immediately before the checkbox's reminder_enabled=true. Gin's PostForm/GetPostForm return the first value of a repeated field, so the checkbox was always ignored and reminders were saved as disabled regardless of the toggle.

Changes

  • internal/handlers/subscription.goCreateSubscription and UpdateSubscription now read the last value of reminder_enabled via PostFormArray, so the standard hidden-input + checkbox pattern works in every case (enable, disable, field-absent).
  • templates/subscriptions.html — render the "reminders disabled" mute icon on the full Subscriptions page, matching the htmx list partial (previously it only appeared after an htmx refresh).
  • internal/handlers/subscription_reminder_test.go — regression test covering enable/disable/absent cases.

Test Plan

  • go test ./... passes
  • Unit test fails without the fix, passes with it
  • End-to-end browser test (Playwright) against the running app: enable/disable round-trips persist correctly and the mute icon reflects state — 6/6 checks
  • Manual verification in the app

Closes #119

The edit form submits a hidden reminder_enabled=false immediately before the
checkbox's reminder_enabled=true. Gin's PostForm/GetPostForm return the first
value, so the checkbox was ignored and reminders were always saved as disabled.

- Read the last value of reminder_enabled in the create and update handlers
- Render the 'reminders disabled' mute icon on the full subscriptions page so
  it matches the htmx list partial (previously only the partial showed it)
- Add a regression test covering the enable/disable/absent cases

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@bscott bscott merged commit da6c94d into main Jun 8, 2026
3 checks passed
@bscott bscott deleted the v0.6.3 branch June 8, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot enable reminder when editing subscription

1 participant