mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
Expose the active weekly subscription window through /v1/usage, calculate offsets with the same normalized page size used by queries, and keep user-facing date ranges on the browser's local calendar date. Constraint: Preserve existing response fields and avoid new dependencies Rejected: Keep duplicate inline date formatters | a shared local-date utility prevents the same UTC regression in both views Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep Offset and Limit based on the same normalized page size Tested: go test ./internal/pkg/pagination ./internal/handler; go vet ./internal/pkg/pagination ./internal/handler; frontend 923 tests; pnpm typecheck; pnpm lint:check; pnpm build Not-tested: Live API request against a deployed subscription Related: #4121