From 8ff7e4db95ed11ac0caf2e99aa39176f1d4d7f41 Mon Sep 17 00:00:00 2001 From: Divide-By-0 Date: Wed, 28 Oct 2026 02:44:10 -0700 Subject: [PATCH 1/2] Refine raw email controls and recollapse expanded redactions --- .github/workflows/ci.yml | 5 +++++ src/components/MaskedText.tsx | 35 +++++++++++++++++++++++---------- src/pages/VerifyPage.tsx | 37 +++++++++++++++++++++++------------ 3 files changed, 55 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53f5707..fbc42f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,13 @@ name: CI on: pull_request: branches: [main] + types: [opened, synchronize, reopened, ready_for_review] + push: + branches: [main] jobs: typecheck: + if: github.event_name != 'pull_request' || github.event.pull_request.draft == false name: Type Check runs-on: ubuntu-latest steps: @@ -31,6 +35,7 @@ jobs: run: yarn test noir: + if: github.event_name != 'pull_request' || github.event.pull_request.draft == false name: Noir circuit tests runs-on: ubuntu-latest steps: diff --git a/src/components/MaskedText.tsx b/src/components/MaskedText.tsx index 85d7d1f..8468e03 100644 --- a/src/components/MaskedText.tsx +++ b/src/components/MaskedText.tsx @@ -6,15 +6,29 @@ interface MaskedTextProps { className?: string; } -const Blocks = ({ count }: { count: number }) => ( - - {'█'.repeat(count)} - -); +const Blocks = ({ count, onCollapse }: { count: number; onCollapse?: () => void }) => { + const blocks = ( + + {'█'.repeat(count)} + + ); + return onCollapse ? ( + + ) : blocks; +}; /** A long redacted stretch, collapsed to one row; click to show every block. */ function CollapsedRedaction({ content, hidden, lines }: { content: string; hidden: number; lines: number }) { @@ -23,7 +37,7 @@ function CollapsedRedaction({ content, hidden, lines }: { content: string; hidde return ( <> {content.split(/(\0+)/).map((part, i) => - part.startsWith('\0') ? : {part} + part.startsWith('\0') ? setOpen(false)} /> : {part} )} -

- )}
+ {bodyDecodedFromQp && ( +
+ +
+ + + +

+ Show raw displays the quoted-printable bytes covered by the proof. + The default view decodes them for readability using a fixed public step anyone can repeat. + {qpEvidence === "content" && " Encoding was detected from the text because its Content-Transfer-Encoding header is hidden."} +

+
+
+ )}
From 0b5a51e6db5e0c98d6005ae543ef64466550af0d Mon Sep 17 00:00:00 2001 From: Divide-By-0 Date: Wed, 28 Oct 2026 10:54:26 -0700 Subject: [PATCH 2/2] Preserve collapse focus and contain expanded redactions --- .github/workflows/ci.yml | 3 ++ src/components/MaskedText.tsx | 61 ++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fbc42f4..2a961ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,9 @@ on: push: branches: [main] +permissions: + contents: read + jobs: typecheck: if: github.event_name != 'pull_request' || github.event.pull_request.draft == false diff --git a/src/components/MaskedText.tsx b/src/components/MaskedText.tsx index 8468e03..e9e56cd 100644 --- a/src/components/MaskedText.tsx +++ b/src/components/MaskedText.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { useRef, useState } from 'react'; import { maskedSegments } from '../utils/maskedRuns'; interface MaskedTextProps { @@ -6,47 +6,48 @@ interface MaskedTextProps { className?: string; } -const Blocks = ({ count, onCollapse }: { count: number; onCollapse?: () => void }) => { - const blocks = ( - - {'█'.repeat(count)} - - ); - return onCollapse ? ( - - ) : blocks; -}; +const Blocks = ({ count }: { count: number }) => ( + + {'█'.repeat(count)} + +); /** A long redacted stretch, collapsed to one row; click to show every block. */ function CollapsedRedaction({ content, hidden, lines }: { content: string; hidden: number; lines: number }) { const [open, setOpen] = useState(false); + const restoreFocus = useRef(false); if (open) { return ( - <> + - + collapse + ); } return (