Skip to content

Polish locale controls and quit flow#3

Merged
ssh4net merged 4 commits into
ssh4net:masterfrom
woffko:agent/locale-ui-controls
Jul 23, 2026
Merged

Polish locale controls and quit flow#3
ssh4net merged 4 commits into
ssh4net:masterfrom
woffko:agent/locale-ui-controls

Conversation

@woffko

@woffko woffko commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

This updates CoMon to version 0.4.3 and completes the locale-aware UI, mouse controls, chart readability, and safe quit
flow.

Locale-aware display modes

  • add the STYLE CLASS / SCOMP / SFULL mouse selector beside the Usage chart controls
  • preserve the existing Classic formatting
  • use regular-space digit grouping in System Full, for example 14 535 104 783
  • keep full values where they fit and compact only individual vertical chart labels that exceed their bar width

Chart improvements

  • show the current locale-aware date and time in the TODAY card border
  • show an exact locale-aware date and value tooltip when hovering over a filled vertical chart bar
  • keep dense monthly charts readable without changing the selected global display mode

System Full previously bypassed the vertical-label width check, causing oversized values to be truncated in narrow monthly
bars. Labels now fall back to compact notation only when their own bar is too narrow.

Mouse and navigation

  • add clickable screen tabs for Usage, Activity, Limits, and History
  • add mouse controls for metrics, timeframe, chart orientation, project count, and display style
  • keep the footer as a keyboard hint instead of a clickable control
  • retain compact, aligned control strips with consistent active-state styling

Quit flow

  • add a bottom-right QUIT action
  • show the same safe Yes/No confirmation for both QUIT and q/Q
  • visually invert QUIT while its confirmation dialog is active
  • add Don't show again to the exit dialog
  • persist the exit-confirmation preference in state.json
  • show the saved preference as [ ]/[✓] beside QUIT
  • ask for confirmation before the mouse checkbox enables or disables future exit prompts
  • keep Ctrl+C as the immediate exit path

Fork replay accounting fix

Forked Codex session files can contain a compressed replay of their parent session history.

The replay detector previously initialized its state from the timestamp inside the session_meta payload and immediately compared it with the outer
JSONL timestamp. When replay preparation took more than one second, that normal delay was mistaken for the end of the replay. Parent messages and
token totals were then counted again for every fork.

This change:

  • initializes replay tracking from the outer JSONL timestamp
  • prevents the initiating session_meta event from ending its own replay
  • keeps replay timestamps monotonic if an event timestamp moves backwards
  • preserves active replay state across incremental cached scans
  • adds cache schema v4
  • invalidates and reparses only cached forked sessions
  • preserves unaffected cache rows
  • avoids scanning old cache files twice during multi-version upgrades

Result

CoMon Usage screen with System Full formatting

image image image

The final UI keeps the screen tabs separate from the Usage controls, places display formatting after BARS VERT / HORZ,
and makes the active style and quit state visually consistent with the existing pill controls.

Validation

  • cargo fmt --all
  • git diff --check
  • cargo test — 71 passed
  • local release installation via scripts/install-user.sh

@ssh4net
ssh4net merged commit 4a0fa1d into ssh4net:master Jul 23, 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.

2 participants