From 717fd14986fea45f2a539068be67a7f132cdedad Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 28 Nov 2025 02:08:50 -0500 Subject: Add create fact form in web UI All tests pass. The create fact form has been added to the web UI. Here' 1. **Added `FactCreateForm` data type** - New form type to handle the cr 2. **Added API route** - `POST /kb/create` endpoint that accepts the for 3. **Added handler** - `factCreateHandler` that creates a new fact using 4. **Added form UI** - A collapsible form on the KB page with fields for - Project (required) - Fact Content (required textarea) - Related Files (optional, comma-separated) - Confidence level (0.0-1.0, default 0.8) 5. **Added CSS styles** - Styling for the create fact section in both li Task-Id: t-158.6 --- Omni/Jr/Web/Style.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Omni/Jr/Web/Style.hs') diff --git a/Omni/Jr/Web/Style.hs b/Omni/Jr/Web/Style.hs index b262037..7d6e7d6 100644 --- a/Omni/Jr/Web/Style.hs +++ b/Omni/Jr/Web/Style.hs @@ -789,6 +789,17 @@ formStyles = do padding (px 16) (px 16) (px 16) (px 16) borderRadius (px 4) (px 4) (px 4) (px 4) border (px 1) solid "#fecaca" + ".create-fact-section" ? do + marginBottom (px 16) + ".create-fact-toggle" ? do + cursor pointer + display inlineBlock + ".fact-create-form" ? do + marginTop (px 12) + padding (px 16) (px 16) (px 16) (px 16) + backgroundColor white + borderRadius (px 4) (px 4) (px 4) (px 4) + border (px 1) solid "#d1d5db" executionDetailsStyles :: Css executionDetailsStyles = do @@ -1274,6 +1285,9 @@ darkModeStyles = backgroundColor "#374151" borderColor "#4b5563" color "#f3f4f6" + ".fact-create-form" ? do + backgroundColor "#1f2937" + borderColor "#374151" -- Responsive dark mode: dropdown content needs background on mobile query Media.screen [Media.maxWidth (px 600)] <| do ".navbar-dropdown-content" ? do -- cgit v1.2.3