Skip to content

fix(desktop): expose full usage request values - #3676

Merged
Astro-Han merged 1 commit into
apache:mainfrom
liuxiaocs7:fix/usage-request-time-tooltip
Aug 24, 2026
Merged

fix(desktop): expose full usage request values#3676
Astro-Han merged 1 commit into
apache:mainfrom
liuxiaocs7:fix/usage-request-time-tooltip

Conversation

@liuxiaocs7

@liuxiaocs7 liuxiaocs7 commented Aug 24, 2026

Copy link
Copy Markdown
Member

Summary

  • widen the usage request timestamp column so full localized date/time values remain visible in Chinese and English
  • let primitive table cells use Astryx Table's default overflow handling, restoring full-value tooltips for truncated model and tool names
  • preserve custom rendering for interactive session buttons and numeric alignment
  • add a UsageLongTail Storybook interaction covering full timestamps and overflow tooltips

Fixes #3675

Verification

  • npm --workspace @maka/desktop run typecheck
  • npx biome check apps/desktop/src/renderer/settings/usage-settings-page.tsx apps/desktop/stories/settings/settings-pages.stories.tsx
  • npm --workspace @maka/desktop run build:renderer
  • git show --check HEAD
  • manually verified the UsageLongTail story in Chinese and English
  • manually checked wide and narrow viewports; the narrow table remains horizontally scrollable

before
image
after
image

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex diagnosed the table rendering issue, implemented the fix and regression coverage, ran verification, and drafted the issue and PR text. The human contributor of record reviewed and owns the contribution.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope

First independent full review of exact head ed70f7f34265fec39f456226bb913f83937d5012.

I covered the request-table rendering change, the upstream settings:usageStatsSettingsStore.usageStats → stored session metadata path, all usage row shapes (model, tool, numeric, and interactive session cells), the long-tail Storybook coverage, and the exact-head CI result.

Findings

No P0–P3 findings in the covered scope.

The change keeps the existing UsageStats data authority intact and only changes how rows are mapped into Astryx Table: primitive cells use the table's default renderer (so truncate-mode tooltip behavior applies), while React elements such as session buttons retain a custom renderer. The fixed request-column widths and long-content story assertions cover the intended visibility regression without changing the underlying usage values or privacy boundary. I found no new exposure of request IDs, provider response fields, or secrets.

Verification

  • Exact-head CI test run 32694397282, job 97333713315: terminal success.
  • Changed-file Biome check: passed.
  • git diff --check: passed.

Evidence gap

The PR adds behavioral Storybook play assertions for width, full long-target text, and tooltip content, but no screenshot or visual artifact is attached. I record the missing visual artifact as an acceptance-evidence gap, not a code finding.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at head ed70f7f34265fec39f456226bb913f83937d5012.

This head already had a full independent review covering the request-table rendering change, the settings:usageStats to SettingsStore.usageStats to stored session metadata path, every usage row shape, and the Storybook coverage — with no P0-P3 findings and no open threads. That review was published as a comment rather than an approval, which is why the PR sat blocked; this converts it.

I also re-checked integration with the latest main before approving. Main has since touched settings-pages.stories.tsx, so the overlap is real, but a trial merge is clean and after merging neither usage-settings-page.tsx nor settings-pages.stories.tsx produces any renderer typecheck error. Hosted test is SUCCESS on this exact head.

简体中文

在 head ed70f7f34265fec39f456226bb913f83937d5012 上给出 approve。

这个 head 之前已经有过一次完整的独立复审,覆盖了 request 表格渲染改动、settings:usageStatsSettingsStore.usageStats → 会话元数据的整条路径、所有 usage 行形态以及 Storybook 覆盖,结论是 0 个 P0–P3,也没有未决线程。当时那次是以普通 comment 发布的,没有转成 approve,所以这个 PR 一直卡在 blocked——这次把它补上。

approve 之前我另外复核了它和最新 main 的集成:main 后来动过 settings-pages.stories.tsx,确实有重叠,但试合并干净,合并后 usage-settings-page.tsxsettings-pages.stories.tsx 都没有 renderer 类型检查错误。这个精确 head 上的 test 是 SUCCESS。

@Astro-Han

Astro-Han commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

LGTM, merging.

简体中文

LGTM,合并中。

@Astro-Han
Astro-Han merged commit a1c16e5 into apache:main Aug 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(desktop): expose full request values in usage statistics

2 participants