fix(ui): hide log service chips on single-service stacks (#1689)

Service chips only differentiate multi-service or multi-container log streams. Gate rendering with the same layout criterion already used in stack details, while keeping parsed prefixes and download attribution intact.
This commit is contained in:
Anso
2026-07-23 20:22:57 -04:00
committed by GitHub
parent 85842cc547
commit a89498ae5b
14 changed files with 359 additions and 92 deletions
@@ -62,7 +62,7 @@ export function MobileStackDetail(props: EditorViewProps) {
openLogViewer,
openBashModal,
serviceAction,
effectiveServices,
effectiveServices = [],
serviceUpdateStatuses,
serviceUpdateInProgress,
onRequestServiceUpdate,
@@ -88,6 +88,7 @@ export function MobileStackDetail(props: EditorViewProps) {
const [segment, setSegment] = useState<Segment>('logs');
const safeContainers = containers || [];
const isMultiContainerLayout = safeContainers.length > 1 || effectiveServices.length > 1;
const isRunning = safeContainers.some(c => c.State === 'running');
const canEditStack = can('stack:edit', 'stack', stackName);
@@ -241,7 +242,12 @@ export function MobileStackDetail(props: EditorViewProps) {
</div>
)}
{segment === 'logs' && (
<StackLogsSection stackName={stackName} logsMode={logsMode} setLogsMode={setLogsMode} />
<StackLogsSection
stackName={stackName}
logsMode={logsMode}
setLogsMode={setLogsMode}
showServiceChips={isMultiContainerLayout}
/>
)}
{segment === 'compose' && (
<div className="min-h-0 flex-1">