docs: api comments say what the endpoints do, not how they came to be (#6277)
Rewrites the internal/api comment blocks to rule 32: task, milestone and rule ids gone, the stories behind them restated as the constraint they left, stale references corrected (the stream secret is wired from config, the timezone handler already refreshes the scheduler, the Android app is the native client, the design docs cited are not in the repo). Also rewraps comment lines over 80 columns left by the earlier batches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -59,15 +59,14 @@ func (h *handlers) handleGetHome(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// handleGetHomeIndex implements GET /api/home/index. Returns the same
|
||||
// five sections /api/home computes, but as flat slices of entity IDs
|
||||
// rather than denormalized objects. Drives the Flutter per-item
|
||||
// rather than denormalized objects. Drives the Android per-item
|
||||
// rendering path — the client hydrates each tile against the
|
||||
// per-entity endpoints, so this response is tiny (a few KB at most)
|
||||
// and the cold-visit round-trip is correspondingly short.
|
||||
//
|
||||
// Shares the recommendation.HomeData computation with /api/home; the
|
||||
// DB cost is identical. A future optimisation could add ID-only
|
||||
// query variants, but the JSON savings already shrink the wire
|
||||
// payload by roughly an order of magnitude on populated libraries.
|
||||
// DB cost is identical, and the wire payload is roughly an order of
|
||||
// magnitude smaller on populated libraries.
|
||||
func (h *handlers) handleGetHomeIndex(w http.ResponseWriter, r *http.Request) {
|
||||
user, ok := requireUser(w, r)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user