Skip to content

Commit 8305d07

Browse files
committed
fix(web): name the machine on cross-machine override rows
1 parent cd872d1 commit 8305d07

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎apps/web/src/components/settings/SettingInheritance.tsx‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ export function SettingInheritance({
225225
target.environmentId === scopeContext?.target?.environmentId &&
226226
target.projectId === scopeContext?.target?.projectId,
227227
) ?? chains[0];
228+
const machineLabelFor = (environmentId: string) => {
229+
const chain = chains.find((entry) => entry.target.environmentId === environmentId);
230+
return chain ? [chain.labels.primary, chain.labels.secondary].filter(Boolean).join(" · ") : "";
231+
};
228232
const groups: (typeof chains)[] = [];
229233
for (const chain of hasMultipleEnvironments && primary
230234
? [primary, ...chains.filter((entry) => entry !== primary)]
@@ -417,7 +421,12 @@ export function SettingInheritance({
417421
className="grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 px-2 py-1"
418422
>
419423
<InlineButton className="min-w-0 justify-start" onClick={project.open}>
420-
<span className="truncate">{project.label}</span>
424+
<span className="truncate">
425+
{project.label}
426+
{hasMultipleEnvironments
427+
? ` · ${machineLabelFor(project.environmentId)}`
428+
: ""}
429+
</span>
421430
</InlineButton>
422431
<span className="max-w-32 truncate text-muted-foreground tabular-nums">
423432
{isProjectScopedSettingKey(key)

0 commit comments

Comments
 (0)