Dashboard: keep unconnected organizations on the dashboard with a truthful preview - #176
Merged
Merged
Conversation
…thful preview
An organization with no AWS account was redirected from /dashboard to
/connect-aws by a client-side effect, so it could never see the dashboard,
and a non-owner, who cannot connect AWS, landed on a page they could not
use. The redirect is gone.
The connection is now one of four states (computeAwsConnectionState):
connected, unconnected, unknown, loading. The accounts request checks
res.ok and the response shape and retries once, so a failed request is
"unknown" ("Couldn't check your AWS connection. Refresh to try again."),
never "not connected". The legacy stats fallback still means connected,
as before, and the connected dashboard is unchanged.
Unconnected shows what the main cards will show and how connecting works,
in words only: no figure, score, bar or chart. Only an owner gets the
"Connect AWS" button and the hero pill as a link; anyone else is told to
ask their owner and sees "AWS not connected" as plain text.
The AI summary is requested only when connected: the backend calls the
model even when every source is unavailable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 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.
Removes the dashboard's hard redirect to /connect-aws. Connection state is now explicit (connected / unconnected / unknown / loading); a failed accounts request is 'unknown', never 'not connected'. Unconnected organizations see a capability preview with no metrics, one Connect AWS action for owners (non-owners are told to ask their owner), and a short how-connecting-works strip. The AI summary only runs for connected organizations, avoiding model calls for orgs with no data. Frontend only.