Skip to content

Conversation

@bianbbc87
Copy link
Contributor

Closes #23720

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@bianbbc87 bianbbc87 requested a review from a team as a code owner August 10, 2025 10:56
@bunnyshell
Copy link

bunnyshell bot commented Aug 10, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@bianbbc87
Copy link
Contributor Author

bianbbc87 commented Aug 10, 2025

PR Summary

Surface repositories that Applications use in Settings → Repositories to improve visibility and navigation.


Proposal

1. Show linked Applications in the repo list

  • Add an “Apps” column showing the number of linked applications.
image
  • In repo detail, add a link to the Applications list filtered by this repo.
image /
  • If no apps exist, link to Create Application prefilled with this repo URL.
image

2. Make unconnected (but app-referenced) repos visible

  • In the list, place repositories referenced by Applications but not connected as a Repository at the top.
  • Add a Not Registered status badge.
  • Duplicates are excluded.
image

3. Provide actions for “Not Registered” repositories

  • In the right-side menu, show Connect Repository and Create Application.
image image
  • For Not Registered repos (and when type === 'git'), make the repo detail read-only. Introduce a registered prop to the EditPanel to track this state (avoids misusing noReadonlyMode, which showed irrelevant inputs).
image

4. Keep existing list behavior consistent

  • Search and filters work across all items, including Not Registered.
  • A horizontal divider separates Not Registered items from the rest; it disappears if none exist.


5. Project filter expansion

  • Expand project filtering from “the repo’s own project” to all projects. This fixes the case where application-sourced repos didn’t display a project and improves visibility.

Full

2025-08-10.8.16.39.mov

Discussion

  1. Non-git types don’t have a repo detail view, so we can’t show the “linked apps” link. Is this acceptable?
  2. The action menu differs by connection status. Is this clearer or potentially confusing?
  • Not Registered: Connect Repository, Create Application
  • Registered: Create Application, Disconnect
  1. I added oci to the repo type filter because it wasn’t being filtered; does anyone know why oci was missing originally?

@bianbbc87
Copy link
Contributor Author

Hi, @Lukas-solar @crenshaw-dev

I’ve proposed an improvement for this issue. Could you please review it?

Copy link
Member

@nitishfy nitishfy left a comment

Choose a reason for hiding this comment

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

Hi, thank you for working on this PR. I tested your changes locally and have few questions to ask based on this comment.

  1. I've an application connected to a repository but the app counts is showing as 0. I think this is happening because the repo url field in application doesn't contian .git while the repo link while trying to add the repo doesn't contain .git. Can we fix this?
    Screenshot 2025-08-11 at 2 46 08 PM

    Screenshot 2025-08-11 at 2 49 23 PM
  2. repo summary links to the filtered app list

    Where can i see this?

@bianbbc87
Copy link
Contributor Author

bianbbc87 commented Aug 30, 2025

Hi, thank you for working on this PR. I tested your changes locally and have few questions to ask based on this comment.

  1. I've an application connected to a repository but the app counts is showing as 0. I think this is happening because the repo url field in application doesn't contian .git while the repo link while trying to add the repo doesn't contain .git. Can we fix this?
    Screenshot 2025-08-11 at 2 46 08 PM
    Screenshot 2025-08-11 at 2 49 23 PM

  2. repo summary links to the filtered app list

    Where can i see this?

Hi, thank you for pointing this out. I hadn’t accounted for the presence of .git in the repo URLs.
I’ve updated the logic so that when retrieving unique repos from applications and when calculating the app count, if a repo in repos contains .git, the comparison with application repos is done using a normalized form where .git is removed. This resolves the issue. 484ede7

when it has .git repository
image

image

Regarding point 2,

repo summary links to the filtered app list

it means that in the repo detail view you can check the links for connected apps, and clicking on one of those links will take you to the corresponding application summary page. The flow looks like this:

you can see application links in repository detail view
image

and click link
image

@bianbbc87 bianbbc87 requested a review from nitishfy September 1, 2025 05:23
@Lukas-solar
Copy link

Thanks for the PR. It looks very good and clear to me!

@Lukas-solar
Copy link

Lukas-solar commented Sep 2, 2025

I really like the list of all repositories. May I ask what the difference is between “connected-repo-app” and “disconnected” on the backend side? I am particularly interested in repos that have no access restrictions like public repos.

@bianbbc87
Copy link
Contributor Author

I really like the list of all repositories. May I ask what the difference is between “connected-repo-app” and “disconnected” on the backend side? I am particularly interested in repos that have no access restrictions like public repos.

Hi Lukas, thanks for the positive feedback on the PR!

there were no backend changes included in this proposal.
I assume you're referring to the “connected-repo-app” and “disconnected” states shown in repos-details.tsx based on the registered variable?

If so, those are custom UI-only states added to distinguish between repositories that were explicitly created and registered via the settings/repos page (i.e., "connected"), and repositories that were created from an application but not yet listed in the registered repo list (i.e., "disconnected").

Let me know if you were referring to something else!

@Lukas-solar
Copy link

I think I understand that part. I was just wondering why we don't also register the repositories that were created from an application directly (ui="disconnected"), i.e., change the backend code. So, a kind of auto-connect without credentials, if none are necessary. But to understand why this separation exists, I asked about the differences in the states in the backend.

@bianbbc87
Copy link
Contributor Author

I think I understand that part. I was just wondering why we don't also register the repositories that were created from an application directly (ui="disconnected"), i.e., change the backend code. So, a kind of auto-connect without credentials, if none are necessary. But to understand why this separation exists, I asked about the differences in the states in the backend.

Ah, I see.

I also considered adding repositories that were created directly from the application as disconnected in the repos data, but in that case, the dataset that makes up the repos would need to be changed. In particular, it would be difficult to decide what type of repo (http/https or ssh) is being created and what the appropriate data should be.

I also wonder whether it’s even necessary to add unauthenticated repos to the database in the first place.

@bianbbc87
Copy link
Contributor Author

@nitishfy
Hi,
If the changes look fine to you, would it be possible to get an approval?

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.

Sync Application repoURL to repositories

3 participants