[PR #7082] fix(settings): preserve notification intervals in Custom mode #6635

Open
opened 2026-11-07 14:34:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/7082
Author: @BenjaminMitchell-D0FB
Created: 11/5/2026
Status: 🔄 Open

Base: main ← Head: BenjaminMitchell-D0FB/fix-notification-schedule-conversion


📝 Commits (1)

  • b118811 fix(settings): preserve notification intervals in Custom mode

📊 Changes

2 files changed (+25 additions, -11 deletions)

View changed files

📝 frontend/src/pages/settings/NotifyTimeField.tsx (+4 -11)
➕ frontend/src/test/notify-time-field.test.tsx (+21 -0)

📄 Description

Summary

Preserve elapsed-time notification schedules when opening the Custom editor in Telegram and Discord settings. A new Custom draft now starts with the original @every descriptor.

Why

A cron step repeats within its field. Converting @every 45m to 0 */45 * * * * schedules notifications at :00 and :45 each hour, alternating 45-minute and 15-minute gaps.

Fixes #7081.

Type of change

  • Bug fix

Areas affected

  • Frontend (UI / panel pages)
  • Telegram bot

How was this tested?

  • The component regression test switches @every 45m to Custom and verifies that the input and emitted settings value both retain @every 45m. The test reproduced the incorrect expression before the fix.
  • The same test verifies that the @hourly preset still seeds 0 0 * * * *.
  • Frontend lint, typecheck, and production build passed.
  • All 1,979 frontend unit and component tests passed.

Screenshots / recordings

The component regression test verifies the rendered input value. A live-panel screenshot was not captured.

Breaking changes

None.

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes, npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/7082 **Author:** [@BenjaminMitchell-D0FB](https://github.com/BenjaminMitchell-D0FB) **Created:** 11/5/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `BenjaminMitchell-D0FB/fix-notification-schedule-conversion` --- ### 📝 Commits (1) - [`b118811`](https://github.com/MHSanaei/3x-ui/commit/b118811c594e0a58f0dfd381c848917dbfdd767c) fix(settings): preserve notification intervals in Custom mode ### 📊 Changes **2 files changed** (+25 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/pages/settings/NotifyTimeField.tsx` (+4 -11) ➕ `frontend/src/test/notify-time-field.test.tsx` (+21 -0) </details> ### 📄 Description ## Summary Preserve elapsed-time notification schedules when opening the Custom editor in Telegram and Discord settings. A new Custom draft now starts with the original `@every` descriptor. ## Why A cron step repeats within its field. Converting `@every 45m` to `0 */45 * * * *` schedules notifications at :00 and :45 each hour, alternating 45-minute and 15-minute gaps. Fixes #7081. ## Type of change - [x] Bug fix ## Areas affected - [x] Frontend (UI / panel pages) - [x] Telegram bot ## How was this tested? - The component regression test switches `@every 45m` to Custom and verifies that the input and emitted settings value both retain `@every 45m`. The test reproduced the incorrect expression before the fix. - The same test verifies that the `@hourly` preset still seeds `0 0 * * * *`. - Frontend lint, typecheck, and production build passed. - All 1,979 frontend unit and component tests passed. ## Screenshots / recordings The component regression test verifies the rendered input value. A live-panel screenshot was not captured. ## Breaking changes None. ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [x] I added or updated tests for the new behavior (when applicable). - [ ] `go build ./...` and the test suite pass locally. - [x] For frontend changes, `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
MHSanaei/3x-ui#6635
No description provided.