Repository navigation
fix: performance API docs status codes, period default, example dates; dashboard trend from zero - #152
Merged
Conversation
…; dashboard trend from zero Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… match the dashboard Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Follow-up to docs#151: three pre-existing mismatches on the performance API page, and the dashboard sentence about percentage change now that cms#510 sends no trend when the previous period was 0.
api-reference/performance.mdx403row (no session, not an active member, or no such program); the401and404rows are gone. The auth note says the same.meta.period:"7d"when none is sent (was"all").datarows are 2024-05-31 and 2024-06-01, insidemeta.dateFrom/dateTo(one row was 2024-06-02, afterdateTo). Totals unchanged.brand/quickstart/view-performance.mdx: a metric that was 0 in the previous period shows no percentage.Not in this PR: docs for
GET /affiliate-partner/programs/:id/stats. That route has no trend (cms#510 changedGET /affiliate-partner/programs/:id); whether to document either is an open question.Why
Approved follow-up by the repo manager; the docs should match the code.
How verified
v3.16.114:src/policies/verify-program-access.ts:24-37("Every refusal is HTTP 403 ... 'Not signed in' therefore reads 403, not 401"); route/tracking/performance/:programIdusestrackingListPolicy(routes file :9, :30); no membership (including a nonexistent program) is refused at policy line ~128. Measured on prod:curl https://api.affitor.com/api/tracking/performance/1with no session returns403 ForbiddenError.getPerformanceDatahasconst { period = '7d', ... } = ctx.query, returned asmeta.period(line ~860).src/components/ui/settings/ChartTrendBadge.tsx:20-21renders nothing when the value is not finite (null), 0, or stable. Open dash#738 keeps that rule for null, so the sentence holds before and after it.check-agent-surface,check-docs-hostandcheck-docs-host-httppass locally. No media.🤖 Generated with Claude Code