Skip to content

Usage request log 任务 (Task) column shows a truncated session key, identical on every row #3832

Description

@liuxiaocs7

What happened

In Settings → 使用统计 (Usage) → 请求日志 (Request log), the 任务 (Task) column shows the same value on every row (e.g. 打开 ["9ce497).

The column is meant to identify which session each request/tool call belongs to. Instead it renders the first 8 characters of the desktop composite session key JSON.stringify([hostId, sessionId]). Those 8 characters are always [" + the first 6 chars of the per-install hostId, which is constant across the whole local workspace — so every row collapses to the identical 打开 ["<hostId prefix> regardless of session.

Expected: show the session name (the same title shown in the main sidebar).

Two smaller display issues in the same table:

  • The 状态 (Status) column is clipped at the right edge (only the first character shows).
  • The Task cell values are indented relative to their column header (not aligned with the other left-aligned columns).

How to reproduce

  1. Use the desktop app across a few different sessions so usage accrues.
  2. Open Settings → 使用统计 → 请求日志 and enable 详情记录 (detailed records).
  3. Observe the 任务 column: every row shows an identical 打开 ["<hostId prefix> value.
  4. Observe the right edge: the 状态 column is cut off.

Environment

  • Maka version or commit: main @ d2754b1 (built from source)
  • OS and version: macOS (Apple Silicon)
  • Surface: Desktop
  • Node.js version: >= 22.19.0

Logs, screenshots, or additional context

Root cause: apps/desktop/src/renderer/settings/usage-settings-page.tsx rendered the Task cell as row.sessionId.slice(0, 8), while the desktop layer projects each sessionId into the composite key via projectDesktopUsageStatsdesktopSessionKey (apps/desktop/src/shared/*). The underlying session name (SessionHeader.name) is available in the session metadata store but was never carried into UsageRequestLog.

(Before/after screenshots attached in a comment.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions