feat(web): structured schedule create/edit UI

Replace the read-only schedule list with a form-driven builder so users
never hand-edit cron patterns. A canonical ScheduleFormState feeds two
inverse pure functions (toCron / fromCron) that guarantee round-trip
equivalence, so new and edit flows share the exact same UI state shape
even though the DB stores only the pattern. Unrecognised patterns (AI-
generated ranges/steps, descriptors, 6-field seconds cron) fall back
losslessly to an advanced mode instead of being silently rewritten.

The dialog adds live previews (human-readable via cronstrue, next 3
trigger times via cron-parser evaluated in the bot timezone) and row
actions for edit / enable-toggle / delete.
This commit is contained in:
Acbox
2026-04-23 19:36:25 +08:00
parent 7642cb8ca4
commit defddc2257
10 changed files with 1685 additions and 24 deletions
+1
View File
@@ -8,6 +8,7 @@ export default defineConfig({
globals: true,
include: [
'packages/**/*.test.ts',
'apps/**/*.test.ts',
],
env: process.env,
testTimeout: Infinity,