From 8b2d9998e344eb69ab55c6b7732e8d2fa8cdc453 Mon Sep 17 00:00:00 2001 From: Joshua Smith Date: Thu, 17 Sep 2026 14:26:08 -0600 Subject: [PATCH 1/2] feat(flowlord): Add JSONL task import * Add About page upload and POST /import to backfill the SQLite cache * Include sample JSONL and tests for parse, import, and handler paths --- apps/flowlord/handler.go | 1 + apps/flowlord/handler/about.tmpl | 40 +++- apps/flowlord/handler/static/about.js | 111 +++++++++++ apps/flowlord/handler/static/style.css | 24 +++ apps/flowlord/handler_test.go | 9 + apps/flowlord/import.go | 99 ++++++++++ apps/flowlord/import_test.go | 261 +++++++++++++++++++++++++ apps/flowlord/test/sample_tasks.jsonl | 7 + 8 files changed, 545 insertions(+), 7 deletions(-) create mode 100644 apps/flowlord/handler/static/about.js create mode 100644 apps/flowlord/import.go create mode 100644 apps/flowlord/import_test.go create mode 100644 apps/flowlord/test/sample_tasks.jsonl diff --git a/apps/flowlord/handler.go b/apps/flowlord/handler.go index 2b50ff1..c0663f9 100644 --- a/apps/flowlord/handler.go +++ b/apps/flowlord/handler.go @@ -120,6 +120,7 @@ func (tm *taskMaster) StartHandler(serveErr chan<- error) error { router.Get("/refresh", tm.refreshHandler) router.Post("/backload", tm.Backloader) router.Post("/rerun", tm.rerunHandler) + router.Post("/import", tm.importHandler) router.Get("/workflow/*", tm.workflowFiles) router.Get("/workflow", tm.workflowFiles) router.Get("/notify", func(w http.ResponseWriter, r *http.Request) { diff --git a/apps/flowlord/handler/about.tmpl b/apps/flowlord/handler/about.tmpl index 641a499..140ddb5 100644 --- a/apps/flowlord/handler/about.tmpl +++ b/apps/flowlord/handler/about.tmpl @@ -124,10 +124,36 @@ + +
+

Task Import

+

Upload a JSONL file of task records to backfill the SQLite cache. Each line must be a JSON task object (same format as bus/logger output). Tasks are inserted or updated in the cache only; nothing is re-queued to the message bus.

+
+
+ + +
+
+ +
+ + +
+
- + +