Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
800ec6c
Update dashboard to reflect configurable lookback window and improve …
rajbos Mar 27, 2026
c736eec
Add backfill historical data functionality and update dashboard for s…
rajbos Mar 27, 2026
819b3c8
Enhance backfill functionality with progress reporting in dashboard
rajbos Mar 27, 2026
655087f
Add Visual Studio session detection to backend services and update de…
rajbos Mar 27, 2026
4b3c1db
Enhance dashboard data handling by incorporating machineId for user i…
rajbos Mar 27, 2026
929d1e9
Refactor trigger type determination to use environment variables for …
rajbos Mar 27, 2026
8b4d201
Getting ready for a new release
rajbos Mar 27, 2026
bfffb03
Improve initial token usage analysis delay and refactor file system c…
rajbos Mar 27, 2026
53b7960
Update description in package.json for clarity on AI fluency insights
rajbos Mar 27, 2026
7b9fd3c
Add crush session handling and enhance dashboard stats calculation
rajbos Mar 27, 2026
ce30184
Enhance backfill progress messaging and add JSONL content handling in…
rajbos Mar 28, 2026
185d786
Fix localInteractions to use exact daily stats instead of rounded app…
rajbos Mar 30, 2026
93a1f5a
Merge origin/main into pr-510: resolve conflicts in cli-publish.yml, …
rajbos Mar 30, 2026
ce87569
Fix duplicate pathExists method in sessionDiscovery.ts
rajbos Mar 30, 2026
27569e4
Merge branch 'main' into team-dashboard
rajbos Mar 30, 2026
99111a3
Merge branch 'main' into team-dashboard
rajbos Mar 30, 2026
2a3236c
feat: enhance data processing and cleanup for Azure entities in sync …
rajbos Apr 1, 2026
ffaa01f
Merge branch 'main' into team-dashboard
rajbos Apr 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"permissions": {
"allow": [
"Bash(xargs grep:*)"
]
}
}
7 changes: 5 additions & 2 deletions .github/workflows/cli-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,13 @@ jobs:

- name: Determine trigger type
id: trigger_type
env:
EVENT_NAME: ${{ github.event_name }}
GIT_REF: ${{ github.ref }}
run: |
if [[ "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == refs/tags/cli/v* ]]; then
if [[ "$EVENT_NAME" == "push" && "$GIT_REF" == refs/tags/cli/v* ]]; then
echo "is_tag=true" >> "$GITHUB_OUTPUT"
TAG_VERSION=${GITHUB_REF#refs/tags/cli/v}
TAG_VERSION=${GIT_REF#refs/tags/cli/v}
echo "tag_version=$TAG_VERSION" >> "$GITHUB_OUTPUT"
echo "Triggered by tag push: cli/v$TAG_VERSION"
else
Expand Down
2 changes: 1 addition & 1 deletion vscode-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "copilot-token-tracker",
"displayName": "AI Engineering Fluency",
"description": "Track your AI Engineering Fluency — daily and monthly token usage, cost estimates, and productivity insights in VS Code.",
"description": "Track your AI Engineering Fluency — daily and monthly token usage, cost estimates, and AI fluency insights in VS Code.",
"version": "0.0.24",
"publisher": "RobBos",
"icon": "assets/logo.png",
Expand Down
25 changes: 25 additions & 0 deletions vscode-extension/src/backend/facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ export interface BackendFacadeDeps {
modelUsage: ModelUsage;
timestamp: number;
}>;
// Crush session handling (per-project crush.db virtual paths)
isCrushSession?: (sessionFile: string) => boolean;
getCrushSessionData?: (sessionFile: string) => Promise<{
tokens: number;
interactions: number;
modelUsage: ModelUsage;
timestamp: number;
}>;
// Visual Studio session detection (binary MessagePack — cannot be parsed as JSON)
isVSSessionFile?: (sessionFile: string) => boolean;
}

export class BackendFacade {
Expand Down Expand Up @@ -126,6 +136,9 @@ export class BackendFacade {
statSessionFile: deps.statSessionFile,
isOpenCodeSession: deps.isOpenCodeSession,
getOpenCodeSessionData: deps.getOpenCodeSessionData,
isCrushSession: deps.isCrushSession,
getCrushSessionData: deps.getCrushSessionData,
isVSSessionFile: deps.isVSSessionFile,
},
this.credentialService,
this.dataPlaneService,
Expand Down Expand Up @@ -441,6 +454,18 @@ export class BackendFacade {
return result;
}

/**
* Backfill historical data to Azure Table Storage.
* Scans ALL local session files (ignoring the mtime-based age filter) and upserts daily
* rollups for every day within the given lookback window (default 365 days).
* Use this when the normal sync has missed data due to the mtime filter.
*/
public async backfillHistoricalData(maxLookbackDays = 365, onProgress?: (processed: number, total: number, daysFound: number) => void): Promise<void> {
const settings = this.getSettings();
await this.syncService.backfillSync(settings, this.isConfigured(settings), maxLookbackDays, onProgress);
this.clearQueryCache();
}

public async tryGetBackendDetailedStatsForStatusBar(
settings: BackendSettings,
): Promise<any | undefined> {
Expand Down
12 changes: 7 additions & 5 deletions vscode-extension/src/backend/services/dataPlaneService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,13 @@ export class DataPlaneService {
const dsPrefix = `ds:${datasetId}`;
const uPrefix = `u:${userId}`;

const startDate = new Date(startDayKey);
const endDate = new Date(endDayKey);
endDate.setUTCHours(23, 59, 59, 999);

const filter = `Timestamp ge datetime'${startDate.toISOString()}' and Timestamp le datetime'${endDate.toISOString()}'`;
// Filter by PartitionKey range instead of system Timestamp.
// PartitionKey format is "ds:{datasetId}|d:{YYYY-MM-DD}".
// Using system Timestamp would miss entities written by older syncs (e.g. written March 1
// for day "2026-03-15") because their Timestamp predates the startDayKey.
const pkStart = buildAggPartitionKey(datasetId, startDayKey);
const pkEnd = buildAggPartitionKey(datasetId, endDayKey);
const filter = `PartitionKey ge '${pkStart}' and PartitionKey le '${pkEnd}'`;

this.log(
`Deleting entities for user "${userId}" in dataset "${datasetId}" (${startDayKey} to ${endDayKey})`,
Expand Down
Loading
Loading