Lor delete pass#57
Merged
Merged
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughRenames Townhall/guild primitives to Lor/workspace across DB schemas, auth/permissions, API routes/handlers/schemas, realtime server/types, and web app routes/components. Removes announcement/forum channel types, adds workspace icon upload, rewires invites/members/search, and updates branding/configs (tauri, env, docker, README/ROADMAP). ChangesWorkspace pivot and Lor rebrand
Sequence Diagram(s)sequenceDiagram
participant WebApp
participant API
participant DB
participant Realtime
WebApp->>API: POST /v1/workspaces/{slug}/invites
API->>DB: Insert workspaceInvite (workspaceId)
API-->>WebApp: 200 { invite }
WebApp->>API: POST /v1/invites/{code}/accept
API->>DB: Tx: ensure membership, inc uses, insert workspaceMember
API-->>Realtime: workspace:member:joined
Realtime-->>WebApp: presence:ready/update (workspaces[])
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
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.
Summary
This PR executes a comprehensive product repositioning from "Townhall" to "Lor" paired with a foundational data model refactoring that transitions the application from guild-based to workspace-based organization. The changes span branding updates, database schema migrations, API route restructuring, and authorization system updates across the entire codebase.
Key Changes
Branding & Configuration:
Lor <noreply@team.lor.chat>townhall.chattolor.chat"townhall"to"lor"Data Model Refactoring (Guild → Workspace):
guild→workspace,guildMember→workspaceMember,guildRole→workspaceRole,guildInvite→workspaceInviteactiveWorkspaceIdreplacingactiveGuildId"announcement"and"forum"fromchannelTypeEnumworkspaceIdinstead ofguildIdwith cascade delete semanticsAPI Routes & Middleware:
/v1/guilds/{guildSlug}/...to/v1/workspaces/{workspaceSlug}/...across all endpoints (channels, invites, members)/v1/guilds/index.ts,routes.ts) completely removed (~167 lines deleted)guildAuthMiddleware→workspaceAuthMiddlewarePermission & Authorization System:
GuildRole/GuildAuthority→WorkspaceRole/WorkspaceAuthorityassertGuildPermission→assertWorkspacePermission,canManageGuildMember→canManageWorkspaceMemberratelimit:workspace:...)Frontend Component Updates:
GuildHeader→WorkspaceHeader,GuildBar→WorkspaceBar,GuildMembersPanel→WorkspaceMembersPanel,CreateGuildDialog→CreateWorkspaceDialog$guildSlugto$workspaceSlugin all authenticated routesGuildMembersSidebarView→WorkspaceMembersSidebarViewtext/voice/categorytypes (removing announcement channel support)Realtime & Events:
guildIdstoworkspaceIds"guild:member:joined"→"workspace:member:joined"workspaceIdworkspaceMemberschemaDatabase & Build Infrastructure:
lorinstead oftownhall)Scope & Risk Assessment
This is a large-scale, systematic refactoring affecting ~110+ files with approximately 1,000+ lines of net changes. The refactoring is consistent and thorough across all layers:
Potential Concerns:
apps/api/src/routes/v1/invites/handlers.tsshows significant logic changes that warrant verificationConfidence Score: 3/5
Justification: The PR demonstrates systematic and consistent refactoring across all layers with comprehensive updates to permissions, routes, schemas, and UI components. However, the following factors reduce confidence:
The refactoring is well-executed from a code consistency standpoint, but deployment and data migration risks are not evident in the provided diff. Recommend verifying database migration strategy and test coverage before merging to production.