Skip to content

feat: session resume/copy/delete + quota display options & resilience - #43

Merged
Carl723000 merged 2 commits into
ClaudeCodeUsage:mainfrom
oxsean:feat/session-actions-and-quota-options
Jun 30, 2026
Merged

Carl723000 merged 2 commits into
ClaudeCodeUsage:mainfrom
oxsean:feat/session-actions-and-quota-options

Conversation

@oxsean

@oxsean oxsean commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Implements the requests in #40, plus some surrounding hardening.

  • Sessions tab — row actions. Copy the session id, copy the project path,
    resume (the official Claude Code extension for a same-project session, or a
    terminal claude --resume <id> for cross-project ones), and delete (moves
    the session's .jsonl + sub-agent dir to the OS trash, behind a modal confirm).
    Plus a Current project / All filter (default Current).
  • Quota display options (⚙ Settings): quotaFiveHourOnly (5-hour window only)
    and showResetInStatusBar (append the reset countdown, e.g. 5h:50%:2.3h). To
    hide cost, the existing statusBarMetric: tokens already covers it.
  • Quota resilience. The last /usage result is cached to disk and painted on
    startup before any fetch; on a 429 the fetch backs off exponentially instead of
    hammering the endpoint; a 30 s floor after a success avoids an immediate refetch
    when a window has just rolled.
  • Dashboard. Detail page widened to 1600 px; expanded sub-project rows are
    indented; status-bar-only setting changes apply without a full reload; the
    active tab is remembered in localStorage across refreshes.

New sessionResume.ts pure helpers (strict id validation, absolute-cwd /
under-dir checks, resume-command builder) with node:test coverage.

Compile clean; 16/16 node:test green.

Addresses #40.

- **Sessions tab actions** — copy the session id / project path, resume (official
  Claude Code extension for a same-project session, terminal `claude --resume`
  otherwise), delete (to OS trash, with a modal confirm), and a Current project /
  All filter.
- **Quota display** — `quotaFiveHourOnly` and `showResetInStatusBar`
  (e.g. `5h:50%:2.3h`) settings; hide cost via the existing `statusBarMetric: tokens`.
- **Quota resilience** — last `/usage` cached to disk and shown on startup; 429
  exponential back-off; a 30 s floor after a success.
- **Dashboard** — 1600 px width, indented sub-projects, status-bar settings apply
  without a full reload, and the active tab is kept in localStorage across refreshes.

Compile clean; 16/16 node:test green.
@oxsean
oxsean requested review from Carl723000 and jack21 as code owners June 27, 2026 05:59
@oxsean

oxsean commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor Author
CleanShot 2026-06-27 at 14 01 19 CleanShot 2026-06-27 at 14 02 35

@oxsean
oxsean force-pushed the feat/session-actions-and-quota-options branch from 649eb02 to 17076a7 Compare June 29, 2026 03:17
… clean format

Resolves the conflicts from ClaudeCodeUsage#41 (monthly-cost metric) and brings in ClaudeCodeUsage#46
(third-party pricing). Replaces this PR's dense quota text
(`5h:50%:2.3h | wk:1%`) with the shared, unit-tested formatter in
quotaFormat.ts so the status bar default stays the airy `5h 6% · wk 1%`;
`quotaFiveHourOnly` / `showResetInStatusBar` still work, reset detail stays
in the tooltip. Keeps oxsean's robust liveWindows()/roll() stale-window
handling and the modal-confirm + move-to-trash session delete unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
@Carl723000

Carl723000 commented Jun 30, 2026 •

Copy link
Copy Markdown
Collaborator

@oxsean 我直接在分支上做了两处小改动来让它能干净地并进 2.1.1:

把 main 合了进来解掉冲突(#41 的 monthly-cost、#46 的定价),并把状态栏配额文案接到了我们共享的 quotaFormat.ts —— 默认保持留白的 5h 6% · wk 1%,quotaFiveHourOnly / showResetInStatusBar 照常工作,完整重置时间留在 tooltip。

你写的 liveWindows 过期窗口处理和「确认 + 回收站」的删除都原样保留。编译干净、测试通过。感谢这个 PR,含金量很高!

@Carl723000 Carl723000 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM — reconciled the quota format and merged main; shipping in 2.1.1.

@Carl723000
Carl723000 merged commit 0dc028b into ClaudeCodeUsage:main Jun 30, 2026
1 check passed
Carl723000 added a commit to henrique-carvalho-dev/ClaudeCodeUsage that referenced this pull request Jun 30, 2026
Brings in ClaudeCodeUsage#43 (session actions + clean quota), ClaudeCodeUsage#46 (pricing), ClaudeCodeUsage#47
(account-switch fix). Adds the pt-BR translations for the session-row
action strings ClaudeCodeUsage#43 introduced (copy id / copy path / resume / delete +
filters) so the pt-BR locale stays complete.

Co-Authored-By: Claude <noreply@anthropic.com>
Carl723000 added a commit that referenced this pull request Jun 30, 2026
- Bump version to 2.1.1.
- CHANGELOG: date [2.1.0] as 2026-06-26 (released) and gather the post-2.1.0
  work under a new [2.1.1] section — monthly cost (#41), session actions +
  clean quota + resilience + wider dashboard (#43), pt-BR (#48), account-switch
  fix (#45), third-party pricing accuracy (#46).
- gitignore the whole docs/ tree (local-only planning context pack; synced to a
  personal repo, never shipped here).
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.

2 participants