Skip to content

Commit a945fa8

Browse files
committed
Fix build typing and sync repo updates
1 parent 712b283 commit a945fa8

13 files changed

Lines changed: 82 additions & 12 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ This runs **Biome** (lint + format with `--write`) then **TypeScript** (Turbo ty
139139
3. **Always test file upload after touching upload code** — FileReader callbacks are async and sensitive to component re-renders
140140
4. **Use `getAuthenticatedUser(ctx)` not `ctx.auth.getUserIdentity()`** for user lookups in Convex mutations
141141
5. **Categories/tags need seeding** — they don't exist until `seed:seedCategories` and `seed:seedTags` are run
142-
6. **XSS** — User-supplied content (comments, descriptions, bios, etc.) is rendered via React's default escaping (e.g. `{comment.body}`). Do not use `dangerouslySetInnerHTML` with user input. The only `dangerouslySetInnerHTML` usage is for JSON-LD (server-built structured data), not user content.
142+
6. **XSS** — User-supplied content (comments, descriptions, bios, etc.) is rendered via React's default escaping (e.g. `{comment.body}`). Do not use `dangerouslySetInnerHTML` with user input. The only `dangerouslySetInnerHTML` usage is for JSON-LD (server-built structured data), not user content.

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Categories are fixed in the database. When uploading, you choose one of:
5858
| Technical | Engineering, DevOps, security, and developer tools |
5959
| Professional | Business, workplace, planning, and workflow |
6060
| Creative | Writers, artists, copywriters, and translators |
61+
| Art DeCC0 | Public-domain (CC0) art prompts, references, and visual style helpers |
6162
| Educational | Teachers, tutors, study guides, and mentors |
6263
| Playful | Games, entertainment, and quirky characters |
6364
| Wellness | Mindful, supportive, and empathetic companions |

apps/web/app/feed/route.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const revalidate = 300
1818

1919
// Type for feed soul items
2020
type FeedSoul = NonNullable<Awaited<ReturnType<typeof getSoulsForFeed>>>[number]
21+
type FeedSouls = NonNullable<Awaited<ReturnType<typeof getSoulsForFeed>>>
2122

2223
function escapeXml(text: string): string {
2324
return text
@@ -36,7 +37,7 @@ function formatISO8601Date(timestamp: number): string {
3637
return new Date(timestamp).toISOString()
3738
}
3839

39-
function generateRSS(souls: Awaited<ReturnType<typeof getSoulsForFeed>>): string {
40+
function generateRSS(souls: FeedSouls): string {
4041
const { name, url, description } = SITE_CONFIG
4142
const now = new Date().toUTCString()
4243

@@ -87,7 +88,7 @@ ${items}
8788
</rss>`
8889
}
8990

90-
function generateAtom(souls: Awaited<ReturnType<typeof getSoulsForFeed>>): string {
91+
function generateAtom(souls: FeedSouls): string {
9192
const { name, url, description } = SITE_CONFIG
9293
const now = formatISO8601Date(Date.now())
9394

@@ -143,7 +144,7 @@ export async function GET(request: Request) {
143144
const format = searchParams.get('format')
144145

145146
try {
146-
const souls = await getSoulsForFeed(20)
147+
const souls = (await getSoulsForFeed(20)) ?? []
147148

148149
const isAtom = format === 'atom'
149150
const content = isAtom ? generateAtom(souls) : generateRSS(souls)

apps/web/app/members/[handle]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export default async function ProfilePage({ params }: PageProps) {
116116
{ name: 'Members', url: ROUTES.members },
117117
{
118118
name: userData.displayName || `@${userData.handle}`,
119-
url: profilePath(userData.handle),
119+
url: profilePath(userData.handle ?? handle),
120120
},
121121
]}
122122
/>

apps/web/app/souls/[handle]/[slug]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ export default async function SoulPage({ params }: PageProps) {
137137
owner: owner
138138
? {
139139
id: owner._id,
140-
handle: owner.handle ?? null,
140+
handle: owner.handle ?? undefined,
141+
name: owner.name ?? undefined,
141142
displayName: owner.displayName ?? undefined,
142143
deletedAt: owner.deletedAt,
143144
}

apps/web/components/souls/soul-detail-content.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ interface SoulData {
8383
owner: {
8484
id: string
8585
handle?: string
86+
name?: string
8687
displayName?: string
8788
deletedAt?: number
8889
} | null

apps/web/convex/_generated/api.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import type * as http from "../http.js";
1818
import type * as lib_access from "../lib/access.js";
1919
import type * as lib_sanitizeSoulContent from "../lib/sanitizeSoulContent.js";
2020
import type * as migrations from "../migrations.js";
21+
import type * as mocaImport from "../mocaImport.js";
2122
import type * as reports from "../reports.js";
2223
import type * as search from "../search.js";
2324
import type * as seed from "../seed.js";
@@ -45,6 +46,7 @@ declare const fullApi: ApiFromModules<{
4546
"lib/access": typeof lib_access;
4647
"lib/sanitizeSoulContent": typeof lib_sanitizeSoulContent;
4748
migrations: typeof migrations;
49+
mocaImport: typeof mocaImport;
4850
reports: typeof reports;
4951
search: typeof search;
5052
seed: typeof seed;

apps/web/convex/seed.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ import { internalMutation, mutation } from './_generated/server'
77
* This matches the centralized config in lib/categories.ts
88
*/
99
/**
10-
* Consolidated categories (reduced from 15 to 8 to avoid overlap).
10+
* Consolidated categories (reduced from 15 to 9 to avoid overlap).
1111
*
1212
* Merges:
1313
* - Technical absorbed Coding
1414
* - Professional absorbed Productivity, Support, Tools
1515
* - Creative absorbed Communication
1616
* - Educational absorbed Learning
1717
* - Playful absorbed Fun
18+
* - Added Art DeCC0 for CC0/public-domain art workflows
1819
*/
1920
const SEED_CATEGORIES = [
2021
{
@@ -65,21 +66,29 @@ const SEED_CATEGORIES = [
6566
color: '#10b981',
6667
order: 6,
6768
},
69+
{
70+
slug: 'art-decc0',
71+
name: 'Art DeCC0',
72+
description: 'Public-domain (CC0) art prompts, references, and visual style helpers',
73+
icon: 'art-decc0',
74+
color: '#fb923c',
75+
order: 7,
76+
},
6877
{
6978
slug: 'research',
7079
name: 'Research',
7180
description: 'Analysis, fact-checking, and investigation',
7281
icon: 'research',
7382
color: '#f59e0b',
74-
order: 7,
83+
order: 8,
7584
},
7685
{
7786
slug: 'experimental',
7887
name: 'Experimental',
7988
description: 'Novel, unconventional, and boundary-pushing',
8089
icon: 'experimental',
8190
color: '#06b6d4',
82-
order: 8,
91+
order: 9,
8392
},
8493
]
8594

apps/web/convex/souls.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ async function buildSoulDetailResponse(ctx: QueryCtx, soul: Doc<'souls'>) {
7171
owner: owner
7272
? {
7373
_id: (owner as Doc<'users'>)._id,
74+
name: (owner as Doc<'users'> & { name?: string }).name,
7475
handle:
7576
(owner as Doc<'users'>).handle ??
7677
(owner as Doc<'users'>).githubHandle ??

apps/web/lib/categories.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@ export const CATEGORIES: CategoryDefinition[] = [
159159
color: '#06b6d4',
160160
order: 15,
161161
},
162+
{
163+
slug: 'art-decc0',
164+
name: 'Art DeCC0',
165+
description: 'Public-domain (CC0) art prompts, references, and visual style helpers',
166+
icon: Palette,
167+
color: '#fb923c',
168+
order: 16,
169+
},
162170
]
163171

164172
/**

0 commit comments

Comments
 (0)