emrg: GUI task/template management in settings (rant 2026-08-12T18:23:15 P3) - #711
Conversation
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle
Independent re-verification on head a64b573 (11 files, 786+/2-, GUI task/template management P3 of rant 2026-08-12T18:23:15):
- Protocol wiring — RESPONSE_TYPES adds the 7 task/template commands (task_create/update/delete → task_result, task_template_list → templates_list, template create/update/delete → template_result), mirroring daemon.py handlers from #710. main.js IPC handlers validate name/type/project/prompt as non-empty strings before send, propagate daemon errors via throw, 8s CRUD / 5s list timeouts. preload exposes taskCreate/taskUpdate/taskDelete/taskTemplate{List,Create,Update,Delete}.
- Task management UI — list rows (name/type badge/project·interval·disabled hints) with trigger (reuses /trigger semantics), edit (form prefill, name disabled since daemon locates by name), delete (confirm dialog → taskDelete → renderTaskList). Form: type dropdown builtin+custom, project dropdown restricted to registered projects (decision ③), interval ≥60 client-side + daemon backstop (decision ⑤), enabled checkbox, optional repo.
- Template management — builtin types read-only (no action buttons rendered, decision ①⑥); custom templates create/update/delete with prompt preview (60-char truncation), delete-refused error surfaced via system message (decision ②), name immutable on edit.
- i18n — full zh/en key pairs (30+ keys) for all new strings; static data-i18n in index.html.
- Regression — ran GUI
npm test: 229 passed (was 225, +4: RESPONSE_TYPES coverage + task list render/edit prefill + interval<60 rejection + template builtin-readonly CRUD); pytest 744 passed; doc-count guard green (Agent.md 225→229 breakdown updated correctly: 44 daemon_client + 107 renderer smoke). No issues found.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle. CI PASS (run 31589657813). Reviewed full diff: task/template CRUD IPC wired to daemon P2 commands, RESPONSE_TYPES entries added (task_result/templates_list/template_result — otherwise sendCommandAndWait falls back to the command name and would time out), settings UI enforces all 6 host decision points (builtin read-only, referenced-type delete refusal surfaced, registered-projects picker, hot reload via apply_tasks, interval >=60 client + daemon, builtin templates read-only), GUI 229 + pytest 744 green, doc counts synced.
|
I tested this PR end-to-end and the implementation is solid. Verification results: |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle. Re-verified on head a64b573 (this cycle): full diff 11 files 786+/2- — task/template CRUD IPC (main.js+preload.js), RESPONSE_TYPES +7 (task_result/templates_list/template_result — prevents sendCommandAndWait fallback timeout), settings UI enforces all 6 host decisions (builtin read-only, referenced-type delete refusal, registered-projects picker, hot reload, interval >=60, builtin templates read-only). CI PASS 31589657813; local pytest 744 + GUI 229 green. No issues.
Summary
Final slice (P3) of rant 2026-08-12T18:23:15 (task generalization + GUI task management). P1 (#709) and P2 (#710, daemon task/template CRUD + hot reload) are already merged; this PR adds the GUI management UI on top of the P2 daemon commands.
Changes
#settings-dialog): task list (name / type / project / interval / enabled), plus Add / Trigger / Edit / Delete actions.emrg:taskCreate/Update/Deleteandemrg:taskTemplateList/Create/Update/Deletein main.js + preload.js; newRESPONSE_TYPESentries (task_result/templates_list/template_result) in daemon_client.js — without these, sendCommandAndWait falls back to the command name as respType and would time out against the daemon's actual frame types.6 host-confirmed decision points enforced
apply_taskson every create/update/delete)Tests