Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
|
TL;DR — Adds a loading skeleton to the Key changes
Summary | 1 file | 1 commit | base: The new file is a single re-export (
|
There was a problem hiding this comment.
Clean, correct change. The [tenantId]/page.tsx performs an async redirect via redirectToProject(), and without a loading.ts at this segment, users see no loading indicator during that transition. This re-export follows the exact same pattern already established in [tenantId]/projects/loading.tsx.
Claude Opus | 𝕏
There was a problem hiding this comment.
PR Review Summary
(0) Total Issues | Risk: Low
This PR adds a missing loading state to the /[tenantId] route segment. When users navigate to /{tenantId}, the page performs an async operation (fetchProjects) before redirecting. Without a loading state, users would see a blank page during this fetch.
Analysis
What this PR does:
- Adds
loading.tsat[tenantId]level that re-exports the skeleton component from[projectId]/loading.tsx - Provides visual feedback during the async redirect operation in
[tenantId]/page.tsx
Correctness:
- ✅ Follows the established pattern already used in
[tenantId]/projects/loading.tsx - ✅ Re-uses the existing skeleton component rather than duplicating code
- ✅ Correctly positioned to catch the async operation in
[tenantId]/page.tsx
Minor observation (non-blocking):
The similar file at [tenantId]/projects/loading.tsx uses .tsx extension while this PR uses .ts. Both work correctly for re-exports without JSX, but using .tsx would be more consistent with the existing sibling file. This is purely stylistic and not worth blocking on.
✅ APPROVE
Summary: Clean, minimal change that improves UX by showing a loading skeleton during the redirect operation. The implementation follows established patterns in the codebase.
Ito Test Report ✅11 test cases ran. 3 additional findings, 8 passed. Overall, 11 test cases ran with 8 passing and 3 failing, confirming that tenant-root navigation is generally stable (including redirects to projects, loading-skeleton behavior, back/forward and refresh recovery, rapid interaction, and multi-tab consistency) with no persistent loading loops in the validated happy paths. The key issues were a high-severity auth boundary flaw where a forced-logout cookie is cleared/ignored if a session cookie exists (allowing protected tenant routing), plus two medium-severity routing defects where unauthorized or nonexistent tenants are incorrectly redirected to /{tenantId}/projects and encoded traversal-style tenant input (e.g., /..%2Fdefault) can trigger an in-app 500 instead of safe no-access/not-found handling. ✅ Passed (8)ℹ️ Additional Findings (3)
🟠 Encoded traversal tenant path triggers 500 instead of safe handling
Relevant code:
const TenantId = z.string().openapi('TenantIdPathParam', {
param: {
name: 'tenantId',
in: 'path',
},
description: 'Tenant identifier',
example: 'tenant_123',
});
export const getTenantScopedRef = (tenantId: string, ref: string): string => {
return `${tenantId}_${ref}`;
};
if (projectId) {
resolvedRef = await resolveProjectRef(db, c, tenantId, projectId, ref);
} else {
resolvedRef = await resolveTenantRef(db, tenantId, ref);
}
|
|
This pull request has been automatically marked as stale because it has not had recent activity. If this PR is still relevant:
Thank you for your contributions! |












No description provided.