Add console.warn when calculateMessageCost encounters an unknown model,
so pricing.json gaps are visible rather than silently returning $0.
Update tests to expect the warning.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Visible Context panel's Session Cost only reflects the parent
session. Add "(parent only · view full cost)" label that links to
the Session Report where parent + subagent costs are shown.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the hardcoded MODEL_PRICING table and costUsd() function in
sessionAnalyzer.ts with calculateMessageCost() and getDisplayPricing()
from the shared pricing module. Re-export getDisplayPricing as getPricing
for backward compat with CostSection. Replace the ModelPricing interface
with a type re-export of DisplayPricing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create a unified pricing module in src/shared/utils/ that wraps
resources/pricing.json with typed lookup, tiered cost calculation,
and display pricing helpers. This is the foundation for consolidating
the dual cost calculation systems (main jsonl.ts + renderer sessionAnalyzer).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shared pricing module replacing dual cost calculation systems
(jsonl.ts hardcoded + sessionAnalyzer.ts LiteLLM) with a single
src/shared/utils/pricing.ts used by both main and renderer processes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Introduced MoreMenu component to consolidate less-frequent actions (Search, Export, Analyze, Settings) behind a dropdown menu.
- Removed individual action buttons from TabBar for a cleaner interface.
- Implemented functionality to close the menu on outside clicks and Escape key press.
- Extract SCROLL_THRESHOLD (300px) constant so auto-scroll hook and
scroll-button visibility logic stay in sync
- Extract CONTEXT_PANEL_WIDTH_PX (320px) constant to avoid layout drift
if the context panel width is ever adjusted
- Gate drag spacer on isElectronMode() && isLeftmostPane to match the
TabBar drag region logic and prevent unintended drag regions in
split-pane layouts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add toggle in settings to auto-expand AI response groups
- Auto-expand new AI groups on live session refresh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Includes scroll improvements:
- Scroll to bottom on session open and live auto-scroll
- Make auto-scroll StrictMode-safe via needsInitialScrollRef
- Add floating scroll-to-bottom button in chat view
Window drag fix:
- Apply drag region to leftmost pane TabBar regardless of sidebar state
- Cap tab list at 75% so drag spacer always has room
- Add explicit flex-1 drag spacer between tabs and action buttons
- Set WebkitAppRegion: no-drag on tab items for reordering
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Show "no commits" / "no lines changed" instead of "total cost ÷ 0"
when commitCount or linesChanged is zero.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Recompute totalInputTokens, totalOutputTokens, totalCacheCreation,
totalCacheRead, and grandTotal after injecting the "Subagents (combined)"
row so tokenUsage.totals stays consistent with byModel rows
- Fix CostSection import order: external packages before path aliases,
merge duplicate import type statements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Compute subagent cost from token breakdown instead of relying on
unpopulated proc.metrics.costUsd; extract actual model from subagent
messages for accurate pricing and mismatch detection
- Add aggregated "Subagents (combined)" row to cost table with arrow
navigation to the Subagents report section (no misleading breakdown)
- Filter <synthetic> model from token/cost tracking to eliminate zero rows
- Fix parseTestSummary to treat missing pass/fail count as 0 so clean
all-passing test runs are not dropped from trajectory analysis
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Intercept Ctrl+R/Cmd+R in before-input-event to prevent Electron's default page reload. Replace hardcoded macOS shortcut symbols with platform-aware helpers that show Ctrl+ on Windows/Linux.
Skip indexing and lookup when tool call/result IDs are missing to
prevent collisions on the empty-string key in toolCallIndex.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- getPricing: use tokenized order-insensitive matching so Claude 3 era
models (e.g. "claude-3-opus-20240229") correctly match pricing key "opus-3"
- sessionAnalyzer: skip isSidechain messages in parentCost loop to prevent
double-counting with processSubagentCost
- CostSection: disable row expansion when token stats are missing
- tabSlice: guard against undefined sessionId/projectId in openSessionReport
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add AssessmentBadge component with hover tooltips explaining thresholds
- Add Key Takeaways summary section surfacing top actionable findings
- Add cost attribution stacked bar and per-token calculation breakdowns
- Add clickable navigation from takeaways and tool errors to detail sections
- Add theme-aware assessment colors via CSS variables for light/dark mode
- Collapse lower-priority sections by default for progressive disclosure
- Replace all hardcoded color hex values with CSS variable references
- Fix missing Fragment key in CostSection model table
- Add defensive division-by-zero guard in stacked bar calculation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add interpretive assessment layer to session reports. Every metric section
now shows color-coded severity badges (green/amber/red) computed from
configurable thresholds, replacing raw numbers with instant signal.
Includes centralized reportAssessments utility, model mismatch detection,
switch pattern recognition, and 44 new tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 7 missing sections and fix 4 incomplete ones that the Python
analyzer generates but the TypeScript port was missing:
New sections: skillsInvoked, bashCommands, lifecycleTasks,
userQuestions, outOfScopeFindings, agentTree, subagentsList
Fixed: compaction (was just count, now has summaryCount + note),
serviceTiers removed (not available in parsed types),
compactionCount replaced with compaction object
Adds InsightsSection UI component and 8 new tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Port all analysis logic from the Python script to TypeScript, running
entirely in the renderer process. Produces a typed SessionReport from
a SessionDetail with: token/cost analysis, friction signals, idle gaps,
conversation tree metrics, test progression, and thrashing detection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>