This repository was archived by the owner on Jul 27, 2026. It is now read-only.
Repository navigation
fix: don't gate sidebar navigation on email verification - #1613
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
PR Artifacts Cleaned Up The |
Contributor
✅ Mock-LLM E2E Tests60/60 passed Commit: Details
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
Contributor
✅ Mock-LLM Docker E2E Test Results60/60 passed Commit: Details
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
Contributor
|
🚀 Released in v1.2.0. |
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
HUMAN:
Agent Canvas disabled the sidebar's New Chat, Extensions, and Automations links whenever the settings API returned email_verified: false. OAuth users who change their email in Enterprise Server get email_verified flipped to false, but the backend does not enforce verification — so the links were silently greyed out (no tooltip, no recovery) while every API still worked, diverging from Enterprise Server's own permissive frontend.
Remove the client-side gate (linkDisabled) so navigation is never disabled based on email_verified. The gate provided no security value (the backend is permissive), and the settings model has no auth-method field to special-case OAuth. The email_verified field is left in the types/response; only its consumption in the sidebar is removed.
Add a regression test asserting the three nav links stay enabled when email_verified is false.
AGENT:
Why
Agent Canvas disabled the sidebar's primary navigation — New Chat, Extensions/Customize, and Automations — whenever the settings API returned
email_verified: false.OAuth users (GitHub/Google) start out verified, but changing their email in OpenHands Enterprise Server flips
email_verifiedback tofalseand triggers a new verification email. The Enterprise Server backend does not enforce email verification — every API keeps working — so only Agent Canvas reacted, silently greying out the links (opacity-50,pointer-events-none,tabIndex=-1) with no tooltip, no explanation, and no recovery path.A user who misses or spam-filters the verification email is locked out of core features in Agent Canvas, while Enterprise Server's own frontend stays fully usable — an inconsistent, dead-end experience.
Root cause
src/components/features/sidebar/sidebar.tsxcomputed:const linkDisabled = settings?.email_verified === false;and fanned it out (via
SidebarRailBody) to the three nav links as theirdisabledprop, with nodisabledReason. The gate was purely client-side and provided no security value — the backend is permissive.Resolution
Remove the client-side email-verification gate so Agent Canvas matches Enterprise Server's permissive behavior for all users. Navigation is no longer disabled based on
email_verified.The two other options in the report were not viable here:
Scope
Frontend only. The
email_verifiedfield stays in the settings types/response (it still describes the real cloud API shape); only its consumption in the sidebar is removed.Testing
Added
sidebar-email-verification.test.tsx: with the settings service resolvingemail_verified: false, the New Chat, Customize, and Automations links remain enabled (noaria-disabled). Confirmed the test fails against the pre-fix code and passes after.Summary
Agent Canvas disabled sidebar navigation (New Chat, Extensions/Customize, Automations) whenever the settings API returned
email_verified: false. This blocked OAuth users who changed their email — even though the Enterprise Server backend never enforces email verification and its own frontend stays fully usable. This PR removes the client-side gate so behavior matches Enterprise Server.Problem
email_verified: true.email_verified: falseand a verification email is sent.pointer-events-none,tabIndex=-1, with no tooltip and no recovery path.Root cause
sidebar.tsxsetconst linkDisabled = settings?.email_verified === false;and passed it (viaSidebarRailBody) to the three nav links asdisabled, with nodisabledReason.Change
linkDisabledand its threedisabled={linkDisabled}bindings — 8 deletions acrosssidebar.tsxandsidebar-rail-body.tsx.email_verifiedin the settings types/response untouched (still the real API shape); only the frontend's use of it is dropped.Why not the report's other options
Testing
__tests__/components/features/sidebar/sidebar-email-verification.test.tsx: withSettingsService.getSettingsresolvingemail_verified: false, asserts the three nav links are notaria-disabled. Mocks the service (not the hook) per the repo's testing conventions.npm run typecheck, ESLint, Prettier, and the full sidebar suite (14 tests) all pass.Behavior
Issue Number
Resolves #1994
How to Test
Clone the
agent-server-guirepository and start the development server by running the following command:Type
🐳 Docker images for this PR
• GHCR package: https://github.com/OpenHands/agent-canvas/pkgs/container/agent-canvas
ghcr.io/openhands/agent-canvasghcr.io/openhands/agent-server:1.32.0-pythonopenhands-automation==1.1.3035f6ce285d78801ccceb50a66e7902fddedf5c1Pull (multi-arch manifest)
# Multi-arch manifest — Docker automatically pulls the correct architecture docker pull ghcr.io/openhands/agent-canvas:sha-035f6ceRun
All tags pushed for this build
About Multi-Architecture Support
sha-035f6ce) is a multi-arch manifest supporting both amd64 and arm64sha-035f6ce-amd64) are also available if needed