feat(organizations): add organization slug URLs#4267
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Previous Review Summaries (8 snapshots, latest commit 8b1e34c)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 8b1e34c)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (5 files)
Previous review (commit 0b19c0f)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Previous review (commit c4d933a)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous review (commit 1b57afe)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (3 files)
Previous review (commit dbca7b2)Status: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Previous review (commit 389f44e)Status: No Issues Found | Recommendation: Merge Files Reviewed (136 files)
Previous review (commit 6553569)Status: No Issues Found | Recommendation: Merge Files Reviewed (16 files)
Previous review (commit 697bc03)Status: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (148 files)
Reviewed by gpt-5.4-20260305 · Input: 78.6K · Output: 9K · Cached: 625.2K Review guidance: REVIEW.md from base branch |
…r the post-create router.push, so an open tab could redirect to a stale slug after organization slug changes. Fixed apps/web/src/components/cloud-agent-next/NewSessionPanel.tsx:911 to build the post-create redirect from stable organizationId.
…ionId: z.string().nullable(), while web had narrowed it to UUID and skips failed parses. Changed: - apps/web/src/lib/cloud-agent-sdk/schemas.ts:161 restores sessionEventV2RowSchema.organizationId to z.string().nullable(). - apps/web/src/lib/cloud-agent-sdk/schemas.ts:202 restores sessionDeletedPayloadSchema.organizationId to z.string().nullable(). - apps/web/src/lib/cloud-agent-sdk/schemas.test.ts:21 adds regression coverage for non-UUID org IDs in session.created. - apps/web/src/lib/cloud-agent-sdk/schemas.test.ts:30 adds regression coverage for non-UUID org IDs in session.deleted.
Summary
Organization URLs were tied to opaque UUIDs, which made shared links hard to read and manage. This adds slug-backed organization URLs so organization pages can use human-readable identifiers while legacy UUID URLs continue to resolve and canonicalize safely.
The implementation follows the existing organization routing, page-context, and admin patterns: route identifiers are resolved at the boundary, downstream authorization/business logic still receives UUIDs, and migration cleanup is handled through admin tooling rather than ad hoc scripts.
Key details
organizations.slugwith max-length and uniqueness constraints.slug ?? idand server routes can resolve either slug or UUID.organizationIdandorganization_idremain UUID contracts, and slug support is limited to route identifier boundaries./admin/backfillsthat processes up to 1,000 legacy organizations per run and can be clicked repeatedly until no rows remain.Verification
Visual Changes
N/A
Reviewer Notes
Please focus review on the route/API boundary: slugs should work as
/organizations/:identifieraliases, but backend/API payloads namedorganizationIdshould continue to require UUIDs. Also review the backfill flow and any remaining UUID-generated links that are intentionally compatible through canonical redirects.