Repository navigation
feat(git): implement tabbed navigation for Git settings - #697
Conversation
There was a problem hiding this comment.
Important
Converting the Git settings into tabs leaves the Playwright suite asserting content that now lives inside a hidden panel. The unit tests were updated to switch tabs first; the e2e specs and feature files were not, so at least six specs will fail. Please update them before merging.
Reviewed changes
- Git settings become tabs —
GitSettings.tsxrendersConnections/Repositories/Automation/Usagebehind arole="tablist"; inactive panels stay mounted with thehiddenattribute, with a roving-tabindexArrowLeft/ArrowRighthandler that moves focus. - Default tab — opens
connectionswhen the project has none (once the connections query has settled), otherwiserepositories. - Unit tests —
GitSettings.test.tsxgains anopenTabhelper and switches tabs before asserting Automation/Usage content. - Sidebar rail —
app-sidebar.tsxnow mountsSidebarRailonly while the sidebar is collapsed.
⚠️ Existing Playwright specs still assert the un-tabbed layout
The unit tests were taught to click a tab before asserting Automation/Usage content, but the e2e specs drive the same page with the assumption that every section is visible on load. Playwright's toBeVisible, click, and selectOption all require visibility/actionability, so assertions aimed at a hidden panel will fail. At minimum, the failing sites are git-settings.spec.ts:141 and :142-146, and git-automation.spec.ts:167, :243, :253, :266, :287, :302, :318; the git-*.feature files also still describe sections rather than tabs.
Technical details
# Playwright specs assert content that is now inside a hidden tab panel
## Affected sites
- `apps/e2e/tests/projects/git-settings.spec.ts:141` — `getByText("No repositories linked").toBeVisible()`. `stubGit` leaves connections unstubbed (`[]`), so the default tab is `connections` and the `repositories` panel containing this text is `hidden`.
- `apps/e2e/tests/projects/git-settings.spec.ts:142-146` — `getByLabel("Repositories").getByText("No Git provider is installed")` scoped to the hidden Repositories `<section>` (the same text is visible in the Connections panel, but this locator targets the hidden one).
- `apps/e2e/tests/projects/git-automation.spec.ts:167` — `getByText("Using it")` now resolves two elements: the visible `usage` tab button and the hidden `<summary>` inside `HowToUse` → strict-mode violation even before visibility is checked.
- `apps/e2e/tests/projects/git-automation.spec.ts:243`, `:253` — `getByText("Link a repository first.")` / the responder warning live only in the hidden `automation` panel.
- `apps/e2e/tests/projects/git-automation.spec.ts:266`, `:287`, `:302`, `:318` — `getByLabel("Default responder").selectOption(...)` and `getByText("Advanced").click()` target the hidden `automation` panel; Playwright actions require visibility.
- `apps/e2e/features/projects/git-*.feature` — scenarios read as sections ("the Automation section", "the \"Using it\" section"), not tabs.
## Required outcome
- The e2e suite must run green against the tabbed UI, and the feature files must describe what the UI now does.
## Suggested approach
- Mirror the unit test's helper: click `getByRole("tab", { name: … })` before asserting Automation/Usage content.
- Disambiguate `"Using it"` (scope to the `usage` panel or match the CopyChip example) since the label now also names a tab.
- The default-tab logic intentionally opens `connections` when a project has none; `git-settings.spec.ts` "No provider is installed" should therefore either switch to the Repositories tab or assert the Connections empty state instead.
## Open questions
- Are the tabs meant to replace the stacked sections entirely, or should Automation/Usage remain visible (which would keep the existing specs valid)?ℹ️ Unrelated sidebar change bundled into this PR
app-sidebar.tsx:2020 changes when the rail renders, which has nothing to do with the Git settings title. The behavior itself looks coherent (sidebar-navigation.spec.ts:491-506 already collapses via the trigger before clicking the rail), so this is a scope note rather than a defect.
Technical details
# Unrelated sidebar change bundled into a Git-settings PR
## Affected sites
- `apps/web/src/components/app-shell/app-sidebar.tsx:2020` — `<SidebarRail />` now renders only when `sidebarState === "collapsed"` (was unconditional).
## Required outcome
- Confirm this is intentional and adjust the PR title/description (or split it out) so the sidebar change is captured in release notes and reviewable on its own.
## Open questions
- Should the rail change be split into its own PR?deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Playwright specs now switch tabs —
git-automation.spec.tsgains anopenAutomationhelper (clickinggetByRole("tab", { name: /^Automation/ })) and calls it in every Automation test; the linked-repository test asserts theUsing ittab by role instead of ambiguous text. git-settings.spec.tsopens the Repositories tab — the "No provider is installed" test clicks the tab first and scopes the empty-state locator togetByRole("tabpanel", { name: /^Repositories/ }).- Feature file wording follows the UI —
git-automation.featuresays "Automation tab" / "Using it tab" instead of section. - Selected-tab fallback fixed —
currentis now clamped to the tabs that exist (tabs.some((x) => x.id === tab) ? tab : fallback), so a rememberedusagetab that disappears when the last repository is unlinked lands on a real tab rather than leaving no tab selected. - Fallback covered by a unit test — new
GitSettings.test.tsxcase drivesrepositoriesto empty viaclient.invalidateQueries()and asserts a tab stays selected.
The e2e suite and feature files were the prior review's only outstanding concern; both are now handled, and the change reads consistently with the tabbed UI. The bundled sidebar rail change remains a scope note (documented in the PR description), not a defect.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Initial tab is now frozen in a ref —
opened.currentis captured on the first render with data (connections-first when the project has none, elserepositories), so adding the first connection no longer moves the user off the tab they opened on;currentis clamped to the tabs that exist. - Skeleton waits on the connections query —
connections.isLoadingjoinsproviders/reposin the guard, soconnectionCountis settled before the default tab is chosen. - Keyboard nav extended to
Home/End—Homejumps to the first tab,Endto the last, alongside the existing arrow wrap and rovingtabIndex. - Tablist made scrollable —
overflow-x-autoon the tablist andshrink-0on the buttons keep badges from being squeezed on narrow widths. - Tests added — first connection stays on Connections, a half-typed repository survives an Automation round-trip, and
Home/End/ArrowLeftfocus movement; the e2e linked-repository assertions are now scoped to the visibleRepositoriestabpanel and disambiguateUsing itby role.
Both prior Pullfrog threads are resolved and the change reads consistently with the tabbed UI. Build/tests could not be executed in this image (no node_modules), so this is a static review.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Summary
The project Git settings page was one long flat page (connections, repositories, automation, usage guide), and the sidebar's edge had two competing gestures. This PR makes both easier to use.
Git settings
role=tab/tabpanel, arrow-key navigation).Sidebar
Test plan
tsc -b,biome checkvitest run src/components(804 passing);GitSettings.test.tsxupdated to open the Automation / Using it tabs