Skip to content

Conversation

@kmendell
Copy link
Member

@kmendell kmendell commented Feb 10, 2026

What This PR Implements

Related issue

Related Issue

Fixes #

Changes Made

Testing Done

  • Development environment started: ./scripts/development/dev.sh start
  • Frontend verified at http://localhost:3000
  • Backend verified at http://localhost:3552
  • Manual testing completed (describe):
  • No linting errors (e.g., just lint all)
  • Backend tests pass: just test backend

Checklist

  • This PR is not opened from my fork’s main branch

AI Tool Used (if applicable)

AI Tool:
Assistance Level:
What AI helped with:
I reviewed and edited all AI-generated output:
I ran all required tests and manually verified changes:

Additional Context

Disclaimer Greptiles Reviews use AI, make sure to check over its work.

To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike

Greptile Overview

Greptile Summary

This PR refactors the notifications settings UI by consolidating the individual built-in provider forms into a schema-driven BuiltInProviderForm + DynamicProviderFormBuilder, and introduces a reusable NotificationProviderTestMenu dropdown. On the backend, Apprise test notifications are expanded to support multiple test payload types via a new type query parameter passed through the handler and into AppriseService.TestNotification(ctx, testType).

Key issues to address before merge:

  • The new test menu uses onclick instead of Svelte on:click, so selecting a test option won’t trigger.
  • The frontend builds ...?type=${type} without URL-encoding, which can produce malformed requests if type contains reserved characters.
  • The API handler forwards unvalidated type and turns unsupported values into a 500; invalid client inputs should be handled as a 4xx (validate/normalize type at the boundary).

Confidence Score: 3/5

  • This PR has a couple of user-facing bugs in the new test dropdown and request construction that should be fixed before merge.
  • Core refactor looks structurally sound, but the new NotificationProviderTestMenu event binding will prevent tests from running, and the new query-param plumbing needs boundary validation/encoding to avoid malformed requests and incorrect 500s.
  • frontend/src/routes/(app)/settings/notifications/providers/NotificationProviderTestMenu.svelte, frontend/src/lib/services/notification-service.ts, backend/internal/huma/handlers/notifications.go

Important Files Changed

Filename Overview
backend/internal/huma/handlers/notifications.go Adds a type query param for Apprise test; currently forwards unchecked values which can surface as 500s for invalid client input.
backend/internal/services/apprise_service.go Extends Apprise test notifications to support multiple test payload types; unsupported types return an error.
backend/internal/services/notification_service.go Refactors TestNotification to add batch-image-update path and adjust email test behavior; no direct issues found in diff snippet.
frontend/src/lib/services/notification-service.ts Adds optional type parameter to Apprise test call but interpolates it into URL without encoding.
frontend/src/routes/(app)/settings/notifications/+page.svelte Updates settings page to use consolidated BuiltInProviderForm and passes through Apprise testType to service.
frontend/src/routes/(app)/settings/notifications/providers/AppriseProviderForm.svelte Switches Apprise form fields to schema-driven builder and replaces single test button with dropdown menu.
frontend/src/routes/(app)/settings/notifications/providers/BuiltInProviderForm.svelte Introduces a consolidated form component for built-in providers, including schema/validation and test menu integration.
frontend/src/routes/(app)/settings/notifications/providers/DynamicProviderFormBuilder.svelte Adds a schema-driven form renderer for inputs/textarea/switch/select/native-select; no direct issues found.
frontend/src/routes/(app)/settings/notifications/providers/NotificationProviderTestMenu.svelte Adds dropdown test menu, but uses onclick instead of Svelte on:click so options won't trigger.
frontend/src/routes/(app)/settings/notifications/providers/index.ts Re-exports consolidated provider components (BuiltInProviderForm, DynamicProviderFormBuilder, NotificationProviderTestMenu).
frontend/src/routes/(app)/settings/notifications/providers/provider-form-schema.ts Adds TypeScript types for describing provider form schemas/fields.
frontend/src/routes/(app)/settings/notifications/providers/provider-form-validation.ts Adds helper to map zod parse issues to per-field error messages.

@kmendell kmendell marked this pull request as ready for review February 10, 2026 04:29
@kmendell kmendell requested a review from a team as a code owner February 10, 2026 04:29
Copy link
Member Author

kmendell commented Feb 10, 2026

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

12 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@kmendell kmendell force-pushed the refactor/consolidate-forms branch from 1e1751a to d95a8db Compare February 10, 2026 04:35
@kmendell kmendell force-pushed the refactor/prune-summary branch from d446335 to 720bde2 Compare February 10, 2026 04:35
@kmendell kmendell force-pushed the refactor/consolidate-forms branch 2 times, most recently from 9b2386d to 41efb69 Compare February 10, 2026 04:53
@kmendell kmendell force-pushed the refactor/prune-summary branch from 720bde2 to d68c3b0 Compare February 10, 2026 04:53
@kmendell kmendell changed the base branch from refactor/prune-summary to graphite-base/1704 February 10, 2026 17:50
@kmendell kmendell force-pushed the refactor/consolidate-forms branch from 41efb69 to 3d9f8f4 Compare February 10, 2026 17:50
@graphite-app graphite-app bot changed the base branch from graphite-base/1704 to main February 10, 2026 17:51
@kmendell kmendell force-pushed the refactor/consolidate-forms branch from 3d9f8f4 to b930148 Compare February 10, 2026 17:51
@github-actions
Copy link

🔍 Deadcode Analysis

Found 1 unreachable functions in the backend.

View details
internal/utils/ws/hub.go:27:15: unreachable func: Hub.ClientCount

Only remove deadcode that you know is 100% no longer used.

Analysis from commit 251a38a

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.

2 participants