Merged
Conversation
same modal on all the pages
rough draft of campaign view
we send an email on invite. we have an auth flow that marks users logged-in if they click the invite link. we have services for creating and responding to invites.
we also make our campaign character cards more consistent
more consistency on different campaign pages
There was a problem hiding this comment.
Pull request overview
This PR implements the initial version of campaigns functionality, allowing users to create campaigns, invite members with different roles (DM, player, viewer), manage characters within campaigns, and handle various campaign-related operations. The implementation includes comprehensive database models, service layers, route handlers, UI components, and extensive test coverage.
Key Changes:
- Added complete campaigns infrastructure with database models for campaigns, campaign members, and campaign characters
- Implemented role-based access control (DM, player, viewer) with specific permissions and workflows
- Refactored modal system from
editModaltodetailModalfor better semantic naming - Added character authorization for DMs and party members to view characters in shared campaigns
- Implemented user profile management with optional display names
Reviewed changes
Copilot reviewed 96 out of 98 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/db/campaigns.ts |
New database operations for campaign CRUD, archiving, and name validation |
src/db/campaign_members.ts |
Campaign membership management with role handling and invite tokens |
src/db/campaign_characters.ts |
Character-campaign associations with reveal/hide functionality for NPCs |
src/services/campaigns/*.ts |
Complete service layer for campaign operations (create, invite, authorize, role changes, etc.) |
src/routes/campaigns.tsx |
Campaign routes with comprehensive permission checks and HTMX integration |
src/routes/campaigns.test.ts |
Extensive test coverage for all campaign operations (2553 lines) |
src/routes/auth.tsx |
Invite magic link handling with account switching support |
src/routes/profile.tsx |
New profile page for user name management |
src/components/ui/DetailModal.tsx |
Refactored modal component from ModalContent with better organization |
src/middleware/notifications.ts |
New middleware for campaign notification badges |
src/lib/email.ts |
Campaign invite email templates |
src/services/authorize.ts |
Extended authorization to support DM and party member access to characters |
src/services/listCharacters.ts |
Refactored to support filtering by campaign or user |
| Character panels | Added isReadOnly prop support for DM viewing of player characters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
fixes #11