Commit Graph

4727 Commits

Author SHA1 Message Date
dal 47f413e111
fix: update access-controls tests for new cache structure
Updated dataset permission tests to expect the full DatasetAccessResult
object instead of just a boolean value in cache operations. This aligns
with the PR feedback to cache the complete access result including
accessPath and userRole.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 12:29:15 -06:00
dal 273fbc36c4
fix: address non-critical PR review comments
- Optimized N+1 query in get-permissioned-datasets.ts using inArray for batch lookup
- Removed unused bulkRemoveAssetPermissions import
- Fixed import organization in find-user-by-email.ts
- Updated CLAUDE.md to reflect tests are written and fixed API example
- Clarified TODO comment in lookup.ts to prevent potential infinite recursion

These are style and performance improvements that don't affect functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 12:29:02 -06:00
dal 2e04af1785
fix: address additional critical PR review comments
- Fixed permission hierarchy: full_access (5) now correctly ranks higher than viewer (3)
- Removed 'querier' role from admin permission check as it was too permissive
- Added organizationId parameter to dashboard access checks to prevent unauthorized access
- Fixed public dashboard expiry date check to verify dates are in the future
- Added cycle detection for collection permissions to prevent infinite recursion
- Fixed bulk remove permissions to correctly filter by identityIds array
- Updated date comparison to use ISO string format for PostgreSQL timestamp columns

These fixes address critical security and logic issues identified in the PR review.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 12:28:58 -06:00
dal d078830a18
fix: address PR review comments for access control migration
- Fixed AssetTypeSchema to include all active asset types (excluding deprecated 'metric' and 'dashboard')
- Added missing 'restricted_querier' role to UserOrganizationRole type
- Fixed dataset access caching to store full result object including accessPath and userRole
- Updated count query to use SQL COUNT for better performance
- Fixed IdentityType consistency across dataset permissions
- Removed unused 'ne' import from list-asset-permissions.ts
- Updated comments to correctly reference 6 access paths instead of 5

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 12:28:52 -06:00
dal 4bef4205f3
feat(access-controls): migrate Rust access control libraries to TypeScript
This PR migrates the Rust  and  libraries to TypeScript in the new  package.

## Changes

### New Access Controls Package
- Implemented complete asset permissions system with CRUD operations
- Added dataset permissions with all 5 access paths (admin, direct user, user→group, team→direct, team→group, org→default)
- Implemented cascading permissions (metrics inherit from dashboards/chats/collections)
- Added LRU caching to replace Redis (30-second TTL)
- Comprehensive test coverage (148 tests passing, 3 skipped pending createUser)

### Database Package Updates
- Fixed AssetType enum to include all 14 asset types
- Added missing database queries for permissions
- Fixed timestamp fields to use ISO strings
- Added getUserOrganizationsByUserId function
- Created organized query structure by table

### AI Package Updates
- Updated getPermissionedDatasets API calls to new format
- Changed property references from ymlFile to ymlContent
- Fixed all test mocks to match new API structure

### Trigger App Updates
- Updated to use new access controls API
- Fixed test mocks to match DatasetListResult structure
- Added proper type imports

### Server Shared Updates
- Added request/response types for access control endpoints
- Exported types for API consistency

## Testing
- All packages build successfully with turbo build:dry-run
- All tests pass with turbo test:unit
- Full type safety maintained throughout

