Feature: Complete User Accounts - Phase 3 Frontend (Resource Sharing) #109

Closed
opened 2025-10-10 10:29:44 +00:00 by rwachters · 0 comments
rwachters commented 2025-10-10 10:29:44 +00:00 (Migrated from github.com)

Executive Summary

The User Accounts feature has successfully completed Phases 1 and 2, and the Phase 3 backend implementation is now complete, providing a fully functional authentication system, user management, and resource sharing infrastructure on the backend. However, frontend implementation for Phase 3 is incomplete, with basic provider/model/settings management UI, but no user group management UI or resource sharing controls.

Current Status

Phase 3: Resource Sharing is currently at ~60% completion (Backend: 100%, Frontend: ~20%). The backend is production-ready, but significant frontend work remains.

Problem Description

While the backend for resource sharing is fully implemented, users currently lack the necessary UI to manage user groups and share resources (providers, models, settings) with these groups. This prevents the full utilization of the Phase 3 functionality.

Missing Frontend Components

User Group Management UI (0% Complete)

  • No UserGroupRepository implementation
  • No UserGroupApi client
  • No UserGroupManagementViewModel
  • No UserGroupManagementTab component
  • No dialogs for creating/editing groups
  • No UI for managing group members
  • AdminScreen has placeholder for "User Groups" tab

Resource Sharing UI (0% Complete)

  • No public/private indicators in resource lists
  • No "Make Public" / "Make Private" buttons
  • No "Share with Group" dialog
  • No UI to view which groups have access to a resource
  • No UI to grant/revoke access to specific groups
  • No owner information display
  • No permission checks for sharing operations

API Client Layer (0% Complete)

  • No API methods for user group management
  • No API methods for resource access management (grant/revoke)
  • No API methods for convenience endpoints (make-public/private)

Tasks to Complete

Priority 1: User Group Management Frontend (HIGH)

  1. Create UserGroupApi interface and KtorUserGroupApiClient implementation.
  2. Create UserGroupRepository interface and DefaultUserGroupRepository implementation.
  3. Create UserGroupManagementViewModel with state management.
  4. Create UserGroupManagementTab component (master-detail layout).
  5. Create UserGroupListPanel and UserGroupDetailPanel.
  6. Create dialogs:
    • CreateGroupDialog
    • EditGroupDialog
    • DeleteGroupDialog
    • ManageGroupMembersDialog
  7. Wire up to AdminScreen (replace placeholder).
  8. Add permission checks (MANAGE_USER_GROUPS).

Priority 2: Resource Sharing UI (HIGH)

  1. API Client Layer:
    • Add methods to ProviderApi, ModelApi, SettingsApi:
      • getResourceAccess(id) - Get access information
      • grantAccess(id, groupId, accessMode) - Grant access
      • revokeAccess(id, groupId, accessMode) - Revoke access
      • makePublic(id) - Make resource public
      • makePrivate(id) - Make resource private
      • isPublic(id) - Check if public
      • getOwner(id) - Get owner info
  2. Repository Layer:
    • Add methods to ProviderRepository, ModelRepository, SettingsRepository:
      • Same methods as API layer
      • Update state after operations
  3. ViewModel Layer:
    • Update ProviderConfigViewModel, ModelConfigViewModel, SettingsConfigViewModel:
      • Add state for access information
      • Add state for public/private status
      • Add state for owner information
      • Add methods for sharing operations
  4. UI Components:
    • Create ResourceSharingDialog (reusable for all resource types):
      • Display current access (which groups have access)
      • Grant access to groups (dropdown + access mode selector)
      • Revoke access from groups
    • Create PublicPrivateToggle component:
      • Show current public/private status
      • Toggle button to make public/private
    • Update list panels:
      • Add "Public" badge for public resources
      • Add owner display
    • Update detail panels:
      • Add "Manage Access" button
      • Add "Make Public" / "Make Private" button
      • Add owner information display
  5. Permission Checks:
    • Add MANAGE_LLM_PROVIDERS, MANAGE_LLM_MODELS, MANAGE_MODEL_SETTINGS permission checks.
    • Only show sharing controls to users with appropriate permissions.

Priority 3: Polish & Testing (MEDIUM)

  1. Add loading states for all sharing operations.
  2. Add error handling and user-friendly error messages.
  3. Add confirmation dialogs for destructive actions.
  4. Add tooltips and help text.
  5. Test all permission combinations.
  6. Test edge cases (e.g., removing last admin from group).
  7. Performance testing with many groups/users.
  8. Documentation updates.

Estimated Effort

Total Estimated Time: 9-12 days

Acceptance Criteria

  • All user group management APIs are integrated into the frontend.
  • A dedicated UI for creating, editing, deleting, and managing members of user groups is available in the AdminScreen.
  • All resource sharing APIs are integrated into the frontend.
  • Users can view public/private status, owner information, and manage access for providers, models, and settings.
  • Sharing controls (make public/private, grant/revoke access) are available and permission-gated.
  • All new UI components are responsive, user-friendly, and include appropriate loading/error states.
  • Comprehensive testing of all new features, including permission checks and edge cases.
