H1Offers
Status: hub for offer snapshots, offer editing, and commercial presentation.
H2Focus Strip
| Now | Lock | Do Not Break | Next Closure |
|---|---|---|---|
| Offer snapshot discipline | offer-owned line items | no downstream recompute | base order snapshot on getOfferWithLineItems() + clone |
| State | Meaning |
|---|---|
| built/locked | offer CRUD, normalized offer line-item read, trip package bridge |
| built/partial | editor/pickers/document surfaces, legacy confirm path |
| docs-ahead | duplicate prevention and canonical order conversion |
This folder maps to the offer route group and its actions/components:
/offers/[offerId]app/offers/actions/getOfferWithLineItems.tsapp/offers/actions/addTripItemsToOffer.tsapp/offers/actions/projectOffers.tsapp/offers/actions/rebuildPipelineMeta.tsapp/offers/components/OfferEditor.tsxapp/offers/[offerId]/components/OfferDocument.tsxapp/offers/[offerId]/components/OfferLineItemsSection.tsx
H2Current status
- Offer reads from LineItems and should stay snapshot-based.
- Offer creation and offer editing are already separated from Trips.
- Trip, Experience, and Product pickers exist for offer composition.
- Offer document surfaces are in place for presentation and line item display.
- Remaining work is mostly around canonical snapshot discipline and duplicate-prevention rules.
H2Code Audit - 2026-04-26
H3Built / locked
getProjectOffers()andgetOfferById()read offers with line items, documents, orders, and contact/project context.createOffer(),updateOffer(), anddeleteOffer()own offer identity and metadata writes.getOfferWithLineItems()is the current normalized read boundary for offer line items and totals.addTripItemsToOffer()is the current trip-package-to-offer line item bridge.
H3Built / partial
OfferEditor, pickers, and offer document components exist for composition and presentation.confirmOffer()can create an order, but it is explicitly legacy and mutates line items rather than cloning a snapshot.
H3Docs-ahead / pending
- Offer snapshot discipline is not fully locked until one canonical Offer -> Order conversion action replaces legacy mutation paths.
- Duplicate-prevention for adding the same trip/package lines to an offer remains pending.
H3Critical next step
Use getOfferWithLineItems() plus line-item cloning as the basis for the canonical order snapshot action, then mark confirmOffer() as removable legacy in code and docs.
H2Canonical files
H2Related hubs
H2Folder rule
- Offers own the commercial snapshot.
- Do not recompute offer truth inside downstream order or document rendering.
- Keep older offer variants in
archive/if the contract changes.
H2Archive notes
- older offer notes live in
archive/