Flag external senders, multi-select, and combine signed docs with their certificate - #137
Merged
Merged
Conversation
…be multi-selected Sender rows and the open message now badge and warn on anything from outside brockcsc.ca, a "Details" toggle surfaces reply-to/bcc/timing/raw headers, and messages get checkboxes with a bulk mark read/unread, star, archive and delete bar backed by two new batched JMAP routes.
…hes every mail client The webmail badge alone never shows up in Thunderbird, Outlook or a phone's mail app. install-external-banner.sh installs external-sender-banner.sieve as Stalwart's system script (same x:.../set pattern as refresh-cert.sh), stamping the warning into the body and an X-BrockCSC-External header for anything not from brockcsc.ca, no matter what reads it. Idempotent; run by hand like the cert script, nothing here runs it automatically.
Checkboxes plus a select-all, with a "Download selected" action that saves each picked document's current version in turn.
Merges the stamped document and Certificate of Completion on the fly with pdf-lib rather than storing a third copy. Added to both the exec document view and the external signer's completed-envelope page.
Login now asks Keycloak for an offline refresh token, governed by its own much longer idle timeout instead of the 30-minute SSO session idle that was expiring mail mid-session whenever the keepalive heartbeat missed a gap (backgrounded tab, sleep). Falls back to a plain token if the client isn't set up for offline access, so this can't break login. Also fires the heartbeat immediately on mount/focus instead of only every 10 minutes.
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.
Description
Checklist
npm run typecheck,npm run lint,npm run format:checkandnpm run buildpassnpm run db:generate) — n/a, no schema changes.env.example,.env.local.example,deploy/docker-compose.ymlandkomodo/deploy-context.mjs— n/a, no new env vars (the Sieve install script's own knobs have defaults)requireAdmin/requireApproverTesting Evidence
Logged into the preview deploy and confirmed live:
POST /api/mail/messages/bulk/flags→ 200)Not exercised live: the combined signed+certificate download button. This preview's document library has real signed/certificate PDF versions (synced from prod), but the signing-request records themselves are deliberately excluded from preview/uat data (no signing PII), so there was nothing to attach the button to. Verified
buildCombinedPdfinstead with a standalone local test (merges a 3-page + 2-page PDF, reloads the result, confirms 5 pages).Two things worth flagging before merge:
deploy/mail/**changed, which triggers Deploy Mail and restarts the live Stalwart stack (destroy_before_deploy: true) even though the Sieve script itself still needs a manualinstall-external-banner.shrun on the VPS to take effect.brockcsc-webKeycloak client has "Offline Access" as an assigned client scope. Login succeeding on the preview confirms it didn't break anything, but confirming it actually got an offline token (vs. quietly falling back) needs a look at server logs.