Skip to content
This repository was archived by the owner on Nov 16, 2025. It is now read-only.

Commit 43457e2

Browse files
steipeteclaude
andcommitted
Fix type-checking issue and pre-flight script
- Break down ClaudeUsageReportView body into smaller components - Fix git diff-index false positives in pre-flight check - Add git update-index refresh to avoid build artifacts detection 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e54ae92 commit 43457e2

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

VibeMeter/Presentation/Views/ClaudeUsageReportView.swift

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,30 @@ struct ClaudeUsageReportView: View {
3737

3838
@Environment(SettingsManager.self)
3939
private var settingsManager
40+
41+
// MARK: - Header View
42+
43+
private var headerView: some View {
44+
VStack(alignment: .leading, spacing: 4) {
45+
Text("Claude Token Usage Report")
46+
.font(.title2)
47+
.fontWeight(.semibold)
48+
.textSelection(.enabled)
49+
50+
Text(viewMode == .byDay ? "Daily breakdown of token usage and costs" : "Project breakdown of token usage and costs")
51+
.font(.subheadline)
52+
.foregroundStyle(.secondary)
53+
.textSelection(.enabled)
54+
}
55+
}
4056

4157
var body: some View {
4258
VStack(spacing: 0) {
43-
// Title and description
44-
VStack(alignment: .leading, spacing: 4) {
45-
Text("Claude Token Usage Report")
46-
.font(.title2)
47-
.fontWeight(.semibold)
48-
.textSelection(.enabled)
49-
50-
Text(viewMode == .byDay ? "Daily breakdown of token usage and costs" : "Project breakdown of token usage and costs")
51-
.font(.subheadline)
52-
.foregroundStyle(.secondary)
53-
.textSelection(.enabled)
54-
}
55-
.frame(maxWidth: .infinity, alignment: .leading)
56-
.padding(.horizontal)
57-
.padding(.top, 12)
58-
.padding(.bottom, 8)
59+
headerView
60+
.frame(maxWidth: .infinity, alignment: .leading)
61+
.padding(.horizontal)
62+
.padding(.top, 12)
63+
.padding(.bottom, 8)
5964

6065
// Progress bar when loading
6166
if dataLoader.isLoading, dataLoader.totalFiles > 0 {

scripts/preflight-check.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ check_warn() {
7676

7777
# 1. Check Git status
7878
echo "📌 Git Status:"
79+
# Refresh the index to avoid false positives
80+
git update-index --refresh >/dev/null 2>&1 || true
7981
if git diff-index --quiet HEAD -- 2>/dev/null; then
8082
check_pass "Working directory is clean"
8183
else

0 commit comments

Comments
 (0)