Fix build blockers for tracker deploy#246
Conversation
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
Greptile SummaryThis PR fixes two build blockers: a TypeScript redeclaration error caused by a duplicate
Confidence Score: 4/5Safe to merge; both changes are narrowly scoped build fixes with no behavioural changes to application logic. The route fix correctly removes a duplicate block, leaving the validation and normalization logic intact and equivalent. The tsconfig exclusions work as intended. The only outstanding concern is that seven scaffold files remain as committed tracked files in the repo root, which is harmless today but adds ongoing maintenance overhead to tsconfig.json. The seven root-level scaffold files (InlinePayModal.tsx, PayApplicantButton.tsx, api-invoices-pay.ts, api-invoices-status.ts, coinpayportal-lib.ts, dashboard-invoices-page.tsx, webhook-enhancement.ts) warrant a follow-up to either delete or relocate them. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[POST /api/affiliates/offers/:id/apply] --> B{Auth check}
B -- unauthorized --> C[401 Unauthorized]
B -- authorized --> D{Rate limit check}
D -- exceeded --> E[429 Too Many Requests]
D -- allowed --> F[Fetch offer]
F --> G{Offer active?}
G -- no --> H[404 Not found]
G -- yes --> I{Own offer?}
I -- yes --> J[400 Cannot promote own offer]
I -- no --> K{Already applied?}
K -- yes --> L[409 Conflict]
K -- no --> M[Parse request body]
M --> N{body.note valid?}
N -- non-string note --> O[400 note must be a string]
N -- valid/absent --> P[Normalize note to string or null]
P --> Q[Insert affiliate_applications row]
Q --> R{Insert error?}
R -- duplicate 23505 --> S[409 Already applied]
R -- other error --> T[400 error message]
R -- success --> U[Increment offer affiliate count]
U --> V[Notify seller]
V --> W[201 application + tracking info]
Reviews (1): Last reviewed commit: "Fix build blockers for tracker deploy" | Re-trigger Greptile |
| "InlinePayModal.tsx", | ||
| "PayApplicantButton.tsx", | ||
| "api-invoices-pay.ts", | ||
| "api-invoices-status.ts", | ||
| "coinpayportal-lib.ts", | ||
| "dashboard-invoices-page.tsx", | ||
| "webhook-enhancement.ts" |
There was a problem hiding this comment.
Scaffold files committed at repo root
Seven draft/scaffold files (InlinePayModal.tsx, PayApplicantButton.tsx, api-invoices-pay.ts, etc.) exist as tracked files at the repository root. Excluding them from the TypeScript build unblocks the compile, but they remain as committed clutter that will require ongoing maintenance in tsconfig.json whenever new scaffold files appear. A cleaner long-term resolution would be to delete them, move them to their intended locations under src/, or add a root-level glob pattern like "*.ts" / "*.tsx" (excluding node_modules and src) if root-level drafts are a recurring workflow artifact.
Summary
Verification