* Improve loading states with graceful transitions and enhanced UX
Co-authored-by: matt <matt@roocode.com>
* DRY it up
* Visual cleanup
* Cleanup
* More cleanup
* More cleanup
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Context
Currently, our analytics system provides data aggregation by developer. This PR extends this functionality to also provide analytics aggregated by repository name, allowing organizations to better understand which repositories are consuming the most resources.
Changes
Added a new getRepositoryUsage function in events.ts to aggregate data by repository
Created a new Repositories.tsx component to display repository analytics
Updated types.ts to add 'repositories' to viewModes and 'repositoryName' as a filter type
Enhanced Tasks.tsx to handle filtering by repository name
Updated Usage.tsx to render the Repositories component
Enhanced TaskCard.tsx to display repository information
Added translations for "repositories" in locale files
Added empty state handling for when no repository data is available
Testing
Navigate to Usage page and switch to "Repositories" tab
Click on repository names to filter tasks
Verify repository information appears in task cards
Test with accounts that have no repository data
Context
This PR adds support for git repository information in the analytics system by adding the necessary columns to the ClickHouse database and updating the UI to handle these properties appropriately.
Implementation
Updated .docker/scripts/clickhouse/001-create-tables.sql to include git properties in the schema for new database instances. Migrated package.json's to support new type schema.
Modified apps/web/src/components/task-sharing/TaskDetails.tsx to display git properties when available (message if not).
Added some claude-code typing.
How to Test
Run the migration by rebuilding docker and pnpm. If this still doesn't work try deleting .docker/data/clickhouse
Create a new task in a git tracked repo on Roo Code extension while signed in-- verify this is logged correctly.