You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by as...@apache.org on 2026/08/29 02:49:51 UTC
(maka) branch main updated: fix(inspector): align cost summary style (#4122)
This is an automated email from the ASF dual-hosted git repository.
Astro-Han pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maka.git
The following commit(s) were added to refs/heads/main by this push:
new a2fcc25a5 fix(inspector): align cost summary style (#4122)
a2fcc25a5 is described below
commit a2fcc25a50094ee7e46fffd3fcfa1bdd35968388
Author: Phoenix <Ph...@163.com>
AuthorDate: Sat Aug 29 10:49:47 2026 +0800
fix(inspector): align cost summary style (#4122)
Align Estimated cost with the Context window title/readout layout in the Inspector overview.
Generated-by: OpenAI Codex
---
.../tools/inspector/session-inspector-panel.tsx | 41 +++++++++++-----------
.../src/renderer/styles/workbar/inspector.css | 26 --------------
2 files changed, 20 insertions(+), 47 deletions(-)
diff --git a/apps/desktop/src/renderer/features/workbar/tools/inspector/session-inspector-panel.tsx b/apps/desktop/src/renderer/features/workbar/tools/inspector/session-inspector-panel.tsx
index 53cf37b86..f7cea7546 100644
--- a/apps/desktop/src/renderer/features/workbar/tools/inspector/session-inspector-panel.tsx
+++ b/apps/desktop/src/renderer/features/workbar/tools/inspector/session-inspector-panel.tsx
@@ -266,25 +266,22 @@ function InspectorOverview(props: {
return (
<VStack gap={6} data-maka-contract="session-inspector-overview">
- {/* The figures open the panel with nothing above them. Every heading
- tried here ranked below the numbers it introduced, because a label
- over a 20px figure is exactly what a StatCell already is — the three
- cells label themselves. */}
{props.showTotals && (
- <>
- <dl className="maka-inspector-stats" data-maka-contract="session-inspector-stats">
- <StatCell
- label={copy.totals.cost}
- value={formatCost(estimatedSessionCost(props.summary), copy.costUnavailable)}
+ <VStack gap={2} data-maka-contract="session-inspector-stats">
+ <InspectorOverviewStat
+ label={copy.totals.cost}
+ value={formatCost(estimatedSessionCost(props.summary), copy.costUnavailable)}
+ />
+ {overview.cacheHitRate !== undefined && (
+ <InspectorOverviewStat
+ label={copy.overview.cacheHit}
+ value={formatPercent(overview.cacheHitRate)}
/>
- {overview.cacheHitRate !== undefined && (
- <StatCell label={copy.overview.cacheHit} value={formatPercent(overview.cacheHitRate)} />
- )}
- </dl>
+ )}
<Text type="supporting" color="secondary">
{copy.costEstimateHelp}
</Text>
- </>
+ </VStack>
)}
{context && (
@@ -308,15 +305,17 @@ function InspectorOverview(props: {
}
/**
- * One headline figure. A label small enough to stay out of the way over a
- * number big enough to be the thing the eye lands on — the inverse of a table
- * row, and the reason these three do not need a section heading to rank them.
+ * One overview total on the same title/readout rhythm as the sections below.
+ * These figures answer parallel questions, so changing typography between the
+ * first and second block would imply a hierarchy the data does not have.
*/
-function StatCell(props: { label: string; value: ReactNode }) {
+function InspectorOverviewStat(props: { label: string; value: ReactNode }) {
return (
- <div className="maka-inspector-stat">
- <dt>{props.label}</dt>
- <dd>{props.value}</dd>
+ <div className="maka-inspector-section-head">
+ <Heading level={3} className="maka-inspector-section-title">
+ {props.label}
+ </Heading>
+ <span className="maka-inspector-section-readout">{props.value}</span>
</div>
);
}
diff --git a/apps/desktop/src/renderer/styles/workbar/inspector.css b/apps/desktop/src/renderer/styles/workbar/inspector.css
index beb61f4bd..47d7880f5 100644
--- a/apps/desktop/src/renderer/styles/workbar/inspector.css
+++ b/apps/desktop/src/renderer/styles/workbar/inspector.css
@@ -424,32 +424,6 @@
box-shadow: inset 0 0 0 var(--border-width-hairline) var(--border-strong);
}
-/* The three headline figures, across the column rather than down it.
- A 480px panel of label-then-value rows leaves its whole right half empty and
- still reads as cramped, because every row is the same weight; giving the
- three figures a reader actually came for their own band fills the width with
- the thing that deserves it and lets everything below stay quiet. */
-.maka-inspector-stats {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr));
- gap: var(--space-3);
- margin: 0;
-}
-
-.maka-inspector-stat dt {
- font: var(--maka-text-body);
- color: var(--muted-foreground);
- margin-bottom: 2px;
-}
-
-.maka-inspector-stat dd {
- margin: 0;
- font: var(--maka-text-heading-1);
- color: var(--foreground);
- font-variant-numeric: tabular-nums;
- overflow-wrap: anywhere;
-}
-
/* The overview's data grid, on the IDE template's `metadataCompact` rhythm
(row space-1, column space-3) at body type: these facts are the content of
the panel, not its chrome. Only a qualifier steps down to supporting. */
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org