Skip to content

feat: Redesign Git repository link and browser as dialogs - #698

Merged
pikann merged 2 commits into
masterfrom
feature/refactor-git-repository-picker
Nov 4, 2026
Merged

pikann merged 2 commits into
masterfrom
feature/refactor-git-repository-picker

Conversation

@pikann

@pikann pikann commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Redesigns the repository flows in a project's Git settings so both are dialogs instead of inline panels.

Link a repository

  • The inline form is now a "Link a repository" dialog (title, description, Cancel / Link footer).
  • The empty state has its own "Link a repository" button; once repositories exist the button stays in the section header.
  • Returning from the platform's access grant reopens the dialog with the input restored.

Repository browser

  • GitRepositoryPicker becomes GitRepositoryBrowserDialog, opened from the link dialog with "Browse repositories".
  • The list loads the next page as you scroll (an IntersectionObserver sentinel at the end of the list); the "Load more" button is gone.
  • A failed page keeps what is already loaded, shows the error and offers Retry. Scrolling never retries on its own, so a broken request cannot loop.
  • No search box. Not every platform can search its whole list (the GitHub plugin only filters the page it fetched), and a box that matches only the loaded pages is misleading. Rather than add a provider capability, the browser is scroll-only for every provider.
  • "Unsupported" / "error" messages now say to close the window and type the path or URL, since the field is no longer directly above.

Also in this PR

  • GitSetupCallback: after creating a project App connection, start the install on the owner's account right away (as already done for agent Apps), falling back to the repository form's install prompt if that can't start.
  • CI: bump setup-helm v5, setup-oras v2, setup-buildx-action v4, upload-artifact v6.

Behaviour changes to be aware of

  • The dialogs are modal, so tabs can't be switched while one is open. A half-typed repository survives closing the dialog and switching tabs.
  • An unlink error is shown inside the dialog area only, so it isn't visible while the dialog is closed (unchanged from before, now less visible).

i18n

New dialog strings added to all 9 locales; removed picker.hide, picker.search and picker.loadMore. The translations are machine-written and worth a native-speaker check.

Test plan

  • tsc -b, biome, and the web tests for components/projects, components/git, i18n and lib pass.
  • GitSettings.test.tsx updated: tests open the dialog first; paging tests stub IntersectionObserver; a new test covers Retry after a failed page.
  • Manually check both dialogs in a browser (scroll paging, retry, return from an access grant).
  • Check against a real GitHub App and GitLab connection (not verified).

…ositories

- Replaced the GitRepositoryPicker component with GitRepositoryBrowserDialog for improved UX.
- Implemented a dialog that allows users to browse repositories without search functionality.
- Updated the repository list to load as the user scrolls, enhancing performance and usability.
- Adjusted the UI to provide better feedback and error handling when loading repositories.
- Modified tests to accommodate the new dialog structure and ensure functionality remains intact.
- Updated translations for new dialog titles and descriptions across multiple languages.
@pikann pikann changed the title feat: Refactor Git repository picker to use a dialog for browsing rep… feat: Redesign Git repository link and browser as dialogs Nov 4, 2026

@pullfrog pullfrog Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The dialog refactor and the nested modal behave correctly, but the checked-in Playwright specs still drive the old inline form, and the new Retry button is wired to the wrong query action for a failed background refresh.

Reviewed changes

  • Link form is now a dialog — Repositories renders the form inside a modal opened from the empty-state "Link a repository" button or the section header, and reopens it with the pending input restored after an access grant.
  • Repository browser is now a dialog — GitRepositoryPicker became GitRepositoryBrowserDialog with IntersectionObserver paging, a Retry affordance, and the search box removed.
  • Project App install starts automatically — GitSetupCallback calls beginGitAccess as soon as a project-identity App is created (tokens skip it) instead of returning to the form.
  • i18n and CI — new dialog/picker strings in all nine locales with the three old picker keys removed; four GitHub Action major-version bumps.

⚠️ Stale references to the old inline form

The form now lives behind the "Link a repository" button, but the Playwright specs and the feature file still expect the Repository input to be on the page as soon as Git settings opens. Seven tests fail before reaching their assertions, and this stays invisible to PR checks because e2e-ci.yml only runs on apps/e2e/** changes while e2e-tests.yml is manual-dispatch.

Technical details
  • apps/e2e/tests/projects/git-settings.spec.ts:162-163 — "An administrator links a repository" fills Repository and clicks Link without opening the dialog.
  • apps/e2e/tests/projects/git-settings.spec.ts:243-244 — "A writer gets the form once a connection is available" asserts the Repository label is visible on load.
  • apps/e2e/tests/projects/git-automation.spec.ts:212-213 — the four parameterized "A <CODE> answer is explained" tests fill Repository without opening the dialog.
  • apps/e2e/tests/projects/git-automation.spec.ts:229-231 — "A repository the identity cannot see offers the install".
  • apps/e2e/features/projects/git-settings.feature:25,46 — the scenario wording still says the Repository field is shown on open.
  • apps/web/src/components/projects/settings/GitSettings.tsx:100 — the JSDoc still says "the form is open while there are none".

Each failing spec should open the link dialog (getByRole("button", { name: "Link a repository" })) before filling the field. Note getByRole("button", { name: "Link" }) is a substring match by default, so it also matches the new "Link a repository" trigger; use exact: true for the submit button. The unit tests were updated (openLink()), but the Playwright specs were not; the e2e stack stubs the endpoints, so the failure is purely the missing dialog step.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the delta since the prior Pullfrog review (a3d35a7).

  • Retry now retries the failed action — the repository browser calls fetchNextPage() after a failed page and refetch() after a failed background refresh, disabling the button while either request is in flight.
  • Playwright specs updated for the dialog — the Git settings and automation specs open the "Link a repository" dialog before filling the field and use exact: true for the submit button; the feature scenarios were renamed and given the dialog step.
  • Retry test now exercises the button — the failed-page unit test clicks Retry and asserts a new request instead of only checking that it is enabled.
  • Stale JSDoc corrected — the settings docstring now describes the dialog trigger rather than the removed inline form.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pikann
pikann merged commit 363fe0e into master Nov 4, 2026
3 checks passed
@pikann
pikann deleted the feature/refactor-git-repository-picker branch November 4, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant