Skip to content

Commit 6f20d2b

Browse files
Merge remote-tracking branch 'origin/main' into configmap-scoped-system-parameters
2 parents 8632622 + f68e00d commit 6f20d2b

18 files changed

Lines changed: 491 additions & 299 deletions

File tree

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Business Source License 1.1
1313

1414
Licensor: Materialize, Inc.
1515

16-
Licensed Work: Materialize Version 20260821
16+
Licensed Work: Materialize Version 20260824
1717
The Licensed Work is © 2026 Materialize, Inc.
1818

1919
Additional Use Grant: Within a single installation of the Licensed Work,
@@ -39,7 +39,7 @@ Additional Use Grant: Within a single installation of the Licensed Work,
3939
whose definitions are controlled by such third
4040
parties.
4141

42-
Change Date: August 21, 2030
42+
Change Date: August 24, 2030
4343

4444
Change License: Apache License, Version 2.0
4545

bin/clear-corrupted-cargo-target-dir

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,29 @@ incremental_build_failure_pattern+="|signal: 11, SIGSEGV"
2727

2828
registry_fetch_failure_pattern="unable to update registry"
2929

30+
# A cached build-script binary poisoned by cargo cache corruption dies with a
31+
# bare ENOENT before doing any work. Both halves are required, and the error
32+
# must be the exact bare line: "failed to run custom build command" alone is
33+
# any build-script bug, which a retry cannot fix, and a build script that
34+
# fails on a missing file with an error context of its own produces the ENOENT
35+
# in a "Caused by:" detail line instead of the bare "Error:" line.
36+
custom_build_script_enoent() {
37+
grep -q "failed to run custom build command" "$1" \
38+
&& grep -qE '^[[:space:]]*Error: No such file or directory \(os error 2\)[[:space:]]*$' "$1"
39+
}
40+
3041
if grep -qE "$incremental_build_failure_pattern" "$1"; then
3142
echo "--- Detected incremental build failure, clearing cargo target directories"
3243
rm -rf target target-xcompile || true
3344
exit 199
3445
fi
3546

47+
if custom_build_script_enoent "$1"; then
48+
echo "--- Detected corrupted cached build script, clearing cargo target directories"
49+
rm -rf target target-xcompile || true
50+
exit 199
51+
fi
52+
3653
# Nothing on disk is corrupted, so keep the target directories. Wiping them
3754
# would turn a network blip into a full rebuild of the workspace, here and in
3855
# every later job that shares the agent's target directory.

console/src/components/connect/ConnectDrawer.test.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
renderComponent,
2222
setFakeEnvironment,
2323
} from "~/test/utils";
24+
import { toBase64 } from "~/utils/format";
2425
import { parseDbVersion } from "~/version/api";
2526

2627
import ConnectDrawer from "./ConnectDrawer";
@@ -49,6 +50,9 @@ describe("ConnectDrawer", () => {
4950
).toBeVisible();
5051
expect(screen.getByText(/materialize-developer/)).toBeVisible();
5152
expect(screen.getByText("Install agent skills (optional)")).toBeVisible();
53+
expect(
54+
screen.getByText(/Agent skills give your coding agent access/),
55+
).toBeVisible();
5256
});
5357

5458
it("switches MCP config format per client", async () => {
@@ -148,6 +152,15 @@ describe("ConnectDrawer", () => {
148152
await screen.findByText(/App password created and added to the command/),
149153
).toBeVisible();
150154
expect(screen.getByText(/Authorization: Basic \*+/)).toBeVisible();
155+
156+
await user.click(screen.getByRole("button", { name: "visibility" }));
157+
158+
const expectedToken = toBase64(
159+
`${dummyValidUser.email}:mzp_${"1".repeat(32)}${"2".repeat(32)}`,
160+
);
161+
expect(
162+
screen.getByText((content) => content.includes(expectedToken)),
163+
).toBeVisible();
151164
});
152165

153166
it("shows connection details on the External tools tab", async () => {
@@ -229,5 +242,9 @@ describe("ConnectDrawer", () => {
229242
),
230243
),
231244
).toBeVisible();
245+
expect(screen.getByText("Enter your password")).toBeVisible();
246+
expect(
247+
screen.getByRole("button", { name: "Create new password" }),
248+
).toBeVisible();
232249
});
233250
});

