Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4cc262a
refactor: add PanelSection and MutationErrorBanner common components
AndersonDesign1 Jun 7, 2026
a3f36ec
refactor: clean up project-files-panel.tsx, use PanelSection and Muta…
AndersonDesign1 Jun 7, 2026
ab9617b
refactor: clean up project-milestones-panel.tsx, use PanelSection, Mu…
AndersonDesign1 Jun 7, 2026
891ac39
refactor: move optionalString helper to lib/utils.ts
AndersonDesign1 Jun 7, 2026
11966e0
refactor: clean up project-updates-panel.tsx to use PanelSection, Mut…
AndersonDesign1 Jun 7, 2026
68dddc2
refactor: add variant support to PanelSection component
AndersonDesign1 Jun 7, 2026
be2fc6f
refactor: update project-collaboration-panel.tsx to use PanelSection …
AndersonDesign1 Jun 7, 2026
1c89c3f
refactor: extract ChartCard helper in dashboard.tsx to reduce class d…
AndersonDesign1 Jun 7, 2026
f382a52
refactor: replace custom animate-bounce-short with standard animate-s…
AndersonDesign1 Jun 7, 2026
8ada609
perf: optimize getBudgetByClientData and getNextDeadline to use singl…
AndersonDesign1 Jun 7, 2026
2b5833b
refactor: apply codebase-wide Biome formatting and auto-fixes
AndersonDesign1 Jun 7, 2026
8a77b03
ci: add React Doctor GitHub Actions workflow
AndersonDesign1 Jun 9, 2026
d96b893
fix(react): remove unused packages and resolve reduced-motion accessi…
AndersonDesign1 Jun 9, 2026
9f9f676
perf(react): hoist static arrays/objects to module scope and optimize…
AndersonDesign1 Jun 9, 2026
98b235d
fix(react): optimize charts rendering performance, resolve React 19 w…
AndersonDesign1 Jun 9, 2026
fcb714d
fix(react): refactor ChartTooltipContent to prevent rules-of-hooks vi…
AndersonDesign1 Jun 9, 2026
4edb761
fix(react): resolve remaining warnings in evil-brush, legend, and chart
AndersonDesign1 Jun 9, 2026
b74ec17
fix(react): resolve hydration, hooks, derived state, and lookup warni…
AndersonDesign1 Jun 9, 2026
4e709c4
Merge branch 'main' into react-doctor/add-github-actions-202606090951
AndersonDesign1 Jun 9, 2026
8f0225e
ci: pin GitHub Actions SHAs, disable checkout credentials, and pin do…
AndersonDesign1 Jun 9, 2026
01888d3
fix: clamp incoming controlled range in evil-brush, pass visibleIndex…
AndersonDesign1 Jun 9, 2026
7043302
fix(review): add role='alert' to mutation error banner and split stat…
AndersonDesign1 Jun 9, 2026
4c978a8
Merge branch 'main' into react-doctor/add-github-actions-202606090951
AndersonDesign1 Jun 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/react-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# React Doctor — finds security, performance, correctness, accessibility,
# bundle-size, and architecture issues in React codebases.
#
# Docs: https://www.react.doctor/ci
# Source: https://github.com/millionco/react-doctor

name: React Doctor

on:
# Scans the PR's changed files and posts a sticky summary comment listing only the new issues introduced relative to the merge base of the target branch.
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# Scans `main` on every push to track the health-score trend and catch regressions that slipped past PR review.
push:
branches: [main]

permissions:
contents: read
pull-requests: write
issues: write
statuses: write

# Cancels any in-flight scan for the same PR (or branch, on push) the moment a new commit arrives, so reviewers only ever see the latest run.
concurrency:
group: react-doctor-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
react-doctor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- uses: millionco/react-doctor@75932719d11ef50e110eac01ce04acdc05fde074 # v2.0.1
# Common configuration knobs — uncomment any to override the default.
# Full reference: https://www.react.doctor/ci
# with:
# blocking: warning # Gate level: "error" (default) | "warning" | "none" (advisory)
# scope: full # On PRs, scan the whole project instead of just changed files
# comment: false # Disable the sticky PR summary comment
# review-comments: false # Disable inline review comments on changed lines
# commit-status: false # Disable the commit status (score + counts, links to the run)
# version: "0.4.0" # Pin to a specific react-doctor version instead of "latest"
# directory: apps/web # Scan a sub-directory (default: ".")
# project: "web,admin" # In a monorepo, scan specific workspace project(s)
31 changes: 16 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
count.txt
.env
.nitro
.tanstack
.wrangler
.output
.vinxi
__unconfig*
todos.json
local.db
node_modules
.DS_Store
dist
dist-ssr
*.local
count.txt
.env
.nitro
.tanstack
.wrangler
.output
.vinxi
__unconfig*
todos.json
local.db
react-doctor-report.json
4 changes: 0 additions & 4 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions doctor.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://react.doctor/schema/config.json",
"ignore": {
"files": [
"src/components/ui/**",
"node_modules/**",
"drizzle/**",
"dist/**",
".output/**",
"react-doctor-report.json"
]
},
"rules": {
"react-doctor/only-export-components": "off",
"react-doctor/no-giant-component": "off",
"react-doctor/no-multi-comp": "off",
"react-doctor/prefer-useReducer": "off",
"react-doctor/no-many-boolean-props": "off",
"react-doctor/prefer-dynamic-import": "off",
"react-doctor/no-event-handler": "off",
"react-doctor/control-has-associated-label": "off",
"react-doctor/use-lazy-motion": "off",
"react-doctor/jsx-no-jsx-as-prop": "off",
"deslop/unused-export": "off",
"deslop/unused-file": "off"
}
}
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"typecheck": "bun x tsc --noEmit",
"check": "ultracite check",
"fix": "ultracite fix",
"db:studio": "drizzle-kit studio"
"db:studio": "drizzle-kit studio",
"doctor": "npx react-doctor@2"
},
"dependencies": {
"@base-ui/react": "^1.3.0",
Expand All @@ -27,7 +28,6 @@
"@tanstack/react-router-devtools": "^1.132.0",
"@tanstack/react-router-ssr-query": "^1.131.7",
"@tanstack/react-start": "^1.132.0",
"@tanstack/router-plugin": "^1.132.0",
"@uploadthing/react": "^7.3.3",
"better-auth": "^1.5.5",
"class-variance-authority": "^0.7.1",
Expand Down Expand Up @@ -63,7 +63,6 @@
"typescript": "^5.7.2",
"ultracite": "7.3.2",
"vite": "^8.0.12",
"vitest": "^4",
"web-vitals": "^5.1.0"
"vitest": "^4"
}
}
16 changes: 12 additions & 4 deletions scripts/migrate-portal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ let hadError = false;

