Fix standings discrepancy on change.
This commit is contained in:
parent
c3472f591e
commit
266502eeec
2 changed files with 36 additions and 3 deletions
34
AGENTS.md
Normal file
34
AGENTS.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# AGENTS.md
|
||||
|
||||
Brackt.com is a fantasy sports drafting platform (React Router 7 + SSR, Socket.IO, PostgreSQL/DrizzleORM, Clerk auth).
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
npm run dev # development with HMR
|
||||
npm run typecheck # TypeScript check
|
||||
npm run db:generate # generate Drizzle migration
|
||||
npm run db:migrate # apply migrations
|
||||
npm run test:run # unit tests (once)
|
||||
npm run test:e2e:headless # Cypress E2E
|
||||
npm run test:all # everything
|
||||
```
|
||||
|
||||
## Critical Rules
|
||||
|
||||
**Routes**: Every new route file must also be registered in `app/routes.ts` — React Router 7 does not auto-discover files. Forgetting this causes a silent 404. See [routing guide](docs/agents/routing.md).
|
||||
|
||||
**Database**: Always query through `app/models/` — never write Drizzle queries directly in route files.
|
||||
|
||||
**Tests**: Required for all new features. Do not consider a feature complete until tests pass. See [testing guide](docs/agents/testing.md).
|
||||
|
||||
**Drizzle migrations**: Never manually create migration SQL or edit `_journal.json`. Always use `npm run db:generate`. See [database guide](docs/agents/database.md).
|
||||
|
||||
## Reference Docs
|
||||
|
||||
- [Architecture](docs/agents/architecture.md) — server layout, DB layer, Socket.IO events
|
||||
- [Domain Models](docs/agents/domain-models.md) — draft system and sports data models
|
||||
- [Database](docs/agents/database.md) — migration rules, scoring event date gotcha
|
||||
- [Routing](docs/agents/routing.md) — route registration, admin routes
|
||||
- [Testing](docs/agents/testing.md) — what tests are required and where they live
|
||||
- [Auth](docs/agents/auth.md) — Clerk patterns, ownership validation
|
||||
|
|
@ -89,13 +89,12 @@ function RankChangeIndicator({ change }: { change: number }) {
|
|||
}
|
||||
|
||||
function PointChangeIndicator({ change }: { change: number }) {
|
||||
const sign = change >= 0 ? "+" : "";
|
||||
if (change >= 0) {
|
||||
return <span className="text-xs font-semibold text-primary">{sign}{change.toFixed(1)}</span>;
|
||||
return <span className="text-xs font-semibold text-primary">▲{Math.round(change)}</span>;
|
||||
}
|
||||
return (
|
||||
<span className="text-xs font-semibold" style={{ color: "var(--coral-accent, #ef4444)" }}>
|
||||
{sign}{change.toFixed(1)}
|
||||
▼{Math.abs(Math.round(change))}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue