Skip to content

希望 用量 可以根据 日期、小时维度来自定义查询,估算价格 #2748

Closed as not planned

Description

@areskts

Area

CLI

What are you trying to accomplish?

希望 用量 可以根据 日期、小时维度来自定义查询,估算价格

What prevents this today?

希望 用量页面 可以根据 日期、小时维度来自定义查询,估算价格

What should OpenCodex do?

希望 用量页面 可以根据 日期、小时维度来自定义查询,估算价格

Example usage or interface

希望 用量页面 可以根据 日期、小时维度来自定义查询,估算价格

Alternatives or workarounds

No response

Additional context

No response

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. lidge-jun commented on Aug 27, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 50 / 80

    이 이슈는 현재 dev(HEAD 802f04adc, package.json 2.34.0)의 사용량 화면이 기간을 7일/30일/전체 세 버튼으로만 고르고, 날짜와 시간대를 직접 집어 조회하거나 그 구간의 추정 가격을 보고 싶다는 요청입니다. 본문은 같은 문장을 다섯 칸에 반복해서, 시작일·종료일·시간 칸·가격을 어디에 그릴지 같은 구체 요구는 없습니다. CLI 라벨이 붙어 있지만 문장은 사용량 페이지를 말하므로 대시보드 조회 UX 로 읽습니다.

    지금 화면(gui/src/pages/Usage.tsx)의 범위 타입은 "all" | "30d" | "7d" 입니다. 서버 src/usage/summary.ts 의 USAGE_RANGES 에는 "today" 가 이미 있는데 GUI 버튼에는 없습니다. 일별 그리드(UsageDay)는 날짜 문자열만 있고 시간 칸은 없습니다. 365일 히트맵과 최근 7일 막대도 날짜 단위입니다. 합계 카드 아래에는 summary.estimatedCostUsd 가 이미 찍힙니다. 가격 추정이 없는 것이 아니라, 사용자가 고른 임의 구간·시간대에 묶여 있지 않은 것입니다.

    관련 작업이 이미 열려 있습니다. 드래프트 #2365 는 #1820 의 캐시/가격 커버 필드를 서버 JSON 에 더하지만 GUI 표와 날짜 선택기는 건드리지 않습니다. #2700 은 CLI 가 accounts[] 를 안 찍는 표시 갭이고, #2699 는 OAuth 계정 라벨입니다. 이 이슈는 그들과 범위가 다릅니다. types.ts/config.ts 분할로 닫을 대상이 아닙니다. 미리보기 배포는 계획에 없습니다.

    gui/src/pages/Usage.tsx:14 - Range 타입이 all/30d/7d 뿐이라 사용자 지정 날짜가 들어갈 자리가 없습니다
    gui/src/pages/Usage.tsx:253 - 필터 버튼이 그 세 값만 그립니다
    src/usage/summary.ts:14 - 서버 USAGE_RANGES 는 today/7d/30d/all 이고 GUI 와 어긋납니다
    src/usage/summary.ts:46 - UsageDay 는 date 만 있고 hour 버킷이 없습니다
    gui/src/pages/Usage.tsx:302 - 추정 비용은 이미 합계에 있습니다. 가격 요청은 커스텀 구간에 묶는 쪽에 가깝습니다
    경로/심볼 GET /api/usage - 프리셋 range 만 받습니다. since/until 쿼리를 화면이 보내지 않습니다
    경로/심볼 #2365 - 캐시/가격 필드이지 날짜·시간 선택기가 아닙니다. 한 PR 로 묶지 마세요

    메인테이너의 판단이 필요한 지점

    너의 추천
    열어 두세요. 다음 PR 은 GUI 에 시작일·종료일(로컬 날짜)만 넣고 GET /api/usage 가 그 구간을 서버에서 자르도록 하는 쪽이 안전합니다. 시간 버킷은 로그 타임스탬프를 hour 로 묶는 후속입니다. 가격은 이미 있는 estimatedCostUsd 를 그 필터에 태우면 됩니다. #2365 와 합치지 마세요. 태그/퍼블리시는 하지 마세요.

    이 댓글은 grok-bot이 작성했습니다

  2. lidge-jun commented on Sep 3, 2026

    @lidge-jun
    Owner

    Closing in favor of #3379, which carries the remaining scope forward.

    Thank you @areskts — the request for 按日期、小时维度自定义用量查询与价格估算 is valid and still unimplemented.

    Verified current state. Confirmed: gui/src/pages/Usage.tsx supports only 7d / 30d / all. Cost estimation itself exists (src/usage/summary.ts), but it cannot be scoped to a custom interval and there is no hourly bucketing.

    Three open dashboard requests share one shape: the page already shows the data but offers no control over it. #3379 states all three concretely, names this issue, and credits you for the original analysis.

    Please follow #3379; if the consolidation lost a detail you asked for, say so there and it will be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCLI, config inject, packaging flagsenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions