Skip to content

Revert PRs #60, #65, #73 and clarify project scope#87

Merged
matt1398 merged 7 commits intomainfrom
revert/pr-60-65-73
Feb 26, 2026
Merged

Revert PRs #60, #65, #73 and clarify project scope#87
matt1398 merged 7 commits intomainfrom
revert/pr-60-65-73

Conversation

@matt1398
Copy link
Owner

@matt1398 matt1398 commented Feb 26, 2026

Summary

Why

These PRs introduced large custom features (session report tab, pricing JSON blob, cost
calculation engine) that fall outside the core purpose of claude-devtools — providing
visibility into Claude Code's actual session data, not generating derivative analysis on
top of it.

Specifically:

Going forward, we're prioritizing stability and parity with Claude Code over
scope-expanding features. The updated CONTRIBUTING.md now documents this philosophy
explicitly so future contributors have clear guidance before starting work.

What changed

Test plan

  • pnpm typecheck passes
  • pnpm test passes
  • pnpm build succeeds
  • App launches and existing features (session view, context panel, etc.) work normally

Summary by CodeRabbit

  • Features Removed

    • Session cost tracking and USD cost displays removed across the UI.
    • Full session analysis/reporting UI (report tab and all report sections) removed.
    • Assessment badges and related severity styling removed.
  • Tests

    • Removed tests for cost/pricing, session analysis, and assessment utilities.
  • Chores

    • Removed optional prebuild pricing fetch and packaged pricing resource.
  • Documentation

    • CONTRIBUTING updated with a new Project Philosophy & Scope and expanded prerequisites.

matt1398 and others added 5 commits February 26, 2026 14:25
…ation"

This reverts commit 68f16bb, reversing
changes made to 3749d7e.
…report"

