From c95c73053326ca20ebf5bfd4642764190ce7f372 Mon Sep 17 00:00:00 2001 From: Kenneth Date: Sun, 12 Apr 2026 18:33:46 +0100 Subject: [PATCH] fix: add .ona and drizzle to oxfmt ignore (#119) oxfmt was reformatting generated drizzle migration snapshots and crashing on .ona/review/comments.json. Also runs the formatter across the full codebase. Co-authored-by: Ona --- .oxfmtrc.json | 2 +- .../src/auth/admin-middleware.test.ts | 2 +- .../src/enhancement/enhance-feed.ts | 2 - .../src/enhancement/prompt-builder.ts | 28 +- .../src/enhancement/schema.test.ts | 12 +- apps/aelis-backend/src/lib/crypto.test.ts | 2 +- apps/aelis-client/app.json | 102 +++++-- apps/aelis-client/src/api/client.ts | 4 +- .../src/app/components/[name].tsx | 9 +- .../aelis-client/src/app/components/index.tsx | 4 +- .../src/components/ui/button.showcase.tsx | 8 +- .../aelis-client/src/components/ui/button.tsx | 6 +- .../src/components/ui/feed-card.showcase.tsx | 2 +- .../src/components/ui/feed-card.tsx | 7 +- .../components/ui/monospace-text.showcase.tsx | 2 +- .../src/components/ui/monospace-text.tsx | 5 +- .../ui/sans-serif-text.showcase.tsx | 2 +- .../src/components/ui/sans-serif-text.tsx | 5 +- .../src/components/ui/serif-text.showcase.tsx | 2 +- .../src/components/ui/serif-text.tsx | 5 +- apps/aelis-client/src/json-render/catalog.ts | 3 +- .../aelis-client/src/json-render/registry.tsx | 22 +- .../app/lottie/clicked-dark.json | 132 +++++++- .../app/lottie/clicked-light.json | 132 +++++++- .../app/lottie/loading-dark.json | 282 +++++++++++++++++- .../app/lottie/loading-light.json | 282 +++++++++++++++++- .../app/lottie/start-loading-dark.json | 225 +++++++++++++- .../app/lottie/start-loading-light.json | 225 +++++++++++++- apps/waitlist-website/fly.toml | 18 +- docs/ai-agent-ideas.md | 227 +++++++------- docs/architecture-draft.md | 234 +++++++-------- docs/db-persistence-layer-spec.md | 77 ++--- docs/feed-source-actions-spec.md | 24 +- packages/aelis-core/package.json | 8 +- .../src/time-of-day-enhancer.ts | 25 +- .../aelis-source-caldav/scripts/test-live.ts | 3 +- packages/aelis-source-tfl/package.json | 2 +- .../aelis-source-weatherkit/scripts/query.ts | 7 +- .../src/weather-source.test.ts | 7 +- .../src/weather-source.ts | 7 +- 40 files changed, 1776 insertions(+), 377 deletions(-) diff --git a/.oxfmtrc.json b/.oxfmtrc.json index b205d56..4675368 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -8,5 +8,5 @@ "ignoreCase": true, "newlinesBetween": true }, - "ignorePatterns": [".claude", "fixtures"] + "ignorePatterns": [".claude", ".ona", "drizzle", "fixtures"] } diff --git a/apps/aelis-backend/src/auth/admin-middleware.test.ts b/apps/aelis-backend/src/auth/admin-middleware.test.ts index 1fa5547..9bd3f0f 100644 --- a/apps/aelis-backend/src/auth/admin-middleware.test.ts +++ b/apps/aelis-backend/src/auth/admin-middleware.test.ts @@ -1,5 +1,5 @@ -import { Hono } from "hono" import { describe, expect, test } from "bun:test" +import { Hono } from "hono" import type { Auth } from "./index.ts" import type { AuthSession, AuthUser } from "./session.ts" diff --git a/apps/aelis-backend/src/enhancement/enhance-feed.ts b/apps/aelis-backend/src/enhancement/enhance-feed.ts index 649b22b..cf82501 100644 --- a/apps/aelis-backend/src/enhancement/enhance-feed.ts +++ b/apps/aelis-backend/src/enhancement/enhance-feed.ts @@ -47,5 +47,3 @@ export function createFeedEnhancer(config: FeedEnhancerConfig): FeedEnhancer { return mergeEnhancement(items, result, currentTime) } } - - diff --git a/apps/aelis-backend/src/enhancement/prompt-builder.ts b/apps/aelis-backend/src/enhancement/prompt-builder.ts index 4114826..376b701 100644 --- a/apps/aelis-backend/src/enhancement/prompt-builder.ts +++ b/apps/aelis-backend/src/enhancement/prompt-builder.ts @@ -36,8 +36,7 @@ export function buildPrompt( for (const item of items) { const hasUnfilledSlots = - item.slots && - Object.values(item.slots).some((slot) => slot.content === null) + item.slots && Object.values(item.slots).some((slot) => slot.content === null) if (hasUnfilledSlots) { enhanceItems.push({ @@ -79,9 +78,7 @@ export function buildPrompt( */ export function hasUnfilledSlots(items: FeedItem[]): boolean { return items.some( - (item) => - item.slots && - Object.values(item.slots).some((slot) => slot.content === null), + (item) => item.slots && Object.values(item.slots).some((slot) => slot.content === null), ) } @@ -129,7 +126,20 @@ function extractCalendarEntry(item: FeedItem): CalendarEntry | null { } const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] as const -const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] as const +const MONTHS = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec", +] as const function pad2(n: number): string { return n.toString().padStart(2, "0") @@ -144,7 +154,11 @@ function formatDayShort(date: Date): string { } function formatDayLabel(date: Date, currentTime: Date): string { - const currentDay = Date.UTC(currentTime.getUTCFullYear(), currentTime.getUTCMonth(), currentTime.getUTCDate()) + const currentDay = Date.UTC( + currentTime.getUTCFullYear(), + currentTime.getUTCMonth(), + currentTime.getUTCDate(), + ) const targetDay = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()) const diffDays = Math.round((targetDay - currentDay) / (1000 * 60 * 60 * 24)) diff --git a/apps/aelis-backend/src/enhancement/schema.test.ts b/apps/aelis-backend/src/enhancement/schema.test.ts index 4ac0c85..418de6c 100644 --- a/apps/aelis-backend/src/enhancement/schema.test.ts +++ b/apps/aelis-backend/src/enhancement/schema.test.ts @@ -135,9 +135,7 @@ describe("schema sync", () => { // JSON Schema structure matches const jsonSchema = enhancementResultJsonSchema - expect(Object.keys(jsonSchema.properties).sort()).toEqual( - Object.keys(payload).sort(), - ) + expect(Object.keys(jsonSchema.properties).sort()).toEqual(Object.keys(payload).sort()) expect([...jsonSchema.required].sort()).toEqual(Object.keys(payload).sort()) // syntheticItems item schema has the right required fields @@ -167,11 +165,7 @@ describe("schema sync", () => { // JSON Schema only allows string or null for slot values const slotValueSchema = - enhancementResultJsonSchema.properties.slotFills.additionalProperties - .additionalProperties - expect(slotValueSchema.anyOf).toEqual([ - { type: "string" }, - { type: "null" }, - ]) + enhancementResultJsonSchema.properties.slotFills.additionalProperties.additionalProperties + expect(slotValueSchema.anyOf).toEqual([{ type: "string" }, { type: "null" }]) }) }) diff --git a/apps/aelis-backend/src/lib/crypto.test.ts b/apps/aelis-backend/src/lib/crypto.test.ts index 8b2dd00..66bf0c5 100644 --- a/apps/aelis-backend/src/lib/crypto.test.ts +++ b/apps/aelis-backend/src/lib/crypto.test.ts @@ -1,5 +1,5 @@ -import { randomBytes } from "node:crypto" import { describe, expect, test } from "bun:test" +import { randomBytes } from "node:crypto" import { CredentialEncryptor } from "./crypto.ts" diff --git a/apps/aelis-client/app.json b/apps/aelis-client/app.json index af4270b..17ffba8 100644 --- a/apps/aelis-client/app.json +++ b/apps/aelis-client/app.json @@ -55,44 +55,112 @@ "fontFamily": "Inter", "fontDefinitions": [ { "path": "./assets/fonts/Inter_100Thin.ttf", "weight": 100 }, - { "path": "./assets/fonts/Inter_100Thin_Italic.ttf", "weight": 100, "style": "italic" }, + { + "path": "./assets/fonts/Inter_100Thin_Italic.ttf", + "weight": 100, + "style": "italic" + }, { "path": "./assets/fonts/Inter_200ExtraLight.ttf", "weight": 200 }, - { "path": "./assets/fonts/Inter_200ExtraLight_Italic.ttf", "weight": 200, "style": "italic" }, + { + "path": "./assets/fonts/Inter_200ExtraLight_Italic.ttf", + "weight": 200, + "style": "italic" + }, { "path": "./assets/fonts/Inter_300Light.ttf", "weight": 300 }, - { "path": "./assets/fonts/Inter_300Light_Italic.ttf", "weight": 300, "style": "italic" }, + { + "path": "./assets/fonts/Inter_300Light_Italic.ttf", + "weight": 300, + "style": "italic" + }, { "path": "./assets/fonts/Inter_400Regular.ttf", "weight": 400 }, - { "path": "./assets/fonts/Inter_400Regular_Italic.ttf", "weight": 400, "style": "italic" }, + { + "path": "./assets/fonts/Inter_400Regular_Italic.ttf", + "weight": 400, + "style": "italic" + }, { "path": "./assets/fonts/Inter_500Medium.ttf", "weight": 500 }, - { "path": "./assets/fonts/Inter_500Medium_Italic.ttf", "weight": 500, "style": "italic" }, + { + "path": "./assets/fonts/Inter_500Medium_Italic.ttf", + "weight": 500, + "style": "italic" + }, { "path": "./assets/fonts/Inter_600SemiBold.ttf", "weight": 600 }, - { "path": "./assets/fonts/Inter_600SemiBold_Italic.ttf", "weight": 600, "style": "italic" }, + { + "path": "./assets/fonts/Inter_600SemiBold_Italic.ttf", + "weight": 600, + "style": "italic" + }, { "path": "./assets/fonts/Inter_700Bold.ttf", "weight": 700 }, - { "path": "./assets/fonts/Inter_700Bold_Italic.ttf", "weight": 700, "style": "italic" }, + { + "path": "./assets/fonts/Inter_700Bold_Italic.ttf", + "weight": 700, + "style": "italic" + }, { "path": "./assets/fonts/Inter_800ExtraBold.ttf", "weight": 800 }, - { "path": "./assets/fonts/Inter_800ExtraBold_Italic.ttf", "weight": 800, "style": "italic" }, + { + "path": "./assets/fonts/Inter_800ExtraBold_Italic.ttf", + "weight": 800, + "style": "italic" + }, { "path": "./assets/fonts/Inter_900Black.ttf", "weight": 900 }, - { "path": "./assets/fonts/Inter_900Black_Italic.ttf", "weight": 900, "style": "italic" } + { + "path": "./assets/fonts/Inter_900Black_Italic.ttf", + "weight": 900, + "style": "italic" + } ] }, { "fontFamily": "Source Serif 4", "fontDefinitions": [ { "path": "./assets/fonts/SourceSerif4_200ExtraLight.ttf", "weight": 200 }, - { "path": "./assets/fonts/SourceSerif4_200ExtraLight_Italic.ttf", "weight": 200, "style": "italic" }, + { + "path": "./assets/fonts/SourceSerif4_200ExtraLight_Italic.ttf", + "weight": 200, + "style": "italic" + }, { "path": "./assets/fonts/SourceSerif4_300Light.ttf", "weight": 300 }, - { "path": "./assets/fonts/SourceSerif4_300Light_Italic.ttf", "weight": 300, "style": "italic" }, + { + "path": "./assets/fonts/SourceSerif4_300Light_Italic.ttf", + "weight": 300, + "style": "italic" + }, { "path": "./assets/fonts/SourceSerif4_400Regular.ttf", "weight": 400 }, - { "path": "./assets/fonts/SourceSerif4_400Regular_Italic.ttf", "weight": 400, "style": "italic" }, + { + "path": "./assets/fonts/SourceSerif4_400Regular_Italic.ttf", + "weight": 400, + "style": "italic" + }, { "path": "./assets/fonts/SourceSerif4_500Medium.ttf", "weight": 500 }, - { "path": "./assets/fonts/SourceSerif4_500Medium_Italic.ttf", "weight": 500, "style": "italic" }, + { + "path": "./assets/fonts/SourceSerif4_500Medium_Italic.ttf", + "weight": 500, + "style": "italic" + }, { "path": "./assets/fonts/SourceSerif4_600SemiBold.ttf", "weight": 600 }, - { "path": "./assets/fonts/SourceSerif4_600SemiBold_Italic.ttf", "weight": 600, "style": "italic" }, + { + "path": "./assets/fonts/SourceSerif4_600SemiBold_Italic.ttf", + "weight": 600, + "style": "italic" + }, { "path": "./assets/fonts/SourceSerif4_700Bold.ttf", "weight": 700 }, - { "path": "./assets/fonts/SourceSerif4_700Bold_Italic.ttf", "weight": 700, "style": "italic" }, + { + "path": "./assets/fonts/SourceSerif4_700Bold_Italic.ttf", + "weight": 700, + "style": "italic" + }, { "path": "./assets/fonts/SourceSerif4_800ExtraBold.ttf", "weight": 800 }, - { "path": "./assets/fonts/SourceSerif4_800ExtraBold_Italic.ttf", "weight": 800, "style": "italic" }, + { + "path": "./assets/fonts/SourceSerif4_800ExtraBold_Italic.ttf", + "weight": 800, + "style": "italic" + }, { "path": "./assets/fonts/SourceSerif4_900Black.ttf", "weight": 900 }, - { "path": "./assets/fonts/SourceSerif4_900Black_Italic.ttf", "weight": 900, "style": "italic" } + { + "path": "./assets/fonts/SourceSerif4_900Black_Italic.ttf", + "weight": 900, + "style": "italic" + } ] } ] diff --git a/apps/aelis-client/src/api/client.ts b/apps/aelis-client/src/api/client.ts index 3b200da..f16d31b 100644 --- a/apps/aelis-client/src/api/client.ts +++ b/apps/aelis-client/src/api/client.ts @@ -27,8 +27,8 @@ export class ApiClient { (prevInit, middleware) => middleware(url, prevInit), init, ) - return fetch(this.baseUrl ? new URL(url.toString(), this.baseUrl) : url, finalInit).then((res) => - Promise.all([Promise.resolve(res), res.json()]), + return fetch(this.baseUrl ? new URL(url.toString(), this.baseUrl) : url, finalInit).then( + (res) => Promise.all([Promise.resolve(res), res.json()]), ) } } diff --git a/apps/aelis-client/src/app/components/[name].tsx b/apps/aelis-client/src/app/components/[name].tsx index 86ece3b..50b569a 100644 --- a/apps/aelis-client/src/app/components/[name].tsx +++ b/apps/aelis-client/src/app/components/[name].tsx @@ -3,13 +3,13 @@ import { useEffect } from "react" import { ScrollView, View } from "react-native" import tw from "twrnc" +import { type Showcase } from "@/components/showcase" import { buttonShowcase } from "@/components/ui/button.showcase" import { feedCardShowcase } from "@/components/ui/feed-card.showcase" import { monospaceTextShowcase } from "@/components/ui/monospace-text.showcase" +import { SansSerifText } from "@/components/ui/sans-serif-text" import { sansSerifTextShowcase } from "@/components/ui/sans-serif-text.showcase" import { serifTextShowcase } from "@/components/ui/serif-text.showcase" -import { type Showcase } from "@/components/showcase" -import { SansSerifText } from "@/components/ui/sans-serif-text" const showcases: Record = { button: buttonShowcase, @@ -41,7 +41,10 @@ export default function ComponentDetailScreen() { const ShowcaseComponent = showcase.component return ( - + ) diff --git a/apps/aelis-client/src/app/components/index.tsx b/apps/aelis-client/src/app/components/index.tsx index d02ebbd..cfa71b8 100644 --- a/apps/aelis-client/src/app/components/index.tsx +++ b/apps/aelis-client/src/app/components/index.tsx @@ -15,7 +15,9 @@ const components = [ export default function ComponentsScreen() { return ( - + item.name} diff --git a/apps/aelis-client/src/components/ui/button.showcase.tsx b/apps/aelis-client/src/components/ui/button.showcase.tsx index d4fe563..6768385 100644 --- a/apps/aelis-client/src/components/ui/button.showcase.tsx +++ b/apps/aelis-client/src/components/ui/button.showcase.tsx @@ -1,8 +1,8 @@ import { View } from "react-native" import tw from "twrnc" -import { Button } from "./button" import { type Showcase, Section } from "../showcase" +import { Button } from "./button" function ButtonShowcase() { return ( @@ -11,11 +11,7 @@ function ButtonShowcase() {