Feat/workspaces#287
Conversation
…with multi-tenant scoping
…with multi-tenant scoping
…to Feat/workspaces
📝 WalkthroughWalkthroughThis PR migrates BoloDB's data model and API surface from per-user scoping to multi-tenant workspace scoping, adding workspace membership, roles, and permissions; adds SQL result chart metadata, saved queries, and dashboards; consolidates ORM models and Alembic migrations; refactors activity logging and connection encryption; and updates the frontend for workspaces, dashboards, and charts. ChangesWorkspace platform
Estimated code review effort: 5 (Critical) | ~150 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant WorkspaceDependency
participant Route
participant Controller
participant DatabaseManager
Client->>WorkspaceDependency: Send JWT and workspace headers
WorkspaceDependency->>DatabaseManager: Verify workspace membership and role
WorkspaceDependency-->>Route: Return workspace_id, role, and db_id
Route->>Controller: Invoke workspace-scoped operation
Controller->>DatabaseManager: Read or write workspace-owned state
DatabaseManager-->>Controller: Return operation result
Controller-->>Route: Return response
Route-->>Client: Return API response
sequenceDiagram
participant DashboardPage
participant DashboardRoute
participant DashboardController
participant DatabaseHelpers
participant DatabaseManager
DashboardPage->>DashboardRoute: Request dashboard data
DashboardRoute->>DashboardController: Execute dashboard queries
DashboardController->>DatabaseHelpers: Load dashboard panels and saved queries
DashboardController->>DatabaseManager: Execute saved-query SQL
DatabaseManager-->>DashboardController: Return rows and columns
DashboardController-->>DashboardRoute: Return normalized panel results
DashboardRoute-->>DashboardPage: Render dashboard panels
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…y do not have a conflict.
|
I think this is ready to merge now, please express your thoughts on this @HAAHIT @coderabbitai @greptileai @CodeAnt-AI @strix-security. Please let me know if i shall merge this. Thank You |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Issue 1 - routes/dashboards.py:174: Captures success from update_panels_batch and raises 404 when False.
Issue 2 - routes/database.py:28,46,97: Added _catalog_permission=Depends(require_permission("catalog.view")) to connect, connect-sample, and reconnect routes.
Issue 3 - routes/dashboards.py:126-127: Changed get_dashboard_data to require both dashboards.view and queries.execute.
…eing followed to wipe out activity retention logs, which has now been fixed
|
Too many files changed for review. ( Bypass the limit by tagging |
|
I think this is now finally ready to merge after the very last validation loop @HAAHIT @greptileai @coderabbitai @CodeAnt-AI @strix-security |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
@strix-security can u please run checks on the latest commits |
- Add new documentation chapters: - docs/10-auth-and-workspaces.md: JWT auth, Google OAuth, workspace multi-tenancy, and 21-capability RBAC matrix - docs/11-dashboards-and-charts.md: Dashboard CRUD, panel grid layouts, saved queries, and ECharts visualization specs - docs/12-semantic-layer.md: Business metrics, join paths, synonyms, value maps, and prompt injection rules - Update existing documentation (chapters 01-09, README.md, docs/README.md) for v2 architecture: - Header context propagation (X-Workspace-Id, X-Db-Id) - PostgreSQL persistence (KnowledgeService, query history, users, workspaces, dashboards) - OpenRouter AI layer (deepseek/deepseek-v4-flash, streaming SSE POST /api/query/stream, structured JSON output) - Defense-in-depth security (SSRF validation, loopback blocking, AST read-only guards, statement timeouts) - Refresh docs/07-file-map.md with 37 backend test files, frontend components, and complete route/controller endpoints
|
The implementation is now complete with docs ! |
User description
Description
Related Issue
Type of Change
How Has This Been Tested?
pytest)Checklist
Summary by CodeRabbit
CodeAnt-AI Description
Add multi-workspace support with workspace settings, permissions, dashboards, and scoped databases
What Changed
Impact
✅ Safer workspace sharing✅ Fewer cross-database mix-ups✅ Clearer dashboard and query history per workspace💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.