Commit 5513156
feat: entire recap command (#1015)
* feat(recap): introduce entire recap command and package
Introduces the 'entire recap' CLI command that shows checkpoint activity
across day/week/month/90d ranges. Local session loading, api enrichment
cache, view builder, heatmap, badges, aggregators, contributors fetch
from the repo-overview endpoints, TUI + static renderers.
This is the baseline from which follow-up commits wire /api/v1/me/recap,
redesign the visual layout with comparison bars, and add the view toggle.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: a8b9ab719bdc
* feat(recap): wire CLI to /api/v1/me/recap endpoint
Pairs with entirehq/entire.io#1604. Prefers the consolidated /me/recap
endpoint when available; falls back to the three-endpoint stack when
the server doesn't have /me/recap yet.
- Adds me_recap.go with FetchMeRecap, TimeframeForRange, and
ContributorsFromMeRecap for the fast-path client.
- Adds stampRepos so cp.Repo is populated for local checkpoints.
- Adds hasUsefulSignal to invalidate cache entries with empty payloads.
- Adds AnalysisStatusComplete guard in EnrichCheckpoint to skip pending
or failed rows instead of poisoning the cache with blanks.
- Adds SkillsUsed/MCPServers to RecapCheckpoint + CheckpointAnalysisResponse.
- Threads Notes diagnostic footer through View.
- JSON-tags LabelCount so musttag accepts it in decode paths.
- Uses repoUnknown constant in aggregate_test.go (goconst fix).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 0de0ce0a0421
* feat(recap): remove --30 flag and Range30d enum
--30 rolling-30-days overlaps with --month (this calendar month) for
practical purposes. Range30d had no persisted state (feature hasn't
shipped), so no migration needed. Users who type --30 get cobra's
native unknown-flag error with suggestion pointing at --90 or --month.
Spec: docs/2026-04-22-entire-recap-visual-redesign-design.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 0d929f3248b7
* fix(recap): include recap_view.go in Range30d removal (pre-commit hook miss)
Entire-Checkpoint: c9967a53a49b
* feat(recap): add team style + renderComparisonBar primitive
Spec: docs/2026-04-22-entire-recap-visual-redesign-design.md §Agents panel spec
Plan Chunk 2.
Adds:
- team lipgloss style (magenta 170, bold) for contributors column accent
- renderComparisonBar(you, team, width, styles) primitive with 9 TDD tests
covering: you>team, team>you, equal (striped), one-sided (both directions),
tiny-vs-huge rounding floor, both-zero drop, narrow/wide width clamping.
No wiring yet — Chunk 5 will integrate this into the agents card.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 4db4bb19673f
* fix(recap): restore barMinWidth=12 per spec
The Equal test was using width=10 which contradicted the spec's min=12.
Keep the spec constant and update the test to use width=12 (and expect
6+6 striped cells, not 5+5).
Entire-Checkpoint: 8968e65373ea
* feat(recap): rewrite summary panel (you/team/top/context)
Spec: docs/2026-04-22-entire-recap-visual-redesign-design.md §Summary
Plan Chunk 3.
Drops the Top agent / Top skill / Focus / Top model placeholder rows.
New top line reflows when signals are empty; disappears when all four
are empty. You/team split mirrors the Agents panel framing.
Moves summary rendering into its own file.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9837c81fcc5a
* feat(recap): pad activity strip + add peak annotation
Spec: docs/2026-04-22-entire-recap-visual-redesign-design.md §Activity
Plan Chunk 4.
Renders every cell (including zero days) so the strip fills its full
width. Anchors rightmost to today. Adds 'most active: <time>'
annotation to the top-right (hourly for --day, 'Jan 2' for longer
ranges). Moves activity rendering into its own file.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 780df16ce84f
* feat(recap): rewrite agents card with bars + view toggle
Spec: docs/2026-04-22-entire-recap-visual-redesign-design.md §Agents
Plan Chunk 5.
Per-agent card now has 3 bar rows (tokens/sessions/checkpoints) +
team qualitative block + your qualitative block, each skipped when
irrelevant. Drops MCP servers and Distinct contribs per spec.
Alphabetical tie-break on combined-sessions sort for snapshot
determinism. Panel-level you/team legend replaces per-card headers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9abf315e5966
* feat(recap): drop bottom panel (worktrees · labels · repos)
Spec: docs/2026-04-22-entire-recap-visual-redesign-design.md §Page composition
Plan Chunk 6.
Labels already inside agent cards (team labels rows). Repos inside agent
cards too (your repos). Worktrees adds no daily value. Three-panel output
(summary → activity → agents) is the new shape.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: ee3fef263e39
* feat(recap): add v keybinding to cycle view mode in TUI
Spec: docs/2026-04-22-entire-recap-visual-redesign-design.md §Header bar
Plan Chunk 7.
Cycles ViewBoth → ViewMe → ViewContributors → ViewBoth.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 83ad8e15f554
* feat(recap): readout-only fallback for narrow terminals
Spec: docs/2026-04-22-entire-recap-visual-redesign-design.md §Minimum
terminal width. Plan Chunk 8.
When the bar drops below barMinWidth (12 cells) the primitive returns
empty; the card row renders just the numeric readout. Preserves
usability on <70-col terminals.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 07f7775d23d8
* fix(recap): session-level tokens, dedupe title, weight top-agent by checkpoints
- Tokens now read from s.TokenUsage (session-level) instead of the
always-nil cp.TokenUsage. projectCheckpoint in load.go intentionally
leaves cp.TokenUsage unset; the aggregators hadn't been updated.
- renderSummaryBand no longer duplicates the range title — renderPanel
already shows view.Title, so the inner title line was a double.
- Top-agent calculation now weights each session by 1 + len(Checkpoints)
so an agent with 23 sessions but 0 checkpoints doesn't outrank one
with 15 sessions and 106 checkpoints.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: a6117ab65f84
* refactor(recap): drop legacy contributors fallback now that /me/recap ships
Removes FetchContributors and the three-endpoint merge stack
(agent-activity + contributor-agents + contributor-tokens) since
the consolidated /api/v1/me/recap endpoint landed in
entirehq/entire.io#1604.
Keeps ContributorsData + AgentContrib as the shared shape — still
used by the me_recap.go adapter and the view renderer.
Entire-Checkpoint: 95a5057707a2
* fix(recap): match mockup — wire team qualitative rows + label dots
- applyContributors was dropping ContribLabels/Skills/ToolMix from the
/me/recap response; those fields now flow into AgentCard so team
labels/skills/tool mix rows actually render.
- Labels use the mockup's ● bullet with semantic color instead of
'<label> <pct>%' — the percentage was noise.
- Agents panel title now includes the range ('Agents · 90d', etc.)
per the mockup.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 77908e4c5ac6
* refactor(recap): drop dead code + register recap in root.go
Removes 4 unused aggregators (AggregateRange, AggregateByDay,
AggregateByAgent, AggregateByRepo) and the 4 summary types that only
they consumed (RecapRangeSummary, RecapAgentSummary, RecapRepoSummary,
RecapDay). Drops heatmap.go entirely (4 unused exports left from an
abandoned local heatmap path) and tool_categorize.go (unused local
tool-time classifier now that tool-time comes from the server).
Also fixes a missed registration: newRecapCmd() was never wired into
root.go in the prior foundation commit, so `entire recap` wouldn't
appear in --help or execute. Adds the one-line AddCommand.
Net -674 lines in the recap package.
Entire-Checkpoint: 97097f304a34
* feat(recap): wire me-side server data through view + TUI
The team-side aggregates (labels, skills, tool mix) already flowed from
/api/v1/me/recap into the agents card via b15d9d4. This mirrors the
same plumbing on the me-side so the user's own row matches the dashboard
counts instead of being recomputed from local checkpoint state.
What changes:
- AgentCard gains MeLabels / MeSkills / MeToolMix, populated by a new
applyServerMe pass that overlays /me/recap's me-side aggregates on
the locally-bucketed cards.
- recap.go's fetchContributorsWithDiag becomes fetchRecapDataWithDiag,
returning (serverMe, contributors, daily, diag) in one round trip
with explicit since/until bounds derived from the CLI's range —
replacing the looser TimeframeForRange handoff.
- BuildOpts gains ServerMe + ServerDaily; runRecapTUI/NewTUIModel
thread them through so the v / 1-4 keybindings can rebuild the view
from the cached fetch instead of re-hitting the server.
- me_recap.go gains MeFromMeRecap, parallel to ContributorsFromMeRecap.
The static + activity renderers prefer server daily counts when
available, falling back to local aggregation when offline.
- Two new tests pin formatToolMix's normalization of raw category
counts to top-3 percentage bars.
Pairs with entirehq/entire.io#1604 (now perf-fixed via Promise.all).
MCP servers stay deliberately unrendered per c990a5e.
Entire-Checkpoint: d69c684aa89d
* fix(recap): wrap TUI in viewport so output scrolls instead of clipping
The three-panel rendered output (summary + activity strip + agents card)
regularly exceeds the visible terminal height, especially when the agents
card lists 4+ agents with bars and qualitative rows. The previous
TUIModel handed the full string straight to bubbletea, which clipped at
the bottom and offered no scroll affordance — users had to shrink their
terminal font to see the rest.
Wraps the rendered body in a bubbles `viewport.Model`:
- ↑/↓, j/k, page up/down, mouse wheel scroll within the rendered output
- Help line stays pinned outside the viewport so the keybind hint is
always visible regardless of scroll position
- Range/agent/view-mode toggles refresh viewport content and snap scroll
back to the top so the summary is always seen first
- Pre-WindowSizeMsg renders a static fallback for the brief flash before
bubbletea sends the initial size; viewport takes over on first message
Mirrors the viewport pattern already used in activity_tui.go.
Entire-Checkpoint: 7f3827580375
* perf(recap): prefetch all ranges in parallel + clear stale data on miss
Range toggles (d/w/m/4) used to either show frozen day-1 data (server
fields cached forever) or display the previous range's numbers under
the new range's title (after we added refetch but before we cleared
stale fields). This wires the TUI through a proper cache:
- On startup, seed cache[initialRange] with the synchronous fetch's
payload, then fire prefetches for the other 3 ranges in parallel via
tea.Batch. After ~1-5s background round-trip every range toggle is
a cache hit.
- On range toggle: cache hit -> swap data, instant render. Cache miss
with no in-flight fetch -> clear server fields (so we don't display
the previous range's numbers under the new title), mark loading,
fire the fetch. Cache miss with in-flight fetch -> mark loading and
wait for the existing reply.
- Active days now reads from server daily counts when present, matching
the dashboard cross-worktree count instead of undercounting from
local sessions.
Pairs with entirehq/entire.io#1604 server-side perf work.
Entire-Checkpoint: 8ac353ca5a57
* style(recap): gofmt tui.go field alignment
CI's gofmt check caught struct field misalignment in TUIModel that
my local lint missed (we'd run gofmt -s -w on a formatted tree, but
this section needed re-alignment after the cache+inFlight fields were
added). gofmt -s -d output was empty locally yet CI rejected; rerunning
gofmt -w produced this 3-line whitespace fix.
Entire-Checkpoint: 288a91aff142
* Refactor recap to server-backed static renderer
Entire-Checkpoint: beb9e66203f5
* Allow intentional interface returns
* Color recap labels and skills
* Fix concurrent session state saves
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 242275a commit 5513156
13 files changed
Lines changed: 1327 additions & 43 deletions
File tree
- cmd/entire/cli
- recap
- session
- strategy
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
0 commit comments