console/src/components/connect/ConnectDrawer.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import SideDrawer from "~/components/SideDrawer";
1717
import { useAppConfig } from "~/config/useAppConfig";
1818
import { User } from "~/external-library-wrappers/frontegg";
1919
import { type AuthContextProps } from "~/external-library-wrappers/oidc";
20+
import { useHideIntercomLauncher } from "~/hooks/useIntercom";
2021
import { useSelfManagedProfile } from "~/hooks/useSelfManagedProfile";
2122
import { ConnectionIcon, MonitorIcon, TerminalIcon } from "~/icons";
2223
import { ClusterDetailParams } from "~/platform/clusters/ClusterRoutes";
@@ -233,6 +234,7 @@ const ConnectDrawer = ({
233234
forAppPassword,
234235
}: ConnectDrawerProps) => {
235236
const appConfig = useAppConfig();
237+
useHideIntercomLauncher(isOpen);
236238

237239
return (
238240
<SideDrawer

console/src/components/connect/ConnectExternalToolsPanel.tsx

Lines changed: 5 additions & 177 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,17 @@
77
// the Business Source License, use of this software will be governed
88
// by the Apache License, Version 2.0.
99

10-
import {
11-
Box,
12-
Button,
13-
HStack,
14-
Input,
15-
Text,
16-
useTheme,
17-
VStack,
18-
} from "@chakra-ui/react";
10+
import { Box, HStack, useTheme, VStack } from "@chakra-ui/react";
1911
import React, { useState } from "react";
2012

21-
import { SecretCopyableBox } from "~/components/copyableComponents";
22-
import TextLink from "~/components/TextLink";
23-
import { useCreateApiToken } from "~/queries/frontegg";
2413
import { MaterializeTheme } from "~/theme";
2514
import { obfuscateSecret } from "~/utils/format";
2615

2716
import {
2817
ConnectionDetailRow,
2918
ConnectStep,
19+
CreateAppPasswordRow,
20+
IdTokenRow,
3021
LabeledCommandBox,
3122
} from "./connectComponents";
3223
import {
@@ -35,167 +26,6 @@ import {
3526
ExternalToolId,
3627
} from "./connectOptions";
3728

38-
const DETAIL_LABEL_WIDTH = "88px";
39-
40-
/** Inline app password creation: name it, create it, copy it once. */
41-
const CreateAppPasswordRow = ({
42-
onCreated,
43-
}: {
44-
onCreated: (password: string) => void;
45-
}) => {
46-
const { colors } = useTheme<MaterializeTheme>();
47-
const [isNaming, setIsNaming] = useState(false);
48-
const [name, setName] = useState("");
49-
const {
50-
mutate: createAppPassword,
51-
isPending,
52-
data: newPassword,
53-
} = useCreateApiToken();
54-
55-
React.useEffect(() => {
56-
if (newPassword?.password) {
57-
onCreated(newPassword.password);
58-
}
59-
}, [newPassword, onCreated]);
60-
61-
const create = () => {
62-
if (name.trim().length === 0 || isPending) return;
63-
createAppPassword({ type: "personal", description: name.trim() });
64-
};
65-
66-
return (
67-
<Box>
68-
<HStack alignItems="center" spacing="3">
69-
<Text
70-
fontSize="sm"
71-
color={colors.foreground.secondary}
72-
w={DETAIL_LABEL_WIDTH}
73-
flexShrink={0}
74-
>
75-
Password
76-
</Text>
77-
{newPassword?.password ? (
78-
<SecretCopyableBox
79-
label="Password"
80-
contents={newPassword.password}
81-
obfuscatedContent={newPassword.obfuscatedPassword}
82-
overflow="hidden"
83-
flex="1"
84-
w="auto"
85-
minWidth={0}
86-
/>
87-
) : isNaming ? (
88-
<HStack spacing="2" flex="1">
89-
<Input
90-
value={name}
91-
onChange={(event) => setName(event.target.value)}
92-
maxW="220px"
93-
isDisabled={isPending}
94-
placeholder="Password name"
95-
aria-label="App password name"
96-
autoFocus
97-
onKeyDown={(event) => {
98-
if (event.key === "Enter") create();
99-
}}
100-
/>
101-
<Button
102-
variant="primary"
103-
size="sm"
104-
px="3"
105-
flexShrink={0}
106-
isLoading={isPending}
107-
loadingText="Creating"
108-
isDisabled={name.trim().length === 0}
109-
onClick={create}
110-
>
111-
Create
112-
</Button>
113-
<Button
114-
variant="borderless"
115-
size="sm"
116-
flexShrink={0}
117-
isDisabled={isPending}
118-
onClick={() => {
119-
setIsNaming(false);
120-
setName("");
121-
}}
122-
>
123-
Cancel
124-
</Button>
125-
</HStack>
126-
) : (
127-
<Button
128-
variant="secondary"
129-
size="sm"
130-
onClick={() => setIsNaming(true)}
131-
>
132-
Create new password
133-
</Button>
134-
)}
135-
</HStack>
136-
{isNaming && !newPassword?.password && (
137-
<Text
138-
fontSize="sm"
139-
color={colors.foreground.secondary}
140-
mt="1.5"
141-
ml={`calc(${DETAIL_LABEL_WIDTH} + 12px)`}
142-
>
143-
You are naming this password. The password itself is generated for
144-
you.
145-
</Text>
146-
)}
147-
{newPassword?.password && (
148-
<Text
149-
fontSize="sm"
150-
color={colors.foreground.secondary}
151-
mt="1.5"
152-
ml={`calc(${DETAIL_LABEL_WIDTH} + 12px)`}
153-
>
154-
Copy it now. It will not be shown again. Manage in{" "}
155-
<TextLink href="/access/app-passwords">App Passwords</TextLink>.
156-
</Text>
157-
)}
158-
</Box>
159-
);
160-
};
161-
162-
/** Self-managed OIDC deployments use the ID token as the SQL password. */
163-
const IdTokenRow = ({ idToken }: { idToken: string }) => {
164-
const { colors } = useTheme<MaterializeTheme>();
165-
166-
return (
167-
<Box>
168-
<HStack alignItems="center" spacing="3">
169-
<Text
170-
fontSize="sm"
171-
color={colors.foreground.secondary}
172-
w={DETAIL_LABEL_WIDTH}
173-
flexShrink={0}
174-
>
175-
Password
176-
</Text>
177-
<SecretCopyableBox
178-
label="idToken"
179-
contents={idToken}
180-
obfuscatedContent={obfuscateSecret(idToken)}
181-
overflow="hidden"
182-
flex="1"
183-
w="auto"
184-
minWidth={0}
185-
/>
186-
</HStack>
187-
<Text
188-
fontSize="sm"
189-
color={colors.foreground.secondary}
190-
mt="1.5"
191-
ml={`calc(${DETAIL_LABEL_WIDTH} + 12px)`}
192-
>
193-
When prompted for a password, paste this ID token.
194-
</Text>
195-
</Box>
196-
);
197-
};
198-
19929
export interface ConnectExternalToolsPanelProps {
20030
ctx: ConnectContext;
20131
}
@@ -219,9 +49,7 @@ export const ConnectExternalToolsPanel = ({
21949
password: createdPassword,
22050
ssl: ctx.ssl,
22151
});
222-
// Mask the password in the rendered snippet. The copy button copies the
223-
// real value.
224-
const displaySnippet = createdPassword
52+
const obfuscatedSnippet = createdPassword
22553
? snippet.replaceAll(createdPassword, obfuscateSecret(createdPassword))
22654
: undefined;
22755

@@ -277,7 +105,7 @@ export const ConnectExternalToolsPanel = ({
277105
<LabeledCommandBox
278106
label={tool.instruction}
279107
contents={snippet}
280-
displayContents={displaySnippet}
108+
obfuscatedContents={obfuscatedSnippet}
281109
/>
282110
</VStack>
283111
</ConnectStep>

console/src/components/connect/ConnectMcpPanel.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,7 @@ export const ConnectMcpPanel = ({ ctx }: ConnectMcpPanelProps) => {
293293
baseUrl: ctx.mcpBaseUrl,
294294
token: oauthActive ? undefined : (mcpToken ?? MCP_TOKEN_PLACEHOLDER),
295295
});
296-
// Mask the token in the rendered snippet. The copy button copies the real
297-
// value.
298-
const displaySnippet = mcpToken
296+
const obfuscatedSnippet = mcpToken
299297
? snippet.replace(mcpToken, obfuscateSecret(mcpToken))
300298
: undefined;
301299
const installLink =
@@ -333,7 +331,7 @@ export const ConnectMcpPanel = ({ ctx }: ConnectMcpPanelProps) => {
333331
: undefined
334332
}
335333
contents={snippet}
336-
displayContents={displaySnippet}
334+
obfuscatedContents={obfuscatedSnippet}
337335
/>
338336
{ctx.oauthAvailable && (
339337
<HStack justifyContent="flex-end">
@@ -366,8 +364,8 @@ export const ConnectMcpPanel = ({ ctx }: ConnectMcpPanelProps) => {
366364
const skillsStep = (
367365
<VStack alignItems="stretch" spacing="2">
368366
<Text fontSize="sm" color={colors.foreground.secondary}>
369-
Ready-made instructions that help your agent work with Materialize
370-
accurately.
367+
Agent skills give your coding agent access to Materialize documentation,
368+
reference material, and best practices.
371369
</Text>
372370
<LabeledCommandBox contents={AGENT_SKILLS_COMMAND} />
373371
</VStack>

0 commit comments

Comments
 (0)