Add community submission and public profile pages#70
Conversation
Greptile SummaryThis PR wires up the first community submission and public profile path end-to-end: an auth-gated Convex mutation that sanitizes and stores unclaimed profiles, a public query with proper
Confidence Score: 5/5Safe to merge; the auth gate, public projection, and sanitization all behave correctly for the current submission path. The submission mutation correctly requires a Convex identity before writing, the public projection does not leak internal attribution fields, and the cross-type field rejection is guarded by a pure presence check verified with a regression test. The two findings are non-blocking quality observations. The Important Files Changed
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
apps/web/src/app/_components/profile-public-page.tsx:136-138
The `"error"` case in `ProfileBackendNotice` renders a development-oriented message that would confuse visitors in production. When the Convex backend is transiently unreachable in a deployed environment (timeout, cold-start delay, etc.), users would see instructions to "Start the local Convex backend" — which has no meaning outside a developer's machine.
```suggestion
{kind === "missing-url"
? "Run the local backend bootstrap before loading public profile pages from this worktree."
: "This profile could not be loaded. Please try again in a moment."}
```
### Issue 2 of 2
apps/web/src/app/p/[slug]/page.tsx:13-27
**Missing page-specific metadata**
Neither `/p/[slug]` nor `/c/[slug]` exports a `generateMetadata` function, so every public profile page inherits the generic "VRDex" title and description from the root layout. Browser tabs, search-engine snippets, and social-share previews all show the same undifferentiated title regardless of which profile is being viewed. Adding a `generateMetadata` export that calls `fetchPublicProfileBySlug` and returns `{ title: profile.displayName, description: profile.headline ?? profile.bio }` (or a 404-appropriate fallback) would give each page a meaningful, crawlable identity.
Reviews (2): Last reviewed commit: "docs: clarify submission write exception" | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01c8169651
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds the first end-to-end “community submit → published public profile page” slice across Convex + Next.js, including a public-safe profile projection and docs/tests for submission sanitization and privacy boundaries.
Changes:
- Introduces an authenticated Convex mutation for community profile submissions, plus a public query for reading published profiles by slug.
- Extends the
profilesschema with presentation fields (about/avatar/banner) and adds a public projection helper that omits source attribution. - Adds
/submit,/p/<slug>, and/c/<slug>pages to create and render public profiles, plus supporting docs and backend unit tests.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/backend/profile-foundation.test.ts | Adds unit tests for submission sanitization helpers and public projection privacy behavior. |
| README.md | Updates repo overview and links to new submission/public profile routes and docs. |
| docs/planning/architecture.md | Updates implementation status to include submission flow and public routes. |
| docs/backend/profile-slugs.md | Documents slug generation usage for the new submission mutation. |
| docs/backend/profile-schema.md | Documents new presentation fields and source attribution on profiles. |
| docs/backend/profile-access-and-claims.md | Clarifies community submission field boundaries and auth requirement. |
| docs/backend/community-submissions.md | New doc defining submission constraints, public routes, and projection rules. |
| convex/schema.ts | Adds about, avatar/banner URLs, and sourceAttribution to the profiles schema. |
| convex/README.md | Documents new backend modules and updated backend contracts. |
| convex/profiles.ts | New public query for profile reads + authenticated community submission mutation. |
| convex/_profileSubmissions.ts | New sanitization and normalization helpers for community submission inputs. |
| convex/_profilePublic.ts | New helper to project profiles into a safe public shape (omitting attribution). |
| convex/_generated/api.d.ts | Updates generated Convex API typings to include new modules/functions. |
| apps/web/src/convex/server.ts | Adds a server-side helper to fetch public profiles by slug via Convex. |
| apps/web/src/app/submit/profile-submission-form.tsx | New client form that calls the submission mutation and links to the created profile. |
| apps/web/src/app/submit/page.tsx | New /submit page wrapper and layout. |
| apps/web/src/app/page.tsx | Updates homepage CTAs and copy to reflect the new submission/public profile routes. |
| apps/web/src/app/p/[slug]/page.tsx | New public person profile route that SSR-fetches and renders the public projection. |
| apps/web/src/app/c/[slug]/page.tsx | New public community profile route that SSR-fetches and renders the public projection. |
| apps/web/src/app/_components/profile-public-page.tsx | New shared public profile page component including trust-state UI and presentation fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Review follow-up prepared locally before push:
Local verification: |
|
@greptile |
Summary
/p/{slug}and/c/{slug}pages with safe public projection.Verification
pnpm verifyNotes
/submitUI stays locked behindNEXT_PUBLIC_VRDEX_SUBMISSIONS_AUTH_READY=trueuntil web auth is wired, so anonymous visitors do not see a form that can only fail.Closes #23
Closes #22
Closes #19
Closes #21