Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c1e9646
Send conference letters and updates from their own subdomains
fastfadingviolets Nov 12, 2026
76426b6
Compile each conference's weekly update from its input
fastfadingviolets Nov 11, 2026
105b512
Email each conference's weekly update to its conferees
fastfadingviolets Nov 11, 2026
9b6a397
Show readers where their conference input goes, and preview their letter
fastfadingviolets Nov 11, 2026
2f87b6f
Mail each new conference input to the reader's rep and senator
fastfadingviolets Nov 11, 2026
0f4e318
Write the letters' and weekly updates' plain text from their content
fastfadingviolets Nov 12, 2026
37ddefb
Run the conference mail jobs once against the local emulators
fastfadingviolets Nov 12, 2026
a07d176
Mail edits to conference input as updated letters
fastfadingviolets Nov 12, 2026
5f8c1d2
Count a weekly update's changes up to when it is compiled
fastfadingviolets Nov 12, 2026
8380b4b
Mail each conference input at the first 9:00 after it's posted
fastfadingviolets Nov 12, 2026
f8eca0a
Record every email MAPLE sends to a legislator
fastfadingviolets Nov 12, 2026
4144842
Decide repeat and updated letters from the record of what was sent
fastfadingviolets Nov 12, 2026
483d2de
Mail conference input by when its event was recorded
fastfadingviolets Nov 12, 2026
cc9c401
Send cosign edits through the letter review
fastfadingviolets Nov 13, 2026
84fac8b
Refuse to run the integration tests without Typesense
fastfadingviolets Nov 12, 2026
50c999a
Matt gets test emails in dev.
fastfadingviolets Nov 13, 2026
96438b0
Send replies and the copy to the reader's own email
fastfadingviolets Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/repo-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
tests/integration/backfillTestimonyScope.test.ts
tests/integration/conferences.test.ts
tests/integration/conferenceFollowing.test.ts
tests/integration/conferenceLetters.test.ts
components/auth/hooks.test.ts
components/db/useUpcoming.test.ts
components/db/testimony
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ prod-build.env
!*.secret
infra/dev/typesense-secrets.yml
infra/prod/typesense-secrets.yml
# Firebase extension secrets for the emulator
extensions/*.secret.local

.python-version
__pycache__/
Expand Down
18 changes: 9 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ your branch ──PR──▶ main ──(automatic)──▶ dev site + dev bac

[Repo Checks](.github/workflows/repo-checks.yml) runs on every push and PR. Run the same commands before you push:

| Check | Command |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| Lint | `yarn lint` |
| Formatting (all files, including Markdown) | `yarn check-formatting`; fix with `yarn fix` |
| Types | `yarn check-types` |
| Cloud Functions tests | `yarn test` |
| Website tests | `yarn test:website` |
| Integration tests | `yarn test:integration-ci <files>` (needs Java for the emulators) |
| Python in `llm/` | `ruff check llm/`, `ruff format --check llm/`, `pytest llm/` (after `pip install -r llm/requirements.txt`) |
| Check | Command |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Lint | `yarn lint` |
| Formatting (all files, including Markdown) | `yarn check-formatting`; fix with `yarn fix` |
| Types | `yarn check-types` |
| Cloud Functions tests | `yarn test` |
| Website tests | `yarn test:website` |
| Integration tests | `yarn test:integration-ci <files>` (needs Java for the emulators, and Typesense: `docker compose -f infra/docker-compose.yml up -d search`) |
| Python in `llm/` | `ruff check llm/`, `ruff format --check llm/`, `pytest llm/` (after `pip install -r llm/requirements.txt`) |

CI runs only the website tests named in the `test:website` script and the integration test files listed in [repo-checks.yml](.github/workflows/repo-checks.yml). Add a new test to one of those lists, or it can fail on `main` unnoticed.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jest.mock("../auth", () => ({
const mounted: string[] = []
jest.mock("../db", () => ({
useProfile: () => ({ profile: {} }),
useMember: () => ({ member: undefined }),
hasDraftChanged: () => false,
useConferenceTestimony: () => ({ items: [], loading: false }),
useEditConferenceTestimony: (
Expand Down
54 changes: 33 additions & 21 deletions components/conference/ConferenceDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ import { useAppDispatch } from "../hooks"
import { maple, siteUrl } from "../links"
import { usePinnedNavbar } from "./hooks"
import { InputContext } from "./input/context"
import { CosignForm, CosignStep } from "./input/CosignForm"
import { initialsOf } from "./input/accounts"
import { CosignForm } from "./input/CosignForm"
import { CosignLetter } from "./input/CosignLetter"
import { InputForm, Step } from "./input/InputForm"
import { Panel, usePanelWidth } from "./input/Panel"
Expand All @@ -49,7 +50,12 @@ import { X } from "./input/icons"
import { jumpToSection } from "./navbar"
import { OverviewLink } from "./OverviewLink"
import { Notice, PageColumn, Title } from "./styles"
import { conferenceName, ConferencePageProps, ConferenceSummary } from "./types"
import {
conferenceName,
ConferencePageProps,
ConferenceSummary,
ConfereeView
} from "./types"

/** The mockup's column, widened to 1320 once the rail sits beside it. */
const Page = styled(PageColumn)`
Expand Down Expand Up @@ -244,11 +250,10 @@ function Details({
)
const byId = useMemo(() => new Map(items.map(x => [x.id, x])), [items])
const [open, setOpen] = useState(false)
const [step, setStep] = useState<Step>("compose")
const [step, setStep] = useState<Step>("write")
// The panel files one of two things: the reader's own input, or a cosign of
// `cosigning`. Both are the reader's one draft on the conference.
const [cosigning, setCosigning] = useState<ConferenceTestimony>()
const [cosignStep, setCosignStep] = useState<CosignStep>("confirm")
const [full, setFull] = useState(true)
// What the reader's draft holds, as far as the page cares: what it
// cosigns, if anything, and whether it has words.
Expand Down Expand Up @@ -294,12 +299,12 @@ function Details({
const close = useCallback(() => setOpen(false), [])
const compose = useCallback(() => {
setCosigning(undefined)
setStep("compose")
setStep("write")
setOpen(true)
}, [])
const resumeCosign = useCallback((parent: ConferenceTestimony) => {
setCosigning(parent)
setCosignStep("write")
setStep("write")
setOpen(true)
}, [])
// A posted cosign is edited as one, its note alone.
Expand Down Expand Up @@ -329,7 +334,7 @@ function Details({
if (!signIn()) return
if (draftWords && draftOf === parent.id) return resumeCosign(parent)
setCosigning(parent)
setCosignStep("confirm")
setStep("confirm")
setFull(true)
setOpen(true)
},
Expand Down Expand Up @@ -474,7 +479,7 @@ function Details({
)
// Signing fills the window with what is signed beside the form; once agreed,
// the reader may fold it back to the drawer.
const filled = !!cosigning && (cosignStep === "confirm" || full)
const filled = !!cosigning && (step === "confirm" || full)
return (
<InputContext.Provider value={input}>
<Shift
Expand Down Expand Up @@ -588,6 +593,7 @@ function Details({
<InputPanel
uid={user.uid}
conference={conference}
conferees={conferees}
subject={subject}
open={open}
width={width}
Expand All @@ -596,8 +602,6 @@ function Details({
step={step}
onStep={setStep}
cosigning={cosigning}
cosignStep={cosignStep}
onCosignStep={setCosignStep}
full={filled}
onFull={setFull}
onDraft={onDraft}
Expand All @@ -613,6 +617,7 @@ function Details({
function InputPanel({
uid,
conference,
conferees,
subject,
open,
width,
Expand All @@ -621,15 +626,14 @@ function InputPanel({
step,
onStep,
cosigning,
cosignStep,
onCosignStep,
full,
onFull,
onDraft,
onPosted
}: {
uid: string
conference: ConferenceSummary
conferees: ConfereeView[]
subject: string
open: boolean
width: number
Expand All @@ -638,14 +642,16 @@ function InputPanel({
step: Step
onStep: (s: Step) => void
cosigning?: ConferenceTestimony
cosignStep: CosignStep
onCosignStep: (s: CosignStep) => void
full: boolean
onFull: (full: boolean) => void
onDraft: (draft?: ConferenceWorkingDraft, read?: boolean) => void
onPosted: () => void
}) {
const { t } = useTranslation("conferences")
const initials = useMemo(
() => conferees.map(c => initialsOf(c.name)),
[conferees]
)
const edit = useEditConferenceTestimony(
uid,
conference.court,
Expand All @@ -659,10 +665,10 @@ function InputPanel({
}, [edit.draft, edit.loading, onDraft])

const title =
cosigning && edit.publication
? "input.cosign_edit_title"
: !cosigning && step === "review"
step === "review"
? "input.review_title"
: cosigning && edit.publication
? "input.cosign_edit_title"
: "input.panel_title"
return (
<Panel
Expand All @@ -674,22 +680,28 @@ function InputPanel({
onClose={onClose}
beside={cosigning && <CosignLetter parent={cosigning} />}
full={full}
onFull={cosigning && cosignStep === "write" ? onFull : undefined}
onFull={cosigning && step === "write" ? onFull : undefined}
>
{cosigning ? (
// Keyed so another parent starts from its own draft.
<CosignForm
key={cosigning.id}
edit={edit}
parent={cosigning}
step={cosignStep}
onStep={onCosignStep}
court={conference.court}
conferenceId={conference.id}
subject={subject}
conferees={initials}
step={step}
onStep={onStep}
onCancel={onClose}
onPosted={onPosted}
/>
) : (
<InputForm
uid={uid}
court={conference.court}
conferenceId={conference.id}
conferees={initials}
edit={edit}
subject={subject}
step={step}
Expand Down
Loading
Loading