Merged
Conversation
Fetches checkpoint and commit data from /api/v1/stats/* endpoints and renders a terminal dashboard with: - Stat cards (throughput, iteration, continuity, streak) - Agent breakdown with colored percentage bullets - Repository bar chart with agent-colored segments - Recent commits grouped by day with diff stats and agent badges API calls run concurrently via errgroup. Computation logic mirrors the entire.io frontend (computeStats, computeStreaks, computeRepoData). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 36f80db38d98
29 test cases covering: - computeContributionStats: throughput, iteration (session_count not steps), continuity (max steps), nil field defaults, empty input - computeStreaks: basic, dedup, invalid timestamps, gap detection - normalizeAgentString: 19 agent name variations incl. Factory AI Droid - groupCommitsByDay: sort order, unknown dates forced last - uniqueCommitAgents: Agents slice, singular Agent fallback, dedup - renderStatCards, renderCommitList, renderRepoChart: label content, singular/plural wording, nil messages, repo count limit - formatCommitDate: today/yesterday/older/future/invalid - padOrTruncate: padding, truncation, unicode safety Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 62669b9b3155
- Use full terminal width instead of 80-char cap for bar charts and stat cards (adds getFullTerminalWidth separate from the shared getTerminalWidth used by other commands) - Add bubbletea TUI: fixed header (stat cards, agent breakdown, repo chart) with scrollable viewport for the full commit list - Show all commit days in the viewport instead of limiting to 3 - Fall back to static output when piped or ACCESSIBLE=1 - Footer shows scroll controls and percentage Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 5f2dd505ea2a
Move +N / -N, file count, and checkpoint count from a separate indented line to the right side of the commit line. Pads with spaces to push stats to the terminal edge, truncating the commit message if needed to fit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: f0ae68985a99
Renders checkpoint activity as a braille-dot scatter plot with date on the x-axis and hour-of-day on the y-axis. Bubble size scales with step count (radius 0/1/2 for small/medium/large). Each dot colored by dominant agent. Replaces the text-only agent breakdown with chart + integrated legend. Uses Unicode braille characters (U+2800-U+28FF) for 2x4 sub-cell resolution per character, giving ~24-hour vertical resolution across 6 character rows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 1d803aa74220
Adds renderDotChart (Option A) using sized Unicode circles (· • ● ⬤) in 4 hour-bands, colored by agent. This is now the active chart via renderContributionChart. The braille chart (Option B) is retained but inactive — swap the call in renderContributionChart to switch between them. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 1b9efec1512f
Increase statsLimit from 500 to 1000 to capture more activity for heavy users. Add repo name as tie-breaker in sort to prevent nondeterministic ordering when repos have equal checkpoint counts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 3543f82ad7ef
Move API fetching into the bubbletea model so the TUI starts immediately with an animated spinner. Data loads in the background and the view transitions to the dashboard when ready. Errors display inline with a quit hint. The static (piped/accessible) path retains its own fetch-then-render flow via runStatsStatic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: abc114e83cfa
Replace ANSI 256 approximations with exact hex values from the entire.io CSS (Tailwind 400-level dark-mode variables). Lipgloss auto-downgrades to the best match for the terminal's color profile. claude=#fb923c gemini=#60a5fa amp=#f87171 codex=#818cf8 opencode=#22d3ee copilot=#a78bfa pi=#fbbf24 cursor=#38bdf8 droid=#f472b6 kiro=#c084fc Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 55b23513d6cf
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new entire activity command that fetches checkpoint/commit stats from the Entire API and renders them as either an interactive Bubble Tea dashboard (TTY) or a static text report (non-interactive / accessible mode).
Changes:
- Introduces
activityCobra subcommand with concurrent API fetching and static/TUI rendering paths. - Adds stats domain types plus rendering + computation helpers for cards/charts/commit list.
- Adds unit tests for stats computations and rendering behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Promotes golang.org/x/sync to a direct dependency (for errgroup). |
| cmd/entire/cli/strategy/manual_commit_condensation.go | Minor comment tweak for summary generator nil-safety note. |
| cmd/entire/cli/stats_types.go | Defines API response structs and computed/rendering types for stats. |
| cmd/entire/cli/stats_cmd.go | Implements entire stats command, API fetch, and stats computations. |
| cmd/entire/cli/stats_tui.go | Implements Bubble Tea TUI (spinner + viewport) and TUI styles. |
| cmd/entire/cli/stats_render.go | Implements static rendering: stat cards, contribution chart, repo chart, commit list. |
| cmd/entire/cli/stats_cmd_test.go | Tests stats computations (throughput/iteration/continuity/streaks, grouping, parsing, formatting). |
| cmd/entire/cli/stats_render_test.go | Tests rendering utilities (labels, pluralization, truncation behavior, repo limits, etc.). |
| cmd/entire/cli/root.go | Registers stats command in the root CLI. |
Switch from solid █ to ▓ (dark shade) for agent bar chart segments. Gives a textured/dithered look while keeping the agent colors clearly visible. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 46f969b38baf
Entire-Checkpoint: 4399468be4c3
Entire-Checkpoint: e1ee10d24fc6
evisdren
previously approved these changes
Apr 21, 2026
gtrrz-victor
previously approved these changes
Apr 22, 2026
Contributor
|
Merge it! Merge it!! |
The API now aggregates stats, repo breakdown, and hourly contributions server-side given an IANA timezone, so the CLI no longer needs to fetch raw checkpoints and recompute everything. Drops ~290 lines of client-side compute (stats, streaks, repo rollup, hourly grouping). Also renames /api/v1/stats/commits to /api/v1/me/commits and swaps the CONTINUITY stat card (peak session length, derived from per-checkpoint steps) for ORCHESTRATION (agent step density, returned directly by the new endpoint). Adds detectTimezone helper (checks TZ env, then /etc/localtime, falls back to UTC). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 1777e243d88a
TZ env var isn't guaranteed to be an IANA zone name. Shell settings like TZ=:America/New_York, TZ=/usr/share/zoneinfo/America/New_York, and POSIX forms like TZ=UTC0 would have been forwarded verbatim and made the new endpoint 400 or mis-bucket the request. normalizeTimezone strips the POSIX ":" prefix and zoneinfo path prefix, then checks the result loads via time.LoadLocation so only IANA-valid names (including legacy aliases like EST5EDT that Go and ICU both accept) reach the API. Anything else falls through to UTC. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 1bed72ec14b9
The previous commit overclaimed: normalizeTimezone does not guarantee IANA-only output, and detectTimezone does not fall straight to UTC on a bogus TZ. What it actually does: - normalizeTimezone accepts anything time.LoadLocation can load, which includes legacy aliases (EST5EDT, GMT0, PST8PDT) that Go ships as zoneinfo files. These may or may not be canonically understood by the server. - detectTimezone walks $TZ → /etc/localtime → time.Local → "UTC". A value that fails normalization is skipped, not coerced to UTC; a bogus TZ on a correctly-configured host still yields the system timezone from /etc/localtime. The server is the canonical authority and falls back to UTC for zones it doesn't recognize, so this mild mis-bucketing risk is accepted. Updates doc comments and test commentary to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: c1e27901075e
The backend added two fields to /api/v1/me/activity: - `stats.lifetime_streak` / `stats.lifetime_current_streak`: streaks over the last 365 days, independent of the `timeframe` param. - `stats.continuity_hours`: peak session length (the metric previously dropped in favor of orchestration). Switches the CLI to read those fields so the stat cards match what the web dashboard shows: STREAK is now lifetime-scoped (so it stops drifting down with short timeframes), and the third card reverts from ORCHESTRATION back to CONTINUITY. The timeframe-scoped `streak` and `orchestration` fields stay available on the response struct for future use. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 39cc3312d096
078dc26
pjbgf
approved these changes
Apr 22, 2026
gtrrz-victor
added a commit
that referenced
this pull request
Apr 23, 2026
main is currently broken — PR #999 (`Add entire activity`) merged with an unresolved reference to `isTerminalWriter` in activity_cmd.go, which doesn't exist in the cli package. The sibling call sites (status_style.go, search_cmd.go, explain.go) correctly use the exported interactive.IsTerminalWriter helper. Apply the same qualification here. Entire-Checkpoint: 4cb94a44f29b
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://entire.io/gh/entireio/cli/trails/64d261c6966b
Summary
entire activitycommand — an interactive terminal dashboard showing checkpoint activity, mirroring the entire.io/overview page/api/v1/stats/checkpointsand/api/v1/stats/commitsconcurrently, with an animated spinner during loadingWhat it looks like
Test plan
mise run checkpasses (fmt + lint + test:ci)go run ./cmd/entire activity | headfalls back to static non-interactive modeACCESSIBLE=1 go run ./cmd/entire activityuses static outputgo run ./cmd/entire activitywithout login shows friendly errorNote
Medium Risk
Adds a fairly large new CLI surface area (TUI rendering + concurrent API calls) that could affect terminal behavior and error handling, but it is mostly additive and covered by unit tests.
Overview
Adds a new
entire activitycommand that fetches per-user checkpoint and commit activity from the/api/v1/stats/checkpointsand/api/v1/stats/commitsendpoints and presents an overview of throughput/iteration/continuity/streak, contribution heatmap, top repos, and recent commits.The command supports both an interactive Bubble Tea TUI (spinner + resizable/scrollable view using full terminal width) and a non-interactive static renderer for piped output or
ACCESSIBLEmode, along with new API response/types, agent normalization, and a comprehensive test suite for the computation/rendering helpers. Also promotesgolang.org/x/syncto a direct dependency and makes a small comment tweak inbuildSummaryGenerator.Reviewed by Cursor Bugbot for commit ba45cf0. Configure here.