Skip to content

Add project spending details to Cost tab - #12

Merged
Gnonymous merged 2 commits into
mainfrom
codex/project-cost-detail
Sep 27, 2026
Merged

Gnonymous merged 2 commits into
mainfrom
codex/project-cost-detail

Conversation

@Gnonymous

Copy link
Copy Markdown
Owner

Summary

  • Make project rows in the Cost tab clickable, with a focused project view and a back action.
  • Show the selected range's total, model costs, trend, and exact hourly or daily cost rows.
  • Build project breakdowns from the same local records as the existing totals, preserving legacy snapshot decoding.

Verification

  • swift run CodingBar --self-test passed, including per-project model and trend reconciliation for Today, 7d, and 30d.
  • Rendered the Cost list and project detail in dark English and light Chinese.
  • git diff --check passed.

The dollar figures remain standard API price equivalents, not subscription charges.

Co-authored-by: codex <codex@openai.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T16:04:02.916524Z 9018430 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 9018430e90

ℹ️ 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 +522 to +523
let project = (snap.overviews.first { $0.range == selectedProjectRange }?.projects
?? snap.projects).first { $0.path == selected.path } ?? selected

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear project details when the refreshed range drops the project

When the periodic refresh produces an overview where the selected project is no longer present—such as after midnight for the Today range, or when it falls outside the top-eight project cutoff—the lookup fails and ?? selected keeps rendering the old ProjectStat. The detail page therefore continues to label stale totals as the current range indefinitely; clear/close the selection or render a missing-project state instead of falling back to the pre-refresh value.

Useful? React with 👍 / 👎.

Co-authored-by: codex <codex@openai.com>
@Gnonymous
Gnonymous merged commit 26c0256 into main Sep 27, 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.

1 participant