···2525 - For now, monolithic approach is appropriate for HTMX-based web app with decentralized storage
26262727## Fixes
2828+2929+- Adding new gear (grinders, etc.) from profile page redirects to brews on profile page after (should stay on current page)
3030+- Brews on profile page are stored in chronological order, should be reverse chronological (newest first)
3131+3232+- [Future work]: adjust timing of caching in feed, maybe use firehose and a sqlite database since we are only storing a few anyway
3333+ - Goal: reduce pings to server when idling
+11
internal/handlers/handlers.go
···44 "context"
55 "encoding/json"
66 "net/http"
77+ "sort"
78 "strconv"
89 "strings"
910···14161417 }
14171418 }
1418141914201420+ // Sort brews in reverse chronological order (newest first)
14211421+ sort.Slice(brews, func(i, j int) bool {
14221422+ return brews[i].CreatedAt.After(brews[j].CreatedAt)
14231423+ })
14241424+14191425 // Check if current user is authenticated (for nav bar state)
14201426 didStr, err := atproto.GetAuthenticatedDID(ctx)
14211427 isAuthenticated := err == nil && didStr != ""
···16211627 }
16221628 }
16231629 }
16301630+16311631+ // Sort brews in reverse chronological order (newest first)
16321632+ sort.Slice(brews, func(i, j int) bool {
16331633+ return brews[i].CreatedAt.After(brews[j].CreatedAt)
16341634+ })
1624163516251636 // Check if the viewing user is the profile owner
16261637 didStr, err := atproto.GetAuthenticatedDID(ctx)