Skip to content
Merged
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 packages/app/src/features/auth/account-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ export function AccountBar() {
</div> : <Link to="/auth/login" className="rounded-lg px-3 py-2 text-sm font-semibold">Account</Link>}
</div>
</nav>
{authenticated && (pathname === "/" || pathname === "/projects") && <nav aria-label="Dashboard navigation" className="border-t border-stone-200 dark:border-slate-800">
{authenticated && (pathname === "/" || pathname === "/projects" || pathname === "/skills") && <nav aria-label="Dashboard navigation" className="border-t border-stone-200 dark:border-slate-800">
<div className="mx-auto flex w-full max-w-6xl gap-1 overflow-x-auto px-4 sm:px-6 lg:px-8">
<Link to="/projects" className={`inline-flex min-h-12 shrink-0 items-center border-b-2 px-3 text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-factorize-500 ${pathname === "/projects" ? "border-factorize-500 text-factorize-700 dark:text-factorize-500" : "border-transparent text-slate-600 hover:border-stone-300 hover:text-slate-950 dark:text-slate-300 dark:hover:border-slate-600 dark:hover:text-white"}`} aria-current={pathname === "/projects" ? "page" : undefined}>Projects</Link>
<Link to="/skills" className={`inline-flex min-h-12 shrink-0 items-center border-b-2 px-3 text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-factorize-500 ${pathname === "/skills" ? "border-factorize-500 text-factorize-700 dark:text-factorize-500" : "border-transparent text-slate-600 hover:border-stone-300 hover:text-slate-950 dark:text-slate-300 dark:hover:border-slate-600 dark:hover:text-white"}`} aria-current={pathname === "/skills" ? "page" : undefined}>Skills</Link>
</div>
</nav>}
{logout.isError && <p role="alert">{logout.error.message}</p>}
Expand Down
13 changes: 13 additions & 0 deletions packages/app/test/jobs.browser.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -311,15 +311,28 @@ test("dashboard Projects subnav completes keyboard navigation into project Jobs"
await page.goto(origin + "/projects");
const dashboardNav = page.getByRole("navigation", { name: "Dashboard navigation" });
const projectsTab = dashboardNav.getByRole("link", { name: "Projects", exact: true });
const skillsTab = dashboardNav.getByRole("link", { name: "Skills", exact: true });
await projectsTab.waitFor();
await skillsTab.waitFor();
assert.deepEqual(await dashboardNav.getByRole("link").allTextContents(), ["Projects", "Skills"]);
assert.equal(await projectsTab.getAttribute("aria-current"), "page");
assert.equal(await skillsTab.getAttribute("aria-current"), null);
assert.equal(await projectsTab.evaluate(element => getComputedStyle(element.parentElement).overflowX), "auto");

const dashboard = page.getByRole("link", { name: "Factorize dashboard" });
await dashboard.focus();
await page.keyboard.press("Enter");
await page.getByRole("heading", { name: "Recent work" }).waitFor();
assert.equal(await dashboardNav.getByRole("link", { name: "Projects", exact: true }).getAttribute("aria-current"), null);
assert.equal(await dashboardNav.getByRole("link", { name: "Skills", exact: true }).getAttribute("aria-current"), null);

await page.route("**/api/v1/skills**", route => route.fulfill({ json: { items: [{ id: "00000000-0000-4000-8000-000000000020", key: "review", usageCount: 1, revision: 1, createdAt: "2026-01-01T00:00:00Z", updatedAt: "2026-01-01T00:00:00Z" }], nextCursor: null } }));
await skillsTab.focus();
await page.keyboard.press("Enter");
await page.getByRole("heading", { name: "Skills", exact: true }).waitFor();
assert.equal(await page.getByRole("link", { name: "review", exact: true }).count(), 1);
assert.equal(await dashboardNav.getByRole("link", { name: "Projects", exact: true }).getAttribute("aria-current"), null);
assert.equal(await dashboardNav.getByRole("link", { name: "Skills", exact: true }).getAttribute("aria-current"), "page");

const dashboardProjects = dashboardNav.getByRole("link", { name: "Projects", exact: true });
await dashboardProjects.focus();
Expand Down
Loading