Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion surfaces/gui/e2e/cloud.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ test("signed out: the account row is the sign-in home; managed connector still c
await expect(modal.getByRole("button", { name: /one click/i })).toHaveCount(0);
});

test("signed in: account row shows the name; one-click appears; sign out from the menu", async ({
test("signed in: account row shows the name and status; one-click appears; sign out from the menu", async ({
page,
}) => {
await openConnectors(page);
await signIn(page);
await expect(page.getByTestId("cloud-status")).toHaveText("Signed in");

await page.getByTestId("connector-gmail").getByRole("button", { name: "Connect", exact: true }).click();
const modal = page.getByTestId("add-connection-modal");
Expand Down
16 changes: 11 additions & 5 deletions surfaces/gui/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const compactAge = (iso?: string | null): string => {
export function Sidebar(props: Props) {
const [searchModalOpen, setSearchModalOpen] = useState(false);
const [appMenuOpen, setAppMenuOpen] = useState(false);
// The account row (§26): cloud sign-in status drives the avatar/name/dot; refreshed on
// The account row (§26): cloud sign-in status drives the avatar/name/status label; refreshed on
// focus and whenever the menu opens (sign-in completes out-of-band in the browser).
const [cloud, setCloud] = useState<CloudStatus | null>(null);
// Inbox chip sticky unlock (§26): absent until the product first parks an item (or a
Expand Down Expand Up @@ -1212,7 +1212,11 @@ export function Sidebar(props: Props) {
}}
aria-haspopup="menu"
aria-expanded={appMenuOpen}
aria-label={cloud?.signed_in ? `Account: ${accountEmail}` : "Account: not signed in"}
aria-label={
cloud?.signed_in
? `Account: ${accountEmail}, signed in to OpenWorker Cloud`
: "Account: not signed in"
}
>
<span
className={
Expand All @@ -1230,10 +1234,12 @@ export function Sidebar(props: Props) {
</span>
{cloud?.signed_in && (
<span
className="w-[7px] h-[7px] rounded-full bg-ok shrink-0"
className="text-[11px] text-muted shrink-0"
data-testid="cloud-status"
title="Signed in to OpenWorker Cloud"
aria-hidden
/>
>
Signed in
</span>
)}
<span className="flex-1" />
{inboxUnlocked && (
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.