+
onCustomQueryChange(e.target.value)}
@@ -81,27 +128,18 @@ export function ListToolbar({
className="h-8 pr-20"
/>
{dirty && (
-
+
Press Enter
)}
-
- {lastFetchedAt && !loading && (
-
- Updated {formatRelativeTime(lastFetchedAt.toISOString())}
-
- )}
-
+
+
);
diff --git a/apps/web/e2e/pages/mobile-github-page.ts b/apps/web/e2e/pages/mobile-github-page.ts
new file mode 100644
index 0000000000..a4503076da
--- /dev/null
+++ b/apps/web/e2e/pages/mobile-github-page.ts
@@ -0,0 +1,27 @@
+import { type Locator, type Page } from "@playwright/test";
+
+export class MobileGitHubPage {
+ readonly mobileMenuButton: Locator;
+ readonly mobileSidebar: Locator;
+ readonly inlineSidebar: Locator;
+ readonly toolbarTitle: Locator;
+
+ constructor(private page: Page) {
+ this.mobileMenuButton = page.getByTestId("github-mobile-menu-button");
+ this.mobileSidebar = page.getByTestId("github-mobile-sidebar");
+ this.inlineSidebar = page.getByTestId("github-presets-sidebar-inline");
+ this.toolbarTitle = page.getByTestId("github-list-toolbar-title");
+ }
+
+ async goto() {
+ await this.page.goto("/github");
+ // The hamburger only mounts once auth has resolved on a mobile viewport —
+ // waiting on it is deterministic and avoids the ambiguity of matching
+ // "GitHub" text (which appears in the breadcrumb AND breadcrumb link aria).
+ await this.mobileMenuButton.waitFor({ state: "visible" });
+ }
+
+ presetByLabel(label: string): Locator {
+ return this.mobileSidebar.getByRole("button", { name: label });
+ }
+}
diff --git a/apps/web/e2e/tests/github/mobile-github-sidebar.spec.ts b/apps/web/e2e/tests/github/mobile-github-sidebar.spec.ts
new file mode 100644
index 0000000000..7e9c7786e5
--- /dev/null
+++ b/apps/web/e2e/tests/github/mobile-github-sidebar.spec.ts
@@ -0,0 +1,48 @@
+import { test, expect } from "../../fixtures/test-base";
+import { MobileGitHubPage } from "../../pages/mobile-github-page";
+
+test.describe("Mobile /github sidebar", () => {
+ test("hamburger opens sheet and selecting a preset updates the toolbar", async ({
+ testPage,
+ apiClient,
+ }) => {
+ await apiClient.mockGitHubReset();
+ await apiClient.mockGitHubSetUser("test-user");
+ await apiClient.mockGitHubAddPRs([
+ {
+ number: 200,
+ title: "Mobile sidebar PR",
+ state: "open",
+ head_branch: "feat/mobile",
+ base_branch: "main",
+ author_login: "test-user",
+ repo_owner: "testorg",
+ repo_name: "testrepo",
+ },
+ ]);
+
+ const page = new MobileGitHubPage(testPage);
+ await page.goto();
+
+ // On a mobile viewport the inline desktop sidebar is hidden and the
+ // hamburger menu button is visible.
+ await expect(page.mobileMenuButton).toBeVisible();
+ await expect(page.inlineSidebar).toBeHidden();
+
+ // Default selection is the first PR preset.
+ await expect(page.toolbarTitle).toContainText("Review requested");
+
+ // Sheet is closed initially.
+ await expect(page.mobileSidebar).toBeHidden();
+
+ // Open the drawer.
+ await page.mobileMenuButton.tap();
+ await expect(page.mobileSidebar).toBeVisible();
+
+ // Tap a different preset → the drawer closes and the toolbar title
+ // reflects the new selection.
+ await page.presetByLabel("Mentions").tap();
+ await expect(page.mobileSidebar).toBeHidden();
+ await expect(page.toolbarTitle).toContainText("Mentions");
+ });
+});