// Add new columns to invites table (ignore if already exist)
for (const [col, ddl] of [
["initiated_by_client_id", "ALTER TABLE invites ADD COLUMN initiated_by_client_id TEXT REFERENCES clients(id) ON DELETE SET NULL"],
["admin_approved_at", "ALTER TABLE invites ADD COLUMN admin_approved_at INTEGER"],
[
"initiated_by_client_id",
"ALTER TABLE invites ADD COLUMN initiated_by_client_id TEXT REFERENCES clients(id) ON DELETE SET NULL",
],
[
"admin_approved_at",
"ALTER TABLE invites ADD COLUMN admin_approved_at INTEGER",
],
] as const) {
try {
await db.run(sql.raw(ddl));
Expand All @@ -28,7 +34,8 @@ if (hadError) {

// Create status_change_requests table
try {
await db.run(sql.raw(`
await db.run(
sql.raw(`
CREATE TABLE IF NOT EXISTS status_change_requests (
id TEXT PRIMARY KEY,
project_id TEXT NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
Expand All @@ -40,7 +47,8 @@ try {
reviewed_at INTEGER,
created_at INTEGER NOT NULL
)
`));
`)
);
console.log("✓ Created status_change_requests table");
} catch (e: unknown) {
console.error("status_change_requests error:", e);
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/api-invite-management.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ vi.mock("@/server/email/notifications", () => ({

import { getSessionUserFromHeaders } from "@/auth/session.server";
import {
approveInviteRecord,
createInviteRecord,
getActiveInviteById,
getClientById,
getInviteRecordById,
refreshInviteExpiration,
revokeInviteRecord,
approveInviteRecord,
} from "@/db/records";
import { Route as InvitesRoute } from "@/routes/api/invites";
import { Route as ApproveInviteRoute } from "@/routes/api/invites/$id/approve";
import { Route as ResendInviteRoute } from "@/routes/api/invites/$id/resend";
import { Route as RevokeInviteRoute } from "@/routes/api/invites/$id/revoke";
import { Route as ApproveInviteRoute } from "@/routes/api/invites/$id/approve";
import { sendInviteEmail } from "@/server/email/notifications";

const inviteHandlers = InvitesRoute.options.server?.handlers as {
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/auth-shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function AuthShell({
</p>
</div>
<div className="font-normal text-emerald-100/40 text-xs tracking-wide">
© {new Date().getFullYear()} Clientra. Refined workspace design.
© <span suppressHydrationWarning>{new Date().getFullYear()}</span> Clientra. Refined workspace design.
</div>
</div>
</div>
Expand Down
10 changes: 6 additions & 4 deletions src/components/auth/worker-invite-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ interface InvitationData {
role: string;
}

const handleSignOut = async () => {
await authClient.signOut();
window.location.reload();
};

export function WorkerInviteForm({ token }: { token: string }) {
const router = useRouter();
const [invitation, setInvitation] = useState<InvitationData | null>(null);
Expand Down Expand Up @@ -85,10 +90,7 @@ export function WorkerInviteForm({ token }: { token: string }) {
}
};

const handleSignOut = async () => {
await authClient.signOut();
window.location.reload();
};


if (loading) {
return (
Expand Down
56 changes: 56 additions & 0 deletions src/components/common/panel-section.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import type { ReactNode } from "react";
import { cn } from "@/lib/utils";

interface PanelSectionProps {
action?: ReactNode;
children: ReactNode;
className?: string;
description?: string;
title: string;
variant?: "card" | "ghost";
}

export function PanelSection({
title,
description,
action,
children,
className,
variant = "card",
}: PanelSectionProps) {
return (
<section
className={cn(
"space-y-5",
variant === "card" &&
"rounded-xl border border-border/40 bg-card p-6 shadow-[0_1px_3px_rgba(0,0,0,0.015)]",
className
)}
>
<div className="flex flex-wrap items-center justify-between gap-4 border-border/40 border-b pb-4">
<div>
<h2
className={cn(
"font-semibold text-foreground",
variant === "card" ? "text-lg" : "text-base"
)}
>
{title}
</h2>
{description && (
<p
className={cn(
"mt-1 text-muted-foreground leading-relaxed",
variant === "card" ? "text-sm" : "text-xs"
)}
>
{description}
</p>
)}
</div>
{action}
</div>
{children}
</section>
);
}
Loading
Loading