Skip to content

feat: Git Configure Edit modal #806

Open
dennisvankekem wants to merge 4 commits into
mainfrom
APL-1945
Open

feat: Git Configure Edit modal #806
dennisvankekem wants to merge 4 commits into
mainfrom
APL-1945

Conversation

@dennisvankekem

@dennisvankekem dennisvankekem commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

console: #806
api: linode/apl-api#1017

Considerations

  • I have tested the changes in both light and dark mode.
  • I have considered the need for new unit tests.
  • I have tested the changes on a cluster.
  • I have included relevant documentation updates.
  • I have an approved Figma design or have reflected my changes in Figma
  • I have verified that the UI/UX is consistent in major browsers (e.g., Chrome, Firefox, Safari, Edge).
  • I have tested the changes for responsiveness in different screen resolutions.
  • I have tested expected error states and verified that the user is presented with informative error messages.
  • I have tested the feature with unusual or extreme inputs (e.g., very long strings, empty states, clicking a button multiple times quickly).

Copilot AI 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.

Pull request overview

Adds an “Edit/Configure Git” experience in the console by fetching current Git settings, conditionally pre-populating the modal, and exposing copy-to-clipboard affordances.

Changes:

  • Add a new RTK Query endpoint/hook to GET current Git settings (/v2/git) and extend Git-related types.
  • Update the Git settings modal to load existing configuration, show an internal-repo URL block, and add copy buttons.
  • Rename the Settings tile from “Git” to “GitOps” and hide the otomi.git section in the generic settings form UI schema.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/redux/otomiApi.ts Adds getGitSettings endpoint/hook and expands Git settings typings.
src/pages/SettingsOverview.tsx Renames the settings card label from “Git” to “GitOps”.
src/components/Setting.tsx Hides otomi.git in the settings form UI schema.
src/components/modals/ConfigureGitModal.tsx Fetches current Git settings, pre-fills the form, adds copy-to-clipboard UI, and adjusts modal flow.
src/components/InformationBanner.tsx Tweaks spacing between the info icon and message text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +270 to +276
const getGitFormValues = (): GitSettingsFormValues => ({
repoUrl: hasGitConfiguration ? gitSettings?.repoUrl || '' : '',
branch: hasGitConfiguration ? gitSettings?.branch || '' : '',
username: hasGitConfiguration ? gitSettings?.username || '' : '',
password: hasGitConfiguration ? gitSettings?.password || '' : '',
email: hasGitConfiguration ? gitSettings?.email || '' : '',
})
Comment thread src/redux/otomiApi.ts
Comment on lines +4869 to +4875
export type GetGitSettingsApiResponse = /** status 200 Current Git settings */ {
repoUrl: string
username?: string
password: string
email: string
branch: string
}
Comment thread src/redux/otomiApi.ts
Comment on lines 4260 to +4265
git?: {
repoUrl?: string
branch?: string
username?: string
password?: string
email?: string
Comment on lines +450 to +454
<Tooltip title='Copy Git repository URL'>
<IconButton color='primary' onClick={handleCopyDefaultGitUrl}>
<ContentCopyIcon fontSize='small' />
</IconButton>
</Tooltip>
Comment on lines +522 to +529
<Tooltip title='Copy Git repository URL'>
<IconButton
edge='end'
sx={{ mr: '0px' }}
color='primary'
onClick={handleCopyRepoUrl}
>
<ContentCopyIcon fontSize='small' />
Comment on lines +265 to +268
const defaultGitUrl = gitSettings?.repoUrl || ''
const isDefaultGitConfiguration = gitSettings?.repoUrl?.includes('gitea-http.gitea.svc.cluster.local') ?? false
const hasGitConfiguration = !!gitSettings?.repoUrl && !isDefaultGitConfiguration
const displayedRepoUrl = isDefaultGitConfiguration ? `https://git.${domainSuffix}/otomi/values` : ''
Configuring an external Git Repo is recommended for installing App Platform.
</BodyText>

{!!defaultGitUrl && (
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.

3 participants