diff --git a/ui/src/ui/app-render.helpers.ts b/ui/src/ui/app-render.helpers.ts
index e0a097210fa..e85913dd46d 100644
--- a/ui/src/ui/app-render.helpers.ts
+++ b/ui/src/ui/app-render.helpers.ts
@@ -109,9 +109,8 @@ function renderCronFilterIcon(hiddenCount: number) {
- ${
- hiddenCount > 0
- ? html` 0
+ ? html`${hiddenCount}`
- : ""
- }
+ : ""}
`;
}
@@ -313,13 +311,11 @@ export function renderChatControls(state: AppViewState) {
state.sessionsHideCron = !hideCron;
}}
aria-pressed=${hideCron}
- title=${
- hideCron
- ? hiddenCronCount > 0
- ? t("chat.showCronSessionsHidden", { count: String(hiddenCronCount) })
- : t("chat.showCronSessions")
- : t("chat.hideCronSessions")
- }
+ title=${hideCron
+ ? hiddenCronCount > 0
+ ? t("chat.showCronSessionsHidden", { count: String(hiddenCronCount) })
+ : t("chat.showCronSessions")
+ : t("chat.hideCronSessions")}
>
${renderCronFilterIcon(hiddenCronCount)}
@@ -945,9 +941,9 @@ export function renderTopbarThemeModeToggle(state: AppViewState) {
(opt) => html`
- ${
- entries.length === 0
- ? html`
-
No allowlist entries yet.
- `
- : entries.map((entry, index) => renderAllowlistEntry(state, entry, index))
- }
+ ${entries.length === 0
+ ? html`
No allowlist entries yet.
`
+ : entries.map((entry, index) => renderAllowlistEntry(state, entry, index))}
`;
}
diff --git a/ui/src/ui/views/nodes.ts b/ui/src/ui/views/nodes.ts
index 1d0f333f996..96798cd5678 100644
--- a/ui/src/ui/views/nodes.ts
+++ b/ui/src/ui/views/nodes.ts
@@ -62,13 +62,9 @@ export function renderNodes(props: NodesProps) {
- ${
- props.nodes.length === 0
- ? html`
-
No nodes found.
- `
- : props.nodes.map((n) => renderNode(n))
- }
+ ${props.nodes.length === 0
+ ? html`
No nodes found.
`
+ : props.nodes.map((n) => renderNode(n))}
`;
@@ -89,35 +85,25 @@ function renderDevices(props: NodesProps) {
${props.devicesLoading ? "Loading…" : "Refresh"}
- ${
- props.devicesError
- ? html`${props.devicesError}
`
- : nothing
- }
+ ${props.devicesError
+ ? html`${props.devicesError}
`
+ : nothing}
- ${
- pending.length > 0
- ? html`
+ ${pending.length > 0
+ ? html`
Pending
${pending.map((req) => renderPendingDevice(req, props))}
`
- : nothing
- }
- ${
- paired.length > 0
- ? html`
+ : nothing}
+ ${paired.length > 0
+ ? html`
Paired
${paired.map((device) => renderPairedDevice(device, props))}
`
- : nothing
- }
- ${
- pending.length === 0 && paired.length === 0
- ? html`
-
No paired devices.
- `
- : nothing
- }
+ : nothing}
+ ${pending.length === 0 && paired.length === 0
+ ? html`
No paired devices.
`
+ : nothing}
`;
@@ -165,18 +151,14 @@ function renderPairedDevice(device: PairedDevice, props: NodesProps) {
${name}
${device.deviceId}${ip}
${roles} · ${scopes}
- ${
- tokens.length === 0
- ? html`
- Tokens: none
- `
- : html`
+ ${tokens.length === 0
+ ? html` Tokens: none
`
+ : html`
Tokens
${tokens.map((token) => renderTokenRow(device.deviceId, token, props))}
- `
- }
+ `}
`;
@@ -198,18 +180,16 @@ function renderTokenRow(deviceId: string, token: DeviceTokenSummary, props: Node
>
Rotate
- ${
- token.revokedAtMs
- ? nothing
- : html`
+ ${token.revokedAtMs
+ ? nothing
+ : html`
props.onDeviceRevoke(deviceId, token.role)}
>
Revoke
- `
- }
+ `}
`;
@@ -285,24 +265,21 @@ function renderBindings(state: BindingState) {
- ${
- state.formMode === "raw"
- ? html`
-
- Switch the Config tab to Form mode to edit bindings here.
-
- `
- : nothing
- }
- ${
- !state.ready
- ? html`
+ ${state.formMode === "raw"
+ ? html`
+
+ Switch the Config tab to Form mode to edit bindings here.
+
+ `
+ : nothing}
+ ${!state.ready
+ ? html`
Load config to edit bindings.
${state.configLoading ? "Loading…" : "Load config"}
`
- : html`
+ : html`
@@ -329,26 +306,17 @@ function renderBindings(state: BindingState) {
)}
- ${
- !supportsBinding
- ? html`
-
No nodes with system.run available.
- `
- : nothing
- }
+ ${!supportsBinding
+ ? html`
No nodes with system.run available.
`
+ : nothing}
- ${
- state.agents.length === 0
- ? html`
-
No agents found.
- `
- : state.agents.map((agent) => renderAgentBinding(agent, state))
- }
+ ${state.agents.length === 0
+ ? html`
No agents found.
`
+ : state.agents.map((agent) => renderAgentBinding(agent, state))}
- `
- }
+ `}
`;
}
@@ -363,11 +331,9 @@ function renderAgentBinding(agent: BindingAgent, state: BindingState) {
${label}
${agent.isDefault ? "default agent" : "agent"} ·
- ${
- bindingValue === "__default__"
- ? `uses default (${state.defaultBinding ?? "any"})`
- : `override: ${agent.binding}`
- }
+ ${bindingValue === "__default__"
+ ? `uses default (${state.defaultBinding ?? "any"})`
+ : `override: ${agent.binding}`}
- ${
- item.href
- ? html`${t("common.docs")}`
- : nothing
- }
+ : nothing}
`,
)}
diff --git a/ui/src/ui/views/overview-cards.ts b/ui/src/ui/views/overview-cards.ts
index eca0f9fa3be..65c09800777 100644
--- a/ui/src/ui/views/overview-cards.ts
+++ b/ui/src/ui/views/overview-cards.ts
@@ -136,9 +136,8 @@ export function renderOverviewCards(props: OverviewCardsProps) {
return html`
${cards.map((c) => renderStatCard(c, props.onNavigate))}
- ${
- sessions.length > 0
- ? html`
+ ${sessions.length > 0
+ ? html`
${t("overview.cards.recentSessions")}
@@ -158,7 +157,6 @@ export function renderOverviewCards(props: OverviewCardsProps) {
`
- : nothing
- }
+ : nothing}
`;
}
diff --git a/ui/src/ui/views/overview-event-log.ts b/ui/src/ui/views/overview-event-log.ts
index e167ccc99ce..26608f68e03 100644
--- a/ui/src/ui/views/overview-event-log.ts
+++ b/ui/src/ui/views/overview-event-log.ts
@@ -28,13 +28,11 @@ export function renderOverviewEventLog(props: OverviewEventLogProps) {
${new Date(entry.ts).toLocaleTimeString()}
${entry.event}
- ${
- entry.payload
- ? html`${formatEventPayload(entry.payload).slice(0, 120)}`
- : nothing
- }
+ : nothing}
`,
)}
diff --git a/ui/src/ui/views/overview.ts b/ui/src/ui/views/overview.ts
index 3e785c319d5..f2c17d481f7 100644
--- a/ui/src/ui/views/overview.ts
+++ b/ui/src/ui/views/overview.ts
@@ -215,10 +215,9 @@ export function renderOverview(props: OverviewProps) {
placeholder="ws://100.x.y.z:18789"
/>
- ${
- isTrustedProxy
- ? ""
- : html`
+ ${isTrustedProxy
+ ? ""
+ : html`
- `
- }
+ `}
- ${
- props.error
- ? html`${props.error}
`
- : nothing
- }
+ ${props.error
+ ? html`${props.error}
`
+ : nothing}
@@ -306,9 +302,8 @@ export function renderSessions(props: SessionsProps) {
- ${
- props.selectedKeys.size > 0
- ? html`
+ ${props.selectedKeys.size > 0
+ ? html`
${props.selectedKeys.size} selected
Unselect
@@ -321,26 +316,20 @@ export function renderSessions(props: SessionsProps) {
`
- : nothing
- }
+ : nothing}
|
- ${
- paginated.length > 0
- ? html` 0
+ ? html` 0 &&
- paginated.every((r) => props.selectedKeys.has(r.key))
- }
- .indeterminate=${
- paginated.some((r) => props.selectedKeys.has(r.key)) &&
- !paginated.every((r) => props.selectedKeys.has(r.key))
- }
+ .checked=${paginated.length > 0 &&
+ paginated.every((r) => props.selectedKeys.has(r.key))}
+ .indeterminate=${paginated.some((r) => props.selectedKeys.has(r.key)) &&
+ !paginated.every((r) => props.selectedKeys.has(r.key))}
@change=${() => {
const allSelected = paginated.every((r) => props.selectedKeys.has(r.key));
if (allSelected) {
@@ -351,8 +340,7 @@ export function renderSessions(props: SessionsProps) {
}}
aria-label="Select all on page"
/>`
- : nothing
- }
+ : nothing}
|
${sortHeader("key", "Key", "data-table-key-col")}
Label |
@@ -365,34 +353,34 @@ export function renderSessions(props: SessionsProps) {
- ${
- paginated.length === 0
- ? html`
-
- |
- No sessions found.
- |
-
- `
- : paginated.map((row) =>
- renderRow(
- row,
- props.basePath,
- props.onPatch,
- props.selectedKeys.has(row.key),
- props.onToggleSelect,
- props.loading,
- props.onNavigateToChat,
- ),
- )
- }
+ ${paginated.length === 0
+ ? html`
+
+ |
+ No sessions found.
+ |
+
+ `
+ : paginated.map((row) =>
+ renderRow(
+ row,
+ props.basePath,
+ props.onPatch,
+ props.selectedKeys.has(row.key),
+ props.onToggleSelect,
+ props.loading,
+ props.onNavigateToChat,
+ ),
+ )}
- ${
- totalRows > 0
- ? html`
+ ${totalRows > 0
+ ? html`
`
- : nothing
- }
+ : nothing}
`;
@@ -480,9 +467,8 @@ function renderRow(
|
diff --git a/ui/src/ui/views/skills-shared.ts b/ui/src/ui/views/skills-shared.ts
index e19f27c2835..33510b87592 100644
--- a/ui/src/ui/views/skills-shared.ts
+++ b/ui/src/ui/views/skills-shared.ts
@@ -30,23 +30,11 @@ export function renderSkillStatusChips(params: {
return html`
${skill.source}
- ${
- showBundledBadge
- ? html`
- bundled
- `
- : nothing
- }
+ ${showBundledBadge ? html` bundled ` : nothing}
${skill.eligible ? "eligible" : "blocked"}
- ${
- skill.disabled
- ? html`
- disabled
- `
- : nothing
- }
+ ${skill.disabled ? html` disabled ` : nothing}
`;
}
diff --git a/ui/src/ui/views/skills.ts b/ui/src/ui/views/skills.ts
index 7092342b856..df9268c1793 100644
--- a/ui/src/ui/views/skills.ts
+++ b/ui/src/ui/views/skills.ts
@@ -159,21 +159,18 @@ export function renderSkills(props: SkillsProps) {
${filtered.length} shown
- ${
- props.error
- ? html`${props.error} `
- : nothing
- }
- ${
- filtered.length === 0
- ? html`
+ ${props.error
+ ? html`${props.error} `
+ : nothing}
+ ${filtered.length === 0
+ ? html`
- ${
- !props.connected && !props.report ? "Not connected to gateway." : "No skills found."
- }
+ ${!props.connected && !props.report
+ ? "Not connected to gateway."
+ : "No skills found."}
`
- : html`
+ : html`
${groups.map((group) => {
return html`
@@ -189,8 +186,7 @@ export function renderSkills(props: SkillsProps) {
`;
})}
- `
- }
+ `}
${detailSkill ? renderSkillDetail(detailSkill, props) : nothing}
@@ -271,9 +267,8 @@ function renderSkillDetail(skill: SkillStatusEntry, props: SkillsProps) {
${renderSkillStatusChips({ skill, showBundledBadge })}
- ${
- missing.length > 0
- ? html`
+ ${missing.length > 0
+ ? html`
${missing.join(", ")}
`
- : nothing
- }
- ${
- reasons.length > 0
- ? html`
+ : nothing}
+ ${reasons.length > 0
+ ? html`
Reason: ${reasons.join(", ")}
`
- : nothing
- }
+ : nothing}
- ${
- message
- ? html`
+ ${message
+ ? html`
${message.message}
`
- : nothing
- }
- ${
- skill.primaryEnv
- ? html`
+ : nothing}
+ ${skill.primaryEnv
+ ? html`
`
- : nothing
- }
+ : nothing}
0
- ? html`
+ ${badges.length > 0
+ ? html`
${badges.map((b) => html`${b}`)}
`
- : nothing
- }
+ : nothing}
${t("usage.overview.messages")}
@@ -145,10 +143,8 @@ function renderSessionSummary(
${t("usage.details.duration")}
- ${
- formatDurationCompact(usage.durationMs, { spaced: true }) ??
- t("usage.common.emptyValue")
- }
+ ${formatDurationCompact(usage.durationMs, { spaced: true }) ??
+ t("usage.common.emptyValue")}
@@ -574,14 +562,12 @@ function renderTimeSeriesCompact(
0
- ${
- points.length > 0
- ? svg`
+ ${points.length > 0
+ ? svg`
${new Date(points[0].timestamp).toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" })}
${new Date(points[points.length - 1].timestamp).toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" })}
`
- : nothing
- }
+ : nothing}
${points.map((p, i) => {
const val = barTotals[i];
@@ -735,9 +721,8 @@ function renderTimeSeriesCompact(
})()}
- ${
- hasSelection
- ? html`
+ ${hasSelection
+ ? html`
${t("usage.details.turnRange", {
start: String(rangeStartIdx + 1),
@@ -759,13 +744,11 @@ function renderTimeSeriesCompact(
)}
· ${formatCost(filteredPoints.reduce((s, p) => s + (p.cost || 0), 0))}
`
- : html`${points.length} ${t("usage.overview.messagesAbbrev")} · ${formatTokens(cumTokens)}
- · ${formatCost(cumCost)}`
- }
+ : html`${points.length} ${t("usage.overview.messagesAbbrev")} · ${formatTokens(cumTokens)}
+ · ${formatCost(cumCost)}`}
- ${
- breakdownByType
- ? html`
+ ${breakdownByType
+ ? html`
${t("usage.breakdown.tokensByType")}
@@ -809,8 +792,7 @@ function renderTimeSeriesCompact(
`
- : nothing
- }
+ : nothing}
`;
}
@@ -869,13 +851,11 @@ function renderContextPanel(
${t("usage.details.systemPromptBreakdown")}
- ${
- hasMore
- ? html`
+ ${hasMore
+ ? html`
${showAll ? t("usage.details.collapse") : t("usage.details.expandAll")}
`
- : nothing
- }
+ : nothing}
${contextPct || t("usage.details.baseContextPerMessage")}
@@ -922,11 +902,10 @@ function renderContextPanel(
${t("usage.breakdown.total")}: ~${formatTokens(totalContextTokens)}
- ${
- skillsList.length > 0
- ? (() => {
- const more = skillsList.length - skillsTop.length;
- return html`
+ ${skillsList.length > 0
+ ? (() => {
+ const more = skillsList.length - skillsTop.length;
+ return html`
${t("usage.details.skills")} (${skillsList.length})
@@ -941,25 +920,21 @@ function renderContextPanel(
`,
)}
- ${
- more > 0
- ? html`
+ ${more > 0
+ ? html`
${t("usage.sessions.more", { count: String(more) })}
`
- : nothing
- }
+ : nothing}
`;
- })()
- : nothing
- }
- ${
- toolsList.length > 0
- ? (() => {
- const more = toolsList.length - toolsTop.length;
- return html`
+ })()
+ : nothing}
+ ${toolsList.length > 0
+ ? (() => {
+ const more = toolsList.length - toolsTop.length;
+ return html`
${t("usage.details.tools")} (${toolsList.length})
@@ -976,25 +951,21 @@ function renderContextPanel(
`,
)}
- ${
- more > 0
- ? html`
+ ${more > 0
+ ? html`
${t("usage.sessions.more", { count: String(more) })}
`
- : nothing
- }
+ : nothing}
`;
- })()
- : nothing
- }
- ${
- filesList.length > 0
- ? (() => {
- const more = filesList.length - filesTop.length;
- return html`
+ })()
+ : nothing}
+ ${filesList.length > 0
+ ? (() => {
+ const more = filesList.length - filesTop.length;
+ return html`
${t("usage.details.files")} (${filesList.length})
@@ -1011,20 +982,17 @@ function renderContextPanel(
`,
)}
- ${
- more > 0
- ? html`
+ ${more > 0
+ ? html`
${t("usage.sessions.more", { count: String(more) })}
`
- : nothing
- }
+ : nothing}
`;
- })()
- : nothing
- }
+ })()
+ : nothing}
`;
@@ -1209,9 +1177,8 @@ function renderSessionLogsCompact(
${log.tokens ? html` ${formatTokens(log.tokens)}` : nothing}
${cleanContent}
- ${
- toolInfo.tools.length > 0
- ? html`
+ ${toolInfo.tools.length > 0
+ ? html`
${toolInfo.summary}
@@ -1223,20 +1190,17 @@ function renderSessionLogsCompact(
`
- : nothing
- }
+ : nothing}
`;
})}
- ${
- filteredEntries.length === 0
- ? html`
+ ${filteredEntries.length === 0
+ ? html`
${t("usage.details.noMessagesMatch")}
`
- : nothing
- }
+ : nothing}
`;
diff --git a/ui/src/ui/views/usage-render-overview.ts b/ui/src/ui/views/usage-render-overview.ts
index 8ad3cbc70d4..119298276a1 100644
--- a/ui/src/ui/views/usage-render-overview.ts
+++ b/ui/src/ui/views/usage-render-overview.ts
@@ -93,9 +93,8 @@ function renderFilterChips(
return html`
- ${
- selectedDays.length > 0
- ? html`
+ ${selectedDays.length > 0
+ ? html`
${t("usage.filters.days")}: ${daysLabel}
`
- : nothing
- }
- ${
- selectedHours.length > 0
- ? html`
+ : nothing}
+ ${selectedHours.length > 0
+ ? html`
${t("usage.filters.hours")}: ${hoursLabel}
`
- : nothing
- }
- ${
- selectedSessions.length > 0
- ? html`
+ : nothing}
+ ${selectedSessions.length > 0
+ ? html`
${t("usage.filters.session")}: ${sessionsLabel}
`
- : nothing
- }
- ${
- (selectedDays.length > 0 || selectedHours.length > 0) && selectedSessions.length > 0
- ? html`
+ : nothing}
+ ${(selectedDays.length > 0 || selectedHours.length > 0) && selectedSessions.length > 0
+ ? html`
${t("usage.filters.clearAll")}
`
- : nothing
- }
+ : nothing}
`;
}
@@ -267,9 +259,8 @@ function renderDailyChartCompact(
class="daily-bar-wrapper ${isSelected ? "selected" : ""}"
@click=${(e: MouseEvent) => onSelectDay(d.date, e.shiftKey)}
>
- ${
- dailyChartMode === "by-type"
- ? html`
+ ${dailyChartMode === "by-type"
+ ? html`
`
- : html` `
- }
+ : html` `}
${showTotals ? html` ${totalLabel} ` : nothing}
${shortLabel}
`;
@@ -330,34 +318,34 @@ function renderCostBreakdownCompact(totals: UsageTotals, mode: "tokens" | "cost"
@@ -371,15 +359,15 @@ function renderCostBreakdownCompact(totals: UsageTotals, mode: "tokens" | "cost"
>
${t("usage.breakdown.cacheWrite")}
- ${
- isTokenMode ? formatTokens(totals.cacheWrite) : formatCost(breakdown.cacheWrite.cost)
- }
${t("usage.breakdown.cacheRead")}
- ${
- isTokenMode ? formatTokens(totals.cacheRead) : formatCost(breakdown.cacheRead.cost)
- }
@@ -398,10 +386,9 @@ function renderInsightList(
return html`
${title}
- ${
- items.length === 0
- ? html` ${emptyLabel} `
- : html`
+ ${items.length === 0
+ ? html` ${emptyLabel} `
+ : html`
${items.map(
(item) => html`
@@ -415,8 +402,7 @@ function renderInsightList(
`,
)}
- `
- }
+ `}
`;
}
@@ -435,10 +421,9 @@ function renderPeakErrorList(
return html`
${title}
- ${
- items.length === 0
- ? html` ${emptyLabel} `
- : html`
+ ${items.length === 0
+ ? html` ${emptyLabel} `
+ : html`
${items.map(
(item) => html`
@@ -450,8 +435,7 @@ function renderPeakErrorList(
`,
)}
- `
- }
+ `}
`;
}
@@ -816,11 +800,9 @@ function renderSessionsCard(
>
${displayLabel}
- ${
- meta.length > 0
- ? html` ${meta.join(" · ")} `
- : nothing
- }
+ ${meta.length > 0
+ ? html` ${meta.join(" · ")} `
+ : nothing}
${t("usage.sessions.title")}
${t("usage.sessions.shown", { count: String(sessions.length) })}
- ${
- totalSessions !== sessions.length
- ? ` · ${t("usage.sessions.total", { count: String(totalSessions) })}`
- : ""
- }
+ ${totalSessions !== sessions.length
+ ? ` · ${t("usage.sessions.total", { count: String(totalSessions) })}`
+ : ""}
@@ -910,55 +890,46 @@ function renderSessionsCard(
onSessionSortDirChange(sessionSortDir === "desc" ? "asc" : "desc")}
- title=${
- sessionSortDir === "desc"
- ? t("usage.sessions.descending")
- : t("usage.sessions.ascending")
- }
+ title=${sessionSortDir === "desc"
+ ? t("usage.sessions.descending")
+ : t("usage.sessions.ascending")}
>
${sessionSortDir === "desc" ? "↓" : "↑"}
- ${
- selectedCount > 0
- ? html`
+ ${selectedCount > 0
+ ? html`
${t("usage.sessions.clearSelection")}
`
- : nothing
- }
+ : nothing}
- ${
- sessionsTab === "recent"
- ? recentEntries.length === 0
- ? html` ${t("usage.sessions.noRecent")} `
- : html`
+ ${sessionsTab === "recent"
+ ? recentEntries.length === 0
+ ? html` ${t("usage.sessions.noRecent")} `
+ : html`
${recentEntries.map((s) => renderSessionBarRow(s, selectedSet.has(s.key)))}
`
- : sessions.length === 0
- ? html` ${t("usage.sessions.noneInRange")} `
- : html`
+ : sessions.length === 0
+ ? html` ${t("usage.sessions.noneInRange")} `
+ : html`
${sortedWithDir
.slice(0, 50)
.map((s) => renderSessionBarRow(s, selectedSet.has(s.key)))}
- ${
- sessions.length > 50
- ? html`
+ ${sessions.length > 50
+ ? html`
${t("usage.sessions.more", { count: String(sessions.length - 50) })}
`
- : nothing
- }
+ : nothing}
- `
- }
- ${
- selectedCount > 1
- ? html`
+ `}
+ ${selectedCount > 1
+ ? html`
${t("usage.sessions.selected", { count: String(selectedCount) })}
@@ -968,8 +939,7 @@ function renderSessionsCard(
`
- : nothing
- }
+ : nothing}
`;
}
diff --git a/ui/src/ui/views/usage.ts b/ui/src/ui/views/usage.ts
index 1bb44c216eb..f83c5b45904 100644
--- a/ui/src/ui/views/usage.ts
+++ b/ui/src/ui/views/usage.ts
@@ -376,11 +376,9 @@ export function renderUsage(props: UsageProps) {
>
${label}
- ${
- selectedCount > 0
- ? html`${selectedCount}`
- : html` ${t("usage.filters.all")} `
- }
+ ${selectedCount > 0
+ ? html`${selectedCount}`
+ : html` ${t("usage.filters.all")} `}
@@ -449,21 +447,16 @@ export function renderUsage(props: UsageProps) {
@@ -693,9 +679,8 @@ export function renderUsage(props: UsageProps) {
${renderFilterSelect("tool", t("usage.filters.tool"), toolOptions)}
${t("usage.query.tip")}
- ${
- queryTerms.length > 0
- ? html`
+ ${queryTerms.length > 0
+ ? html`
${queryTerms.map((term) => {
const label = term.raw;
@@ -716,11 +701,9 @@ export function renderUsage(props: UsageProps) {
})}
`
- : nothing
- }
- ${
- querySuggestions.length > 0
- ? html`
+ : nothing}
+ ${querySuggestions.length > 0
+ ? html`
${querySuggestions.map(
(suggestion) => html`
@@ -737,35 +720,29 @@ export function renderUsage(props: UsageProps) {
)}
`
- : nothing
- }
- ${
- queryWarnings.length > 0
- ? html`
+ : nothing}
+ ${queryWarnings.length > 0
+ ? html`
${queryWarnings.join(" · ")}
`
- : nothing
- }
+ : nothing}
- ${
- data.error ? html`${data.error} ` : nothing
- }
- ${
- data.sessionsLimitReached
- ? html`
+ ${data.error
+ ? html`${data.error} `
+ : nothing}
+ ${data.sessionsLimitReached
+ ? html`
${t("usage.sessions.limitReached")}
`
- : nothing
- }
+ : nothing}
- ${
- isEmpty
- ? renderUsageEmptyState(filterActions.onRefresh)
- : html`
+ ${isEmpty
+ ? renderUsageEmptyState(filterActions.onRefresh)
+ : html`
${renderUsageInsights(
displayTotals,
activeAggregates,
@@ -793,11 +770,9 @@ export function renderUsage(props: UsageProps) {
displayActions.onDailyChartModeChange,
filterActions.onSelectDay,
)}
- ${
- displayTotals
- ? renderCostBreakdownCompact(displayTotals, display.chartMode)
- : nothing
- }
+ ${displayTotals
+ ? renderCostBreakdownCompact(displayTotals, display.chartMode)
+ : nothing}
${renderSessionsCard(
filteredSessions,
@@ -817,9 +792,8 @@ export function renderUsage(props: UsageProps) {
filterActions.onClearSessions,
)}
- ${
- primarySelectedEntry
- ? html`
+ ${primarySelectedEntry
+ ? html`
${renderSessionDetailPanel(
primarySelectedEntry,
detail.timeSeries,
@@ -849,11 +823,9 @@ export function renderUsage(props: UsageProps) {
filterActions.onClearSessions,
)}
`
- : nothing
- }
+ : nothing}
- `
- }
+ `}
`;
}
|