Conversation
Adds a proprietary Gmail OAuth callback and config entries for mailbox credentials. This also introduces an email inbox UI with /mail routing, sidebar/file-source entry points, and an IndexedDB-backed email cache for connected accounts, messages, and attachments.
Update GmailOAuthController to redirect to /mail?gmail=connected instead of /editor/mail?gmail=connected. When a frontendUrl is configured the controller now appends "/mail?gmail=connected" (after trimming any trailing slash). This aligns the backend OAuth callback with the frontend route change.
Adds Gmail OAuth session-backed inbox listing and attachment download endpoints, including message metadata and attachment parsing in the proprietary backend. The email inbox page now recognizes Gmail callback state, loads real mailbox messages, and downloads attachments from the server instead of relying only on demo data.
Adds MIME metadata to demo email attachments and wires the inbox download action to fetch the attachment blob and import it via useFileHandler. This lets users add PDF and document files directly from email messages into the editor workflow.
Add in-memory per-user storage for Gmail OAuth connections and wire controller to use it. GmailOAuthService now holds a ConcurrentHashMap of GmailConnection records with saveConnection/getConnection APIs. GmailOAuthController records the current username in session, consults/saves the service-side connection as a fallback to session tokens/profiles, and persists the connection after successful OAuth. Also change EmailInboxPage back button to navigate to the editor route ("/editor") instead of history back. Note: connections are stored in-memory (ephemeral) in this change.
Add folder + pagination support to Gmail endpoints and wire it into the inbox UI. Backend: GmailOAuthController now accepts folder and pageToken; GmailOAuthService returns a GmailMessagePage (messages + nextPageToken) and queries labelIds/pageToken. Frontend: EmailInboxPage adds folder selection (inbox/starred/trash), incremental loading with nextPageToken, infinite-scroll handler, and duplicate-check against stored file stubs before import. Also wrap /mail route with RequireAuth guard. Small UI/button state updates to reflect active folder.
Add per-account display name settings and a loading-more spinner to the Email inbox UI; persist display name in localStorage. Use a ScrollArea viewportRef (useRef) for reliable infinite-scroll detection and show a small animated spinner when loading additional messages. Include a settings Modal to edit/save/cancel the display name and show the name in the account header (falls back to email). Small cleanup: remove an unused import (List) in GmailOAuthController.java.
Contributor
🌐 TOML Translation Verification Summary🔄 Reference Branch:
|
This change improves the email inbox by parsing sender names and addresses more robustly, adding a refresh action and attachment-type filter, and updating the unread badge to reflect the current inbox state. It also adds quick copy actions for subject and sender, and filters the attachment list to match the selected file type.
Add mailbox config and admin UI plus Gmail attachment-type filtering. Backend: add mailbox.gmail properties to ApplicationProperties, extend GmailOAuthController/Service to accept a `types` query (builds filename query) and expose mailbox in AdminSettingsController. Frontend: add AdminMailboxSection, include nav entry and VALID_NAV_KEYS, update EmailInboxPage (UI, CSS) to support multi-select attachment type filtering and pass types to API, and add OG metadata for /settings/adminMailbox. Note: mailbox changes require server restart.
Introduce GmailConnectionEntity and GmailConnectionRepository to persist encrypted OAuth tokens. Extend GmailOAuthService to save/load connections, refresh access tokens, revoke grants (disconnect), and return a valid token via getValidToken. Update GmailOAuthController to remove session-token reliance, add a DELETE /api/v1/email/gmail/connection endpoint, and use the service token helpers. Include mail package in DatabaseConfig scans. Frontend: add disconnectAccount action and UI button in EmailInboxPage and adjust a placeholder text.
Backend: load Gmail label names, map message labelIds to human-readable names (excluding UNREAD), and add labels to GmailMessage record. Frontend: add CSS for label chips and layout fixes; extend MailMessage with labels; track available/selected labels; add label MultiSelect filter and render label chips in message list and details. Also add custom attachment-type input and minor message-list sizing/auto-load adjustments. This ties Gmail label metadata into the UI and enables filtering/display of message labels.
Adds a shared email mailbox availability flag and hides the /mail route and mailbox UI when the feature is unavailable. Core/web builds enable the inbox, while desktop disables it to avoid unsupported routes. This also updates the demo inbox text and labels to use clearer English copy.
Contributor
📦 Tauri Desktop Builds Ready!The desktop applications have been built and are ready for testing. Download Artifacts:🍎 macOS Universal: Download Stirling-PDF-macos-universal (.dmg) - 340.5 MB Built from commit bfb0a9f |
Add localization entries for mailbox integration and admin mailbox settings. Adds admin.settings.mailbox (and gmail note) plus mailbox-related UI strings (connect, connectGmail, cancel, copySender/Subject, displayName & hints, file type/label filters, loadingMore, save, etc.) and registers "mailbox" in system settings list to enable UI for email attachment import and configuration.
Register the 'gmail_oauth_connections' table in the SaaS schema ownership list so it is included in ownership/management rules. Updated app/saas/src/main/java/stirling/software/saas/config/SaasSchemaOwnership.java to include the table name.
This change makes Gmail OAuth configuration checks null-safe so startup/configuration failures are handled predictably, keeps HttpClient replaceable for deterministic tests, and adds controller/service coverage for auth flow, token refresh, attachment queries, and disconnect behavior.
Add support for an allowlist of Google account emails for Gmail mailbox connections. Introduces ApplicationProperties.mailbox.gmail.allowedEmails, documents it in settings.yml.template, and exposes it in the admin mailbox settings UI. Server-side enforcement added to GmailOAuthService (throws 403) and GmailOAuthController now redirects the frontend to ?gmail=not-allowed on rejection. Frontend shows localized error messages and handles connect failures. Unit tests updated to cover allowlist behavior.
Contributor
|
🚀 Auto-deploying V2 version for PR #7666... This is an automated deployment for approved V2 contributors. |
Contributor
✅ Backend License Check PassedAll backend dependencies have valid and allowed licenses. The backend license report has been updated successfully. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI disclosure
This pull request was generated entirely by AI. The implementation, tests, configuration, security model, and UI require thorough human review before merging.
Summary
Adds a proprietary Gmail mailbox workflow for browsing messages with attachments and importing those attachments into the Stirling PDF workspace.
Included changes
gmail_oauth_connections.has:attachmentfiltering/mailinbox page with:/mailroute and mailbox entry points in the file-source and sidebar navigation.2.15.0.Configuration
Configure the Gmail OAuth values in the server settings:
mailbox.gmail.clientIdmailbox.gmail.clientSecretmailbox.gmail.redirectUrimailbox.gmail.allowedEmailsThe redirect URI must also be registered in the Google OAuth client. Leave
allowedEmailsempty to allow all Google accounts, or provide the permitted Google account addresses.Screenshots
Mailbox entry and account connection
Email inbox and attachment import
Mailbox administration
Validation
Checklist