Skip to content

feat(cron): add command payload form#1289

Merged
clark-cant merged 1 commit into
nextlevelbuilder:devfrom
zezaeoh:feat/cron-command-form
Jun 27, 2026
Merged

feat(cron): add command payload form#1289
clark-cant merged 1 commit into
nextlevelbuilder:devfrom
zezaeoh:feat/cron-command-form

Conversation

@zezaeoh

@zezaeoh zezaeoh commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #1279, #1285, #1286, #1287, and #1288. Command cron payloads can now run, show in the UI, be edited, and be created; this PR replaces the create dialog's raw command JSON box with a structured command form.

The form collects argv as one argument per line plus optional cwd, timeout, no-output timeout, output byte limit, and stdin. It still submits the same CronCommandSpec shape to cron.create.

Type

  • Feature
  • Bug fix
  • Hotfix (targeting main)
  • Refactor
  • Docs
  • CI/CD

Target Branch

Targets dev.

Checklist

  • go build ./... passes
  • go build -tags sqliteonly ./... passes (if Go changes)
  • go vet ./... passes
  • Tests pass: go test -race ./...
  • Web UI builds: cd ui/web && pnpm build (if UI changes)
  • No hardcoded secrets or credentials
  • SQL queries use parameterized $1, $2 (no string concat)
  • New user-facing strings added to all 3 locales (en/vi/zh)
  • Migration version bumped in internal/upgrade/version.go (if new migration)

Test Plan

  • corepack prepare pnpm@10.30.1 --activate && pnpm --dir ui/web build
  • env -u GOCLAW_CONFIG -u GOCLAW_DATA_DIR -u GOCLAW_HOST -u GOCLAW_PORT -u GOCLAW_PUBLIC_URL -u GOCLAW_ALLOWED_ORIGINS PATH=/usr/local/go/bin:$PATH go build ./...
  • env -u GOCLAW_CONFIG -u GOCLAW_DATA_DIR -u GOCLAW_HOST -u GOCLAW_PORT -u GOCLAW_PUBLIC_URL -u GOCLAW_ALLOWED_ORIGINS PATH=/usr/local/go/bin:$PATH go build -tags sqliteonly ./...

@clark-cant clark-cant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR Review

Verdict: APPROVE

Summary

Follow-up to #1287/#1288 completing the cron command UI series. Replaces the raw JSON textarea in the create dialog with a structured command form (argv per-line, cwd, timeouts, output limit, stdin). Clean, well-scoped frontend-only change.

Mandatory gates

  • Duplicate / prior implementation: clear — this is the planned final piece in the cron command UI series (#1279, #1285, #1286, #1287, #1288)
  • Project standards: consistent — follows existing form patterns, proper i18n across 4 locales (en, ko, vi, zh), zod validation, satisfies type annotation
  • Strategic necessity: clear value — structured form is significantly more user-friendly than raw JSON editing for command cron creation

Findings

No blocking issues. Clean implementation:

  • argv parsing (split/trim/filter) is correct for the per-line input pattern
  • Numeric field validation with regex + range check is appropriate
  • Optional fields correctly default to undefined via falsy check
  • Form layout with grid for timeout fields is clean UX
  • i18n strings properly added to all 4 locales

CI

All checks green: release-versioning ✅, go ✅, web ✅

Merge state

MERGEABLE, CLEAN

Posted by github-maintain cron-safe run at 2026-06-27T05:53:00Z

@clark-cant clark-cant merged commit 24a6b02 into nextlevelbuilder:dev Jun 27, 2026
3 checks passed
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