Mark unread turn summaries in the switcher and Project rows

This commit is contained in:
Ian Gulliver
2026-10-16 11:08:57 -07:00
parent ec169583ff
commit 34db128afe
24 changed files with 755 additions and 239 deletions
+26
View File
@@ -99,6 +99,32 @@ func (s *Server) SetFocus(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusOK, f)
}
func (s *Server) GetSummaryReads(w http.ResponseWriter, r *http.Request) {
reads, err := s.store.SummaryReads(r.Context(), actor(r))
if err != nil {
writeStoreError(w, err)
return
}
writeJSON(w, http.StatusOK, reads)
}
func (s *Server) MarkSummaryRead(w http.ResponseWriter, r *http.Request, taskId string) {
body := api.SummaryRead{}
if !readJSON(w, r, &body) {
return
}
if body.Seq <= 0 {
writeError(w, http.StatusBadRequest, errors.New("seq must be positive"))
return
}
err := s.store.MarkSummaryRead(r.Context(), actor(r), taskId, body.Seq)
if err != nil {
writeStoreError(w, err)
return
}
w.WriteHeader(http.StatusNoContent)
}
func (s *Server) SetPaneFocus(w http.ResponseWriter, r *http.Request) {
p := api.PaneFocus{}
if !readJSON(w, r, &p) {