diff --git a/ui/src/ui/app-render.helpers.ts b/ui/src/ui/app-render.helpers.ts
index e85913dd46d..e0a097210fa 100644
--- a/ui/src/ui/app-render.helpers.ts
+++ b/ui/src/ui/app-render.helpers.ts
@@ -109,8 +109,9 @@ function renderCronFilterIcon(hiddenCount: number) {
- ${hiddenCount > 0
- ? html` 0
+ ? html`${hiddenCount}`
- : ""}
+ : ""
+ }
`;
}
@@ -311,11 +313,13 @@ 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)}
@@ -941,9 +945,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 96798cd5678..1d0f333f996 100644
--- a/ui/src/ui/views/nodes.ts
+++ b/ui/src/ui/views/nodes.ts
@@ -62,9 +62,13 @@ 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))
+ }
`;
@@ -85,25 +89,35 @@ 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
+ }
`;
@@ -151,14 +165,18 @@ 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))}
- `}
+ `
+ }
`;
@@ -180,16 +198,18 @@ function renderTokenRow(deviceId: string, token: DeviceTokenSummary, props: Node
>
Rotate
- ${token.revokedAtMs
- ? nothing
- : html`
+ ${
+ token.revokedAtMs
+ ? nothing
+ : html`
props.onDeviceRevoke(deviceId, token.role)}
>
Revoke
- `}
+ `
+ }
`;
@@ -265,21 +285,24 @@ 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`
@@ -306,17 +329,26 @@ 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))
+ }
- `}
+ `
+ }
`;
}
@@ -331,9 +363,11 @@ 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 65c09800777..eca0f9fa3be 100644
--- a/ui/src/ui/views/overview-cards.ts
+++ b/ui/src/ui/views/overview-cards.ts
@@ -136,8 +136,9 @@ 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")}
@@ -157,6 +158,7 @@ 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 26608f68e03..e167ccc99ce 100644
--- a/ui/src/ui/views/overview-event-log.ts
+++ b/ui/src/ui/views/overview-event-log.ts
@@ -28,11 +28,13 @@ 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 f2c17d481f7..3e785c319d5 100644
--- a/ui/src/ui/views/overview.ts
+++ b/ui/src/ui/views/overview.ts
@@ -215,9 +215,10 @@ 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
+ }
@@ -302,8 +306,9 @@ export function renderSessions(props: SessionsProps) {
- ${props.selectedKeys.size > 0
- ? html`
+ ${
+ props.selectedKeys.size > 0
+ ? html`
${props.selectedKeys.size} selected
Unselect
@@ -316,20 +321,26 @@ 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) {
@@ -340,7 +351,8 @@ export function renderSessions(props: SessionsProps) {
}}
aria-label="Select all on page"
/>`
- : nothing}
+ : nothing
+ }
|
${sortHeader("key", "Key", "data-table-key-col")}
Label |
@@ -353,34 +365,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
+ }
`;
@@ -467,8 +480,9 @@ function renderRow(
|
diff --git a/ui/src/ui/views/skills-shared.ts b/ui/src/ui/views/skills-shared.ts
index 33510b87592..e19f27c2835 100644
--- a/ui/src/ui/views/skills-shared.ts
+++ b/ui/src/ui/views/skills-shared.ts
@@ -30,11 +30,23 @@ 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 df9268c1793..7092342b856 100644
--- a/ui/src/ui/views/skills.ts
+++ b/ui/src/ui/views/skills.ts
@@ -159,18 +159,21 @@ 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`
@@ -186,7 +189,8 @@ export function renderSkills(props: SkillsProps) {
`;
})}
- `}
+ `
+ }
${detailSkill ? renderSkillDetail(detailSkill, props) : nothing}
@@ -267,8 +271,9 @@ 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")}
@@ -143,8 +145,10 @@ function renderSessionSummary(
${t("usage.details.duration")}
- ${formatDurationCompact(usage.durationMs, { spaced: true }) ??
- t("usage.common.emptyValue")}
+ ${
+ formatDurationCompact(usage.durationMs, { spaced: true }) ??
+ t("usage.common.emptyValue")
+ }
@@ -562,12 +574,14 @@ 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];
@@ -721,8 +735,9 @@ function renderTimeSeriesCompact(
})()}
- ${hasSelection
- ? html`
+ ${
+ hasSelection
+ ? html`
${t("usage.details.turnRange", {
start: String(rangeStartIdx + 1),
@@ -744,11 +759,13 @@ 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")}
@@ -792,7 +809,8 @@ function renderTimeSeriesCompact(
`
- : nothing}
+ : nothing
+ }
`;
}
@@ -851,11 +869,13 @@ 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")}
@@ -902,10 +922,11 @@ 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})
@@ -920,21 +941,25 @@ 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})
@@ -951,21 +976,25 @@ 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})
@@ -982,17 +1011,20 @@ function renderContextPanel(
`,
)}
- ${more > 0
- ? html`
+ ${
+ more > 0
+ ? html`
${t("usage.sessions.more", { count: String(more) })}
`
- : nothing}
+ : nothing
+ }
`;
- })()
- : nothing}
+ })()
+ : nothing
+ }
`;
@@ -1177,8 +1209,9 @@ function renderSessionLogsCompact(
${log.tokens ? html` ${formatTokens(log.tokens)}` : nothing}
${cleanContent}
- ${toolInfo.tools.length > 0
- ? html`
+ ${
+ toolInfo.tools.length > 0
+ ? html`
${toolInfo.summary}
@@ -1190,17 +1223,20 @@ 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 119298276a1..8ad3cbc70d4 100644
--- a/ui/src/ui/views/usage-render-overview.ts
+++ b/ui/src/ui/views/usage-render-overview.ts
@@ -93,8 +93,9 @@ 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
+ }
`;
}
@@ -259,8 +267,9 @@ 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}
`;
@@ -318,34 +330,34 @@ function renderCostBreakdownCompact(totals: UsageTotals, mode: "tokens" | "cost"
@@ -359,15 +371,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)}
@@ -386,9 +398,10 @@ function renderInsightList(
return html`
${title}
- ${items.length === 0
- ? html` ${emptyLabel} `
- : html`
+ ${
+ items.length === 0
+ ? html` ${emptyLabel} `
+ : html`
${items.map(
(item) => html`
@@ -402,7 +415,8 @@ function renderInsightList(
`,
)}
- `}
+ `
+ }
`;
}
@@ -421,9 +435,10 @@ function renderPeakErrorList(
return html`
${title}
- ${items.length === 0
- ? html` ${emptyLabel} `
- : html`
+ ${
+ items.length === 0
+ ? html` ${emptyLabel} `
+ : html`
${items.map(
(item) => html`
@@ -435,7 +450,8 @@ function renderPeakErrorList(
`,
)}
- `}
+ `
+ }
`;
}
@@ -800,9 +816,11 @@ 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) })}`
+ : ""
+ }
@@ -890,46 +910,55 @@ 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) })}
@@ -939,7 +968,8 @@ function renderSessionsCard(
`
- : nothing}
+ : nothing
+ }
`;
}
diff --git a/ui/src/ui/views/usage.ts b/ui/src/ui/views/usage.ts
index f83c5b45904..1bb44c216eb 100644
--- a/ui/src/ui/views/usage.ts
+++ b/ui/src/ui/views/usage.ts
@@ -376,9 +376,11 @@ export function renderUsage(props: UsageProps) {
>
${label}
- ${selectedCount > 0
- ? html`${selectedCount}`
- : html` ${t("usage.filters.all")} `}
+ ${
+ selectedCount > 0
+ ? html`${selectedCount}`
+ : html` ${t("usage.filters.all")} `
+ }
@@ -447,16 +449,21 @@ export function renderUsage(props: UsageProps) {
@@ -679,8 +693,9 @@ 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;
@@ -701,9 +716,11 @@ export function renderUsage(props: UsageProps) {
})}
`
- : nothing}
- ${querySuggestions.length > 0
- ? html`
+ : nothing
+ }
+ ${
+ querySuggestions.length > 0
+ ? html`
${querySuggestions.map(
(suggestion) => html`
@@ -720,29 +737,35 @@ 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,
@@ -770,9 +793,11 @@ export function renderUsage(props: UsageProps) {
displayActions.onDailyChartModeChange,
filterActions.onSelectDay,
)}
- ${displayTotals
- ? renderCostBreakdownCompact(displayTotals, display.chartMode)
- : nothing}
+ ${
+ displayTotals
+ ? renderCostBreakdownCompact(displayTotals, display.chartMode)
+ : nothing
+ }
${renderSessionsCard(
filteredSessions,
@@ -792,8 +817,9 @@ export function renderUsage(props: UsageProps) {
filterActions.onClearSessions,
)}
- ${primarySelectedEntry
- ? html`
+ ${
+ primarySelectedEntry
+ ? html`
${renderSessionDetailPanel(
primarySelectedEntry,
detail.timeSeries,
@@ -823,9 +849,11 @@ export function renderUsage(props: UsageProps) {
filterActions.onClearSessions,
)}
`
- : nothing}
+ : nothing
+ }
- `}
+ `
+ }
`;
}
|