This reverts commit 6264ec5, reversing
changes made to 58c979f.
This reverts commit 58c979f, reversing
changes made to 9629c0a.
The MoreMenu component (from PR #71) referenced openSessionReport
which was introduced by PR #60. Remove the dangling reference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n guidelines

Added a section outlining the project's philosophy, priorities, and scope, emphasizing the focus on context visibility and stability. Included guidelines for contributions to ensure alignment with the project's roadmap.
@gemini-code-assist
Copy link

Summary of Changes

Hello @matt1398, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refines the project's direction by reverting several previously introduced features, specifically the session analysis reports, related export options, and the unified cost calculation engine. The primary motivation is to align the application more closely with its core mission of providing direct visibility into Claude Code's session data, rather than expanding into derivative analysis or complex custom features that add maintenance overhead. Concurrently, new guidelines have been added to the contribution documentation to explicitly define the project's philosophy and scope, promoting stability and direct integration with Claude Code's capabilities.

Highlights

  • Feature Reversion: Reverted Pull Requests feat: session analysis report with assessment badges #60 (session analysis report), feat: add cost calculation metric #65 (export dropdown), and Unify cost calculation with shared pricing module #73 (unified cost calculation) to streamline the project's focus.
  • Project Scope Clarification: Added a new 'Project Philosophy & Scope' section to CONTRIBUTING.md to provide clear guidance for future contributions, emphasizing stability and parity with Claude Code.
  • Removal of Session Analysis & Cost Calculation: Completely removed the session analysis report feature, including its UI components, underlying logic, pricing data fetching, and all associated cost calculation and display functionalities throughout the application.
Changelog
  • CONTRIBUTING.md
    • Added a new 'Project Philosophy & Scope' section to guide future contributions.
  • package.json
    • Removed the 'prebuild' script for fetching pricing data.
    • Removed the 'extraResources' entry for pricing.json.
  • scripts/fetch-pricing-data.ts
    • Removed the script responsible for fetching model pricing data.
  • src/main/types/chunks.ts
    • Removed the costUsd property from the EMPTY_METRICS object.
  • src/main/utils/jsonl.ts
    • Removed the import for calculateMessageCost.
    • Removed cost calculation logic from calculateMetrics and hardcoded costUsd to 0.
  • src/renderer/components/chat/AIChatGroup.tsx
    • Removed cost-related variables and props from the AIChatGroupInner component.
  • src/renderer/components/chat/ChatHistory.tsx
    • Removed openSessionReport from store usage.
    • Removed subagentCostUsd calculation and related props from SessionContextPanel.
  • src/renderer/components/chat/SessionContextPanel/components/FlatInjectionList.tsx
    • Updated text formatting for displayText.
  • src/renderer/components/chat/SessionContextPanel/components/SessionContextHeader.tsx
    • Removed import for formatCostUsd.
    • Removed all cost and report-related props and rendering logic.
  • src/renderer/components/chat/SessionContextPanel/index.tsx
    • Removed cost and report-related props from SessionContextPanel.
  • src/renderer/components/chat/SessionContextPanel/types.ts
    • Removed SessionMetrics, subagentCostUsd, and onViewReport from SessionContextPanelProps.
  • src/renderer/components/chat/items/linkedTool/renderHelpers.tsx
    • Added a trailing comma in extractOutputText for formatting.
  • src/renderer/components/common/TokenUsageDisplay.tsx
    • Removed import for formatCostUsd.
    • Removed costUsd prop and its display logic.
  • src/renderer/components/layout/MoreMenu.tsx
    • Removed the 'Analyze Session' menu item and its associated icon and logic.
  • src/renderer/components/layout/PaneContent.tsx
    • Removed the SessionReportTab component and its rendering logic.
  • src/renderer/components/layout/SortableTab.tsx
    • Removed the Activity icon import.
    • Removed the 'report' tab type from TAB_ICONS.
  • src/renderer/components/report/AssessmentBadge.tsx
    • Removed the AssessmentBadge component.
  • src/renderer/components/report/ReportSection.tsx
    • Removed the ReportSection component.
  • src/renderer/components/report/SessionReportTab.tsx
    • Removed the SessionReportTab component.
  • src/renderer/components/report/sections/CostSection.tsx
    • Removed the CostSection component.
  • src/renderer/components/report/sections/ErrorSection.tsx
    • Removed the ErrorSection component.
  • src/renderer/components/report/sections/FrictionSection.tsx
    • Removed the FrictionSection component.
  • src/renderer/components/report/sections/GitSection.tsx
    • Removed the GitSection component.
  • src/renderer/components/report/sections/InsightsSection.tsx
    • Removed the InsightsSection component.
  • src/renderer/components/report/sections/KeyTakeawaysSection.tsx
    • Removed the KeyTakeawaysSection component.
  • src/renderer/components/report/sections/OverviewSection.tsx
    • Removed the OverviewSection component.
  • src/renderer/components/report/sections/QualitySection.tsx
    • Removed the QualitySection component.
  • src/renderer/components/report/sections/SubagentSection.tsx
    • Removed the SubagentSection component.
  • src/renderer/components/report/sections/TimelineSection.tsx
    • Removed the TimelineSection component.
  • src/renderer/components/report/sections/TokenSection.tsx
    • Removed the TokenSection component.
  • src/renderer/components/report/sections/ToolSection.tsx
    • Removed the ToolSection component.
  • src/renderer/index.css
    • Removed CSS variables for assessment severity colors.
  • src/renderer/store/slices/tabSlice.ts
    • Removed the openSessionReport function.
  • src/renderer/types/sessionReport.ts
    • Removed all type definitions related to session reports.
  • src/renderer/types/tabs.ts
    • Removed the 'report' type from the Tab interface.
  • src/renderer/utils/displayItemBuilder.ts
    • Updated formatting for hasToolResults check.
  • src/renderer/utils/reportAssessments.ts
    • Removed all utilities for report assessments.
  • src/renderer/utils/sessionAnalyzer.ts
    • Removed the session analysis logic.
  • src/shared/types/api.ts
    • Removed the CostBreakdown interface.
  • src/shared/utils/costFormatting.ts
    • Removed cost formatting utilities.
  • src/shared/utils/pricing.ts
    • Removed pricing data fetching and calculation utilities.
  • test/main/utils/costCalculation.test.ts
    • Removed tests for cost calculation.
  • test/renderer/utils/reportAssessments.test.ts
    • Removed tests for report assessments.
  • test/renderer/utils/sessionAnalyzer.test.ts
    • Removed tests for session analyzer.
  • test/shared/utils/costFormatting.test.ts
    • Removed tests for cost formatting.
  • test/shared/utils/pricing.test.ts
    • Removed tests for pricing utilities.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai coderabbitai bot added bug Something isn't working documentation Improvements or additions to documentation labels Feb 26, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d655ddd and 656c3e6.

📒 Files selected for processing (2)
  • src/renderer/components/layout/MoreMenu.tsx
  • src/renderer/components/layout/TabBar.tsx

📝 Walkthrough

Walkthrough

This PR removes the session analysis/report feature and associated cost/pricing functionality across code, types, UI, styling, scripts, and tests, and updates components to drop cost-related props and report navigation.

Changes

Cohort / File(s) Summary
Documentation & Configuration
CONTRIBUTING.md, package.json
Added "Project Philosophy & Scope" to contributing; removed prebuild script and packaging of resources/pricing.json.
Pricing script & shared pricing
scripts/fetch-pricing-data.ts, src/shared/utils/pricing.ts, resources/pricing.json
Deleted pricing fetch script and pricing utilities (lookup, tiered calculations, message cost APIs) and removed packaging of pricing.json.
Cost formatting utilities
src/shared/utils/costFormatting.ts
Removed formatCostUsd and formatCostCompact exports.
Metrics / JSONL processing
src/main/types/chunks.ts, src/main/utils/jsonl.ts
Removed costUsd initialization from EMPTY_METRICS and eliminated per-message cost accumulation; costUsd now optional in calculateMetrics.
Session report types & analysis logic
src/renderer/types/sessionReport.ts, src/renderer/utils/sessionAnalyzer.ts, src/renderer/utils/reportAssessments.ts
Deleted entire session report types, renderer-side analyzer, assessment utilities, takeaways and related exports.
Report UI components
src/renderer/components/report/*, src/renderer/components/report/sections/*
Removed SessionReportTab and all report section components (KeyTakeaways, Overview, Cost, Token, Tool, Subagent, Error, Git, Friction, Timeline, Quality, Insights, ReportSection, AssessmentBadge, etc.).
Component props & cost display removal
src/renderer/components/chat/..., src/renderer/components/common/TokenUsageDisplay.tsx
Removed sessionMetrics, subagentCostUsd, onViewReport props; removed costUsd prop and USD display logic.
Tab type & navigation
src/renderer/types/tabs.ts, src/renderer/components/layout/..., src/renderer/store/slices/tabSlice.ts
Removed 'report' tab type, eliminated "Analyze Session" menu item and report tab rendering, removed openSessionReport store method, and adjusted MoreMenu/TabBar props.
Styling
src/renderer/index.css
Removed assessment severity CSS variables (--assess-good, --assess-warning, --assess-danger, --assess-neutral) from both themes.
Tests removed
test/... (multiple)
Deleted test suites covering pricing, cost formatting, cost calculation, report assessments, and session analyzer.
Minor formatting / small changes
src/renderer/components/chat/items/linkedTool/renderHelpers.tsx, src/renderer/components/chat/SessionContextPanel/components/FlatInjectionList.tsx, src/renderer/utils/displayItemBuilder.ts
Formatting and whitespace adjustments only (no behavioral changes).

Possibly related PRs

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/renderer/components/layout/MoreMenu.tsx (1)

36-36: ⚠️ Potential issue | 🔴 Critical

Remove unused activeTabId parameter to fix ESLint error.

The pipeline is failing because activeTabId is defined but never used. This parameter was likely used by the removed openSessionReport functionality.

🐛 Proposed fix
 export const MoreMenu = ({
   activeTab,
   activeTabSessionDetail,
-  activeTabId,
 }: Readonly<MoreMenuProps>): React.JSX.Element => {

Also update the interface:

 interface MoreMenuProps {
   activeTab: Tab | undefined;
   activeTabSessionDetail: SessionDetail | null;
-  activeTabId: string | null;
 }

And update any call sites that pass this prop.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/renderer/components/layout/MoreMenu.tsx` at line 36, Remove the unused
activeTabId parameter from the MoreMenu component signature and from its props
interface (e.g., the Props or MoreMenuProps type) and update any places that
pass activeTabId into <MoreMenu /> to stop providing it; ensure the component's
export and internal references no longer mention activeTabId and run the
TypeScript/ESLint check to confirm the unused-parameter error is resolved.
🧹 Nitpick comments (1)
src/main/utils/jsonl.ts (1)

231-264: Optional: Simplify dead costUsd code.

Since costUsd is a constant 0 and never updated in the loop, the condition costUsd > 0 is always false. This could be simplified to directly return undefined.

Understand this may be intentional to preserve the structure for future re-enablement—if so, consider adding a brief comment to clarify.

♻️ Suggested simplification
-  const costUsd = 0;
   // ... token accumulation loop ...
   return {
     durationMs: maxTime - minTime,
     totalTokens: inputTokens + cacheCreationTokens + cacheReadTokens + outputTokens,
     inputTokens,
     outputTokens,
     cacheReadTokens,
     cacheCreationTokens,
     messageCount: messages.length,
-    costUsd: costUsd > 0 ? costUsd : undefined,
+    costUsd: undefined, // Cost calculation removed in revert of PRs `#60`, `#65`, `#73`
   };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/utils/jsonl.ts` around lines 231 - 264, The local constant costUsd
is always 0 and the check costUsd > 0 will never be true, so remove the unused
costUsd variable and directly return costUsd: undefined in the result (or if you
want to keep the placeholder for future re-enablement, replace the const costUsd
= 0 with const costUsd = undefined and add a one-line comment explaining it's
intentionally disabled); update the return object in the function that computes
duration/tokens (the block that constructs
durationMs/totalTokens/inputTokens/...) to reflect this change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/renderer/components/layout/MoreMenu.tsx`:
- Line 36: Remove the unused activeTabId parameter from the MoreMenu component
signature and from its props interface (e.g., the Props or MoreMenuProps type)
and update any places that pass activeTabId into <MoreMenu /> to stop providing
it; ensure the component's export and internal references no longer mention
activeTabId and run the TypeScript/ESLint check to confirm the unused-parameter
error is resolved.

---

Nitpick comments:
In `@src/main/utils/jsonl.ts`:
- Around line 231-264: The local constant costUsd is always 0 and the check
costUsd > 0 will never be true, so remove the unused costUsd variable and
directly return costUsd: undefined in the result (or if you want to keep the
placeholder for future re-enablement, replace the const costUsd = 0 with const
costUsd = undefined and add a one-line comment explaining it's intentionally
disabled); update the return object in the function that computes
duration/tokens (the block that constructs
durationMs/totalTokens/inputTokens/...) to reflect this change.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c3c4fa6 and d655ddd.

📒 Files selected for processing (47)
  • CONTRIBUTING.md
  • package.json
  • resources/pricing.json
  • scripts/fetch-pricing-data.ts
  • src/main/types/chunks.ts
  • src/main/utils/jsonl.ts
  • src/renderer/components/chat/AIChatGroup.tsx
  • src/renderer/components/chat/ChatHistory.tsx
  • src/renderer/components/chat/SessionContextPanel/components/FlatInjectionList.tsx
  • src/renderer/components/chat/SessionContextPanel/components/SessionContextHeader.tsx
  • src/renderer/components/chat/SessionContextPanel/index.tsx
  • src/renderer/components/chat/SessionContextPanel/types.ts
  • src/renderer/components/chat/items/linkedTool/renderHelpers.tsx
  • src/renderer/components/common/TokenUsageDisplay.tsx
  • src/renderer/components/layout/MoreMenu.tsx
  • src/renderer/components/layout/PaneContent.tsx
  • src/renderer/components/layout/SortableTab.tsx
  • src/renderer/components/report/AssessmentBadge.tsx
  • src/renderer/components/report/ReportSection.tsx
  • src/renderer/components/report/SessionReportTab.tsx
  • src/renderer/components/report/sections/CostSection.tsx
  • src/renderer/components/report/sections/ErrorSection.tsx
  • src/renderer/components/report/sections/FrictionSection.tsx
  • src/renderer/components/report/sections/GitSection.tsx
  • src/renderer/components/report/sections/InsightsSection.tsx
  • src/renderer/components/report/sections/KeyTakeawaysSection.tsx
  • src/renderer/components/report/sections/OverviewSection.tsx
  • src/renderer/components/report/sections/QualitySection.tsx
  • src/renderer/components/report/sections/SubagentSection.tsx
  • src/renderer/components/report/sections/TimelineSection.tsx
  • src/renderer/components/report/sections/TokenSection.tsx
  • src/renderer/components/report/sections/ToolSection.tsx
  • src/renderer/index.css
  • src/renderer/store/slices/tabSlice.ts
  • src/renderer/types/sessionReport.ts
  • src/renderer/types/tabs.ts
  • src/renderer/utils/displayItemBuilder.ts
  • src/renderer/utils/reportAssessments.ts
  • src/renderer/utils/sessionAnalyzer.ts
  • src/shared/types/api.ts
  • src/shared/utils/costFormatting.ts
  • src/shared/utils/pricing.ts
  • test/main/utils/costCalculation.test.ts
  • test/renderer/utils/reportAssessments.test.ts
  • test/renderer/utils/sessionAnalyzer.test.ts
  • test/shared/utils/costFormatting.test.ts
  • test/shared/utils/pricing.test.ts
💤 Files with no reviewable changes (38)
  • src/renderer/components/chat/SessionContextPanel/index.tsx
  • src/renderer/components/common/TokenUsageDisplay.tsx
  • src/renderer/utils/sessionAnalyzer.ts
  • src/renderer/components/chat/SessionContextPanel/types.ts
  • package.json
  • src/renderer/components/report/sections/ToolSection.tsx
  • src/renderer/components/report/sections/KeyTakeawaysSection.tsx
  • src/shared/utils/costFormatting.ts
  • src/main/types/chunks.ts
  • src/renderer/store/slices/tabSlice.ts
  • src/renderer/components/report/AssessmentBadge.tsx
  • src/shared/utils/pricing.ts
  • src/renderer/index.css
  • src/renderer/components/chat/AIChatGroup.tsx
  • src/renderer/components/report/sections/TokenSection.tsx
  • src/renderer/components/report/sections/CostSection.tsx
  • src/shared/types/api.ts
  • src/renderer/components/report/sections/SubagentSection.tsx
  • src/renderer/components/report/sections/GitSection.tsx
  • src/renderer/components/report/SessionReportTab.tsx
  • src/renderer/components/report/sections/OverviewSection.tsx
  • src/renderer/components/chat/ChatHistory.tsx
  • src/renderer/components/chat/SessionContextPanel/components/SessionContextHeader.tsx
  • src/renderer/components/report/ReportSection.tsx
  • test/main/utils/costCalculation.test.ts
  • src/renderer/components/report/sections/InsightsSection.tsx
  • src/renderer/components/report/sections/TimelineSection.tsx
  • src/renderer/components/report/sections/ErrorSection.tsx
  • src/renderer/components/layout/PaneContent.tsx
  • test/renderer/utils/reportAssessments.test.ts
  • src/renderer/components/report/sections/FrictionSection.tsx
  • test/renderer/utils/sessionAnalyzer.test.ts
  • test/shared/utils/costFormatting.test.ts
  • test/shared/utils/pricing.test.ts
  • src/renderer/types/sessionReport.ts
  • scripts/fetch-pricing-data.ts
  • src/renderer/utils/reportAssessments.ts
  • src/renderer/components/report/sections/QualitySection.tsx

The activeTabId prop was removed from the MoreMenu component as it was not being utilized, streamlining the component's interface.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d655dddb83

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 30 to 33
notifications: Bell,
settings: Settings,
session: FileText,
report: Activity,
} as const;

Choose a reason for hiding this comment

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

P2 Badge Handle legacy report tabs in tab icon mapping

After this revert, TAB_ICONS no longer includes report, but legacy report tabs can still be restored from context snapshots: validateSnapshot in src/renderer/store/slices/contextSlice.ts currently keeps all non-session tabs (return true), so a snapshot created before the revert can rehydrate a report tab. In that case const Icon = TAB_ICONS[tab.type] becomes undefined, and rendering <Icon /> throws an invalid element type error when opening/switching to that context.

Useful? React with 👍 / 👎.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request reverts several large features (session analysis, export dropdown, cost calculation) to refocus the project on its core scope. The changes are extensive, involving the removal of many files and code related to these features. The revert appears to be clean and thorough. I've added one minor suggestion to clean up a leftover variable from the cost calculation removal. The new 'Project Philosophy & Scope' section in CONTRIBUTING.md is a great addition and clearly communicates the project's direction to future contributors.

Removed the unused activeTabId prop from the MoreMenu component in the TabBar, simplifying the component's integration and maintaining a cleaner interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant