The contract, on the project

A collapsible Contract tile inside the project modal that finds the agreement even when it was signed before the project existed — and repairs the link so it's instant next time.

What it is

The tile shows the status pill, who signed and when, who counter-signed and when, and buttons to View, Counter-Sign (admins, when due) and Send to Customer (fully executed only). Finding the contract uses a three-tier lookup run concurrently, and stamps the project id onto the contract when it resolves through the fallback.

Also called: contract on the job · project agreement tile · no contract for this project yet

See it
The contract, on the project
Prepared for
Delia Yoder
1140 Ridge Line Rd · Fair Play
Shell package$26,914
Concrete & site$7,814
Doors & windows$5,209
Trim & finish$3,473
Total
$43,410
Signature
The Contract tile in the project modal, expanded, showing 'Customer: … · signed 3/14/2026' and 'Counter-signed by: …'. ContractSection.tsx. Sample data — no customer information appears here.
How it works
  1. 1Tier 1: contracts.project_id equals the project.
  2. 2Tier 2: an explicitly passed estimate link id.
  3. 3Tier 3: resolve the estimate link that birthed the project, then fetch that link's contract.
  4. 4All three run concurrently and the winner is picked by priority.
  5. 5On a tier-3 hit the contract's project_id is stamped so later loads short-circuit at tier 1.
Why we built it

Two comments, both about real failures. The lookup: 'Customers sign contracts before the project row exists, so contracts.project_id is often null even after the project is created… Without the third tier, the admin's project-management view found nothing for those contracts and rendered "No contract for this project yet" right after the customer had clearly signed it.' And the concurrency fix: 'These were sequential awaits, so a project whose contract is only reachable through tier 3 paid FOUR serial round trips before anything rendered… and the tile sat blank the whole time. Worst case goes from four round trips to two.'

The problem
  • Contracts invisible on projects created after signing
  • A blank tile while four sequential lookups ran
  • Contracts permanently unlinked from their project
Sound familiar?
What you get
The signed contract shows up on the job, always
Loads in at most two round trips
Self-heals the link so it's instant afterwards

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →