Add project spending details to Cost tab - #12
Conversation
Co-authored-by: codex <codex@openai.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| let project = (snap.overviews.first { $0.range == selectedProjectRange }?.projects | ||
| ?? snap.projects).first { $0.path == selected.path } ?? selected |
There was a problem hiding this comment.
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>
Summary
Verification
swift run CodingBar --self-testpassed, including per-project model and trend reconciliation for Today, 7d, and 30d.git diff --checkpassed.The dollar figures remain standard API price equivalents, not subscription charges.