From 043f48c12eb4dfc410e8724b430166000d7cb905 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 13 Jan 2026 08:38:39 -1000 Subject: Implement unified Atom model for multi-source abstraction - Create internal/models/atom.go with Atom struct and enums - Add mapper functions for Task, Card, Note, and Meal types - Normalize priority scales (1-4) and assign brand colors - Update Phase 2 plan with Atom architecture as Step 1 - Document architectural decision in SESSION_STATE.md This abstraction enables consistent handling, sorting, and rendering of items from Trello, Todoist, Obsidian, and PlanToEat sources. Co-Authored-By: Claude Sonnet 4.5 --- SESSION_STATE.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'SESSION_STATE.md') diff --git a/SESSION_STATE.md b/SESSION_STATE.md index f4b76f0..e3a498e 100644 --- a/SESSION_STATE.md +++ b/SESSION_STATE.md @@ -32,6 +32,13 @@ Frontend modernization with tabs, HTMX, and Tailwind build pipeline complete. - Empty boards now pushed to bottom, active boards at top - **Commit:** 9ef5b7f "Sort Trello boards with active boards first" - **Frontend Modernization:** Complete UI overhaul with tabs, HTMX, and Tailwind build pipeline + - **Commit:** 06c7485 "Modernize frontend with tabs, HTMX, and Tailwind build pipeline" +- **Unified Atom Model:** Created abstraction layer for all data sources + - internal/models/atom.go: New Atom struct with AtomSource and AtomType enums + - Mapper functions: TaskToAtom, CardToAtom, NoteToAtom, MealToAtom + - Priority normalization (1-4 scale), brand color mapping (Trello=Blue, Todoist=Red, Obsidian=Purple, PlanToEat=Green) + - Preserves raw data for future write operations + - All tests passing after implementation - **Build Pipeline:** npm + PostCSS + Tailwind configuration (replaced CDN) - package.json, tailwind.config.js, postcss.config.js, Makefile - Custom design system with brand colors (Trello, Todoist, Obsidian, PlanToEat) @@ -72,9 +79,13 @@ Frontend modernization with tabs, HTMX, and Tailwind build pipeline complete. - **Decision:** Compiled Tailwind over CDN for 99% smaller CSS and custom design tokens. - **Decision:** Template partials for HTMX-friendly swap targets and reusability. - **Decision:** Native `
` element for empty board collapsible (no JS required). +- **Decision:** Unified Atom Model - Abstract all data sources (Trello, Todoist, Obsidian, PlanToEat) into a single `models.Atom` type for consistent handling, sorting, and rendering across the UI. ## 📋 Next Steps -1. **Future:** Consider Phase 2 features (write operations, user management). +1. **Phase 2 Step 2:** Implement 4-Tab Split (Tasks, Planning, Notes, Meals) using the Atom model. +2. **Phase 2 Step 3:** Trello smart sorting (activity-based, modification date). +3. **Phase 2 Step 4:** Todoist "due first" sorting. +4. **Phase 2 Remaining:** Search, visual overhaul, write operations, PWA. ## ⚠️ Known Blockers / Debt - None currently. -- cgit v1.2.3