diff --git a/docs/GLOSSARY.md b/docs/GLOSSARY.md
index 95f8a908d7..15f3789bd6 100644
--- a/docs/GLOSSARY.md
+++ b/docs/GLOSSARY.md
@@ -7431,6 +7431,8 @@ A paper signed before v2.9096's deploy keeps its emptied link and still reads as
Since v2.9110 that thank-you offers no way into the app to an outside signer or a customer, as the page says right after a signature (`signedLinkAudience`).
Since v2.9113 (finding 722) the thank-you says that no copy was emailed and to ask the person who gave the paper for one when `accept-contract` answers `not_sent`, and nothing for `pending` (`signedCopyWords` in [`signerAfterSigning.ts`](../src/lib/contracts/signerAfterSigning.ts)).
Since v2.9143 (finding 685) the signing page asks the public layout for its compact band in each of its five states, so on a phone the paper's name stands on the first screen, as the page a signing code opens has since it was built ([`ContractAccept.tsx`](../src/pages/ContractAccept.tsx)).
+Since v2.9279 the signing page's paper box carries **Full screen**: the press opens the same box over the whole window, **Back to signing** at its head and its foot or Escape puts it back, and the reader's place is kept both ways as a share of the way down ([`PaperReadBox.tsx`](../src/components/contracts/PaperReadBox.tsx), words and place in [`paperFullWindow.ts`](../src/lib/contracts/paperFullWindow.ts)).
+The signing page holds nobody to reading to the end before they sign, so the full window changes no rule of the signing.
Since v2.9129 (punch list #458, call 15) a signed agreement's record carries **Email the signed copy…** for the four roles that send a paper ([`SignedCopyEmailPress.tsx`](../src/components/contracts/SignedCopyEmailPress.tsx), words and rules in [`signedCopyEmail.ts`](../src/lib/contracts/signedCopyEmail.ts)).
It opens **Email it to** on the address the paper kept (`signer_email`), shows **Mobile they gave** when a walk-up off a signing code gave one (`signer_phone`), and says when a copy last went (`signed_copy_sent_at`).
**Email the copy** asks `person-paper-pdf` with `email_to`, which sends the signature's own email and PDF to that address and changes nothing else on the paper.
diff --git a/docs/recent-features/v2.9279.md b/docs/recent-features/v2.9279.md
new file mode 100644
index 0000000000..2cd974ff46
--- /dev/null
+++ b/docs/recent-features/v2.9279.md
@@ -0,0 +1,29 @@
+# v2.9279 — Signing page: read the paper full screen (2026-12-03)
+
+The owner's words, with a picture of the public signing page: *can we add a full screen button to be able to see the contract full screen?* Client only. No migration, no function change, nothing owed on prod.
+
+## What changed
+
+- **The paper's box carries Full screen** ([`PaperReadBox.tsx`](../../src/components/contracts/PaperReadBox.tsx)). The press stands over the box at its right, with the app's full-screen glyph. It opens the same box over the whole window: one box that changes its shape, never a second copy of the paper, so what is read in the window is the paper that is signed.
+- **Back to signing** stands at the window's head, which stays in view while the paper scrolls, and again as a wide press at the paper's end. Escape closes the window too. The cursor goes to **Back to signing** on the way in and back to **Full screen** on the way out, and Tab stays inside the window while it is open.
+- **The reader's place is kept both ways** ([`paperFullWindow.ts`](../../src/lib/contracts/paperFullWindow.ts), `readPlace` and `scrollTopForPlace`). A wider window wraps the words onto fewer lines, so the place is kept as a share of the way down, not as a count of pixels.
+- **The page stays light.** The public layout pins the page light, and the window is the page's own box, so it is light in a dark browser too.
+- **On a phone** the presses are 44 px tall, the window's top keeps clear of the status bar (`--app-top-chrome`, held by `check:status-bar`) and its foot of the home bar, the head never scrolls away, the page behind does not scroll, and the app's *A new version is ready* pill waits as it does for any window that fills the screen.
+- **Spanish**: a paper read in Spanish reads **Pantalla completa** and **Volver a firmar**.
+
+## Where it holds
+
+Every paper `/contract/accept` draws as words: a plain paper's box, and the box under **The full agreement** on a paper built from clauses. A fillable form is not a scrolling box of words and has no such press.
+
+## What the page asks before a signature
+
+The page was read first for a hold on reading to the end. There is none: the form asks for a name, the consent and the tick *I have read and agree to this contract*, and nothing reads how far the box was scrolled. So the full window changes no rule of the signing, and a test signs after reading in the window.
+
+## Not covered
+
+- `/contract/sign`, the job's own contract, folds its terms under **Read the full terms** and is a different page. It has no such press yet.
+- Not looked at on the live site: the page needs a real signing link, so the look goes through the walker.
+
+## Tests
+
+`paperFullWindow.test.ts` (the words, the place, Tab's wrap), `PaperReadBox.render.test.tsx` (the window, its two closes, Escape, Tab, the place, Spanish) and `ContractAccept.fullWindow.render.test.tsx` (the page offers it on a plain paper and on a paper built from clauses, and a signer signs after it).
diff --git a/src/components/contracts/PaperReadBox.render.test.tsx b/src/components/contracts/PaperReadBox.render.test.tsx
new file mode 100644
index 0000000000..8f084e697d
--- /dev/null
+++ b/src/components/contracts/PaperReadBox.render.test.tsx
@@ -0,0 +1,108 @@
+// @vitest-environment jsdom
+import { beforeEach, describe, expect, it, vi } from 'vitest'
+import { fireEvent, render, screen } from '@testing-library/react'
+import { PaperReadBox } from './PaperReadBox'
+
+const BOX = { maxHeight: 420, overflow: 'auto' } as const
+
+function mount(lang?: 'en' | 'es') {
+ return render(
+
+
+
The paper's own words.
+
+
+
,
+ )
+}
+
+// The scroll lock puts the page back where it was when the window closes, and jsdom has no scrollTo.
+beforeEach(() => {
+ window.scrollTo = vi.fn() as unknown as typeof window.scrollTo
+})
+
+describe('PaperReadBox: the paper over the whole window (v2.9279)', () => {
+ it('draws the paper in its box with Full screen over it, and no window yet', () => {
+ mount()
+ expect(screen.getByRole('button', { name: 'Full screen' })).toBeTruthy()
+ expect(screen.queryByRole('dialog')).toBeNull()
+ expect(screen.queryByRole('button', { name: 'Back to signing' })).toBeNull()
+ expect(screen.getByTestId('paper-paper').style.maxHeight).toBe('420px')
+ })
+
+ it('Full screen opens the same paper over the whole window, named for the paper', () => {
+ mount()
+ const words = screen.getByTestId('words')
+ fireEvent.click(screen.getByRole('button', { name: 'Full screen' }))
+ const win = screen.getByRole('dialog', { name: 'ZZ Test Agreement, full screen' })
+ expect(win.style.position).toBe('fixed')
+ expect(win.getAttribute('aria-modal')).toBe('true')
+ // The same words, never a second copy: what is read in the window is the paper that is signed.
+ expect(screen.getAllByTestId('words')).toHaveLength(1)
+ expect(screen.getByTestId('words')).toBe(words)
+ expect(win.contains(words)).toBe(true)
+ // The window's top keeps clear of a phone's status bar, and its head stands over the box that scrolls.
+ expect(win.style.paddingTop).toBe('var(--app-top-chrome, 0px)')
+ expect(screen.getByTestId('paper-paper').style.overflow).toBe('auto')
+ // A press at the head and one at the foot, and the cursor on the head's.
+ expect(screen.getAllByRole('button', { name: 'Back to signing' })).toHaveLength(2)
+ expect(document.activeElement).toBe(screen.getByTestId('paper-back'))
+ })
+
+ it('Back to signing closes it, from the head and from the foot, and the cursor returns to Full screen', () => {
+ mount()
+ for (const press of ['paper-back', 'paper-back-foot']) {
+ fireEvent.click(screen.getByRole('button', { name: 'Full screen' }))
+ fireEvent.click(screen.getByTestId(press))
+ expect(screen.queryByRole('dialog')).toBeNull()
+ expect(screen.getByTestId('paper-paper').style.position).toBe('')
+ expect(document.activeElement).toBe(screen.getByRole('button', { name: 'Full screen' }))
+ }
+ })
+
+ it('Escape closes it', () => {
+ mount()
+ fireEvent.click(screen.getByRole('button', { name: 'Full screen' }))
+ fireEvent.keyDown(window, { key: 'Escape' })
+ expect(screen.queryByRole('dialog')).toBeNull()
+ expect(screen.getByTestId('words')).toBeTruthy()
+ })
+
+ it('Tab stays inside the window while it is open', () => {
+ mount()
+ fireEvent.click(screen.getByRole('button', { name: 'Full screen' }))
+ const head = screen.getByTestId('paper-back')
+ const foot = screen.getByTestId('paper-back-foot')
+ foot.focus()
+ fireEvent.keyDown(window, { key: 'Tab' })
+ expect(document.activeElement).toBe(head)
+ fireEvent.keyDown(window, { key: 'Tab', shiftKey: true })
+ expect(document.activeElement).toBe(foot)
+ })
+
+ it("keeps the reader's place going in and coming back", () => {
+ mount()
+ const box = screen.getByTestId('paper-paper')
+ // The box is 420 tall over 1,420 of words. The window is 900 tall, and wider, so the same words run 1,700.
+ const isFull = () => document.querySelector('[data-paper-full]') !== null
+ let top = 250
+ Object.defineProperty(box, 'scrollTop', { configurable: true, get: () => top, set: (v: number) => { top = v } })
+ Object.defineProperty(box, 'scrollHeight', { configurable: true, get: () => (isFull() ? 1700 : 1420) })
+ Object.defineProperty(box, 'clientHeight', { configurable: true, get: () => (isFull() ? 900 : 420) })
+ // A quarter of the way down the box is a quarter of the way down the window.
+ fireEvent.click(screen.getByRole('button', { name: 'Full screen' }))
+ expect(screen.getByTestId('paper-paper')).toBe(box)
+ expect(top).toBe(200)
+ // Read on to half way in the window, and come back half way down the box.
+ top = 400
+ fireEvent.click(screen.getByTestId('paper-back'))
+ expect(top).toBe(500)
+ })
+
+ it('reads in Spanish for a paper read in Spanish', () => {
+ mount('es')
+ fireEvent.click(screen.getByRole('button', { name: 'Pantalla completa' }))
+ expect(screen.getByRole('dialog', { name: 'ZZ Test Agreement, pantalla completa' })).toBeTruthy()
+ expect(screen.getAllByRole('button', { name: 'Volver a firmar' })).toHaveLength(2)
+ })
+})
diff --git a/src/components/contracts/PaperReadBox.tsx b/src/components/contracts/PaperReadBox.tsx
new file mode 100644
index 0000000000..66504c3947
--- /dev/null
+++ b/src/components/contracts/PaperReadBox.tsx
@@ -0,0 +1,178 @@
+/**
+ * The box a signer reads a paper in, with **Full screen** over it (v2.9279). The box is the page's own: half a screen
+ * tall, scrolling. The press opens the same box over the whole window, and **Back to signing**, at its head and at
+ * its foot, or Escape, puts it back. The words, the place kept both ways and Tab's wrap are `paperFullWindow.ts`.
+ *
+ * It is one box that changes its shape, never a second copy of the paper, so what the signer reads in the window is
+ * the paper they sign. The page is pinned light, and the window stands inside the page, so it is light too.
+ *
+ * The window is a column: its head, which never scrolls, over the box, which does. So the head stays under a phone's
+ * status bar while the words run, and the window's own top keeps clear of it (`--app-top-chrome`).
+ */
+import { useCallback, useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ReactNode } from 'react'
+import { useBodyScrollLock } from '../../hooks/useBodyScrollLock'
+import { markPhoneWindowOpen } from '../../lib/phoneSheetOpen'
+import { PAPER_FULL_WINDOW_WORDS, readPlace, scrollTopForPlace, tabWrap, type PaperWindowLang } from '../../lib/contracts/paperFullWindow'
+import { ModalFullScreenIcon } from '../icons/ModalFullScreenIcon'
+
+/** A fingertip, as the signing form's own presses stand. */
+const PRESS_MIN_HEIGHT = 44
+
+const openPress: CSSProperties = {
+ display: 'inline-flex',
+ alignItems: 'center',
+ gap: '0.4rem',
+ minHeight: PRESS_MIN_HEIGHT,
+ padding: '0.3rem 0.8rem',
+ border: '1px solid var(--border-strong)',
+ borderRadius: 6,
+ background: 'var(--surface)',
+ color: 'var(--text-700)',
+ fontFamily: 'inherit',
+ fontSize: '0.875rem',
+ fontWeight: 600,
+ cursor: 'pointer',
+}
+const fullWindow: CSSProperties = {
+ position: 'fixed',
+ inset: 0,
+ zIndex: 9000,
+ display: 'flex',
+ flexDirection: 'column',
+ background: 'var(--surface)',
+ color: 'var(--text-base)',
+ outline: 'none',
+ paddingTop: 'var(--app-top-chrome, 0px)',
+}
+const head: CSSProperties = {
+ flex: '0 0 auto',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'space-between',
+ gap: '0.75rem',
+ padding: '0.5rem 1rem',
+ borderBottom: '1px solid var(--border)',
+ background: 'var(--surface)',
+}
+/** The box while the window is open: the rest of the window, scrolling. */
+const fullBox: CSSProperties = { flex: '1 1 auto', minHeight: 0, overflow: 'auto', overscrollBehavior: 'contain', fontSize: '0.95rem' }
+const headName: CSSProperties = { minWidth: 0, fontSize: '1rem', fontWeight: 700, color: 'var(--text-strong)', overflowWrap: 'anywhere' }
+const words: CSSProperties = { maxWidth: '46rem', margin: '0 auto', padding: '1rem 1rem 1.25rem' }
+const foot: CSSProperties = { maxWidth: '46rem', margin: '0 auto', padding: '0 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px))' }
+const footPress: CSSProperties = {
+ width: '100%',
+ minHeight: PRESS_MIN_HEIGHT,
+ padding: '0.5rem 1rem',
+ border: '1px solid #2563eb',
+ borderRadius: 6,
+ background: '#2563eb',
+ color: 'white',
+ fontFamily: 'inherit',
+ fontSize: '1rem',
+ fontWeight: 600,
+ cursor: 'pointer',
+}
+
+export function PaperReadBox({
+ paperName,
+ lang = 'en',
+ boxStyle,
+ testId = 'paper-read-box',
+ children,
+}: {
+ /** The paper's name: the full window's heading, and its name for a screen reader. */
+ paperName: string
+ lang?: PaperWindowLang
+ /** The box as the page draws it while it is not full. */
+ boxStyle: CSSProperties
+ testId?: string
+ children: ReactNode
+}) {
+ const [full, setFull] = useState(false)
+ const win = useRef(null)
+ const box = useRef(null)
+ const open = useRef(null)
+ const back = useRef(null)
+ /** The reader's place, read just before the box changes its shape. */
+ const place = useRef(0)
+ const turned = useRef(false)
+ const w = PAPER_FULL_WINDOW_WORDS[lang]
+
+ const turn = useCallback((next: boolean) => {
+ if (box.current) place.current = readPlace(box.current)
+ turned.current = true
+ setFull(next)
+ }, [])
+
+ // The page behind stays still, and on a phone the app's pill waits as it does for any window that fills the screen.
+ useBodyScrollLock(full)
+ useEffect(() => (full ? markPhoneWindowOpen() : undefined), [full])
+
+ // After the box has changed its shape: the same place, and the cursor on the press that undoes what was pressed.
+ useLayoutEffect(() => {
+ if (!turned.current) return
+ turned.current = false
+ const el = box.current
+ if (el) el.scrollTop = scrollTopForPlace(place.current, el)
+ ;(full ? back.current : open.current)?.focus()
+ }, [full])
+
+ useEffect(() => {
+ if (!full) return
+ const onKey = (e: KeyboardEvent) => {
+ if (e.key === 'Escape' && !e.defaultPrevented) {
+ e.preventDefault()
+ turn(false)
+ return
+ }
+ if (e.key !== 'Tab' || !win.current) return
+ const stops = Array.from(win.current.querySelectorAll('button, a[href], [tabindex]:not([tabindex="-1"])'))
+ const to = tabWrap(stops.length, stops.indexOf(document.activeElement as HTMLElement), e.shiftKey)
+ if (to == null) return
+ e.preventDefault()
+ stops[to]?.focus()
+ }
+ window.addEventListener('keydown', onKey)
+ return () => window.removeEventListener('keydown', onKey)
+ }, [full, turn])
+
+ return (
+
+
+
+
+
+ {full ? (
+
+ {paperName}
+
+
+ ) : null}
+
+
{children}
+ {full ? (
+
+
+
+ ) : null}
+
+
+
+ )
+}
+
+export default PaperReadBox
diff --git a/src/content/help/send-one-contract-to-one-person.md b/src/content/help/send-one-contract-to-one-person.md
index cd1eeae270..4f3a595ac1 100644
--- a/src/content/help/send-one-contract-to-one-person.md
+++ b/src/content/help/send-one-contract-to-one-person.md
@@ -124,6 +124,8 @@ The CLICK. letterhead on the same paper as the sub portal · **One document to s
- **Opening message** is the only part in your words. Leave it blank for the default line. Or write it like a text to the person: "Taunya, here's the agreement we talked about. Sign once and it covers every job."
- The link works for **14 days**. Sending again mints a fresh link and a fresh email.
+The link opens the signer's page. The paper stands in a box above the signing form. **Full screen** opens the paper over the whole window. **Back to signing** brings the signer back to the form.
+
## When the email does not go
Sometimes the mail service refuses an address. The paper is still made, and its signing link works. The window does not close. An amber block above **Send email** says so.
diff --git a/src/content/releaseNotes/v2.9279.ts b/src/content/releaseNotes/v2.9279.ts
new file mode 100644
index 0000000000..7651a7029d
--- /dev/null
+++ b/src/content/releaseNotes/v2.9279.ts
@@ -0,0 +1,16 @@
+import type { ReleaseNote } from '../../lib/releaseNotes'
+
+const note: ReleaseNote = {
+ version: 'v2.9279',
+ date: '2026-12-03',
+ title: 'Signing page: read the paper full screen',
+ kind: 'feature',
+ highlights: [
+ 'The page a signer opens now has Full screen over the paper. One press opens the paper over the whole window, so a long agreement is no longer read through a small box.',
+ 'Back to signing, at the top and at the end of the paper, brings the signer back to the form. Escape does the same.',
+ 'The signer keeps their place going in and coming back. On a phone the presses are a fingertip tall.',
+ 'Signing itself is unchanged. The page asks for a name and the ticks, as before.',
+ ],
+}
+
+export default note
diff --git a/src/lib/contracts/paperFullWindow.test.ts b/src/lib/contracts/paperFullWindow.test.ts
new file mode 100644
index 0000000000..67c9b75bd0
--- /dev/null
+++ b/src/lib/contracts/paperFullWindow.test.ts
@@ -0,0 +1,62 @@
+import { describe, expect, it } from 'vitest'
+import { PAPER_FULL_WINDOW_WORDS, readPlace, scrollTopForPlace, tabWrap } from './paperFullWindow'
+
+describe('the paper over the whole window (v2.9279)', () => {
+ it('names its two presses in both languages, and the window by its paper', () => {
+ expect(PAPER_FULL_WINDOW_WORDS.en.open).toBe('Full screen')
+ expect(PAPER_FULL_WINDOW_WORDS.en.back).toBe('Back to signing')
+ expect(PAPER_FULL_WINDOW_WORDS.en.windowName('Vendor Secrecy Agreement')).toBe('Vendor Secrecy Agreement, full screen')
+ expect(PAPER_FULL_WINDOW_WORDS.es.open).toBe('Pantalla completa')
+ expect(PAPER_FULL_WINDOW_WORDS.es.back).toBe('Volver a firmar')
+ })
+
+ it('reads the place as a share of the way down', () => {
+ expect(readPlace({ scrollTop: 0, scrollHeight: 1420, clientHeight: 420 })).toBe(0)
+ expect(readPlace({ scrollTop: 250, scrollHeight: 1420, clientHeight: 420 })).toBe(0.25)
+ expect(readPlace({ scrollTop: 1000, scrollHeight: 1420, clientHeight: 420 })).toBe(1)
+ })
+
+ it('a box with nothing to scroll is at the top', () => {
+ expect(readPlace({ scrollTop: 0, scrollHeight: 300, clientHeight: 420 })).toBe(0)
+ expect(readPlace({ scrollTop: 40, scrollHeight: 420, clientHeight: 420 })).toBe(0)
+ expect(readPlace({ scrollTop: Number.NaN, scrollHeight: 1420, clientHeight: 420 })).toBe(0)
+ })
+
+ it('never reads a place past either end', () => {
+ expect(readPlace({ scrollTop: -30, scrollHeight: 1420, clientHeight: 420 })).toBe(0)
+ expect(readPlace({ scrollTop: 5000, scrollHeight: 1420, clientHeight: 420 })).toBe(1)
+ })
+
+ it('stands at the same share in a box of another size', () => {
+ // A quarter of the way down the half-screen box is a quarter of the way down the whole window.
+ const place = readPlace({ scrollTop: 250, scrollHeight: 1420, clientHeight: 420 })
+ expect(scrollTopForPlace(place, { scrollHeight: 1700, clientHeight: 900 })).toBe(200)
+ // And back again.
+ const back = readPlace({ scrollTop: 200, scrollHeight: 1700, clientHeight: 900 })
+ expect(scrollTopForPlace(back, { scrollHeight: 1420, clientHeight: 420 })).toBe(250)
+ })
+
+ it('the end stays the end, and the top stays the top', () => {
+ expect(scrollTopForPlace(1, { scrollHeight: 1700, clientHeight: 900 })).toBe(800)
+ expect(scrollTopForPlace(0, { scrollHeight: 1700, clientHeight: 900 })).toBe(0)
+ })
+
+ it('a place that is no number, or a window with nothing to scroll, is the top', () => {
+ expect(scrollTopForPlace(Number.NaN, { scrollHeight: 1700, clientHeight: 900 })).toBe(0)
+ expect(scrollTopForPlace(0.5, { scrollHeight: 600, clientHeight: 900 })).toBe(0)
+ expect(scrollTopForPlace(7, { scrollHeight: 1700, clientHeight: 900 })).toBe(800)
+ })
+
+ it('Tab wraps at the ends of the window and is left alone between them', () => {
+ expect(tabWrap(3, 2, false)).toBe(0)
+ expect(tabWrap(3, 0, true)).toBe(2)
+ expect(tabWrap(3, 1, false)).toBeNull()
+ expect(tabWrap(3, 1, true)).toBeNull()
+ })
+
+ it('Tab from outside the window lands inside it', () => {
+ expect(tabWrap(3, -1, false)).toBe(0)
+ expect(tabWrap(3, -1, true)).toBe(2)
+ expect(tabWrap(0, -1, false)).toBeNull()
+ })
+})
diff --git a/src/lib/contracts/paperFullWindow.ts b/src/lib/contracts/paperFullWindow.ts
new file mode 100644
index 0000000000..5079c08bd7
--- /dev/null
+++ b/src/lib/contracts/paperFullWindow.ts
@@ -0,0 +1,60 @@
+/**
+ * The paper over the whole window, on the signer's page (v2.9279). The page draws a paper in a box that scrolls, half
+ * a screen tall, with the signing form under it. The owner's words, with a picture of that box: *can we add a full
+ * screen button to be able to see the contract full screen?* One press opens the same paper over the whole window,
+ * and one press, or Escape, brings the signer back to the signing form.
+ *
+ * The page holds nobody to reading to the end before they sign: the form asks for a name and the tick *I have read
+ * and agree*, and nothing reads how far the box was scrolled. So the full window changes no rule of the signing.
+ *
+ * The reader's place is kept both ways. A wider window wraps the words onto fewer lines, so a count of pixels would
+ * land somewhere else. The place is kept as a share of the way down: a third of the way down the box is a third of
+ * the way down the window.
+ *
+ * Pure: the words, the place, and where Tab goes while the window is open.
+ */
+
+export type PaperWindowLang = 'en' | 'es'
+
+export const PAPER_FULL_WINDOW_WORDS: Readonly string }>> = {
+ en: { open: 'Full screen', back: 'Back to signing', windowName: (paper) => `${paper}, full screen` },
+ es: { open: 'Pantalla completa', back: 'Volver a firmar', windowName: (paper) => `${paper}, pantalla completa` },
+}
+
+/** What a scrolling box says of itself. */
+export interface ScrollBox {
+ scrollTop: number
+ scrollHeight: number
+ clientHeight: number
+}
+
+function scrollRoom(box: Pick): number {
+ const room = box.scrollHeight - box.clientHeight
+ return Number.isFinite(room) && room > 0 ? room : 0
+}
+
+/** How far down the reader is: 0 at the top, 1 at the end. A box with nothing to scroll is at the top. */
+export function readPlace(box: ScrollBox): number {
+ const room = scrollRoom(box)
+ if (room === 0 || !Number.isFinite(box.scrollTop)) return 0
+ return Math.min(1, Math.max(0, box.scrollTop / room))
+}
+
+/** Where a box scrolls to, to stand at a place. A place that is no number is the top. */
+export function scrollTopForPlace(place: number, box: Pick): number {
+ const share = Number.isFinite(place) ? Math.min(1, Math.max(0, place)) : 0
+ return Math.round(share * scrollRoom(box))
+}
+
+/**
+ * Where Tab goes while the window is open, so the cursor never leaves it for the page behind. `at` is the place of
+ * the press that has the cursor among the window's `count` presses and links, or -1 when the cursor is on none of
+ * them. The answer is the one to take the cursor, or null to let the browser move it.
+ */
+export function tabWrap(count: number, at: number, back: boolean): number | null {
+ if (count <= 0) return null
+ if (at < 0 || at >= count) return back ? count - 1 : 0
+ if (back && at === 0) return count - 1
+ if (!back && at === count - 1) return 0
+ return null
+}
diff --git a/src/pages/ContractAccept.fullWindow.render.test.tsx b/src/pages/ContractAccept.fullWindow.render.test.tsx
new file mode 100644
index 0000000000..1486fabd23
--- /dev/null
+++ b/src/pages/ContractAccept.fullWindow.render.test.tsx
@@ -0,0 +1,131 @@
+// @vitest-environment jsdom
+/**
+ * The sign page and the paper over the whole window (v2.9279). The page draws a paper's words in a box half a screen
+ * tall. **Full screen** opens the same words over the whole window, and **Back to signing** or Escape brings the signer
+ * back to the form. The page holds nobody to reading to the end before they sign, so a signer who read in the window
+ * signs as one who read in the box does. Every name here is made up and the words are placeholders.
+ */
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
+import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
+import { MemoryRouter } from 'react-router-dom'
+import type { ReactNode } from 'react'
+
+vi.mock('../lib/supabase', async () => ({ supabase: (await import('../test/renderSmokeMocks')).makeSupabaseStub() }))
+vi.mock('../hooks/useAuth', async () => {
+ const m = await import('../test/renderSmokeMocks')
+ return m.useAuthModuleMock({ user: null, role: null })
+})
+
+import { ToastProvider } from '../contexts/ToastContext'
+import ContractAccept from './ContractAccept'
+import { installDomShims } from '../test/renderSmokeMocks'
+
+const PLAIN = {
+ id: 'pcd-9',
+ person_name: 'Lena Park',
+ signer_name: 'Lena Park',
+ signer_title: 'Branch manager',
+ signing_for: 'Tallgrass Supply Co.',
+ audience: 'outside',
+ document_name: 'ZZ Test vendor paper',
+ signing_body_html: '
Placeholder words to keep secret.
',
+ signing_body_format: 'html',
+ canonical_document_url: null,
+ form: null,
+ clause_paper: null,
+}
+const PAPER_EN = {
+ paperId: 'doc-msa',
+ revision: 3,
+ lang: 'en',
+ clauses: [{ id: 'msa-1', v: 2, n: 1, text: 'Term: one year from signing.' }],
+ exhibit: [],
+ exhibitFor: [],
+ between: 'ZZ Test Builder and ZZ Test Excavation',
+}
+const PAPER_ES = { ...PAPER_EN, lang: 'es', clauses: [{ id: 'msa-1', v: 2, n: 1, text: 'Plazo: un año desde la firma.' }] }
+const CLAUSES = { ...PLAIN, document_name: 'ZZ Test services agreement', signing_body_html: '
The standard terms.
', clause_paper: { revision: 3, en: PAPER_EN, es: PAPER_ES } }
+
+let loaded: Record = PLAIN
+const posts: Record[] = []
+
+beforeEach(() => {
+ loaded = PLAIN
+ posts.length = 0
+ vi.stubGlobal(
+ 'fetch',
+ vi.fn(async (url: string, init?: RequestInit) => {
+ if (String(url).includes('get-contract-for-signer')) return new Response(JSON.stringify(loaded), { status: 200 })
+ posts.push(JSON.parse(String(init?.body ?? '{}')) as Record)
+ return new Response(JSON.stringify({ ok: true, documentId: 'pcd-9' }), { status: 200 })
+ }),
+ )
+})
+afterEach(() => {
+ cleanup()
+ vi.unstubAllGlobals()
+})
+
+function open() {
+ installDomShims()
+ window.scrollTo = vi.fn() as unknown as typeof window.scrollTo
+ return render(, {
+ wrapper: ({ children }: { children: ReactNode }) => (
+
+
+ {children}
+
+
+ ),
+ })
+}
+
+describe('the sign page and the paper over the whole window', () => {
+ it('offers Full screen over the paper, and the window is named for the paper', async () => {
+ open()
+ const words = await screen.findByText('Placeholder words to keep secret.')
+ expect(screen.queryByRole('dialog')).toBeNull()
+ fireEvent.click(screen.getByRole('button', { name: 'Full screen' }))
+ const win = screen.getByRole('dialog', { name: 'ZZ Test vendor paper, full screen' })
+ // The same words, never a second copy of the paper.
+ expect(win.contains(words)).toBe(true)
+ expect(screen.getAllByText('Placeholder words to keep secret.')).toHaveLength(1)
+ expect(screen.getAllByRole('button', { name: 'Back to signing' })).toHaveLength(2)
+ })
+
+ it('Back to signing brings the signer back to the form, and they sign as before', async () => {
+ open()
+ await screen.findByText('Placeholder words to keep secret.')
+ fireEvent.click(screen.getByRole('button', { name: 'Full screen' }))
+ fireEvent.click(screen.getByTestId('contract-accept-paper-back-foot'))
+ expect(screen.queryByRole('dialog')).toBeNull()
+ // Nothing on the page reads how far the paper was scrolled: a name and the ticks are what it asks.
+ fireEvent.change(screen.getByPlaceholderText(/full legal name|nombre legal completo/), { target: { value: 'Lena Park' } })
+ for (const box of screen.getAllByRole('checkbox')) fireEvent.click(box)
+ fireEvent.click(screen.getByRole('button', { name: 'Submit signature' }))
+ await waitFor(() => expect(posts).toHaveLength(1))
+ expect(posts[0]).toMatchObject({ token: 'tok-9', printedName: 'Lena Park' })
+ })
+
+ it('Escape closes the window too', async () => {
+ open()
+ await screen.findByText('Placeholder words to keep secret.')
+ fireEvent.click(screen.getByRole('button', { name: 'Full screen' }))
+ fireEvent.keyDown(window, { key: 'Escape' })
+ expect(screen.queryByRole('dialog')).toBeNull()
+ expect(screen.getByRole('button', { name: 'Submit signature' })).toBeTruthy()
+ })
+
+ it('a paper built from clauses offers it over its full agreement, in the language read', async () => {
+ loaded = CLAUSES
+ open()
+ await screen.findByText('The standard terms.')
+ fireEvent.click(screen.getByRole('button', { name: 'Full screen' }))
+ expect(screen.getByRole('dialog', { name: 'ZZ Test services agreement, full screen' })).toBeTruthy()
+ fireEvent.keyDown(window, { key: 'Escape' })
+ fireEvent.click(screen.getByRole('button', { name: 'Español' }))
+ fireEvent.click(screen.getByRole('button', { name: 'Pantalla completa' }))
+ expect(screen.getByRole('dialog', { name: 'ZZ Test services agreement, pantalla completa' })).toBeTruthy()
+ expect(screen.getAllByRole('button', { name: 'Volver a firmar' })).toHaveLength(2)
+ })
+})
diff --git a/src/pages/ContractAccept.tsx b/src/pages/ContractAccept.tsx
index 085f10f2ef..07c18fdc34 100644
--- a/src/pages/ContractAccept.tsx
+++ b/src/pages/ContractAccept.tsx
@@ -10,6 +10,7 @@ import EstimateCustomerThankYou from '../components/estimates/EstimateCustomerTh
import { ContractAcceptSignatureForm } from '../components/contracts/ContractAcceptSignatureForm'
import { contractBodyHasRenderableDisplay } from '../lib/contractBodyFormat'
import { ContractBodyDisplay } from '../components/contracts/ContractBodyDisplay'
+import { PaperReadBox } from '../components/contracts/PaperReadBox'
import { ClausePaper } from '../components/contracts/ClausePaper'
import { CLAUSE_SIGN_WORDS, clauseView, type ClausePaperPayload } from '../lib/contracts/clauseSign'
import type { EstimateAcceptSubmitPayload } from '../components/estimates/EstimateAcceptBody'
@@ -107,6 +108,17 @@ type LoadPayload = {
asks_reach: boolean
}
+/** The box a signer reads a paper's words in: half a screen tall, scrolling, until **Full screen** opens it. */
+const PAPER_BOX: CSSProperties = {
+ maxHeight: 'min(50vh, 420px)',
+ overflow: 'auto',
+ border: '1px solid var(--border)',
+ borderRadius: 8,
+ padding: '1rem',
+ background: 'var(--bg-subtle)',
+ fontSize: '0.9rem',
+}
+
export default function ContractAccept() {
const [params] = useSearchParams()
// A signer sent on by a signing code's page: the third step is lit, and the name they gave may be said under the
@@ -668,8 +680,10 @@ export default function ContractAccept() {
{hasRenderableSigningBody ? (
{CLAUSE_SIGN_WORDS[paperLang].full}
-