Skip to content

Fix build blockers for tracker deploy#246

Merged
ralyodio merged 1 commit into
masterfrom
crawlproof/fix-ugig-build-for-tracker-deploy
May 23, 2026
Merged

Fix build blockers for tracker deploy#246
ralyodio merged 1 commit into
masterfrom
crawlproof/fix-ugig-build-for-tracker-deploy

Conversation

@ralyodio
Copy link
Copy Markdown
Contributor

Summary

  • remove duplicate normalizedNote declaration in affiliate offer application route
  • exclude root-level scaffold artifacts from TypeScript/Next build so the real src/ app files compile

Verification

  • pnpm install --frozen-lockfile --prefer-offline
  • pnpm run build (passes compile and TypeScript; local prerender then stops because local env is missing Supabase service role config)

@ralyodio ralyodio merged commit 57b9a67 into master May 23, 2026
4 checks passed
@ralyodio ralyodio deleted the crawlproof/fix-ugig-build-for-tracker-deploy branch May 23, 2026 12:44
@github-actions
Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 23, 2026

Greptile Summary

This PR fixes two build blockers: a TypeScript redeclaration error caused by a duplicate normalizedNote variable in the affiliate offer apply route, and compilation failures from seven root-level scaffold files that TypeScript was inadvertently picking up.

  • route.ts: Removes the first (redundant) note parsing block; the second block already performs the same type check and normalization correctly, so the surviving logic is functionally equivalent.
  • tsconfig.json: Adds the seven root-level scaffold filenames to exclude; this is valid TypeScript config and unblocks the build, though the files themselves remain as committed artifacts in the repo root.

Confidence Score: 4/5

Safe 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

Filename Overview
src/app/api/affiliates/offers/[id]/apply/route.ts Removes duplicate note parsing/validation block that caused a TypeScript redeclaration error; surviving validation block is correct and equivalent.
tsconfig.json Adds seven root-level scaffold filenames to exclude so they are skipped during Next.js/TypeScript compilation; files exist at the repo root and the bare-filename exclusion syntax is valid, but the files themselves are committed clutter.

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]
Loading

Fix All in Codex Fix All in Claude Code

Reviews (1): Last reviewed commit: "Fix build blockers for tracker deploy" | Re-trigger Greptile

Comment thread tsconfig.json
Comment on lines +42 to +48
"InlinePayModal.tsx",
"PayApplicantButton.tsx",
"api-invoices-pay.ts",
"api-invoices-status.ts",
"coinpayportal-lib.ts",
"dashboard-invoices-page.tsx",
"webhook-enhancement.ts"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Fix in Codex Fix in Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant