-
Notifications
You must be signed in to change notification settings - Fork 534
feat: Implement session sharing UI and client-side decryption #356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add comprehensive translations for session sharing feature including: - Session sharing UI labels and actions - Access level descriptions (view, edit, manage) - Public link management - Consent and access logging - Error messages for sharing operations Translations added for all 9 supported languages: - English, Japanese, Russian, Polish, Spanish - Portuguese, Chinese (Simplified), Italian, Catalan - sources/text/_default.ts - sources/text/translations/ja.ts - sources/text/translations/ru.ts - sources/text/translations/pl.ts - sources/text/translations/es.ts - sources/text/translations/pt.ts - sources/text/translations/zh-Hans.ts - sources/text/translations/it.ts - sources/text/translations/ca.ts
Add comprehensive TypeScript types and API client for session sharing: Types (`sharingTypes.ts`): - ShareAccessLevel: view/edit/admin permissions - SessionShare: Direct user-to-user sharing - PublicSessionShare: Link-based public sharing - Request/Response types for all API operations - Custom error classes for error handling - Detailed TSDoc for all types and interfaces API Client (`apiSharing.ts`): - Direct sharing: create, update, delete, list shares - Public links: create, delete, access, manage - Shared sessions: list and retrieve - Access logs and blocked users management - Detailed TSDoc with @param, @returns, @throws tags - Automatic retry with backoff on failures - Type-safe error handling - sources/sync/sharingTypes.ts - sources/sync/apiSharing.ts
Implements SessionShareDialog for managing session sharing with users. Displays current shares, access levels, and provides UI for adding/removing shares. - sources/components/SessionSharing/SessionShareDialog.tsx
Adds translations for session sharing UI elements across all 9 supported languages. Includes strings for access levels, share management, and dialog text. - sources/text/_default.ts - sources/text/translations/ca.ts - sources/text/translations/es.ts - sources/text/translations/it.ts - sources/text/translations/ja.ts - sources/text/translations/pl.ts - sources/text/translations/pt.ts - sources/text/translations/ru.ts - sources/text/translations/zh-Hans.ts
Implements FriendSelector component for choosing friends to share sessions with. Features searchable friend list and access level selection. - sources/components/SessionSharing/FriendSelector.tsx
Adds translation keys for friend search and selection in session sharing. Includes searchFriends, noFriendsFound, and addShare across all languages. - sources/text/_default.ts - sources/text/translations/ca.ts - sources/text/translations/es.ts - sources/text/translations/it.ts - sources/text/translations/ja.ts - sources/text/translations/pl.ts - sources/text/translations/pt.ts - sources/text/translations/ru.ts - sources/text/translations/zh-Hans.ts
Implements PublicLinkDialog for creating and managing public share links. Features QR code generation, expiration settings, usage limits, and consent options. - sources/components/SessionSharing/PublicLinkDialog.tsx
Adds translation keys for public link creation and management UI. Includes expiration, usage limits, and consent options across all languages. - sources/text/_default.ts - sources/text/translations/ca.ts - sources/text/translations/es.ts - sources/text/translations/it.ts - sources/text/translations/ja.ts - sources/text/translations/pl.ts - sources/text/translations/pt.ts - sources/text/translations/ru.ts - sources/text/translations/zh-Hans.ts
Align frontend with server-side encryption implementation. The server now handles data key encryption automatically using recipient's public keys. Clients no longer provide encryptedDataKey when creating shares. Files: - sources/sync/sharingTypes.ts - sources/sync/apiSharing.ts - sources/app/(app)/session/[id]/sharing.tsx
Add publicKey field to UserProfile for encryption support. Add getUserID and getUserPublicKey helper methods to sync class for accessing user info. Files: - sources/sync/friendTypes.ts - sources/sync/sync.ts
Add translations for session sharing UI including direct sharing, public links, access levels, and error messages across all languages. Files: - sources/text/_default.ts - sources/text/translations/ca.ts - sources/text/translations/es.ts - sources/text/translations/it.ts - sources/text/translations/ja.ts - sources/text/translations/pl.ts - sources/text/translations/pt.ts - sources/text/translations/ru.ts - sources/text/translations/zh-Hans.ts
Add navigation button to session sharing management screen in the quick actions section of session info page. Files: - sources/app/(app)/session/[id]/info.tsx
Implement client-side logic to fetch and decrypt sessions shared with the current user. Uses existing Box decryption to decrypt encryptedDataKey with recipient's private key, enabling E2E encrypted session sharing. Files: - sources/sync/sync.ts
Add token-based encryption for public shares with client-side key generation. Clients generate random tokens, encrypt data keys with derived keys, and send both to server for E2E security. Files: - sources/sync/publicShareEncryption.ts - sources/sync/sync.ts - sources/sync/apiSharing.ts - sources/app/(app)/session/[id]/sharing.tsx
Store owner profile information and access level for shared sessions. This enables UI to display who shared the session and enforce permissions. - sources/sync/storageTypes.ts - sources/sync/sync.ts
Add translations for view-only mode and permission error messages. Covers all supported languages for access control feedback. - sources/text/_default.ts - sources/text/translations/ca.ts - sources/text/translations/es.ts - sources/text/translations/it.ts - sources/text/translations/ja.ts - sources/text/translations/pl.ts - sources/text/translations/pt.ts - sources/text/translations/ru.ts - sources/text/translations/zh-Hans.ts
Show owner badge with icon and name for shared sessions. Helps users quickly identify which sessions are shared with them. - sources/components/ActiveSessionsGroup.tsx
Support disabling input field and send button for read-only sessions. Implements UI enforcement of view-only access level. - sources/components/AgentInput.tsx
Disable input and block message sending for view-only sessions. Show appropriate placeholder and error messages based on access level. - sources/-session/SessionView.tsx
Hide sharing management button for non-admin access levels. Only session owners and admin-level users can modify sharing settings. - sources/app/(app)/session/[id]/info.tsx
Add method to store decrypted data keys from public shares. Expose server URL getter for public share API access. - sources/sync/sync.ts - sources/sync/publicShareEncryption.ts
Add translations for share access errors and consent flow. Covers not found, expired, decryption failure, and consent UI. - sources/text/_default.ts - sources/text/translations/ca.ts - sources/text/translations/es.ts - sources/text/translations/it.ts - sources/text/translations/ja.ts - sources/text/translations/pl.ts - sources/text/translations/pt.ts - sources/text/translations/ru.ts - sources/text/translations/zh-Hans.ts
Add screen for accessing sessions via public share links. Handles token-based decryption and consent flow with owner display. - sources/app/(app)/share/[token].tsx
Use username as primary display name with firstName as fallback. Maintains consistency across user profile displays. - sources/components/ActiveSessionsGroup.tsx
Remove non-existent CustomModal dependency from FriendSelector and PublicLinkDialog. Convert to standard View components without modal wrapper logic. - sources/components/SessionSharing/FriendSelector.tsx - sources/components/SessionSharing/PublicLinkDialog.tsx
Updated theme property references to match existing codebase patterns. Changed background->surface, typography->text, primary->textLink, margins to fixed pixel values. Applied consistent radio button styling using theme.colors.radio. - sources/components/SessionSharing/SessionShareDialog.tsx - sources/components/SessionSharing/FriendSelector.tsx - sources/components/SessionSharing/PublicLinkDialog.tsx
Added translation keys for share error messages, public link options, and consent flow. Includes shareNotFound, shareExpired, failedToDecrypt, and various UI labels. - sources/text/_default.ts
Fixed component props to match actual interfaces (Avatar, Item). Updated translation key format from sessionSharing to session.sharing. Prioritized username display over firstName+lastName concatenation. - sources/app/(app)/session/[id]/sharing.tsx - sources/app/(app)/share/[token].tsx
Added missing translation keys for session sharing feature. Includes error messages, public link options, and consent flow strings. - sources/text/translations/ru.ts - sources/text/translations/pl.ts - sources/text/translations/es.ts - sources/text/translations/pt.ts - sources/text/translations/ca.ts - sources/text/translations/it.ts - sources/text/translations/ja.ts - sources/text/translations/zh-Hans.ts
Added remaining translation keys for public link options, error messages, and consent flow. Includes expiration options, usage limits, and dynamic count functions. - sources/text/translations/ru.ts - sources/text/translations/pl.ts - sources/text/translations/es.ts - sources/text/translations/pt.ts - sources/text/translations/ca.ts - sources/text/translations/it.ts - sources/text/translations/ja.ts - sources/text/translations/zh-Hans.ts
Fixed parameter names in translation function calls. Changed count->used for usage count display functions. Changed common.close->common.cancel for consistency. Removed non-existent ownerUsername property reference. - sources/app/(app)/share/[token].tsx - sources/components/SessionSharing/PublicLinkDialog.tsx - sources/components/SessionSharing/SessionShareDialog.tsx
Replaced `sync.getServerUrl` with direct `getServerUrl` call. Removed redundant `getServerUrl` method from `sync`. - sources/app/(app)/share/[token].tsx - sources/sync/sync.ts
Remove unused Modal import from sharing screen - sources/app/(app)/share/[token].tsx
Replaced `ItemGroup` with `ItemList` for better structure. Adjusted styles and removed unused `isCreating` state logic. Consolidated common sections and updated QR code dimensions for consistency. - sources/components/SessionSharing/PublicLinkDialog.tsx
Updated icons in SessionShareDialog to use Ionicons for consistency and styling improvements. Adjusted size and color to align with design guidelines. - sources/components/SessionSharing/SessionShareDialog.tsx
Add three event schemas for real-time session sharing notifications. These schemas enable clients to receive updates when sessions are shared, share permissions are modified, or shares are revoked. - sources/sync/apiTypes.ts
Replace plain Item component with RoundButton for the create button. Makes the primary action more visible and easier to recognize in the dialog. - sources/components/SessionSharing/PublicLinkDialog.tsx
|
@ex3ndr (Are you the correct person to mention?) |
16af0c1 to
7213402
Compare
delete: unnecessary file delete: unnecessary file delete: unnecessary file
7213402 to
a7a2a6f
Compare
Summary
Implements client-side UI and logic for session sharing functionality, including shared session fetching, decryption, and management interface.
Features
Session Sharing Management UI
Shared Session Support
Client-Side Decryption
Real-time Events
Security
Implementation Details
New Components
API Integration
Translation Support
Technical Changes
Files modified:
Related PRs
Backend PR: slopus/happy-server#25
Notes
Public link functionality is marked as not implemented pending encryption design for anonymous access.