Skip to content

Make it 3$ for EVERYONE, not just old users - #130

Open
itzmetanjim wants to merge 1 commit into
hackclub:mainfrom
itzmetanjim:main
Open

Make it 3$ for EVERYONE, not just old users#130
itzmetanjim wants to merge 1 commit into
hackclub:mainfrom
itzmetanjim:main

Conversation

@itzmetanjim

@itzmetanjim itzmetanjim commented Jul 23, 2026

Copy link
Copy Markdown

Right now, because of some bug, old users have 3$ limit but new users have a 4$ limit. This commit fixes that and makes everyone have a 3$ limit.

Copilot AI review requested due to automatic review settings July 23, 2026 09:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the application’s default daily spending limit behavior so that UI display, middleware enforcement, OpenRouter key provisioning, and the DB default/migration all use the same fallback limit.

Changes:

  • Set default spending limit fallback to $3 across UI (Header), request limiting middleware, and OpenRouter key provisioning.
  • Change users.spending_limit_usd database default to 3 and add a migration to update existing rows that are 4 → 3.
  • Add corresponding Drizzle migration metadata (snapshot + journal entry).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/views/components/Header.tsx Aligns displayed limit fallback with the server/DB default (now “3”).
src/middleware/limits.ts Enforces the default limit fallback as “3” when user has no explicit limit.
src/lib/openrouter-keys.ts Provisions/syncs OpenRouter key limit using fallback “3”.
src/db/schema.ts Changes spendingLimitUsd column default from “4” to “3”.
drizzle/meta/0016_snapshot.json Adds schema snapshot reflecting the new default.
drizzle/meta/_journal.json Records the new migration entry.
drizzle/0016_normal_basilisk.sql Applies DB default change + updates existing users from 4 to 3.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/db/schema.ts
Comment thread drizzle/0016_normal_basilisk.sql
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.

2 participants