Skip to content

Revert "fix: add server-side auth gate to tenant layout"#1980

Merged
amikofalvy merged 1 commit intomainfrom
revert-1976-prd-6033/tenant-auth-gate
Feb 13, 2026
Merged

Revert "fix: add server-side auth gate to tenant layout"#1980
amikofalvy merged 1 commit intomainfrom
revert-1976-prd-6033/tenant-auth-gate

Conversation

@amikofalvy
Copy link
Collaborator

Reverts #1976

@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agents-api Building Building Preview, Comment Feb 13, 2026 7:48am
agents-manage-ui Building Building Preview, Comment Feb 13, 2026 7:48am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agents-docs Skipped Skipped Feb 13, 2026 7:48am

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2026

⚠️ No Changeset found

Latest commit: 93403bf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@amikofalvy amikofalvy merged commit f054c7b into main Feb 13, 2026
2 of 4 checks passed
@amikofalvy amikofalvy deleted the revert-1976-prd-6033/tenant-auth-gate branch February 13, 2026 07:48
Copy link
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

(1) Total Issues | Risk: Medium

🟠⚠️ Major (1) 🟠⚠️

🟠 1) system Missing rationale for revert with observable UX regression

Issue: This PR reverts PR #1976 without explaining why the revert is needed. The original PR added server-side auth enforcement that redirected unauthenticated users to /login before rendering tenant-scoped content. Without this gate, unauthenticated users will now:

  1. Receive and render the full tenant layout shell (sidebar, header, breadcrumbs)
  2. See a brief "flash of unauthorized content" before client-side auth handlers trigger a redirect
  3. Experience a degraded UX compared to the immediate server-side redirect

Why: The security model remains intact (API-level auth prevents data access), but this creates a noticeable UX regression. The PR description simply says "Reverts #1976" without explaining:

  • What issue the original PR caused that necessitated a revert
  • Whether this is a temporary rollback while investigating, or a permanent architectural decision
  • Whether an alternative approach (e.g., Next.js middleware) will be implemented

Fix: Add context to the PR description or a comment explaining:

  • The reason for the revert (build failure? runtime issue? performance concern?)
  • Whether this is temporary or permanent
  • If permanent, consider documenting the intended auth architecture and accepted tradeoff

Refs:


💭 Consider (1) 💭

💭 1) multi-file Inlined cookie prefix string creates minor duplication

Issue: The centralized constants.ts file is deleted, and the 'better-auth' cookie prefix is now inlined in 3 locations within agents-manage-ui.

Why: This creates minor divergence risk if cookie names change, though the prefix is defined by the better-auth library and unlikely to change. The duplication is manageable.

Fix: If the revert is permanent, consider whether a minimal constant (BETTER_AUTH_COOKIE_PREFIX = 'better-auth') should be retained for maintainability. If temporary, no action needed.

Refs:


💡 APPROVE WITH SUGGESTIONS

Summary: The code changes are technically correct and the security model remains intact (API-level auth prevents unauthorized data access). However, this revert removes a UX improvement without explaining why. Please consider adding context about the reason for reverting PR #1976 so reviewers and future maintainers understand the tradeoff being made.


Discarded (3)
Location Issue Reason Discarded
layout.tsx Layout component pattern is valid after conversion Informational/positive observation, not an actionable issue
layout.tsx Accessibility patterns (semantic HTML, ARIA labels) maintained Informational/positive observation, not an actionable issue
system Security vulnerability from removed auth gate Security reviewer confirmed API-level auth is the primary control; this is UX, not security
Reviewers (5)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-product 2 1 0 0 0 0 0
pr-review-consistency 1 0 1 0 0 0 0
pr-review-frontend 3 0 0 0 0 0 2
pr-review-security-iam 0 0 0 0 0 0 1
pr-review-standards 0 0 0 0 0 0 0
Total 6 1 1 0 0 0 3

Note: Security reviewer's thorough analysis confirmed the API-level authentication remains the primary security control, correctly reclassifying the concern as UX rather than security.

@github-actions github-actions bot deleted a comment from claude bot Feb 13, 2026
dimaMachina pushed a commit that referenced this pull request Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments