Repository navigation
Make @/lib/reviews the single entry point for reviews - #23
Merged
Merged
Conversation
Reviews are now read, validated, and written only through `@/lib/reviews` (server) and `@/lib/reviews/shared` (client-safe), enforced by a lint rule. - Reads are `load*` functions that take a `labelled` filter, so callers decide whether they want labelled reviews. `Review` no longer carries a `labelled` flag; `loadLabelledUris` in `@/lib/moderation` answers which records are labelled when a page needs to show a notice. - Reviews take a subject (strong ref) instead of knowing about routes. The self-review rule uses the DID in the subject's URI rather than a join. - Input is validated with a Zod schema that requires text. - `saveReview` and `deleteReview` own the repository writes and return typed failure reasons; the server actions map those to messages. - Adds `assertSession`, `Viewer`, and `parseRecordUri`. - Adds tests that run against a Postgres container with the real migrations applied (Testcontainers), and a fake account for writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M9KZ6SDuRW4inA7dgB2nYh
- Generate TIDs with @atproto/common-web and CIDs with @atproto/lex instead of hand-rolled or hardcoded values. - Rename the `route` test helper to `routeSubject`. - Apply migrations through Kysely's Migrator. - Drop an unneeded comment in the review actions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M9KZ6SDuRW4inA7dgB2nYh
- Database functions take an optional AbortSignal and cancel the query in Postgres when it aborts. Key lookups default to a 1s timeout. - Parse AT URIs with AtUri from @atproto/syntax. - Show the viewer's own review first on a route page instead of merging it into the list by date. - Replace the import lint rule with data access guidance in AGENTS.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M9KZ6SDuRW4inA7dgB2nYh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M9KZ6SDuRW4inA7dgB2nYh
ssh2 and cpu-features only speed up SSH connections to remote Docker hosts, so their build scripts are skipped like the other entries. CI's install failed with ERR_PNPM_IGNORED_BUILDS without them listed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M9KZ6SDuRW4inA7dgB2nYh
haroldadmin
added a commit
that referenced
this pull request
Oct 28, 2026
Stacked on #23. Applies the same data access cleanup to profiles: everything goes through `@/lib/profiles` (and `@/lib/profiles/shared` for client components). - `fetchProfile`, `fetchProfiles` and `fetchUserProfile` combine indexed profiles with Bluesky handles, and accept an `AbortSignal`. - `fetchAvatar` owns the avatar lookup and format policy, and returns typed failure reasons. - `fetchProfileRecord`, `saveProfile` and `ensureProfileRecord` own profile record writes. This replaces `auth/declaration.ts`. - Profile input is validated with a Zod schema. - `profile-name.ts` and `actor-search.ts` are folded into the module. - Focused tests, with the fake account moved into a shared test helper. --- _Generated by [Claude Code](https://claude.ai/code/session_01M9KZ6SDuRW4inA7dgB2nYh)_ Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First domain in the data layer cleanup: reviews are now read, validated, and written only through
@/lib/reviews(and@/lib/reviews/sharedfor client components).load*reads take alabelledfilter. A separateloadLabelledUrislookup drives moderation notices.saveReviewanddeleteReviewhandle the account writes and return typed failure reasons.AbortSignal. Key lookups default to a short timeout.AGENTS.mddocuments data access and test conventions.Generated by Claude Code