feat(profile): AWAN-152 Implemented MCP settings & token management - #50
Conversation
…2, and McpRepositoryImpl
…d navigation wiring
…rve raw token on DB write error, state hoisting, LocalClipboardManager, accessibility strings & design system spacing tokens
…Button/AwanCard and optimize dialog content paddings
… server URL in McpInfoScreen
…L and Client ID on McpInfoScreen
…dalBottomSheet containers
… and date formatting unit tests
Abdallah-Elsobky
left a comment
There was a problem hiding this comment.
vm_repo.txt:L1: 🔵 nit: binary artifact committed to repository root. Remove vm_repo.txt and add to .gitignore.
app/src/main/java/com/awan/app/AwanApp.kt:L254-255: 🔵 nit: inline fully-qualified references to McpSettingsRoute and McpInfoRoute. Move com.awan.feature.profile.api.* to top-level imports.
core/data/src/main/kotlin/com/awan/app/core/data/mcp/repository/McpRepositoryImpl.kt:L41: 🟡 risk: hardcoded Railway URL "https://backend-production-c701.up.railway.app/api/v1/mcp". Inject base URL from BuildConfig/NetworkConfig.
core/data/src/main/kotlin/com/awan/app/core/data/mcp/repository/McpRepositoryImpl.kt:L120-128: 🟡 risk: regenerateMcpToken() swallows revokeApiKey(id) failure and deletes local DB entity anyway. Abort local DB deletion if server revocation fails.
core/network/src/main/kotlin/com/awan/app/core/network/di/NetworkModule.kt:L181: 🔵 nit: inline fully-qualified return type com.awan.app.core.network.api.McpApiService. Add import statement at file header.
core/network/src/main/kotlin/com/awan/app/core/network/dto/mcp/:L1: 🔵 nit: CreateMcpTokenRequestDto, CreatedMcpTokenResponseDto, McpConnectionDetailsDto, and McpTokenResponseDto are unused. Delete dead DTO files.
feature/profile/impl/src/main/java/com/awan/feature/profile/impl/presentation/McpSettingsViewModel.kt:L60-91: 🟡 risk: loadData() launches 2 unmanaged coroutines per invocation without cancelling active collections. Store Job references and cancel before re-collecting on refresh.
feature/profile/impl/src/main/java/com/awan/feature/profile/impl/presentation/McpSettingsViewModel.kt:L65: 🟡 risk: connectionDetails success sets isLoading = false while getMcpTokensUseCase() collection is still running. Combine flows or track loading flags separately.
feature/profile/impl/src/main/java/com/awan/feature/profile/impl/presentation/McpSettingsViewModel.kt:L124-127: 🔵 nit: manual tokens state filtering in deleteToken() is redundant with Room DB flow. Rely on DB flow emission instead.
feature/profile/impl/src/main/java/com/awan/feature/profile/impl/ui/McpInfoScreen.kt:L64,77: 🟡 risk: hardcoded Railway URL in claudeSnippet and cursorSnippet. Template dynamic URL from McpConnectionDetails.
Implements MCP settings and token management updates for AWAN-152, including localized copy feedback, token creation dates, updated setup instructions, AI-assisted setup prompt, and removal of the obsolete OAuth Client ID UI.