summaryrefslogtreecommitdiff
path: root/internal/handlers/atoms.go
diff options
context:
space:
mode:
authorClaude Agent <agent@doot.local>2026-03-25 05:17:35 +0000
committerClaude Agent <agent@doot.local>2026-03-25 05:17:35 +0000
commitb58787cfec0bd07abc316c66dc9be6c10b8113c6 (patch)
treee1c788094f51bdab0bce8ad38c8d6638c9079bb9 /internal/handlers/atoms.go
parent2db5020047640361066510f29f908ca9fd1c99aa (diff)
feat: add Claudomator stories as atom source in Doot tasks tab
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/handlers/atoms.go')
-rw-r--r--internal/handlers/atoms.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/internal/handlers/atoms.go b/internal/handlers/atoms.go
index e99c879..6086a5b 100644
--- a/internal/handlers/atoms.go
+++ b/internal/handlers/atoms.go
@@ -1,15 +1,17 @@
package handlers
import (
+ "context"
"log"
"sort"
+ "task-dashboard/internal/api"
"task-dashboard/internal/models"
"task-dashboard/internal/store"
)
// BuildUnifiedAtomList creates a list of atoms from tasks, cards, and google tasks
-func BuildUnifiedAtomList(s *store.Store) ([]models.Atom, []models.Board, error) {
+func BuildUnifiedAtomList(s *store.Store, claudomator api.ClaudomatorClient) ([]models.Atom, []models.Board, error) {
tasks, err := s.GetTasks()
if err != nil {
return nil, nil, err
@@ -51,6 +53,17 @@ func BuildUnifiedAtomList(s *store.Store) ([]models.Atom, []models.Board, error)
}
}
+ if claudomator != nil {
+ stories, err := claudomator.GetActiveStories(context.Background())
+ if err != nil {
+ log.Printf("Warning: failed to fetch Claudomator stories: %v", err)
+ } else {
+ for _, s := range stories {
+ atoms = append(atoms, models.StoryToAtom(s))
+ }
+ }
+ }
+
// Compute UI fields for all atoms
for i := range atoms {
atoms[i].ComputeUIFields()