Executive Summary The **User Accounts feature** has successfully completed **Phases 1 and 2**, and the **Phase 3 backend implementation is now complete**, providing a fully functional authentication system, user management, and resource sharing infrastructure on the backend. However, **frontend implementation for Phase 3 is incomplete**, with basic provider/model/settings management UI, but no user group management UI or resource sharing controls. Current Status **Phase 3: Resource Sharing** is currently at ~60% completion (Backend: 100%, Frontend: ~20%). The backend is production-ready, but significant frontend work remains. Problem Description While the backend for resource sharing is fully implemented, users currently lack the necessary UI to manage user groups and share resources (providers, models, settings) with these groups. This prevents the full utilization of the Phase 3 functionality. Missing Frontend Components User Group Management UI (0% Complete) * No `UserGroupRepository` implementation * No `UserGroupApi` client * No `UserGroupManagementViewModel` * No `UserGroupManagementTab` component * No dialogs for creating/editing groups * No UI for managing group members * [AdminScreen](psi_element://AdminScreen) has placeholder for "User Groups" tab Resource Sharing UI (0% Complete) * No public/private indicators in resource lists * No "Make Public" / "Make Private" buttons * No "Share with Group" dialog * No UI to view which groups have access to a resource * No UI to grant/revoke access to specific groups * No owner information display * No permission checks for sharing operations API Client Layer (0% Complete) * No API methods for user group management * No API methods for resource access management (grant/revoke) * No API methods for convenience endpoints (make-public/private) Tasks to Complete Priority 1: User Group Management Frontend (HIGH) 1. Create `UserGroupApi` interface and `KtorUserGroupApiClient` implementation. 2. Create `UserGroupRepository` interface and `DefaultUserGroupRepository` implementation. 3. Create `UserGroupManagementViewModel` with state management. 4. Create `UserGroupManagementTab` component (master-detail layout). 5. Create `UserGroupListPanel` and `UserGroupDetailPanel`. 6. Create dialogs: * `CreateGroupDialog` * `EditGroupDialog` * `DeleteGroupDialog` * `ManageGroupMembersDialog` 7. Wire up to [AdminScreen](psi_element://AdminScreen) (replace placeholder). 8. Add permission checks (`MANAGE_USER_GROUPS`). Priority 2: Resource Sharing UI (HIGH) 1. **API Client Layer:** * Add methods to `ProviderApi`, `ModelApi`, `SettingsApi`: * `getResourceAccess(id)` - Get access information * `grantAccess(id, groupId, accessMode)` - Grant access * `revokeAccess(id, groupId, accessMode)` - Revoke access * `makePublic(id)` - Make resource public * `makePrivate(id)` - Make resource private * `isPublic(id)` - Check if public * `getOwner(id)` - Get owner info 2. **Repository Layer:** * Add methods to `ProviderRepository`, `ModelRepository`, `SettingsRepository`: * Same methods as API layer * Update state after operations 3. **ViewModel Layer:** * Update `ProviderConfigViewModel`, `ModelConfigViewModel`, `SettingsConfigViewModel`: * Add state for access information * Add state for public/private status * Add state for owner information * Add methods for sharing operations 4. **UI Components:** * Create `ResourceSharingDialog` (reusable for all resource types): * Display current access (which groups have access) * Grant access to groups (dropdown + access mode selector) * Revoke access from groups * Create `PublicPrivateToggle` component: * Show current public/private status * Toggle button to make public/private * Update list panels: * Add "Public" badge for public resources * Add owner display * Update detail panels: * Add "Manage Access" button * Add "Make Public" / "Make Private" button * Add owner information display 5. **Permission Checks:** * Add `MANAGE_LLM_PROVIDERS`, `MANAGE_LLM_MODELS`, `MANAGE_MODEL_SETTINGS` permission checks. * Only show sharing controls to users with appropriate permissions. Priority 3: Polish & Testing (MEDIUM) 1. Add loading states for all sharing operations. 2. Add error handling and user-friendly error messages. 3. Add confirmation dialogs for destructive actions. 4. Add tooltips and help text. 5. Test all permission combinations. 6. Test edge cases (e.g., removing last admin from group). 7. Performance testing with many groups/users. 8. Documentation updates. Estimated Effort **Total Estimated Time:** 9-12 days Acceptance Criteria * All user group management APIs are integrated into the frontend. * A dedicated UI for creating, editing, deleting, and managing members of user groups is available in the [AdminScreen](psi_element://AdminScreen). * All resource sharing APIs are integrated into the frontend. * Users can view public/private status, owner information, and manage access for providers, models, and settings. * Sharing controls (make public/private, grant/revoke access) are available and permission-gated. * All new UI components are responsive, user-friendly, and include appropriate loading/error states. * Comprehensive testing of all new features, including permission checks and edge cases.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Torvian.eu/chatbot#109
No description provided.