## Migration Notes
- Drop-in replacement for Rust libraries
- Same permission model and roles
- Cache invalidation strategies implemented
- Soft delete pattern maintained

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 10:17:35 -06:00
dal ff1404324a
last claude update for the sub agents 2025-07-26 10:41:30 -06:00
Nate Kelley a01d4f42e1
Merge pull request #638 from buster-so/big-nate/bus-1521-couple-bugz-with-three-dot-menu
Big nate/bus 1521 couple bugz with three dot menu
2025-07-26 10:26:47 -06:00
Nate Kelley 9acc244b2e
Merge branch 'staging' into big-nate/bus-1521-couple-bugz-with-three-dot-menu 2025-07-26 10:23:52 -06:00
Nate Kelley 1608547a3e
Merge branch 'big-nate/bus-1521-couple-bugz-with-three-dot-menu' of https://github.com/buster-so/buster into big-nate/bus-1521-couple-bugz-with-three-dot-menu 2025-07-26 10:23:39 -06:00
Nate Kelley 6a507bd7ff
rename should navigate to different page 2025-07-26 10:23:36 -06:00
dal 1ddc3d5cb6
copy over claude settings 2025-07-26 10:13:43 -06:00
Nate Kelley 7b8cbc6213
Merge pull request #631 from buster-so/big-nate/bus-1521-couple-bugz-with-three-dot-menu
Fix save to collection dropdown
2025-07-26 10:06:13 -06:00
Nate Kelley 1653ae5af4
Update apps/web/src/layouts/ChatLayout/FileContainer/FileContainerHeader/DashboardContainerHeaderButtons/DashboardThreeDotMenu.tsx
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-26 10:05:07 -06:00
Nate Kelley f3944a6dea
fix bug causing dashboard add menu to flicker 2025-07-26 10:03:28 -06:00
dal 2cfe8585a3
small local dev helper 2025-07-26 09:53:34 -06:00
dal 4d9109aa84
Merge pull request #637 from buster-so/update-claude-planning-settings
Add planning and review guidelines to CLAUDE.md
2025-07-26 09:47:00 -06:00
dal 2218262dda
Add planning and review guidelines to CLAUDE.md
- Add Plan & Review section with instructions for creating detailed implementation plans
- Require writing plans to .claude/tasks/TASK_NAME.md before starting work
- Emphasize MVP approach and getting approval before proceeding
- Add guidelines for updating plans during implementation with detailed change descriptions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 09:29:56 -06:00
dal 645cadd7c9
Merge pull request #636 from buster-so/fix-env-copy-script
Fix-env-copy-script
2025-07-25 19:38:48 -06:00
dal 4672f0fcaa
Enhance move-env-to-worktree script to respect gitignore for non-.env files and always include .env files (excluding .env.example). This improves file handling during environment setup in worktrees. 2025-07-25 19:38:21 -06:00
dal f8f33365ea
Merge pull request #635 from buster-so/worktree-info-exploration
Add simplified env file copy script for worktrees
2025-07-25 19:32:20 -06:00
dal 88ecc1b216
Add simplified env file copy script for worktrees
This script copies all .env files from ~/buster/buster to the current worktree,
ignoring gitignore rules to ensure actual .env files are copied (not just examples).
Unlike the existing move-env-to-worktree.ts script which respects gitignore,
this script is designed specifically for syncing environment files between worktrees.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 19:31:44 -06:00
dal 83952f4554
Refactor .env file copying script to implement custom gitignore handling
This update enhances the script by replacing the glob-based search for .env files with a custom directory traversal method that respects .gitignore rules. The new implementation allows for more precise control over which files are included, improving the script's functionality in various project structures.
2025-07-25 19:20:48 -06:00
dal 9aed7a612e
Merge pull request #634 from buster-so/move-env-to-worktree-script
Add script to copy .env files from main repo to worktree
2025-07-25 19:14:57 -06:00
dal 73e47748f2
Add script to copy .env files from main repo to worktree
This script helps developers quickly set up environment variables in worktrees by copying all .env files from the main repository (~buster/buster) to the current worktree, preserving the directory structure.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 19:11:50 -06:00
dal 57dd2895d2
dry run for these two bad boys 2025-07-25 19:00:07 -06:00
dal 3e821f5609
Merge pull request #633 from buster-so/dallin/should-be-able-to-turbo-build-lint-test-unit-without-env-vars
Dallin/should-be-able-to-turbo-build-lint-test-unit-without-env-vars
2025-07-25 18:38:40 -06:00
dal 198adf9fb3
global cursor fix 2025-07-25 18:33:39 -06:00
dal e6c6123754
Update CLAUDE.md to enhance test running guidelines and introduce pre-completion workflow steps for CI/CD checks. 2025-07-25 18:32:59 -06:00
dal 2833c6bb0c
dry run 2025-07-25 18:29:35 -06:00
dal d0ab484a81
test and lint don't need buidl 2025-07-25 17:41:43 -06:00
dal 168da8a640
Merge pull request #632 from buster-so/dallin/minor-ui-tweaks-and-fixes
Hide filters for now
2025-07-25 17:07:47 -06:00
Nate Kelley 2ba9044d13
Invalidation after add to dashboard 2025-07-25 16:49:45 -06:00
dal 45c2846b9b
hiding filters for now since we're noticing LLM isn't ready. 2025-07-25 16:33:33 -06:00
Nate Kelley ac6b63bd6d
close on select false for favorites 2025-07-25 16:30:26 -06:00
Nate Kelley 2a0b727e17
Made icon bigger for dropdown 2025-07-25 16:16:58 -06:00
Nate Kelley efa289fe4d
Fix save to collection dropdown 2025-07-25 16:13:35 -06:00
Nate Kelley deb866b67e
Merge pull request #630 from buster-so/big-nate/bus-1574-charts-are-not-reflecting-styling-changes-in-real-time
Memoized props should alwasy rerender
2025-07-25 15:47:35 -06:00
Nate Kelley 850dc2577b
Memoized props should alwasy rerender 2025-07-25 15:47:13 -06:00
Nate Kelley 9784abe906
Merge pull request #629 from buster-so/hot-fix/fix-drilldown-pr
Remove "mode" from followup
2025-07-25 15:35:13 -06:00
Nate Kelley e6d4628a5f
Remove "mode" from followup
Removed mode from followup asset content. It was logically impossible to have a mode with a metric. Falling back to just asset type.
2025-07-25 15:35:04 -06:00
dal 14fe8d0712
icon is now black when importing assets 2025-07-25 14:57:46 -06:00
dal 523a6921b1
hotfix on sql dialect 2025-07-25 14:31:35 -06:00
dal 4464abfc22
Merge pull request #628 from buster-so/big-nate/bus-1483-quick-win-for-filter-dashboard-drill-downexplore-metric
Filter and drill down feature
2025-07-25 13:42:20 -06:00
dal 1f52bd9b69
Enhance asset chat handling by introducing `handleAssetChatWithPrompt` for processing user prompts alongside asset imports. Update `createChatHandler` to manage asset-only and asset+prompt scenarios, ensuring correct message order and preventing unnecessary analyst task triggers. Add tests for new functionality and refactor related services for improved clarity and maintainability. 2025-07-25 12:47:01 -06:00
Nate Kelley 2df53404d1
Merge pull request #627 from buster-so/devin/BUS-1494-1753276227
Front end - asset document titles
2025-07-24 18:18:38 -06:00
Nate Kelley 1d646c003d
Update request to use v2 2025-07-24 18:15:43 -06:00
Nate Kelley 0c6271f5c9
title generations 2025-07-24 18:09:18 -06:00
Nate Kelley 55679b9d19
Make request 2025-07-24 17:54:55 -06:00
Nate Kelley 633a77e2ef
Merge pull request #603 from buster-so/devin/BUS-1494-1753276227
Implement /api/v2/title endpoint for asset title retrieval (BUS-1494)
2025-07-24 17:43:41 -06:00
Nate Kelley 5e6eb76f5b
move get asset types around 2025-07-24 17:41:36 -06:00