You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds the API client and the Settings page for the PipeCD plugin.
The plugin talks to PipeCD's APIService over gRPC-Web using an API key. The client is generated from PipeCD's own .proto definitions. The Settings page lets users save their PipeCD server URL and API key, and test the connection before saving.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution.
Could you take a look at the commit messages in this PR? We follow a Linux kernel style for git commits — see the contributing guide and git log for examples.
Commits that need attention
pipecd: add initial plugin project structure — Description must start with a capital letter — e.g. frontend: HomeButton: Fix the button not frontend: HomeButton: fix the button.
pipecd: trim README to a placeholder — Description must start with a capital letter — e.g. frontend: HomeButton: Fix the button not frontend: HomeButton: fix the button.
pipecd: add Apache license header — Description must start with a capital letter — e.g. frontend: HomeButton: Fix the button not frontend: HomeButton: fix the button.
pipecd: add API client and settings page — Description must start with a capital letter — e.g. frontend: HomeButton: Fix the button not frontend: HomeButton: fix the button.
Commit guidelines
Use atomic commits focused on a single change.
Use the title format <area>: <Description of changes> — description must start with a capital letter.
Keep the title under 72 characters (soft requirement).
Explain the intention and why the change is needed.
Make commit titles meaningful and describe what changed.
Do not add code that a later commit rewrites; squash or reorder commits instead.
Use a routed link that preserves the Headlamp base and cluster path
pipecd/src/components/NotConfigured.tsx:16
This hash URL only changes the current page fragment; it does not navigate through Headlamp's registered route or preserve Headlamp's base/cluster path. Build the URL from the PipeCDSettings route and use a React Router link, as other internal Headlamp links do.
Unrecognized deploy plugins incorrectly fall back to Kubernetes
pipecd/src/api/pipecd.ts:177
When deployTargetsByPlugin contains only an unrecognized or future plugin, this falls back to the deprecated enum. Plugin-architecture pipeds leave that enum at zero, so the resource is incorrectly reported as Kubernetes instead of UNKNOWN. Only consult kind when there are no deploy-target keys.
Use established plugin API import path for useTranslation
pipecd/AGENTS.md:125
The documented import path differs from the established official-plugin API: Flux, Karpenter, and cert-manager import useTranslation from @kinvolk/headlamp-plugin/lib (for example, flux/src/sources/SourceList.tsx:1). Keeping the wrong path here will direct future changes away from the repository convention.
Add coverage for stage-log response mapping
pipecd/src/api/pipecd.ts:401
The stage-log wrapper is the only distinct response mapper in this API client without coverage; the test client does not even define listStageLogs. Add a test that verifies the deployment ID, bigint index/timestamp conversion, severity mapping, and completed propagation so this public API cannot regress unnoticed.
Translate empty state text and add English locale entries
pipecd/src/components/NotConfigured.tsx:13
This new user-facing empty state also bypasses the plugin's enabled i18n bundle. Wrap the component's headings, descriptions, and button text with useTranslation from @kinvolk/headlamp-plugin/lib and add the extracted English entries, following cert-manager/src/components/orders/List.tsx:1-14.
This issue also appears on line 16 of the same file.
Translate hard-coded component copy using the plugin i18n bundle
pipecd/src/components/SettingsPage.tsx:99
This component hard-codes its user-facing copy even though the plugin enables English i18n and ships a locale bundle. Official plugin UI components use useTranslation from @kinvolk/headlamp-plugin/lib (for example, flux/src/sources/SourceList.tsx:1-20); translate this component's labels, helpers, buttons, and result messages and extract the English resources.
Translate hard-coded placeholder text
pipecd/src/index.tsx:23
The placeholder's visible text is hard-coded while this plugin declares an i18n locale. Translate this copy with useTranslation from @kinvolk/headlamp-plugin/lib and extract it into the English locale, consistent with karpenter/src/Scaling/List.tsx:1-15.
Document the established useTranslation import path
pipecd/AGENTS.md:125
This guidance conflicts with the plugin itself and the repository-wide import pattern: UI components import useTranslation from @kinvolk/headlamp-plugin/lib (for example, karpenter/src/Scaling/List.tsx:1, flux/src/sources/SourceList.tsx:1, and cert-manager/src/components/orders/List.tsx:1). Document the established path so future generated changes do not introduce an inconsistent or unavailable import.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Application filtering and deployment-state mapping can return misleading data.
0 open findings
Previously missed (2)
In code that hasn't changed since last review
Preserve deploying flag in effective application status
pipecd/src/api/pipecd.ts:228
PipeCD reports active deployments through a.deploying, independently of the drift-derived syncState; its own status component gives that flag precedence. This mapper drops the flag, so deploying: true with a previous SYNCED state is returned as synced, and an absent syncState hides deployment activity entirely. Map the flag to the effective DEPLOYING status and add regression tests for both cases.
Filter applications by resolved platform with pagination
pipecd/src/api/pipecd.ts:325
The server's ListApplications handler filters the stored, deprecated Kind field, while resolveKind() uses deployTargetsByPlugin for v1 applications. A v1 Terraform application with the default Kind is therefore excluded by the Terraform filter and included by the Kubernetes filter. Apply filtering to resolved platforms rather than forwarding this legacy filter, and handle server pagination so matching applications are not skipped. Add regression tests for both filters.
Test Connection fetches all applications when limit is zero
pipecd/src/components/SettingsPage.tsx:109
listApplications(config) sends limit: 0. PipeCD passes that limit through to its datastore, and the Firestore adapter applies no limit when it is zero. Test Connection can therefore download and map every enabled application in the project just to validate credentials. Pass a small explicit pageSize, such as 1, and update the assertion in SettingsPage.test.tsx that currently requires undefined options.
Users cannot clear saved API credentials
pipecd/src/components/SettingsPage.tsx:192
After saving a connection, clearing the API key or both fields disables Save Settings. The old key remains in localStorage and reappears when the page is reopened, with no reset action available. Allow saving cleared fields while keeping Test Connection disabled for incomplete configurations, or provide an explicit action to remove the stored credentials.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the API client and the Settings page for the PipeCD plugin.
The plugin talks to PipeCD's APIService over gRPC-Web using an API key. The client is generated from PipeCD's own .proto definitions. The Settings page lets users save their PipeCD server URL and API key, and test the connection before saving.
Depends on #1277
Part of the LFX Mentorship 2026 Term 3, tracked in pipe-cd/pipecd#6706.
Screenshot