feat(plugins): add source-control extension contracts (#2117)

This commit is contained in:
José Almeida
2026-08-13 08:29:29 +01:00
committed by GitHub
parent 064b852884
commit f218880ecb
530 changed files with 39054 additions and 7518 deletions
+72
View File
@@ -0,0 +1,72 @@
import { cleanup, render, screen } from "@testing-library/react";
import { afterEach, describe, expect, it, vi } from "vitest";
import { TaskChangeRequestLinkForm } from "@/components/integrations/task-change-request-link-form";
import { pluginModalManager } from "@/lib/plugins/modal-manager";
import { AppShell } from "./app-shell";
const mocks = vi.hoisted(() => ({
passthrough: ({ children }: { children: React.ReactNode }) => children,
}));
vi.mock("@/components/app-sidebar/app-sidebar", () => ({ AppSidebar: () => null }));
vi.mock("@/components/app-status-bar/app-status-surface-provider", () => ({
AppStatusSurfaceProvider: mocks.passthrough,
}));
vi.mock("@/components/command-panel", () => ({ CommandPanel: () => null }));
vi.mock("@/components/config-chat/config-chat-provider", () => ({
ConfigChatProvider: mocks.passthrough,
}));
vi.mock("@/components/diff-worker-pool-provider", () => ({
DiffWorkerPoolProvider: mocks.passthrough,
}));
vi.mock("@/components/desktop-command-host", () => ({ DesktopCommandHost: () => null }));
vi.mock("@/components/global-commands", () => ({ GlobalCommands: () => null }));
vi.mock("@/components/log-buffer-bridge", () => ({ LogBufferBridge: () => null }));
vi.mock("@/components/quick-chat/quick-chat-provider", () => ({
QuickChatProvider: mocks.passthrough,
}));
vi.mock("@/components/task/recent-task-switcher", () => ({ RecentTaskSwitcher: () => null }));
vi.mock("@/components/session-failure-toast-bridge", () => ({
SessionFailureToastBridge: () => null,
}));
vi.mock("@/components/task-deleted-toast-bridge", () => ({ TaskDeletedToastBridge: () => null }));
vi.mock("@/components/update-available-toast-bridge", () => ({
UpdateAvailableToastBridge: () => null,
}));
vi.mock("@/components/sidebar-views-sync-bridge", () => ({ SidebarViewsSyncBridge: () => null }));
vi.mock("@/components/theme-provider", () => ({ ThemeProvider: mocks.passthrough }));
vi.mock("@/components/ws-connector", () => ({ WebSocketConnector: () => null }));
vi.mock("@/lib/commands/command-registry", () => ({
CommandRegistryProvider: mocks.passthrough,
}));
vi.mock("@kandev/ui/sonner", () => ({ Toaster: () => null }));
vi.mock("@kandev/ui/tooltip", () => ({ TooltipProvider: mocks.passthrough }));
describe("AppShell plugin modal topology", () => {
afterEach(() => {
cleanup();
pluginModalManager.closeAllForPlugin("bitbucket");
});
it("renders host task-link forms inside the shared toast provider", () => {
pluginModalManager.openTaskLinkDialog("bitbucket", {
title: "Link Bitbucket pull request",
content: () => (
<TaskChangeRequestLinkForm
inputLabel="Pull request"
emptyError="Enter a Bitbucket pull request URL or key."
failureMessage="Failed to link Bitbucket pull request."
successMessage="Bitbucket pull request linked"
onSubmit={vi.fn().mockResolvedValue(undefined)}
onCancel={() => undefined}
onSuccess={() => undefined}
/>
),
});
render(<AppShell>App content</AppShell>);
expect(screen.getByLabelText("Pull request")).not.toBeNull();
expect(screen.getByRole("button", { name: "Save" })).not.toBeNull();
});
});
+2
View File
@@ -8,6 +8,7 @@ import { DiffWorkerPoolProvider } from "@/components/diff-worker-pool-provider";
import { DesktopCommandHost } from "@/components/desktop-command-host";
import { GlobalCommands } from "@/components/global-commands";
import { LogBufferBridge } from "@/components/log-buffer-bridge";
import { PluginModalHost } from "@/components/plugins/plugin-modal-host";
import { QuickChatProvider } from "@/components/quick-chat/quick-chat-provider";
import { RecentTaskSwitcher } from "@/components/task/recent-task-switcher";
import { SessionFailureToastBridge } from "@/components/session-failure-toast-bridge";
@@ -54,6 +55,7 @@ export function AppShell({ children }: AppShellProps) {
<TooltipProvider>
<ToastProvider>
<AppToaster />
<PluginModalHost />
<SessionFailureToastBridge />
<TaskDeletedToastBridge />
<UpdateAvailableToastBridge />
+16 -2
View File
@@ -104,6 +104,7 @@ describe("readBootPayload plugins", () => {
name: "Jira",
bundleUrl: JIRA_BUNDLE_URL,
styleUrls: ["/api/plugins/jira/style.css"],
repositoryProviderIds: ["jira"],
},
{ id: "hello", name: "Hello", bundleUrl: "/api/plugins/hello/bundle" },
],
@@ -116,6 +117,7 @@ describe("readBootPayload plugins", () => {
name: "Jira",
bundleUrl: JIRA_BUNDLE_URL,
styleUrls: ["/api/plugins/jira/style.css"],
repositoryProviderIds: ["jira"],
},
{ id: "hello", name: "Hello", bundleUrl: "/api/plugins/hello/bundle", styleUrls: undefined },
]);
@@ -126,13 +128,25 @@ describe("readBootPayload plugins", () => {
__KANDEV_BOOT_PAYLOAD__: {
plugins: [
{ id: "no-bundle-url", name: "Missing bundleUrl" },
{ id: "jira", name: "Jira", bundleUrl: JIRA_BUNDLE_URL, styleUrls: ["ok.css", 3] },
{
id: "jira",
name: "Jira",
bundleUrl: JIRA_BUNDLE_URL,
styleUrls: ["ok.css", 3],
repositoryProviderIds: ["jira", 3, null, "azure_devops"],
},
],
},
} as unknown as Window;
expect(readBootPayload(win).plugins).toEqual([
{ id: "jira", name: "Jira", bundleUrl: JIRA_BUNDLE_URL, styleUrls: ["ok.css"] },
{
id: "jira",
name: "Jira",
bundleUrl: JIRA_BUNDLE_URL,
styleUrls: ["ok.css"],
repositoryProviderIds: ["jira", "azure_devops"],
},
]);
});
+10 -1
View File
@@ -110,7 +110,16 @@ function readPlugin(value: Record<string, unknown>): ActivePlugin | undefined {
const styleUrls = Array.isArray(value.styleUrls)
? value.styleUrls.filter((entry): entry is string => typeof entry === "string")
: undefined;
return { id, name, bundleUrl, styleUrls };
const repositoryProviderIds = Array.isArray(value.repositoryProviderIds)
? value.repositoryProviderIds.filter((entry): entry is string => typeof entry === "string")
: undefined;
return {
id,
name,
bundleUrl,
styleUrls,
...(repositoryProviderIds ? { repositoryProviderIds } : {}),
};
}
export async function loadBootPayload(
@@ -0,0 +1,34 @@
import IntegrationsIndexPage from "@/app/settings/integrations/page";
import IntegrationsAzureDevOpsPage from "@/app/settings/integrations/azure-devops/page";
import IntegrationsGitHubPage from "@/app/settings/integrations/github/page";
import IntegrationsGitLabPage from "@/app/settings/integrations/gitlab/page";
import IntegrationsJiraPage from "@/app/settings/integrations/jira/page";
import IntegrationsLinearPage from "@/app/settings/integrations/linear/page";
import IntegrationsSentryPage from "@/app/settings/integrations/sentry/page";
import { IntegrationsIndexPage as IntegrationsIndexPageClient } from "@/components/integrations/integrations-index-page";
import { renderPluginIntegrationSettings } from "./plugin-integration-settings-route";
export function renderIntegrationSettingsRoute(section: string | null, workspaceId?: string) {
switch (section) {
case null:
return workspaceId ? (
<IntegrationsIndexPageClient workspaceId={workspaceId} />
) : (
<IntegrationsIndexPage />
);
case "azure-devops":
return <IntegrationsAzureDevOpsPage workspaceId={workspaceId} />;
case "github":
return <IntegrationsGitHubPage workspaceId={workspaceId} />;
case "gitlab":
return <IntegrationsGitLabPage workspaceId={workspaceId} />;
case "jira":
return <IntegrationsJiraPage workspaceId={workspaceId} />;
case "linear":
return <IntegrationsLinearPage workspaceId={workspaceId} />;
case "sentry":
return <IntegrationsSentryPage workspaceId={workspaceId} />;
default:
return renderPluginIntegrationSettings(section, workspaceId);
}
}
+102 -1
View File
@@ -1,4 +1,11 @@
{
"addAllCommentsToChatContext": "Add all comments to chat context",
"addAllFailedChecksToChatContext": "Add all failed checks to chat context",
"addAllReviewsToChatContext": "Add all reviews to chat context",
"actionFromReviewer": "{{action}} from {{name}}",
"addFailuresToChatContext": "Add {{name}} failures to chat context",
"addReviewComment": "Add review comment",
"addWholeThreadToChatContext": "Add whole thread to chat context",
"addDetailsAboutThisChange": "Add details about this change...",
"allRepos": "All repos",
"anErrorOccurred": "An error occurred",
@@ -6,9 +13,28 @@
"authenticationFailed": "Authentication failed: {{error}}",
"authRequiredHeading": "{{name}} authentication required",
"authRequiredInline": "{{name}} authentication required.",
"approved": "Approved",
"approvedCount_one": "{{count}} approved",
"approvedCount_other": "{{count}} approved",
"actionRequired": "action required",
"awaitingReview": "Awaiting review",
"botComments_one": "Bot comments ({{count}})",
"botComments_other": "Bot comments ({{count}})",
"branchPushedNotCreated": "Branch pushed; {{shortName}} not created",
"branchWasPushedRetryCreation": "Branch was pushed; retry {{longName}} creation.",
"by": "by",
"checkedRelative": "· checked {{relative}}",
"changesRequested": "Changes requested",
"changesRequestedCount_one": "{{count}} changes requested",
"changesRequestedCount_other": "{{count}} changes requested",
"chooseReview": "Choose review",
"chooseReviewToOpen": "Choose a review to open it.",
"ciChecks": "CI Checks{{summary}}",
"closePullRequestStatus": "Close PR status",
"commented": "Commented",
"comments": "Comments",
"commentCount_one": "{{count}} comment",
"commentCount_other": "{{count}} comments",
"commit": "Commit",
"commitChangedFiles_one": "Commit {{count}} changed file",
"commitChangedFiles_other": "Commit {{count}} changed files",
@@ -27,6 +53,9 @@
"copyingConfigTo": "Copying {{label}} config to {{targetName}}…",
"createAsDraft": "Create as draft",
"createdSuccessfully": "{{longName}} created successfully",
"createdLinkNeedsAttention": "{{shortName}} created; task link needs attention",
"associationRetryViaTaskMenu": "{{message}}. Use Link in the task menu to retry.",
"taskAssociationCouldNotBeSaved": "Task association could not be saved.",
"createFailed": "Create {{shortName}} failed",
"createLongName": "Create {{longName}}",
"createPr": "Create PR",
@@ -40,10 +69,16 @@
"deleteSavedQueryNamed": "Delete {{label}} saved query",
"describeYourChanges": "Describe your changes...",
"description": "Description",
"disabled": "Disabled",
"dismissed": "Dismissed",
"draftCreated": "Draft {{shortName}} created",
"enableIntegrationNamed": "Enable {{name}}",
"enterCommitMessage": "Enter commit message...",
"failedToCopyConfig": "Failed to copy config: {{err}}",
"failed": "Failed",
"failedToUnlinkPullRequest": "Failed to unlink pull request",
"failedCount_one": "{{count}} failed",
"failedCount_other": "{{count}} failed",
"failedToDeleteSavedQuery": "Failed to delete saved query",
"failedToSaveSavedQuery": "Failed to save saved query",
"failedToUpdateDefaultView": "Failed to update default view",
@@ -55,13 +90,38 @@
"generateCommitMessageWithAi": "Generate commit message with AI",
"generateDescriptionWithAi": "Generate {{shortName}} description with AI",
"generateTitleWithAi": "Generate {{shortName}} title with AI",
"general": "(general)",
"inProgress": "In progress",
"lastSynced": "Last synced {{relative}}",
"loading": "Loading…",
"loadingChangeRequest": "Loading change request",
"longNameTitle": "{{longName}} title",
"longNameTitlePlaceholder": "{{longName}} title...",
"merge": "Merge",
"mergedRelative": "merged {{relative}}",
"noChecks": "No checks",
"noChecksHaveStarted": "No checks have started",
"noChangesToCommit": "No changes to commit",
"noCommentsYet": "No comments yet",
"noReviewsYet": "No reviews yet",
"noSavedQueriesYet": "No saved queries yet",
"openDetails": "Open {{title}} details",
"openedRelative": "opened {{relative}}",
"openReview": "Open review",
"openReviewNumber": "Open review #{{number}}",
"ontoBranch": "onto {{branch}}",
"other": "Other",
"otherCount_one": "{{count}} other",
"otherCount_other": "{{count}} other",
"overall": "Overall",
"passRate": "Pass rate",
"passed": "Passed",
"passedCount_one": "{{count}} passed",
"passedCount_other": "{{count}} passed",
"pending": "Pending",
"pendingCount_one": "{{count}} pending",
"pendingCount_other": "{{count}} pending",
"pendingReview": "Pending review",
"openVcsOptions": "Open VCS options",
"pickActionThenRepo": "Pick action, then repo",
"pickARepositoryForCommit": "Pick a repository for Commit",
@@ -69,23 +129,64 @@
"pickARepositoryForPush": "Pick a repository for Push",
"pickARepositoryForRebase": "Pick a repository for Rebase",
"pull": "Pull",
"pullRequest": "Pull request",
"pullRequestCount_one": "{{count}} pull request",
"pullRequestCount_other": "{{count}} pull requests",
"pullRequestNumber": "PR #{{number}}",
"pullRequestShortCount_one": "{{count}} PR",
"pullRequestShortCount_other": "{{count}} PRs",
"pullRequestStatusSummary": "Pull request CI status, reviews, and checks summary.",
"pullRequestUnlinked": "Pull request unlinked",
"linkedProviderPullRequests_one": "{{count}} {{provider}} pull request linked",
"linkedProviderPullRequests_other": "{{count}} {{provider}} pull requests linked",
"push": "Push",
"pushCommitsToRemote_one": "Push {{count}} commit to remote",
"pushCommitsToRemote_other": "Push {{count}} commits to remote",
"rebase": "Rebase",
"rebaseOntoBranchBehind": "Rebase onto {{branch}} ({{behind}} behind)",
"reconnectProvider": "Reconnect {{name}}",
"registeredProvider": "registered provider",
"refresh": "Refresh",
"repository": "Repository",
"replyToThread": "Reply to thread {{threadId}}",
"requestedCount_one": "{{count}} requested",
"requestedCount_other": "{{count}} requested",
"retry": "Retry",
"reviewUnavailable": "Review unavailable.",
"reviewCount_one": "{{count}} review",
"reviewCount_other": "{{count}} reviews",
"reviewerTeamName": "{{name}} (team)",
"reviews": "Reviews{{summary}}",
"running": "running",
"retryShortName": "Retry {{shortName}}",
"saveCurrentQuery": "Save current query",
"saving": "Saving",
"savedQueries": "Saved",
"savedQueryDefaultUpdateInProgress": "Updating default view… {{action}}",
"setSavedQueryAsDefaultView": "Set {{label}} as default view",
"clearSavedQueryAsDefaultView": "Clear {{label}} as default view",
"selectAWorkspace": "Select a workspace…",
"shortNameCreated": "{{shortName}} created",
"closedRelative": "closed {{relative}}",
"stageAllChangesBeforeCommitting": "Stage all changes before committing",
"targetWorkspace": "Target workspace",
"timedOut": "timed out",
"untitledPullRequest": "Untitled pull request",
"unlinkPullRequestNumber": "Unlink pull request #{{number}}",
"unresolvedComments_one": "{{count}} unresolved comment",
"unresolvedComments_other": "{{count}} unresolved comments",
"unknownError": "unknown error",
"waitingForTheNextBackendHealth": "Waiting for the next backend health check…"
"updatedAgo": "updated {{elapsed}} ago",
"updatedJustNow": "updated just now",
"viewPullRequestExternally": "View pull request #{{number}} externally",
"defaultRepository": "Default repository",
"filterRepositories": "Filter repositories…",
"noRepositoriesFound": "No repositories found",
"query": "Query",
"queryName": "Name",
"queryNamePlaceholder": "e.g. Needs my review",
"saveQuery": "Save query",
"waitingForTheNextBackendHealth": "Waiting for the next backend health check…",
"cursorPaginationSummary_one": "Page {{page}} · {{count}} result",
"cursorPaginationSummary_other": "Page {{page}} · {{count}} results"
}
+1
View File
@@ -60,6 +60,7 @@
"override": "override",
"packageUrl": "Package URL",
"pluginInstalled": "{{name}} installed",
"pluginDialog": "Plugin dialog",
"pluginPageFailedToLoad": "This plugin page failed to load.",
"pluginsAvailable_one": "{{count}} plugin available",
"pluginsAvailable_other": "{{count}} plugins available",
+2
View File
@@ -1084,6 +1084,8 @@
"reviewTheseChangesBeforeAddingSources": "Review these changes before adding sources. The task must remain idle until the operation finishes.",
"reviewed": "Reviewed",
"reviewers": "Reviewers",
"reviewsCount_one": "Review ({{count}})",
"reviewsCount_other": "Reviews ({{count}})",
"revoke": "Revoke",
"revokeShare": "Revoke share",
"revoking": "Revoking…",
+102 -1
View File
@@ -1,4 +1,11 @@
{
"addAllCommentsToChatContext": "Àďď àĺĺ ćōḿḿēńţś ţō ćĥàţ ćōńţēxţ",
"addAllFailedChecksToChatContext": "Àďď àĺĺ ƒàĩĺēď ćĥēćķś ţō ćĥàţ ćōńţēxţ",
"addAllReviewsToChatContext": "Àďď àĺĺ ŕēvĩēŵś ţō ćĥàţ ćōńţēxţ",
"actionFromReviewer": "{{action}} ƒŕōḿ {{name}}",
"addFailuresToChatContext": "Àďď {{name}} ƒàĩĺũŕēś ţō ćĥàţ ćōńţēxţ",
"addReviewComment": "Àďď ŕēvĩēŵ ćōḿḿēńţ",
"addWholeThreadToChatContext": "Àďď ŵĥōĺē ţĥŕēàď ţō ćĥàţ ćōńţēxţ",
"addDetailsAboutThisChange": "Àďď ďēţàĩĺś àƀōũţ ţĥĩś ćĥàńĝē...",
"allRepos": "Àĺĺ ŕēƥōś",
"anErrorOccurred": "Àń ēŕŕōŕ ōććũŕŕēď",
@@ -6,9 +13,28 @@
"authenticationFailed": "Àũţĥēńţĩćàţĩōń ƒàĩĺēď: {{error}}",
"authRequiredHeading": "{{name}} àũţĥēńţĩćàţĩōń ŕēqũĩŕēď",
"authRequiredInline": "{{name}} àũţĥēńţĩćàţĩōń ŕēqũĩŕēď.",
"approved": "Àƥƥŕōvēď",
"approvedCount_one": "{{count}} àƥƥŕōvēď",
"approvedCount_other": "{{count}} àƥƥŕōvēď",
"actionRequired": "àćţĩōń ŕēqũĩŕēď",
"awaitingReview": "Àŵàĩţĩńĝ ŕēvĩēŵ",
"botComments_one": "Ɓōţ ćōḿḿēńţś ({{count}})",
"botComments_other": "Ɓōţ ćōḿḿēńţś ({{count}})",
"branchPushedNotCreated": "Ɓŕàńćĥ ƥũśĥēď; {{shortName}} ńōţ ćŕēàţēď",
"branchWasPushedRetryCreation": "Ɓŕàńćĥ ŵàś ƥũśĥēď; ŕēţŕŷ {{longName}} ćŕēàţĩōń.",
"by": "ƀŷ",
"checkedRelative": "· ćĥēćķēď {{relative}}",
"changesRequested": "Ćĥàńĝēś ŕēqũēśţēď",
"changesRequestedCount_one": "{{count}} ćĥàńĝēś ŕēqũēśţēď",
"changesRequestedCount_other": "{{count}} ćĥàńĝēś ŕēqũēśţēď",
"chooseReview": "Ćĥōōśē ŕēvĩēŵ",
"chooseReviewToOpen": "Ćĥōōśē à ŕēvĩēŵ ţō ōƥēń ĩţ.",
"ciChecks": "ĆĨ Ćĥēćķś{{summary}}",
"closePullRequestStatus": "Ćĺōśē ƤŔ śţàţũś",
"commented": "Ćōḿḿēńţēď",
"comments": "Ćōḿḿēńţś",
"commentCount_one": "{{count}} ćōḿḿēńţ",
"commentCount_other": "{{count}} ćōḿḿēńţś",
"commit": "Ćōḿḿĩţ",
"commitChangedFiles_one": "Ćōḿḿĩţ {{count}} ćĥàńĝēď ƒĩĺē",
"commitChangedFiles_other": "Ćōḿḿĩţ {{count}} ćĥàńĝēď ƒĩĺēś",
@@ -27,6 +53,9 @@
"copyingConfigTo": "Ćōƥŷĩńĝ {{label}} ćōńƒĩĝ ţō {{targetName}}…",
"createAsDraft": "Ćŕēàţē àś ďŕàƒţ",
"createdSuccessfully": "{{longName}} ćŕēàţēď śũććēśśƒũĺĺŷ",
"createdLinkNeedsAttention": "{{shortName}} ćŕēàţēď; ţàśķ ĺĩñķ ñēēďś àţţēñţĩőñ",
"associationRetryViaTaskMenu": "{{message}}. Ũśē Ĺĩñķ ĩñ ţĥē ţàśķ mēñũ ţő ŕēţŕŷ.",
"taskAssociationCouldNotBeSaved": "Ţàśķ àśśőćĩàţĩőñ ćőũĺď ñőţ bē śàvēď.",
"createFailed": "Ćŕēàţē {{shortName}} ƒàĩĺēď",
"createLongName": "Ćŕēàţē {{longName}}",
"createPr": "Ćŕēàţē ƤŔ",
@@ -40,10 +69,16 @@
"deleteSavedQueryNamed": "Ďēĺēţē {{label}} śàvēď qũēŕŷ",
"describeYourChanges": "Ďēśćŕĩƀē ŷōũŕ ćĥàńĝēś...",
"description": "Ďēśćŕĩƥţĩōń",
"disabled": "Ďĩśàƀĺēď",
"dismissed": "Ďĩśḿĩśśēď",
"draftCreated": "Ďŕàƒţ {{shortName}} ćŕēàţēď",
"enableIntegrationNamed": "Ēńàƀĺē {{name}}",
"enterCommitMessage": "Ēńţēŕ ćōḿḿĩţ ḿēśśàĝē...",
"failedToCopyConfig": "Ƒàĩĺēď ţō ćōƥŷ ćōńƒĩĝ: {{err}}",
"failed": "Ƒàĩĺēď",
"failedToUnlinkPullRequest": "Ƒàĩĺēď ţō ũńĺĩńķ ƥũĺĺ ŕēqũēśţ",
"failedCount_one": "{{count}} ƒàĩĺēď",
"failedCount_other": "{{count}} ƒàĩĺēď",
"failedToDeleteSavedQuery": "Ƒàĩĺēď ţō ďēĺēţē śàvēď qũēŕŷ",
"failedToSaveSavedQuery": "Ƒàĩĺēď ţō śàvē śàvēď qũēŕŷ",
"failedToUpdateDefaultView": "Ƒàĩĺēď ţō ũƥďàţē ďēƒàũĺţ vĩēŵ",
@@ -55,13 +90,38 @@
"generateCommitMessageWithAi": "Ĝēńēŕàţē ćōḿḿĩţ ḿēśśàĝē ŵĩţĥ ÀĨ",
"generateDescriptionWithAi": "Ĝēńēŕàţē {{shortName}} ďēśćŕĩƥţĩōń ŵĩţĥ ÀĨ",
"generateTitleWithAi": "Ĝēńēŕàţē {{shortName}} ţĩţĺē ŵĩţĥ ÀĨ",
"general": "(ĝēńēŕàĺ)",
"inProgress": "Ĩń ƥŕōĝŕēśś",
"lastSynced": "Ĺàśţ śŷńćēď {{relative}}",
"loading": "Ĺōàďĩńĝ…",
"loadingChangeRequest": "Ĺōàďĩńĝ ćĥàńĝē ŕēqũēśţ",
"longNameTitle": "{{longName}} ţĩţĺē",
"longNameTitlePlaceholder": "{{longName}} ţĩţĺē...",
"merge": "Ḿēŕĝē",
"mergedRelative": "ḿēŕĝēď {{relative}}",
"noChecks": "Ńō ćĥēćķś",
"noChecksHaveStarted": "Ńō ćĥēćķś ĥàvē śţàŕţēď",
"noChangesToCommit": "Ńō ćĥàńĝēś ţō ćōḿḿĩţ",
"noCommentsYet": "Ńō ćōḿḿēńţś ŷēţ",
"noReviewsYet": "Ńō ŕēvĩēŵś ŷēţ",
"noSavedQueriesYet": "Ńō śàvēď qũēŕĩēś ŷēţ",
"openDetails": "Ōƥēń {{title}} ďēţàĩĺś",
"openedRelative": "ōƥēńēď {{relative}}",
"openReview": "Ōƥēń ŕēvĩēŵ",
"openReviewNumber": "Ōƥēń ŕēvĩēŵ #{{number}}",
"ontoBranch": "ōńţō {{branch}}",
"other": "Ōţĥēŕ",
"otherCount_one": "{{count}} ōţĥēŕ",
"otherCount_other": "{{count}} ōţĥēŕ",
"overall": "Ōvēŕàĺĺ",
"passRate": "Ƥàśś ŕàţē",
"passed": "Ƥàśśēď",
"passedCount_one": "{{count}} ƥàśśēď",
"passedCount_other": "{{count}} ƥàśśēď",
"pending": "Ƥēńďĩńĝ",
"pendingCount_one": "{{count}} ƥēńďĩńĝ",
"pendingCount_other": "{{count}} ƥēńďĩńĝ",
"pendingReview": "Ƥēńďĩńĝ ŕēvĩēŵ",
"openVcsOptions": "Ōƥēń VĆŚ ōƥţĩōńś",
"pickActionThenRepo": "Ƥĩćķ àćţĩōń, ţĥēń ŕēƥō",
"pickARepositoryForCommit": "Ƥĩćķ à ŕēƥōśĩţōŕŷ ƒōŕ Ćōḿḿĩţ",
@@ -69,23 +129,64 @@
"pickARepositoryForPush": "Ƥĩćķ à ŕēƥōśĩţōŕŷ ƒōŕ Ƥũśĥ",
"pickARepositoryForRebase": "Ƥĩćķ à ŕēƥōśĩţōŕŷ ƒōŕ Ŕēƀàśē",
"pull": "Ƥũĺĺ",
"pullRequest": "Ƥũĺĺ ŕēqũēśţ",
"pullRequestCount_one": "{{count}} ƥũĺĺ ŕēqũēśţ",
"pullRequestCount_other": "{{count}} ƥũĺĺ ŕēqũēśţś",
"pullRequestNumber": "ƤŔ #{{number}}",
"pullRequestShortCount_one": "{{count}} ƤŔ",
"pullRequestShortCount_other": "{{count}} ƤŔś",
"pullRequestStatusSummary": "Ƥũĺĺ ŕēqũēśţ ĆĨ śţàţũś, ŕēvĩēŵś, àńď ćĥēćķś śũḿḿàŕŷ.",
"pullRequestUnlinked": "Ƥũĺĺ ŕēqũēśţ ũńĺĩńķēď",
"linkedProviderPullRequests_one": "{{count}} {{provider}} ƥũĺĺ ŕēqũēśţ ĺĩńķēď",
"linkedProviderPullRequests_other": "{{count}} {{provider}} ƥũĺĺ ŕēqũēśţś ĺĩńķēď",
"push": "Ƥũśĥ",
"pushCommitsToRemote_one": "Ƥũśĥ {{count}} ćōḿḿĩţ ţō ŕēḿōţē",
"pushCommitsToRemote_other": "Ƥũśĥ {{count}} ćōḿḿĩţś ţō ŕēḿōţē",
"rebase": "Ŕēƀàśē",
"rebaseOntoBranchBehind": "Ŕēƀàśē ōńţō {{branch}} ({{behind}} ƀēĥĩńď)",
"reconnectProvider": "Ŕēćōńńēćţ {{name}}",
"registeredProvider": "ŕēĝĩśţēŕēď ƥŕōvĩďēŕ",
"refresh": "Ŕēƒŕēśĥ",
"repository": "Ŕēƥōśĩţōŕŷ",
"replyToThread": "Ŕēƥĺŷ ţō ţĥŕēàď {{threadId}}",
"requestedCount_one": "{{count}} ŕēqũēśţēď",
"requestedCount_other": "{{count}} ŕēqũēśţēď",
"retry": "Ŕēţŕŷ",
"reviewUnavailable": "Ŕēvĩēŵ ũńàvàĩĺàƀĺē.",
"reviewCount_one": "{{count}} ŕēvĩēŵ",
"reviewCount_other": "{{count}} ŕēvĩēŵś",
"reviewerTeamName": "{{name}} (ţēàḿ)",
"reviews": "Ŕēvĩēŵś{{summary}}",
"running": "ŕũńńĩńĝ",
"retryShortName": "Ŕēţŕŷ {{shortName}}",
"saveCurrentQuery": "Śàvē ćũŕŕēńţ qũēŕŷ",
"saving": "Śàvĩńĝ",
"savedQueries": "Śàvēď",
"savedQueryDefaultUpdateInProgress": "Ũƥďàţĩńĝ ďēƒàũĺţ vĩēŵ… {{action}}",
"setSavedQueryAsDefaultView": "Śēţ {{label}} àś ďēƒàũĺţ vĩēŵ",
"clearSavedQueryAsDefaultView": "Ćĺēàŕ {{label}} àś ďēƒàũĺţ vĩēŵ",
"selectAWorkspace": "Śēĺēćţ à ŵōŕķśƥàćē…",
"shortNameCreated": "{{shortName}} ćŕēàţēď",
"closedRelative": "ćĺōśēď {{relative}}",
"stageAllChangesBeforeCommitting": "Śţàĝē àĺĺ ćĥàńĝēś ƀēƒōŕē ćōḿḿĩţţĩńĝ",
"targetWorkspace": "Ţàŕĝēţ ŵōŕķśƥàćē",
"timedOut": "ţĩḿēď ōũţ",
"untitledPullRequest": "Ũńţĩţĺēď ƥũĺĺ ŕēqũēśţ",
"unlinkPullRequestNumber": "Ũńĺĩńķ ƥũĺĺ ŕēqũēśţ #{{number}}",
"unresolvedComments_one": "{{count}} ũńŕēśōĺvēď ćōḿḿēńţ",
"unresolvedComments_other": "{{count}} ũńŕēśōĺvēď ćōḿḿēńţś",
"unknownError": "ũńķńōŵń ēŕŕōŕ",
"waitingForTheNextBackendHealth": "Ŵàĩţĩńĝ ƒōŕ ţĥē ńēxţ ƀàćķēńď ĥēàĺţĥ ćĥēćķ…"
"updatedAgo": "ũƥďàţēď {{elapsed}} àĝō",
"updatedJustNow": "ũƥďàţēď ĵũśţ ńōŵ",
"viewPullRequestExternally": "Vĩēŵ ƥũĺĺ ŕēqũēśţ #{{number}} ēxţēŕńàĺĺŷ",
"defaultRepository": "Ďēƒàũĺţ ŕēƥōśĩţōŕŷ",
"filterRepositories": "Ƒĩĺţēŕ ŕēƥōśĩţōŕĩēś…",
"noRepositoriesFound": "Ńō ŕēƥōśĩţōŕĩēś ƒōũńď",
"query": "Qũēŕŷ",
"queryName": "Ńàḿē",
"queryNamePlaceholder": "ē.ĝ. Ńēēďś ḿŷ ŕēvĩēŵ",
"saveQuery": "Śàvē qũēŕŷ",
"waitingForTheNextBackendHealth": "Ŵàĩţĩńĝ ƒōŕ ţĥē ńēxţ ƀàćķēńď ĥēàĺţĥ ćĥēćķ…",
"cursorPaginationSummary_one": "Ƥàĝē {{page}} · {{count}} ŕēśũļţ",
"cursorPaginationSummary_other": "Ƥàĝē {{page}} · {{count}} ŕēśũļţś"
}
+1
View File
@@ -60,6 +60,7 @@
"override": "ōvēŕŕĩďē",
"packageUrl": "Ƥàćķàĝē ŨŔĹ",
"pluginInstalled": "{{name}} ĩńśţàĺĺēď",
"pluginDialog": "Ƥĺũĝĩń ďĩàĺōĝ",
"pluginPageFailedToLoad": "Ţĥĩś ƥĺũĝĩń ƥàĝē ƒàĩĺēď ţō ĺōàď.",
"pluginsAvailable_one": "{{count}} ƥĺũĝĩń àvàĩĺàƀĺē",
"pluginsAvailable_other": "{{count}} ƥĺũĝĩńś àvàĩĺàƀĺē",
+2
View File
@@ -1084,6 +1084,8 @@
"reviewTheseChangesBeforeAddingSources": "Ŕēvĩēŵ ţĥēśē ćĥàńĝēś ƀēƒōŕē àďďĩńĝ śōũŕćēś. Ţĥē ţàśķ ḿũśţ ŕēḿàĩń ĩďĺē ũńţĩĺ ţĥē ōƥēŕàţĩōń ƒĩńĩśĥēś.",
"reviewed": "Ŕēvĩēŵēď",
"reviewers": "Ŕēvĩēŵēŕś",
"reviewsCount_one": "Ŕēvĩēŵ ({{count}})",
"reviewsCount_other": "Ŕēvĩēŵś ({{count}})",
"revoke": "Ŕēvōķē",
"revokeShare": "Ŕēvōķē śĥàŕē",
"revoking": "Ŕēvōķĩńĝ…",
+19 -1
View File
@@ -27,6 +27,9 @@
"copyingConfigTo": "A copiar a configuração do {{label}} para {{targetName}}…",
"createAsDraft": "Criar como rascunho",
"createdSuccessfully": "{{longName}} criado com êxito",
"createdLinkNeedsAttention": "{{shortName}} criado; a ligação à tarefa requer atenção",
"associationRetryViaTaskMenu": "{{message}}. Utilize Ligação no menu da tarefa para tentar novamente.",
"taskAssociationCouldNotBeSaved": "Não foi possível guardar a associação à tarefa.",
"createFailed": "Não foi possível criar o {{shortName}}",
"createLongName": "Criar {{longName}}",
"createPr": "Criar PR",
@@ -75,6 +78,7 @@
"rebase": "Rebase",
"rebaseOntoBranchBehind": "Rebase sobre {{branch}} ({{behind}} atrás)",
"reconnectProvider": "Voltar a ligar o {{name}}",
"registeredProvider": "fornecedor registado",
"repository": "Repositório",
"retryShortName": "Repetir o {{shortName}}",
"saveCurrentQuery": "Guardar a consulta atual",
@@ -87,5 +91,19 @@
"stageAllChangesBeforeCommitting": "Preparar todas as alterações antes de fazer commit",
"targetWorkspace": "Área de trabalho de destino",
"unknownError": "erro desconhecido",
"waitingForTheNextBackendHealth": "A aguardar a próxima verificação de saúde do backend…"
"failedToUnlinkPullRequest": "Falha ao desligar o pull request",
"pullRequestUnlinked": "Pull request desligado",
"linkedProviderPullRequests_one": "{{count}} pull request de {{provider}} associado",
"linkedProviderPullRequests_other": "{{count}} pull requests de {{provider}} associados",
"unlinkPullRequestNumber": "Desligar pull request #{{number}}",
"defaultRepository": "Repositório predefinido",
"filterRepositories": "Filtrar repositórios…",
"noRepositoriesFound": "Nenhum repositório encontrado",
"query": "Consulta",
"queryName": "Nome",
"queryNamePlaceholder": "por ex., Precisa da minha revisão",
"saveQuery": "Guardar consulta",
"waitingForTheNextBackendHealth": "A aguardar a próxima verificação de saúde do backend…",
"cursorPaginationSummary_one": "Página {{page}} · {{count}} resultado",
"cursorPaginationSummary_other": "Página {{page}} · {{count}} resultados"
}
+2
View File
@@ -1084,6 +1084,8 @@
"reviewTheseChangesBeforeAddingSources": "Reveja estas alterações antes de adicionar fontes. A tarefa tem de permanecer inativa até a operação terminar.",
"reviewed": "Revistos",
"reviewers": "Revisores",
"reviewsCount_one": "Revisão ({{count}})",
"reviewsCount_other": "Revisões ({{count}})",
"revoke": "Revogar",
"revokeShare": "Revogar a partilha",
"revoking": "A revogar…",
+19 -1
View File
@@ -27,6 +27,9 @@
"copyingConfigTo": "正在将 {{label}} 配置复制到 {{targetName}}…",
"createAsDraft": "创建为草稿",
"createdSuccessfully": "{{longName}} 创建成功",
"createdLinkNeedsAttention": "{{shortName}} 已创建;任务链接需要处理",
"associationRetryViaTaskMenu": "{{message}}。请在任务菜单中使用“链接”重试。",
"taskAssociationCouldNotBeSaved": "无法保存任务关联。",
"createFailed": "创建 {{shortName}} 失败",
"createLongName": "创建 {{longName}}",
"createPr": "创建 PR",
@@ -75,6 +78,7 @@
"rebase": "变基",
"rebaseOntoBranchBehind": "变基到 {{branch}}(落后 {{behind}})",
"reconnectProvider": "重新连接 {{name}}",
"registeredProvider": "已注册提供商",
"repository": "仓库",
"retryShortName": "重试 {{shortName}}",
"saveCurrentQuery": "保存当前查询",
@@ -87,5 +91,19 @@
"stageAllChangesBeforeCommitting": "提交前暂存所有更改",
"targetWorkspace": "目标工作区",
"unknownError": "未知错误",
"waitingForTheNextBackendHealth": "正在等待下一次后端健康检查…"
"failedToUnlinkPullRequest": "无法取消关联拉取请求",
"pullRequestUnlinked": "已取消关联拉取请求",
"linkedProviderPullRequests_one": "已关联 {{count}} 个 {{provider}} 拉取请求",
"linkedProviderPullRequests_other": "已关联 {{count}} 个 {{provider}} 拉取请求",
"unlinkPullRequestNumber": "取消关联拉取请求 #{{number}}",
"defaultRepository": "默认仓库",
"filterRepositories": "筛选仓库…",
"noRepositoriesFound": "未找到仓库",
"query": "查询",
"queryName": "名称",
"queryNamePlaceholder": "例如:需要我的审查",
"saveQuery": "保存查询",
"waitingForTheNextBackendHealth": "正在等待下一次后端健康检查…",
"cursorPaginationSummary_one": "第 {{page}} 页 · {{count}} 个结果",
"cursorPaginationSummary_other": "第 {{page}} 页 · {{count}} 个结果"
}
+2
View File
@@ -1084,6 +1084,8 @@
"reviewTheseChangesBeforeAddingSources": "添加来源前请审阅这些变更。在操作完成前任务必须保持空闲。",
"reviewed": "已审阅",
"reviewers": "审阅人",
"reviewsCount_one": "审阅({{count}})",
"reviewsCount_other": "审阅({{count}})",
"revoke": "撤销",
"revokeShare": "撤销分享",
"revoking": "正在撤销…",
-2
View File
@@ -2,7 +2,6 @@ import { StrictMode, useEffect } from "react";
import { createRoot } from "react-dom/client";
import "@/app/globals.css";
import { setOnUnauthorized } from "@/lib/api/client";
import { PluginModalHost } from "@/components/plugins/plugin-modal-host";
import { useAppStoreApi, StateProvider } from "@/components/state-provider";
import { PluginBootBridge } from "@/lib/plugins/plugin-boot-bridge";
import { preloadLocale } from "@/lib/i18n";
@@ -46,7 +45,6 @@ function AppBody({ payload }: { payload: BootPayload }) {
return (
<>
<PluginBootBridge plugins={payload.plugins} />
<PluginModalHost />
<AppShell>
<RouteErrorBoundary>
<SpaRoutes routeData={payload.routeData} />
@@ -0,0 +1,29 @@
import {
PluginErrorBoundary,
PluginRouteFallback,
} from "@/components/plugins/plugin-error-boundary";
import { SettingsSection } from "@/components/settings/settings-section";
import { resolvePluginIcon } from "@/lib/plugins/icons";
import { pluginRegistry } from "@/lib/plugins/registry";
/** Renders one lifecycle-owned contribution inside Kandev's native settings section. */
export function renderPluginIntegrationSettings(integrationId: string, workspaceId?: string) {
const registration = pluginRegistry.getIntegrationSetting(integrationId);
if (!registration) return null;
const Component = registration.Component;
const Icon = resolvePluginIcon(registration.icon);
return (
<PluginErrorBoundary
context={`integration settings "${integrationId}"`}
fallback={<PluginRouteFallback />}
>
<SettingsSection
title={registration.label}
description={registration.description}
icon={<Icon className="h-5 w-5" />}
>
<Component workspaceId={workspaceId} />
</SettingsSection>
</PluginErrorBoundary>
);
}
+98 -1
View File
@@ -1,11 +1,16 @@
import { isValidElement, type ReactElement } from "react";
import { createElement, isValidElement, type ReactElement, type ReactNode } from "react";
import { cleanup, render, screen } from "@testing-library/react";
import { afterEach, describe, expect, it, vi } from "vitest";
import { pluginRegistry } from "@/lib/plugins/registry";
import { renderSettingsRoute } from "./settings-routes";
vi.mock("@/components/settings/workspaces/workspace-settings-shell", () => ({
WorkspaceSettingsShell: ({ children }: { children: ReactNode }) => children,
}));
const PLUGIN_ID = "plugin-a";
const PLUGIN_SETTINGS_PATH = "/settings/plugins/plugin-a/config";
const PLUGIN_INTEGRATION_ID = "source-control";
function cleanupPlugins(...pluginIds: string[]) {
pluginIds.forEach((id) => pluginRegistry.unregisterPlugin(id));
@@ -70,3 +75,95 @@ describe("renderSettingsRoute — plugin fallthrough", () => {
expect((route as ReactElement).type).not.toBe(ShouldNotMatch);
});
});
describe("renderSettingsRoute — plugin integration settings", () => {
afterEach(() => {
cleanupPlugins(PLUGIN_ID);
cleanup();
});
it("redirects a registered integration global route into the active workspace", () => {
function IntegrationSettings({ workspaceId }: { workspaceId?: string }) {
return `PluginIntegration:${workspaceId ?? "global"}`;
}
pluginRegistry.forPlugin(PLUGIN_ID).registerIntegrationSettings({
id: PLUGIN_INTEGRATION_ID,
label: "Source Control",
description: "Configure source control.",
Component: IntegrationSettings,
});
const route = renderSettingsRoute(
`/settings/integrations/${PLUGIN_INTEGRATION_ID}`,
) as ReactElement;
expect((route.type as { name?: string }).name).toBe("ActiveWorkspaceSectionRedirect");
expect(route.props).toEqual({ section: `integrations/${PLUGIN_INTEGRATION_ID}` });
});
it("passes the decoded workspace id to a registered integration", () => {
function IntegrationSettings({ workspaceId }: { workspaceId?: string }) {
return `PluginIntegration:${workspaceId}`;
}
pluginRegistry.forPlugin(PLUGIN_ID).registerIntegrationSettings({
id: PLUGIN_INTEGRATION_ID,
label: "Source Control",
description: "Configure source control.",
Component: IntegrationSettings,
});
render(
renderSettingsRoute(
`/settings/workspaces/workspace%20one/integrations/${PLUGIN_INTEGRATION_ID}`,
) as ReactElement,
);
expect(screen.getByText("PluginIntegration:workspace one")).not.toBeNull();
});
it("wraps plugin content in the native integration settings section", () => {
function PluginProviderIcon({ className }: { className?: string }) {
return createElement("svg", { className, "data-testid": "plugin-provider-icon" });
}
pluginRegistry.forPlugin(PLUGIN_ID).registerIntegrationSettings({
id: PLUGIN_INTEGRATION_ID,
label: "Acme Source Control",
description: "Configure Acme source control.",
icon: PluginProviderIcon,
Component: () => "Plugin-owned settings cards",
});
render(
renderSettingsRoute(
`/settings/workspaces/workspace-1/integrations/${PLUGIN_INTEGRATION_ID}`,
) as ReactElement,
);
expect(screen.getByRole("heading", { name: "Acme Source Control" })).not.toBeNull();
expect(screen.getByText("Configure Acme source control.")).not.toBeNull();
expect(screen.getByTestId("plugin-provider-icon")).not.toBeNull();
expect(screen.getByText("Plugin-owned settings cards")).not.toBeNull();
});
it("contains errors thrown by a plugin integration settings component", () => {
const errorSpy = vi.spyOn(console, "error").mockImplementation(() => undefined);
function ThrowingIntegration(): never {
throw new Error("boom");
}
pluginRegistry.forPlugin(PLUGIN_ID).registerIntegrationSettings({
id: PLUGIN_INTEGRATION_ID,
label: "Source Control",
description: "Configure source control.",
Component: ThrowingIntegration,
});
render(
renderSettingsRoute(
`/settings/workspaces/workspace-1/integrations/${PLUGIN_INTEGRATION_ID}`,
) as ReactElement,
);
expect(screen.getByText(/this plugin page failed to load/i)).not.toBeNull();
errorSpy.mockRestore();
});
});
+7 -33
View File
@@ -13,14 +13,6 @@ import ProfileEditPage from "@/app/settings/executors/[profileId]/page";
import CreateProfilePage from "@/app/settings/executors/new/[type]/page";
import SSHExecutorPage from "@/app/settings/executors/ssh/[executorId]/page";
import ExternalMcpPage from "@/app/settings/external-mcp/page";
import IntegrationsIndexPage from "@/app/settings/integrations/page";
import { IntegrationsIndexPage as IntegrationsIndexPageClient } from "@/components/integrations/integrations-index-page";
import IntegrationsGitHubPage from "@/app/settings/integrations/github/page";
import IntegrationsAzureDevOpsPage from "@/app/settings/integrations/azure-devops/page";
import IntegrationsGitLabPage from "@/app/settings/integrations/gitlab/page";
import IntegrationsJiraPage from "@/app/settings/integrations/jira/page";
import IntegrationsLinearPage from "@/app/settings/integrations/linear/page";
import IntegrationsSentryPage from "@/app/settings/integrations/sentry/page";
import PluginsSettingsPage from "@/app/settings/plugins/page";
import PluginDetailPage from "@/app/settings/plugins/[pluginId]/page";
import UtilityAgentsSettingsPage from "@/app/settings/utility-agents/page";
@@ -107,6 +99,7 @@ import type { HydrationState } from "@/lib/state/store";
import { toAgentProfileOption } from "@/lib/state/slices/settings/types";
import type { ListWorkspacesResponse, UserSettingsResponse } from "@/lib/types/http";
import type { LicenseEntry } from "@/lib/types/system";
import { renderIntegrationSettingsRoute } from "./integration-settings-route";
import {
WorkspaceRepositoriesRoute,
WorkspaceWorkflowsRoute,
@@ -299,6 +292,12 @@ function renderDynamicSettingsRoute(pathname: string) {
const workspaceRoute = renderWorkspaceSettingsRoute(pathname);
if (workspaceRoute) return workspaceRoute;
const integrationId = matchSingle(pathname, /^\/settings\/integrations\/([^/]+)$/);
if (integrationId && pluginRegistry.getIntegrationSetting(integrationId)) {
const section = pathname.split("/").slice(2).join("/");
return <ActiveWorkspaceSectionRedirect section={section} />;
}
const pluginId = matchSingle(pathname, /^\/settings\/plugins\/([^/]+)$/);
if (pluginId) {
// A plugin-authored settings route registered at exactly this path
@@ -469,31 +468,6 @@ function ActiveWorkspaceSectionRedirect({ section }: { section: string }) {
);
}
function renderIntegrationSettingsRoute(section: string | null, workspaceId?: string) {
switch (section) {
case null:
return workspaceId ? (
<IntegrationsIndexPageClient workspaceId={workspaceId} />
) : (
<IntegrationsIndexPage />
);
case "azure-devops":
return <IntegrationsAzureDevOpsPage workspaceId={workspaceId} />;
case "github":
return <IntegrationsGitHubPage workspaceId={workspaceId} />;
case "gitlab":
return <IntegrationsGitLabPage workspaceId={workspaceId} />;
case "jira":
return <IntegrationsJiraPage workspaceId={workspaceId} />;
case "linear":
return <IntegrationsLinearPage workspaceId={workspaceId} />;
case "sentry":
return <IntegrationsSentryPage workspaceId={workspaceId} />;
default:
return null;
}
}
// Components rather than inline JSX so `t()` resolves at render — a t() call
// inside SETTINGS_ROUTES would run at module load and freeze at the boot locale.
function AccountSecurityRoute() {