Files
mono/federation/sxc/pages/social.sx
giles 418ac9424f Eliminate Python page helpers from account, federation, and cart
All three services now fetch page data via (service ...) IO primitives
in .sx defpages instead of Python middleman functions.

- Account: newsletters-data → AccountPageService.newsletters_data
- Federation: 8 page helpers → FederationPageService methods
  (timeline, compose, search, following, followers, notifications)
- Cart: 4 page helpers → CartPageService methods
  (overview, page-cart, admin, payments)
- Serializers moved to service modules, thin delegates kept for routes
- ~520 lines of Python page helpers removed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 02:01:50 +00:00

83 lines
2.0 KiB
Plaintext

;; Federation social pages
;; All data fetching via (service ...) IO primitives, no Python helpers.
(defpage home-timeline
:path "/social/"
:auth :login
:layout :social
:data (service "federation-page" "home-timeline-data")
:content (~federation-timeline-content
:items items
:timeline-type timeline-type
:actor actor))
(defpage public-timeline
:path "/social/public"
:auth :public
:layout :social
:data (service "federation-page" "public-timeline-data")
:content (~federation-timeline-content
:items items
:timeline-type timeline-type
:actor actor))
(defpage compose-form
:path "/social/compose"
:auth :login
:layout :social
:data (service "federation-page" "compose-data")
:content (~federation-compose-content
:reply-to reply-to))
(defpage search
:path "/social/search"
:auth :public
:layout :social
:data (service "federation-page" "search-data")
:content (~federation-search-content
:query query
:actors actors
:total total
:followed-urls followed-urls
:actor actor))
(defpage following-list
:path "/social/following"
:auth :login
:layout :social
:data (service "federation-page" "following-data")
:content (~federation-following-content
:actors actors
:total total
:actor actor))
(defpage followers-list
:path "/social/followers"
:auth :login
:layout :social
:data (service "federation-page" "followers-data")
:content (~federation-followers-content
:actors actors
:total total
:followed-urls followed-urls
:actor actor))
(defpage actor-timeline
:path "/social/actor/<int:id>"
:auth :public
:layout :social
:data (service "federation-page" "actor-timeline-data" :id id)
:content (~federation-actor-timeline-content
:remote-actor remote-actor
:items items
:is-following is-following
:actor actor))
(defpage notifications
:path "/social/notifications"
:auth :login
:layout :social
:data (service "federation-page" "notifications-data")
:content (~federation-notifications-content
:notifications notifications))