Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .cursor/rules/project-structure.mdc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
description: Project structure and file organization guidelines
globs:
globs:
alwaysApply: false
---

# Project Structure

## Main Structure
Expand Down Expand Up @@ -68,7 +69,6 @@ alwaysApply: false
│ └── unsubscriber/ # Automates unsubscribes using browser automation. Not currently in use
├── packages
├── tinybird/
├── eslint-config/
├── loops/
├── resend/
├── tinybird-ai-analytics/
Expand Down
344 changes: 344 additions & 0 deletions .cursor/rules/ultracite.mdc

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions .eslintrc.js

This file was deleted.

2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
npx lint-staged
# pnpm run lint

npx ultracite format
14 changes: 13 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,17 @@
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript][typescript][javascriptreact][typescriptreact][json][jsonc][css][graphql]": {
"editor.defaultFormatter": "biomejs.biome"
},
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"emmet.showExpandedAbbreviation": "never",
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
}
}
19 changes: 0 additions & 19 deletions apps/web/.eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion apps/web/__tests__/ai-extract-from-email-history.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe.runIf(isAiTest)("aiExtractFromEmailHistory", () => {

const result = await aiExtractFromEmailHistory({
currentThreadMessages: currentMessages,
historicalMessages: historicalMessages,
historicalMessages,
emailAccount: getEmailAccount(),
});

Expand Down
1 change: 0 additions & 1 deletion apps/web/__tests__/ai/reply/draft-with-knowledge.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { describe, expect, test, vi } from "vitest";
import { aiDraftWithKnowledge } from "@/utils/ai/reply/draft-with-knowledge";
import type { EmailAccountWithAI } from "@/utils/llms/types";
import type { EmailForLLM } from "@/utils/types";
import { getEmailAccount } from "@/__tests__/helpers";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ const AddGroupItemForm = ({
if (e.key === "Enter") {
e.preventDefault();
e.stopPropagation();
void handleSubmit(onSubmit)(e);
handleSubmit(onSubmit)(e);
}
},
[handleSubmit, onSubmit],
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(marketing)
Submodule (marketing) updated from 057e79 to 334fb2
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ vi.mock("@/utils/gmail/thread", () => ({
getThreadMessages: vi.fn().mockImplementation(async (gmail, threadId) => [
{
id: threadId === "thread-456" ? "456" : "123",
threadId: threadId,
threadId,
labelIds: ["INBOX"],
internalDate: "1704067200000", // 2024-01-01T00:00:00Z
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/api/lemon-squeezy/webhook/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ async function handleSubscriptionCreated(payload: Payload, userId: string) {
throw new Error("No subscription item");

logger.info("Subscription created", {
lemonSqueezyRenewsAt: lemonSqueezyRenewsAt,
lemonSqueezyRenewsAt,
lemonSqueezySubscriptionId:
payload.data.attributes.first_subscription_item.subscription_id,
lemonSqueezySubscriptionItemId:
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/api/user/stats/day/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function getPastSevenDayStats(
const dateString = `${date.getDate()}/${date.getMonth() + 1}`;

// let count = cachedStats?.[dateString]
let count: number | undefined = undefined;
let count: number | undefined;

if (typeof count !== "number") {
const query = getQuery(options.type, date);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"start_url": "/",
"display": "standalone",
"orientation": "portrait"
}
}
1 change: 0 additions & 1 deletion apps/web/components/TabSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export function TabSelect<T extends string>({
target === "_blank" && "group flex items-center gap-1.5",
)}
data-selected={isSelected}
aria-selected={isSelected}
>
{label}
{target === "_blank" && <ArrowUpRight className="size-2.5" />}
Expand Down
1 change: 1 addition & 0 deletions apps/web/components/assistant-chat/message-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function MessageEditor({
const [draftContent, setDraftContent] = useState<string>(message.content);
const textareaRef = useRef<HTMLTextAreaElement>(null);

// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
useEffect(() => {
if (textareaRef.current) {
adjustHeight();
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/assistant-chat/message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const PurePreviewMessage = ({
const { toolName, toolCallId, state } = toolInvocation;

if (state === "call") {
return <Skeleton className="h-16 w-full" />;
return <Skeleton key={toolCallId} className="h-16 w-full" />;
}

if (state === "result") {
Expand Down
10 changes: 7 additions & 3 deletions apps/web/components/editor/SimpleRichTextEditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
font-weight: 500;
}

.simple-rich-editor.prose :where(code):not(:where([class~="not-prose"] *))::before,
.simple-rich-editor.prose :where(code):not(:where([class~="not-prose"] *))::after {
.simple-rich-editor.prose
:where(code):not(:where([class~="not-prose"] *))::before,
.simple-rich-editor.prose
:where(code):not(:where([class~="not-prose"] *))::after {
content: ""; /* Remove backticks */
}

Expand All @@ -25,7 +27,9 @@
@apply bg-blue-950 border-blue-800 text-blue-100;
}

.dark .simple-rich-editor.prose :where(code):not(:where([class~="not-prose"] *)) {
.dark
.simple-rich-editor.prose
:where(code):not(:where([class~="not-prose"] *)) {
@apply bg-blue-950 text-blue-100 border-blue-800;
}

Expand Down
6 changes: 0 additions & 6 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@
"dub": "0.63.4",
"email-reply-parser": "1.9.4",
"encoding": "0.1.13",
"eslint": "9.28.0",
"eslint-config-next": "15.3.3",
"fast-deep-equal": "3.1.3",
"framer-motion": "12.15.0",
"gmail-api-parse-message": "2.1.2",
Expand Down Expand Up @@ -122,7 +120,6 @@
"p-retry": "6.2.1",
"posthog-js": "1.249.0",
"posthog-node": "4.18.0",
"prettier": "3.5.3",
"react": "19.1.0",
"react-day-picker": "8.10.1",
"react-dom": "19.1.0",
Expand Down Expand Up @@ -150,7 +147,6 @@
},
"devDependencies": {
"@headlessui/tailwindcss": "0.2.2",
"@inboxzero/eslint-config": "workspace:*",
"@testing-library/react": "16.3.0",
"@types/diff": "7.0.2",
"@types/email-reply-parser": "1.4.2",
Expand All @@ -169,8 +165,6 @@
"dotenv": "16.5.0",
"jiti": "2.4.2",
"postcss": "8.5.4",
"prettier": "3.5.3",
"prettier-plugin-tailwindcss": "0.6.12",
"prisma": "6.6.0",
"serwist": "9.0.14",
"tailwindcss": "3.4.17",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
}
};
2 changes: 1 addition & 1 deletion apps/web/sanity.cli.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This configuration file lets you run `$ sanity [command]` in this folder
* Go to https://www.sanity.io/docs/cli to learn more.
**/
*/
import { defineCliConfig } from "sanity/cli";

const projectId = process.env.NEXT_PUBLIC_SANITY_PROJECT_ID;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
--background: 0 0% 100%; /* white */
--foreground: 222.2 47.4% 11.2%; /* slate-900 */

--muted: 210 40% 96.1%; /* slate-100 */
--muted: 210 40% 96.1%; /* slate-100 */
--muted-foreground: 215.4 16.3% 46.9%; /* slate-500 */

--popover: 0 0% 100%; /* white */
Expand Down
2 changes: 1 addition & 1 deletion apps/web/utils/actions/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const adminSyncAllStripeCustomersToDbAction = adminActionClient
logger.info("Starting sync of all Stripe customers to DB");

let hasMore = true;
let startingAfter: string | undefined = undefined;
let startingAfter: string | undefined;
const allCustomers: Stripe.Customer[] = [];

while (hasMore) {
Expand Down
6 changes: 1 addition & 5 deletions apps/web/utils/assess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ import { createScopedLogger } from "@/utils/logger";

const logger = createScopedLogger("utils/assess");

export async function assessUser({
gmail,
}: {
gmail: gmail_v1.Gmail;
}) {
export async function assessUser({ gmail }: { gmail: gmail_v1.Gmail }) {
// how many unread emails?
const unreadCount = await getUnreadEmailCount(gmail);
// how many unarchived emails?
Expand Down
10 changes: 6 additions & 4 deletions apps/web/utils/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,14 @@ export type ServerActionResponse<

// This class is used to throw error messages that are safe to expose to the client.
export class SafeError extends Error {
constructor(
public safeMessage?: string,
public statusCode?: number,
) {
safeMessage?: string;
statusCode?: number;

constructor(safeMessage?: string, statusCode?: number) {
super(safeMessage);
this.name = "SafeError";
this.safeMessage = safeMessage;
this.statusCode = statusCode;
}
}

Expand Down
4 changes: 2 additions & 2 deletions apps/web/utils/redis/subscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const logger = createScopedLogger("ioredis");
class RedisSubscriber {
private static instance: Redis | null = null;

public static getInstance(): Redis {
static getInstance(): Redis {
if (!RedisSubscriber.instance) {
if (!env.REDIS_URL) {
throw new Error("REDIS_URL is not set");
Expand All @@ -30,7 +30,7 @@ class RedisSubscriber {
return RedisSubscriber.instance;
}

public static disconnect(): void {
static disconnect(): void {
if (RedisSubscriber.instance) {
RedisSubscriber.instance.disconnect();
RedisSubscriber.instance = null;
Expand Down
8 changes: 4 additions & 4 deletions apps/web/vitest.config.mts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { config } from "dotenv";
import { defineConfig } from 'vitest/config'
import { defineConfig } from "vitest/config";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
plugins: [tsconfigPaths()],
test: {
environment: 'node',
environment: "node",
env: {
...config({ path: "./.env.test" }).parsed,
},
},
})
});
Loading
Loading