diff --git a/docs/PROJECT_DOCUMENTATION.md b/docs/PROJECT_DOCUMENTATION.md index af442762ed..fb3bd7dd29 100644 --- a/docs/PROJECT_DOCUMENTATION.md +++ b/docs/PROJECT_DOCUMENTATION.md @@ -1954,7 +1954,7 @@ Clickable addresses (Google Maps), `mailto:`/`tel:` links, and `#step-{id}` deep - **Page**: [`Prospects.tsx`](../src/pages/Prospects.tsx), which opens on **Overview** (v2.8767, punch list #450, `?tab=overview`, [`ProspectsOverview`](../src/components/prospects/ProspectsOverview.tsx) over `lib/prospects/funnelOverview.ts`: the page as three funnels of four steps with their counts, the ratio between two steps and a press for each); since v2.8776 its top row is **Overview**, **Jobs**, **Hires** and **Subs**, each funnel with its four steps in a row under it (`FunnelStepRow`, `prospectsPillRow`), and the surfaces below, top-level tabs of their own until v2.8770, are those steps: - **Customers** — the sales-lead pipeline, with sub-tabs **Follow Up**, **Prospect List**, **Convert**, and **Activity** (renamed from **Team** in v2.708; per-user/per-day marked+updated activity tables). Since v2.5559 (punch list #110) the deck finds three kinds of company through the top row — **Customers**, **Jobs to GC** (an owner, developer, architect or owner's rep with a job we could build as the GC) and **Subs** (a trade company for the bench) — one `prospects.kind` with each kind's facts (`source`; a sub's trades, range and language; a lead's role), its own last press (**Add to the bench ✓** opens the bench's Add a company filled from the card, `gc_add_company`; **Asked us ✓** opens Add customer) and its own Prospect List and Activity; Convert stays on Customers. Kernels `src/lib/prospects/prospectKinds.ts`, `subsLane.ts` (the bench's needs, v2.5560) and `gcLeadLane.ts` (a lead's jobs in `prospect_jobs`, Asked us ✓ → New project, v2.5561); every other reader keeps to its kind (v2.5563). Since punch lists #113 and #117 (v2.5578–v2.5585, v2.5600–v2.5606): a lane's deck is its own on a refresh (`laneLoad.ts`), one double line over every home a company can already have (`companyDouble.ts`), a lead's job edited in place, the two windows fit the screen and ask before a touched one closes, a ZZ company stays out of every non-dev lane, and the person we call comes first (`personBlock.ts`: `is_person`, title, cell and language on every kind; **May we text?**, which `quo-send` waits on; a sub pasted from Google Maps with its license and Maps link; the person carried into Add customer and the bench). Since punch list #148 the Subs lane opens on **What GC mode needs right now** (v2.5782, `gcNeeds.ts`: each trade short of quotes or of bench companies, with a door from the need to the bench, the subs here or Add a sub) and Jobs to GC's strip names the projects bidding now (v2.5785); since punch list #153 the Subs lane carries the path onto the bench as a strip (To call → Called → Talked → On the bench → Quoted, read and never stored, `subsStages.ts`), the Prospect List by trade with **For** the project a set of plans is for (v2.5807), the **Board** sub-tab, one column a trade with **Call the top 3 →** running Follow Up as a run (v2.5808, `SubsBoard.tsx`, `callRun.ts`), a drag that pins a card and Call first · Normal · Later on every sub (v2.5809, `prospect_trade_ranks`, `prospects.priority`), and the sub that says yes asked on the project's job as it lands on the bench (v2.5810, `benchAsk.ts`). Lead warmth, fit status (`prospect_fit_status`), callbacks, and copy templates feed the Calendar and the Quickfill **Prospects** section. - **Hiring** (`?tab=team`; labelled Team until v2.1253, and since v2.8776 the Decide, Contact and Ours steps under **Hires**) — the **prospective-hires board** ([`TeamProspectsTab`](../src/components/prospects/TeamProspectsTab.tsx)): candidate cards in `team_prospects` with roles in `team_prospect_roles` (`20260717190000`, `20260717230000`), including per-source success tracking (v2.715). Access is per-user via `users.team_prospects_access` (`20260717250000_team_prospects_access_flag.sql`, helper `user_has_team_prospects_access()`, v2.714) — prospects-staff role alone is not enough. Since v2.5812 a candidate has a flow (Screening call, Qualifications, Try-out, Hired or passed, read from the board's row by `flows/candidateLoad.ts`), and its **Qualifications** step notes a level from 0 to 3 in plumbing, electrical and HVAC, the license and where they drive in from (`trade_levels`, `lib/hiring/tradeScale.ts`, `QualificationsWindow.tsx`), the same scale a sub's coming-on lane carries. The **Try-out** stage (v2.3627) holds trial helpers; each card carries the tally and the nudge (v2.3715 — `team_prospect_trial_tally()` read into `src/lib/hiring/trialTally.ts`; *Keep trying* stamps `trial_deferred_at / _by`). A column can be **shared** with an account that has prospects staff access but not the switch (v2.3798 `team_prospect_role_shares` + `user_hiring_shared_role_ids()` in the policies; v2.3802 the header's ⋯ → *Share with…*, `ShareColumnDialog`, and the *Hiring columns shared with them* line on the person desk's Extra access row (v2.4348; it was in Settings → Active accounts); v2.3805 the share holder's tab — the Hiring pill, the **Hires** pill since v2.8776, opens for a share (`useMyHiringShares`) and the board renders `shared`, trimmed by `src/lib/hiring/sharedHiringTab.ts`). - - **Permits** (v2.6782, punch list #292, `?tab=permits`; labelled Research and keyed `?tab=research` until v2.6787, which the page still accepts) — the permit ledger ([`ProspectsResearchTab`](../src/components/prospects/ProspectsResearchTab.tsx) over [`permitResearch.ts`](../src/lib/research/permitResearch.ts)): a city's building permits and project applications from `permits` (each city's open-data feed, five cities since v2.6861, pulled nightly by `permit-pull`), newest first, each with who pulled it and the **Plumber** cell, which since v2.6785 names a plumber only when a plumbing permit on the same number or address was pulled under a name other than the applicant's and else reads *on file, no plumber named* or *none yet* (`plumberWords`; `research_permits` replaced in place, `20261109100000`; since v2.7922 a San Antonio plumbing permit at the address counts only from the same applicant, because that city issues a project's plumbing permit on the project's own number and another tenant's permit was closing jobs, `permit_address_plumbing_counts`, `20261119063000`; since v2.7935 a permit left uncounted is said under *none yet* and on the skim card, `nearbyPlumbingWords` over `research_permits_v3`, `20261119073000`; since v2.8295 every read that pairs a plumbing permit with a building permit (the skim's and the ledger's plumber and his day, a builder's open count, the permits said as *at this address, not counted*, Market's first plumbing day and Builders' plumber) counts only the building's own plumbing permit, a general plumbing permit or a plumbing type with no qualifier, through `permit_is_building_plumbing` beside each `kind = 'plumbing'` in `research_permits`, `_v2`, `_v3`, `_v4` and `research_builders` (`20261122230500`), the rule `plumbingTypeOf` already read a bid's window by, so a lawn sprinkler, gas or sewer permit no longer closes a building as **Has a plumber**; since v2.7966 Builders draws its plumber column only where some builder's permits name one, `cityNamesPlumbers`, and a caught-up skim in a quiet city says what stopped, `caughtUpWords`; since v2.9263, punch list #465 step 1, Builders reads every city at once, *All five cities* on the tab's picker and the one the list opens on, through `research_builders_v2` (`loadBuildersOf`), and draws each name's share of the dollars declared and of the permits as a dark and a light bar, green for a name that is ours and grey for one not ours yet, with headings that sort and the chips Everyone, Ours and Not ours yet, `builderShare.ts`; since v2.9266, step 2, a name on Builders opens the company's profile in place of the list, [`PermitBuilderProfile`](../src/components/prospects/PermitBuilderProfile.tsx) over `builderProfile.ts`, on the address `view=builders&builder=`, with its open jobs and where each stands read by `loadBuilderStanding`, and the builder's sheet opens from the page's **Mark, kind and ties**); one **Decide…** press per row opens [`PermitDecideSheet`](../src/components/prospects/PermitDecideSheet.tsx) — Pursue (Approach them until v2.6830; makes a lead with *A permit* as its source, on the deck `leadDeck` picks from **They are**: a general contractor is a `customer` prospect with the permit in its notes, an owner or an architect a `gc_lead` prospect with the permit as a `prospect_jobs` row; every one was a `gc_lead` until v2.6907, and `loadLeadDecks` tells a row's lead door which deck to open), Investigate (with a look-again day), Pass, Has a plumber — each with a reason, kept in `permit_verdicts`. Open to the office and every estimator (`user_can_research_permits()`); an estimator without `estimator_prospects_access` lands here and sees no calling-deck tabs. Since v2.6784 a **Map** view ([`ResearchMapCard`](../src/components/prospects/ResearchMapCard.tsx) over the Bid Board's pins canvas, in the shared `PinsMapFrame` with Satellite, Streets and **Time** since v2.7802) draws the lens as pins, a group of pins names what it holds since v2.8745 (*N permits here*, with *jobs* on the Jobs map, *bids* on the Bid Board's and *pins* for a map that names nothing; `clusterTitle` in [`clusterPins.ts`](../src/lib/map/clusterPins.ts)), a word under each name reads our bid history with it (`research_contact_history`, `20261109080000`; an open lead of that name on either calling deck reads **on the deck** since `20261111043500`; its bids are the ones the one rule counts since `20261121152000`, v2.8181), and the taken lens opens with **Who wins what**. Since v2.6830 (punch list #302) the tab opens on **Skim** ([`PermitSkimDeck`](../src/components/prospects/PermitSkimDeck.tsx) over [`permitSkim.ts`](../src/lib/research/permitSkim.ts)): one permit at a time with no date window, best first, two answers (Investigate writes `look`, Pass writes `not_for_us`), held a few seconds so Undo can take one back, with a street view and a map across the top of the card and a swipe on a phone since v2.6833 ([`PermitSkimLook`](../src/components/prospects/PermitSkimLook.tsx), [`permitLook.ts`](../src/lib/research/permitLook.ts)); and the four verdicts read **Investigate, Pass, Pursue, Has a plumber** on every screen, the place a permit waits in reading **Investigating** (Keep and Kept until v2.6879; the stored value is `look` throughout) (Look into it, Not for us, Approach them and Already taken before it). Since v2.6835 a strip counts where every permit is — **Skim, Investigating, Pursuing, Closed** ([`permitBuilders.ts`](../src/lib/research/permitBuilders.ts), [`PermitPlaceList`](../src/components/prospects/PermitPlaceList.tsx)): an Investigate can be handed to a person (the bar asks *Investigating. Who?*), a permit under Investigating closes on **Pursue…** (what for, who follows up) or **Not pursuing…** ([`PermitCloseOutSheet`](../src/components/prospects/PermitCloseOutSheet.tsx)), the city box lists the cities the pull reads, San Antonio, Austin (v2.6859) and New Braunfels, San Marcos and Seguin (v2.6861) ([`permitCities.ts`](../supabase/functions/_shared/permitCities.ts), the browser remembering the last one, and on a phone's Skim riding on the strip as a chip after the magnifier since v2.6905, each city's row reading its newest permit day or, since v2.7880, *quiet since* the day the city's own source stopped while our pull still runs clean ([`permitQuiet.ts`](../src/lib/research/permitQuiet.ts) over `usePermitCityQuiet`, more than 7 days back, 10 for San Antonio's weekly rhythm); a card's county, appraisal district, city permit search and deed search come from [`permitCityDoors.ts`](../src/lib/research/permitCityDoors.ts), and every city's county parcel record is read for the owner of record since v2.6912 (each county by house number and street name, then by the permit's point, in [`permitParcels.ts`](../supabase/functions/_shared/permitParcels.ts) and [`permitLookup.ts`](../supabase/functions/_shared/permitLookup.ts), Bexar at the point since v2.6978 and by number and street name since v2.6991; since v2.6974 an Austin permit's lot is asked first by the county id the permit carries, at Travis or, since v2.6984, at Williamson for Austin over the county line; since v2.6980 a neighbouring county's layer is asked at the point when the city's own county holds nothing there; the order of the questions and how long each answer is kept: [EDGE_FUNCTIONS.md](./EDGE_FUNCTIONS.md) → *permit-lookup*); a building's sheet offers **Open this permit at the city** when the feed's row carries the city's own page, `permitOwnPage`); the magnifier at the start of the strip is **Find a permit** ([`PermitFindPanel`](../src/components/prospects/PermitFindPanel.tsx), [`permitFind.ts`](../src/lib/research/permitFind.ts), v2.6892): one search over every list and every city, the other cities read one at a time; Closed also reads **On a map**, every permit on the chip as a pin; Closed has a search, **Put back** and, on a pass or a drop, **Investigate** for anyone; every card and sheet reads the permit's history from `permit_verdicts` ([`permitHistory.ts`](../src/lib/research/permitHistory.ts), v2.6850); **Second look** ([`permitSecondLook.ts`](../src/lib/research/permitSecondLook.ts), v2.6843) deals what someone else passed through the same deck in `second` mode, opened from the grey *N passed* segment joined to the Skim chip, once per permit, a second pass written with an `sl_` reason code; **Builders** ([`PermitBuilders`](../src/components/prospects/PermitBuilders.tsx) over `research_builders`) lists every name on permits, read a page at a time past the API's 1,000 rows like the skim's own read (`fetchAllRows`, v2.6924), as far back as the records go, a year at most, every count saying the day the records start ([`permitReach.ts`](../src/lib/research/permitReach.ts) over `permit_pulls.since`, v2.6857) and a **Read back to …** press reading a step further as history, flagged `permits.backfilled` and kept off the skim (v2.6873, `20261110224035`), with a Good or Avoid mark that shows on the skim card, and since v2.6963 an **Our bids** count that adds the bids of the customers someone tied the name to, since v2.8138 and v2.8147 only the bids of two years with no practice bid, the rule Market's table counts by ([`ourBids.ts`](../src/lib/research/ourBids.ts), on the database `research_bid_counts` and `research_bid_party_key`) ([`builderAnswers.ts`](../src/lib/research/builderAnswers.ts), `useBuilderAnswers`, read once for the list) and a sheet section **Our customer under this name** ([`BuilderNameTies`](../src/components/prospects/BuilderNameTies.tsx)) with each tie, whose word it is, **Take back**, *Same company?* and **Tie to a customer**; and [`PermitCountStrip`](../src/components/prospects/PermitCountStrip.tsx) reads the month's count (`permit_funnel`). **Market** (v2.7978, punch list #405, [`PermitMarket`](../src/components/prospects/PermitMarket.tsx) over [`permitMarket.ts`](../src/lib/research/permitMarket.ts) and `usePermitMarket`, on the address as `view=market`) is the view beside Builders that says what the permits mean for us: every company we priced a job for in two years with our bids, our wins and the commercial permits its names pulled in twelve months in every city (`bidCompanies`: a bid under its customer's name and the old builders list's, practice bids and a bid platform's bucket left out, the permits each city's `research_builders` count under the company's key or a name a person tied to it), what that reads as, **Tie a name** on a customer with no permit on record opening Find their names on permits, a name on a row opening the builder's sheet, and **the clock** (`marketClocks`), the quarter marks of the days from an application to its permit, read off `permits` with the history rows (since v2.8260 a line under it says how many applications of the twelve months still wait and how many of those were filed over six months ago, `applicationsWaiting` and `clockWaitingNote`), or from a building permit to the plumber's permit where the city names plumbers (since v2.8254 to the job's first plumbing permit, `plumber_first_permit_on` off `research_permits_v4`, `20261122032000`, where it ran to the newest); since v2.7993 it leads with **Call this week** ([`PermitCallList`](../src/components/prospects/PermitCallList.tsx) over [`permitCallList.ts`](../src/lib/research/permitCallList.ts)): five builders with three or more commercial jobs in twelve months, a job being one name's rows of one day at one address since v2.8112 (`marketJobs`), never an Avoid or a name said to file for others, each with its reasons as tags and no score (`callRows`: since v2.8112 a name with a building word first, `saysItBuilds`, then a name that reads as a company, then a job open now, then picking up or new and busy, then never bid), chips over it, **Pursue** making the lead the skim makes through the kept permit's own sheet, **Not for us**, and either answer kept append-only in `builder_call_answers` (`20261120031349`) so the name leaves the list for everyone until its day to look again, and since v2.8112 until it has applied for a new job after the answer (`backWithNewJob`), and **Put back** undoes it, and since v2.8121 each row's **Ask for** block ([`PermitAskFor`](../src/components/prospects/PermitAskFor.tsx) over [`builderLookups.ts`](../src/lib/research/builderLookups.ts)) shows what a one-time lookup found about the name, the kind of company, an office phone and a person to ask for, each with its page and day out of `builder_lookups` (`20261120120000`), grey as looked up and not checked until a person presses **Checked**, off the row on **Wrong**, the presses append-only in `builder_lookup_checks`, a looked-up kind tagging the name and ordering it only once checked (`lookupOrder`) and never removing it; and beside the clock **Who holds the work**, drawn only where the permits name plumbers, and **How much is being built** by month, kind and size ([`PermitMarketShape`](../src/components/prospects/PermitMarketShape.tsx) over [`permitMarketShape.ts`](../src/lib/research/permitMarketShape.ts)), all counted over a city's year of commercial permits read off `permits` with the history rows (`loadMarketPermits`, the pages after the first asked together). Since v2.6828 an address opens **The building** ([`PermitBuildingSheet`](../src/components/prospects/PermitBuildingSheet.tsx) over [`permitPublic.ts`](../src/lib/research/permitPublic.ts)): the permit with every field the feed sent (`permits.raw`), the county's parcel, every permit on the address and the doors to the city's record and the county clerk's deeds; the Who pulled it card lists the name's other permits and opens the state's franchise tax search; and a round **G** ([`GoogleSearchPress`](../src/components/prospects/GoogleSearchPress.tsx)) beside a name or an address opens a Google search in a new tab. Guide `research-permits-for-work-to-bid`. Since v2.6866 (punch list #307) a bid's Edit window reads the same permits by the bid's own address: **This site** under Location ([`BidSitePermits`](../src/components/bids/BidSitePermits.tsx)) and **What we can see about** the GC under its card ([`BidGcPermits`](../src/components/bids/BidGcPermits.tsx)), over [`bidSite.ts`](../src/lib/research/bidSite.ts), [`bidSitePanel.ts`](../src/lib/research/bidSitePanel.ts) and the read `bid_site_permits` (`20261110220345`); guide `see-what-the-city-has-on-a-bids-address`. Since v2.6870 the Bid Board carries the same read as a chip on each undecided bid's row (`useBidPermitNews`, [`bidPermitNews.ts`](../src/lib/research/bidPermitNews.ts)). Since v2.7941 the news lines are a lens on Followup, **Permit news** ([`BidsPermitNewsLens`](../src/components/bids/BidsPermitNewsLens.tsx)). There each line is answered in `bid_permit_answers` (`20261119130000`), and a sent bid's plumbing line opens the board's own outcome through **We lost it…** ([`BidBoardNewsMarkLost`](../src/components/bids/BidBoardNewsMarkLost.tsx)). Until v2.7941 the lines were the strip **Permit news on your bids** above the board's sections. Since v2.6872 the site's lead permit asks once who the city lists on it ([`BidNameQuestion`](../src/components/bids/BidNameQuestion.tsx); *Same company?* since v2.6963 when one name begins the other), the answers kept append-only in `builder_customer_answers` (`20261110223054`) and folded by [`nameAnswers.ts`](../src/lib/research/nameAnswers.ts), and the GC's panel lists the names tied to it ([`BidGcTiedNames`](../src/components/bids/BidGcTiedNames.tsx)). Since v2.6886 a person links a customer to its names on permits: **Find their names on permits** ([`FindNamesSheet`](../src/components/bids/FindNamesSheet.tsx), from the GC's panel and the customer page's **Names on permits** card) suggests names with their reasons over [`nameLikeness.ts`](../src/lib/research/nameLikeness.ts), a phone or a web domain the name shares with the customer among them since v2.8308 (`permit_name_contact_matches`, migration `20261122233000`, read through `loadNameContactMatches`; **Compare** lists the phones and web domains each side holds), and Builders carries **Looks like a customer** ([`PermitLookAlikes`](../src/components/prospects/PermitLookAlikes.tsx)), whose count the Dashboard's Needs you card carries since v2.6962 (*N names on permits look like a customer*, **Answer them** opening `/prospects?tab=permits&view=builders&looks=1`, [`permitsLink.ts`](../src/lib/research/permitsLink.ts)); the app ties nothing on a likeness. Since v2.9196 (punch list #464, `permitBand.ts`) every card on the skim sits in one of three bands, **We want it**, **Acceptable** or **Likely not a fit**, with three presses over the deck. Since v2.9231 the press **What we want** over a deck opens the sheet the bands are read against ([`PermitSheetPanel`](../src/components/prospects/PermitSheetPanel.tsx), `?sheet=1`, also opened from the Overview's Identify box): a line a subject and a column a band, each of its seven numbers changed in place with a line that counts what the change would move on the skim in every city before it is kept, a refusal in words, an **Undo**, and **Changes**, the record of who changed what, all kept append-only in `permit_sheet_changes` and folded by `permitSheet.ts` over today's rules (`TODAYS_SHEET`). Since v2.9258 the skim's **Likely not a fit** band carries a box with one press, *Pass 11 of 13* (`permitBandPass.ts`): it passes the band's permits one row each with the code `likely_not_a_fit` and the line that put each there, holds back a permit whose builder or size line reads *We want it* with its reason, names a row that failed, and its **Undo** puts every passed permit back. Since v2.9259 the sheet's picks are changed in place too: a kind of work is a `choice` value moved to another band (`sheetKindInserts`, the lists that change kept as one insert by `keepSheetChanges`, refused when it would leave *We want it* with no kind), and the **Never** line is switched on or off. + - **Permits** (v2.6782, punch list #292, `?tab=permits`; labelled Research and keyed `?tab=research` until v2.6787, which the page still accepts) — the permit ledger ([`ProspectsResearchTab`](../src/components/prospects/ProspectsResearchTab.tsx) over [`permitResearch.ts`](../src/lib/research/permitResearch.ts)): a city's building permits and project applications from `permits` (each city's open-data feed, five cities since v2.6861, pulled nightly by `permit-pull`), newest first, each with who pulled it and the **Plumber** cell, which since v2.6785 names a plumber only when a plumbing permit on the same number or address was pulled under a name other than the applicant's and else reads *on file, no plumber named* or *none yet* (`plumberWords`; `research_permits` replaced in place, `20261109100000`; since v2.7922 a San Antonio plumbing permit at the address counts only from the same applicant, because that city issues a project's plumbing permit on the project's own number and another tenant's permit was closing jobs, `permit_address_plumbing_counts`, `20261119063000`; since v2.7935 a permit left uncounted is said under *none yet* and on the skim card, `nearbyPlumbingWords` over `research_permits_v3`, `20261119073000`; since v2.8295 every read that pairs a plumbing permit with a building permit (the skim's and the ledger's plumber and his day, a builder's open count, the permits said as *at this address, not counted*, Market's first plumbing day and Builders' plumber) counts only the building's own plumbing permit, a general plumbing permit or a plumbing type with no qualifier, through `permit_is_building_plumbing` beside each `kind = 'plumbing'` in `research_permits`, `_v2`, `_v3`, `_v4` and `research_builders` (`20261122230500`), the rule `plumbingTypeOf` already read a bid's window by, so a lawn sprinkler, gas or sewer permit no longer closes a building as **Has a plumber**; since v2.7966 Builders draws its plumber column only where some builder's permits name one, `cityNamesPlumbers`, and a caught-up skim in a quiet city says what stopped, `caughtUpWords`; since v2.9263, punch list #465 step 1, Builders reads every city at once, *All five cities* on the tab's picker and the one the list opens on, through `research_builders_v2` (`loadBuildersOf`), and draws each name's share of the dollars declared and of the permits as a dark and a light bar, green for a name that is ours and grey for one not ours yet, with headings that sort and the chips Everyone, Ours and Not ours yet, `builderShare.ts`; since v2.9266, step 2, a name on Builders opens the company's profile in place of the list, [`PermitBuilderProfile`](../src/components/prospects/PermitBuilderProfile.tsx) over `builderProfile.ts`, on the address `view=builders&builder=`, with its open jobs and where each stands read by `loadBuilderStanding`, and the builder's sheet opens from the page's **Mark, kind and ties**; since v2.9277 the card of who pulled it and, over Market, the builder's sheet carry **Everything they are working on** to that page, the Overview's Identify box a second quiet press, *See who is building*, `OVERVIEW_DOORS.builders`, and a customer's Permits tab links a tied name to the page, `BidGcTiedNames`'s `pageLinks`, as the page's *Us and them* links back); one **Decide…** press per row opens [`PermitDecideSheet`](../src/components/prospects/PermitDecideSheet.tsx) — Pursue (Approach them until v2.6830; makes a lead with *A permit* as its source, on the deck `leadDeck` picks from **They are**: a general contractor is a `customer` prospect with the permit in its notes, an owner or an architect a `gc_lead` prospect with the permit as a `prospect_jobs` row; every one was a `gc_lead` until v2.6907, and `loadLeadDecks` tells a row's lead door which deck to open), Investigate (with a look-again day), Pass, Has a plumber — each with a reason, kept in `permit_verdicts`. Open to the office and every estimator (`user_can_research_permits()`); an estimator without `estimator_prospects_access` lands here and sees no calling-deck tabs. Since v2.6784 a **Map** view ([`ResearchMapCard`](../src/components/prospects/ResearchMapCard.tsx) over the Bid Board's pins canvas, in the shared `PinsMapFrame` with Satellite, Streets and **Time** since v2.7802) draws the lens as pins, a group of pins names what it holds since v2.8745 (*N permits here*, with *jobs* on the Jobs map, *bids* on the Bid Board's and *pins* for a map that names nothing; `clusterTitle` in [`clusterPins.ts`](../src/lib/map/clusterPins.ts)), a word under each name reads our bid history with it (`research_contact_history`, `20261109080000`; an open lead of that name on either calling deck reads **on the deck** since `20261111043500`; its bids are the ones the one rule counts since `20261121152000`, v2.8181), and the taken lens opens with **Who wins what**. Since v2.6830 (punch list #302) the tab opens on **Skim** ([`PermitSkimDeck`](../src/components/prospects/PermitSkimDeck.tsx) over [`permitSkim.ts`](../src/lib/research/permitSkim.ts)): one permit at a time with no date window, best first, two answers (Investigate writes `look`, Pass writes `not_for_us`), held a few seconds so Undo can take one back, with a street view and a map across the top of the card and a swipe on a phone since v2.6833 ([`PermitSkimLook`](../src/components/prospects/PermitSkimLook.tsx), [`permitLook.ts`](../src/lib/research/permitLook.ts)); and the four verdicts read **Investigate, Pass, Pursue, Has a plumber** on every screen, the place a permit waits in reading **Investigating** (Keep and Kept until v2.6879; the stored value is `look` throughout) (Look into it, Not for us, Approach them and Already taken before it). Since v2.6835 a strip counts where every permit is — **Skim, Investigating, Pursuing, Closed** ([`permitBuilders.ts`](../src/lib/research/permitBuilders.ts), [`PermitPlaceList`](../src/components/prospects/PermitPlaceList.tsx)): an Investigate can be handed to a person (the bar asks *Investigating. Who?*), a permit under Investigating closes on **Pursue…** (what for, who follows up) or **Not pursuing…** ([`PermitCloseOutSheet`](../src/components/prospects/PermitCloseOutSheet.tsx)), the city box lists the cities the pull reads, San Antonio, Austin (v2.6859) and New Braunfels, San Marcos and Seguin (v2.6861) ([`permitCities.ts`](../supabase/functions/_shared/permitCities.ts), the browser remembering the last one, and on a phone's Skim riding on the strip as a chip after the magnifier since v2.6905, each city's row reading its newest permit day or, since v2.7880, *quiet since* the day the city's own source stopped while our pull still runs clean ([`permitQuiet.ts`](../src/lib/research/permitQuiet.ts) over `usePermitCityQuiet`, more than 7 days back, 10 for San Antonio's weekly rhythm); a card's county, appraisal district, city permit search and deed search come from [`permitCityDoors.ts`](../src/lib/research/permitCityDoors.ts), and every city's county parcel record is read for the owner of record since v2.6912 (each county by house number and street name, then by the permit's point, in [`permitParcels.ts`](../supabase/functions/_shared/permitParcels.ts) and [`permitLookup.ts`](../supabase/functions/_shared/permitLookup.ts), Bexar at the point since v2.6978 and by number and street name since v2.6991; since v2.6974 an Austin permit's lot is asked first by the county id the permit carries, at Travis or, since v2.6984, at Williamson for Austin over the county line; since v2.6980 a neighbouring county's layer is asked at the point when the city's own county holds nothing there; the order of the questions and how long each answer is kept: [EDGE_FUNCTIONS.md](./EDGE_FUNCTIONS.md) → *permit-lookup*); a building's sheet offers **Open this permit at the city** when the feed's row carries the city's own page, `permitOwnPage`); the magnifier at the start of the strip is **Find a permit** ([`PermitFindPanel`](../src/components/prospects/PermitFindPanel.tsx), [`permitFind.ts`](../src/lib/research/permitFind.ts), v2.6892): one search over every list and every city, the other cities read one at a time; Closed also reads **On a map**, every permit on the chip as a pin; Closed has a search, **Put back** and, on a pass or a drop, **Investigate** for anyone; every card and sheet reads the permit's history from `permit_verdicts` ([`permitHistory.ts`](../src/lib/research/permitHistory.ts), v2.6850); **Second look** ([`permitSecondLook.ts`](../src/lib/research/permitSecondLook.ts), v2.6843) deals what someone else passed through the same deck in `second` mode, opened from the grey *N passed* segment joined to the Skim chip, once per permit, a second pass written with an `sl_` reason code; **Builders** ([`PermitBuilders`](../src/components/prospects/PermitBuilders.tsx) over `research_builders`) lists every name on permits, read a page at a time past the API's 1,000 rows like the skim's own read (`fetchAllRows`, v2.6924), as far back as the records go, a year at most, every count saying the day the records start ([`permitReach.ts`](../src/lib/research/permitReach.ts) over `permit_pulls.since`, v2.6857) and a **Read back to …** press reading a step further as history, flagged `permits.backfilled` and kept off the skim (v2.6873, `20261110224035`), with a Good or Avoid mark that shows on the skim card, and since v2.6963 an **Our bids** count that adds the bids of the customers someone tied the name to, since v2.8138 and v2.8147 only the bids of two years with no practice bid, the rule Market's table counts by ([`ourBids.ts`](../src/lib/research/ourBids.ts), on the database `research_bid_counts` and `research_bid_party_key`) ([`builderAnswers.ts`](../src/lib/research/builderAnswers.ts), `useBuilderAnswers`, read once for the list) and a sheet section **Our customer under this name** ([`BuilderNameTies`](../src/components/prospects/BuilderNameTies.tsx)) with each tie, whose word it is, **Take back**, *Same company?* and **Tie to a customer**; and [`PermitCountStrip`](../src/components/prospects/PermitCountStrip.tsx) reads the month's count (`permit_funnel`). **Market** (v2.7978, punch list #405, [`PermitMarket`](../src/components/prospects/PermitMarket.tsx) over [`permitMarket.ts`](../src/lib/research/permitMarket.ts) and `usePermitMarket`, on the address as `view=market`) is the view beside Builders that says what the permits mean for us: every company we priced a job for in two years with our bids, our wins and the commercial permits its names pulled in twelve months in every city (`bidCompanies`: a bid under its customer's name and the old builders list's, practice bids and a bid platform's bucket left out, the permits each city's `research_builders` count under the company's key or a name a person tied to it), what that reads as, **Tie a name** on a customer with no permit on record opening Find their names on permits, a name on a row opening the builder's sheet, and **the clock** (`marketClocks`), the quarter marks of the days from an application to its permit, read off `permits` with the history rows (since v2.8260 a line under it says how many applications of the twelve months still wait and how many of those were filed over six months ago, `applicationsWaiting` and `clockWaitingNote`), or from a building permit to the plumber's permit where the city names plumbers (since v2.8254 to the job's first plumbing permit, `plumber_first_permit_on` off `research_permits_v4`, `20261122032000`, where it ran to the newest); since v2.7993 it leads with **Call this week** ([`PermitCallList`](../src/components/prospects/PermitCallList.tsx) over [`permitCallList.ts`](../src/lib/research/permitCallList.ts)): five builders with three or more commercial jobs in twelve months, a job being one name's rows of one day at one address since v2.8112 (`marketJobs`), never an Avoid or a name said to file for others, each with its reasons as tags and no score (`callRows`: since v2.8112 a name with a building word first, `saysItBuilds`, then a name that reads as a company, then a job open now, then picking up or new and busy, then never bid), chips over it, **Pursue** making the lead the skim makes through the kept permit's own sheet, **Not for us**, and either answer kept append-only in `builder_call_answers` (`20261120031349`) so the name leaves the list for everyone until its day to look again, and since v2.8112 until it has applied for a new job after the answer (`backWithNewJob`), and **Put back** undoes it, and since v2.8121 each row's **Ask for** block ([`PermitAskFor`](../src/components/prospects/PermitAskFor.tsx) over [`builderLookups.ts`](../src/lib/research/builderLookups.ts)) shows what a one-time lookup found about the name, the kind of company, an office phone and a person to ask for, each with its page and day out of `builder_lookups` (`20261120120000`), grey as looked up and not checked until a person presses **Checked**, off the row on **Wrong**, the presses append-only in `builder_lookup_checks`, a looked-up kind tagging the name and ordering it only once checked (`lookupOrder`) and never removing it; and beside the clock **Who holds the work**, drawn only where the permits name plumbers, and **How much is being built** by month, kind and size ([`PermitMarketShape`](../src/components/prospects/PermitMarketShape.tsx) over [`permitMarketShape.ts`](../src/lib/research/permitMarketShape.ts)), all counted over a city's year of commercial permits read off `permits` with the history rows (`loadMarketPermits`, the pages after the first asked together). Since v2.6828 an address opens **The building** ([`PermitBuildingSheet`](../src/components/prospects/PermitBuildingSheet.tsx) over [`permitPublic.ts`](../src/lib/research/permitPublic.ts)): the permit with every field the feed sent (`permits.raw`), the county's parcel, every permit on the address and the doors to the city's record and the county clerk's deeds; the Who pulled it card lists the name's other permits and opens the state's franchise tax search; and a round **G** ([`GoogleSearchPress`](../src/components/prospects/GoogleSearchPress.tsx)) beside a name or an address opens a Google search in a new tab. Guide `research-permits-for-work-to-bid`. Since v2.6866 (punch list #307) a bid's Edit window reads the same permits by the bid's own address: **This site** under Location ([`BidSitePermits`](../src/components/bids/BidSitePermits.tsx)) and **What we can see about** the GC under its card ([`BidGcPermits`](../src/components/bids/BidGcPermits.tsx)), over [`bidSite.ts`](../src/lib/research/bidSite.ts), [`bidSitePanel.ts`](../src/lib/research/bidSitePanel.ts) and the read `bid_site_permits` (`20261110220345`); guide `see-what-the-city-has-on-a-bids-address`. Since v2.6870 the Bid Board carries the same read as a chip on each undecided bid's row (`useBidPermitNews`, [`bidPermitNews.ts`](../src/lib/research/bidPermitNews.ts)). Since v2.7941 the news lines are a lens on Followup, **Permit news** ([`BidsPermitNewsLens`](../src/components/bids/BidsPermitNewsLens.tsx)). There each line is answered in `bid_permit_answers` (`20261119130000`), and a sent bid's plumbing line opens the board's own outcome through **We lost it…** ([`BidBoardNewsMarkLost`](../src/components/bids/BidBoardNewsMarkLost.tsx)). Until v2.7941 the lines were the strip **Permit news on your bids** above the board's sections. Since v2.6872 the site's lead permit asks once who the city lists on it ([`BidNameQuestion`](../src/components/bids/BidNameQuestion.tsx); *Same company?* since v2.6963 when one name begins the other), the answers kept append-only in `builder_customer_answers` (`20261110223054`) and folded by [`nameAnswers.ts`](../src/lib/research/nameAnswers.ts), and the GC's panel lists the names tied to it ([`BidGcTiedNames`](../src/components/bids/BidGcTiedNames.tsx)). Since v2.6886 a person links a customer to its names on permits: **Find their names on permits** ([`FindNamesSheet`](../src/components/bids/FindNamesSheet.tsx), from the GC's panel and the customer page's **Names on permits** card) suggests names with their reasons over [`nameLikeness.ts`](../src/lib/research/nameLikeness.ts), a phone or a web domain the name shares with the customer among them since v2.8308 (`permit_name_contact_matches`, migration `20261122233000`, read through `loadNameContactMatches`; **Compare** lists the phones and web domains each side holds), and Builders carries **Looks like a customer** ([`PermitLookAlikes`](../src/components/prospects/PermitLookAlikes.tsx)), whose count the Dashboard's Needs you card carries since v2.6962 (*N names on permits look like a customer*, **Answer them** opening `/prospects?tab=permits&view=builders&looks=1`, [`permitsLink.ts`](../src/lib/research/permitsLink.ts)); the app ties nothing on a likeness. Since v2.9196 (punch list #464, `permitBand.ts`) every card on the skim sits in one of three bands, **We want it**, **Acceptable** or **Likely not a fit**, with three presses over the deck. Since v2.9231 the press **What we want** over a deck opens the sheet the bands are read against ([`PermitSheetPanel`](../src/components/prospects/PermitSheetPanel.tsx), `?sheet=1`, also opened from the Overview's Identify box): a line a subject and a column a band, each of its seven numbers changed in place with a line that counts what the change would move on the skim in every city before it is kept, a refusal in words, an **Undo**, and **Changes**, the record of who changed what, all kept append-only in `permit_sheet_changes` and folded by `permitSheet.ts` over today's rules (`TODAYS_SHEET`). Since v2.9258 the skim's **Likely not a fit** band carries a box with one press, *Pass 11 of 13* (`permitBandPass.ts`): it passes the band's permits one row each with the code `likely_not_a_fit` and the line that put each there, holds back a permit whose builder or size line reads *We want it* with its reason, names a row that failed, and its **Undo** puts every passed permit back. Since v2.9259 the sheet's picks are changed in place too: a kind of work is a `choice` value moved to another band (`sheetKindInserts`, the lists that change kept as one insert by `keepSheetChanges`, refused when it would leave *We want it* with no kind), and the **Never** line is switched on or off. - **State roll** (v2.8198, punch list #411, `?tab=roll`) — the state's public roll of licensed plumbers kept for our counties, and since v2.8202 for our own people's license numbers wherever they live ([`StateRollTab`](../src/components/prospects/StateRollTab.tsx)), shown to the Hiring switch (`users.team_prospects_access`) alone. **Our own** (v2.8233, [`StateRollOwn`](../src/components/prospects/StateRollOwn.tsx), `?tab=roll&roll=own`) lays each plumbing license we hold beside the state's row of the same number and rank, with **Use the state's date**, for a person who may also open People → Licenses; its rule is [`ownLicenses.ts`](../src/lib/licenseRoll/ownLicenses.ts), and since v2.8783 its two chips, *Needs a look* and *Matches*, are Everyone's `RollChip` ([`StateRollChip.tsx`](../src/components/prospects/StateRollChip.tsx), with `LIT_LINE` and `filterHeight` in `stateRollFilterLook.ts`), 30 px on a desk and 44 px under 640 px, the lit one in the blue tint. **Everyone** (v2.8390, `roll=everyone`, `StateRollEveryone`) is the kept roll searched by name or number, its head two lines and a desk row one since v2.8765 (→ `GLOSSARY.md`, *State roll*). The third view is **Pulls** (`roll=pulls`): what is kept, a card a state file with when it was last read and what that read changed, and **Pull 4 files**, which pulls the four weekly files in turn through `license-roll-pull` (the apprentice file, read for our own numbers since v2.8202, has no card and runs on its Monday job alone). The roll's rule is [`_shared/licenseRoll.ts`](../supabase/functions/_shared/licenseRoll.ts); the view's lines are [`rollPulls.ts`](../src/lib/licenseRoll/rollPulls.ts). No home address, home phone or email is kept, and since v2.8771 a responsible master's row keeps the company phone and address the state's file lists (the four `license_roll` columns v2.8769 added, `20261128180500_license_roll_business_contact`). - See [ACCESS_CONTROL.md](./ACCESS_CONTROL.md), [PROSPECTS_TABS_ARCHITECTURE.md](./PROSPECTS_TABS_ARCHITECTURE.md), and [RECENT_FEATURES.md](./RECENT_FEATURES.md) (v2.708–v2.715) for details. diff --git a/docs/recent-features/v2.9277.md b/docs/recent-features/v2.9277.md new file mode 100644 index 0000000000..0f23e54b01 --- /dev/null +++ b/docs/recent-features/v2.9277.md @@ -0,0 +1,34 @@ +# v2.9277 — Builders: more ways into a company's page (2026-12-03) + +Punch list #465, step 2, four of the ways in the card names. It stands on v2.9266, the company's page. Client only. Nothing owed on prod. + +## What it does + +- **The card of who pulled it** (`WhoPulledItSheet`) has a press under the name, **Everything they are working on**. It opens the company's page (`builderProfileHref`) and the card closes on the way. The card opens from a name on a skim card, in the ledger and on the sheet of a kept permit, so each of those is two presses from the page. A row with no `builder_key` draws no press. +- **The builder's sheet over Market** (`BuilderSheet`, the new `pageLink`) has the same press. Market opens the sheet from **Open builder** on the call list, from a city's count in the table and from a name under *Who holds the work*. The sheet draws no such press when it is open over the page itself. +- **The Overview's Identify box** has a second quiet press beside *What we want*: *See who is building*, which opens Builders (`OVERVIEW_DOORS.builders`). `OverviewStep.also` is a list now. +- **A customer's record, both ways.** On the customer's **Permits** tab, a name the city lists a permit under is a link to its page (`BidGcTiedNames`, the new `pageLinks`, which `BidGcPermits` sets when it is on its own page). Over a bid the names stay plain words, since a link would leave the window. On the company's page, *Us and them* names each customer a person tied the company to, and each is a link to that customer's Permits tab (`/customers/?tab=permits`). + +## Where it differs from the card + +The card says a press on a name opens the page, in place of the sheet it opens today. Here the sheet still opens and the page is one press further. + +- On the skim the card of who pulled it holds the two answers and the lookups for the one permit. A press that left the skim for the page would drop them mid-answer. +- On Market the sheet's kept facts read the call list's lookups again (v2.8732). The page is another view of the tab, so Market would not be there to read. + +This is a call for the owner. The pick here is the sheet first. + +## Left of step 2 + +- **The search.** A name typed in the app's search opens its page. It needs a read of the builders' names inside the search, which is its own piece. +- The calling deck's press belongs to step 3, with the call's screen. + +## Tests + +`funnelOverview.test.ts` (the Identify box's two presses), `ProspectsResearchTab.render.test.tsx` (one new case: the card's press, its address, and the card closing), `PermitMarket.render.test.tsx` (the sheet's press over Market), `PermitBuilders.render.test.tsx` (no press on the sheet over the page, and the page's link to a tied customer), `BidGcTiedNames.render.test.tsx` (new, two cases). + +## To verify on the live site + +Read only. On the skim, press the name beside **Who**, then **Everything they are working on**: the company's page opens. Press the browser's Back: the skim is there. On Market, press **Open builder**, then the same press. On Prospects → Overview, press *See who is building*: Builders opens. On a customer with a tied name, open the **Permits** tab and press the name: its page opens, and *Us and them* there links back. + +Not seen in a browser. diff --git a/src/components/bids/BidGcPermits.tsx b/src/components/bids/BidGcPermits.tsx index 6eea12d252..d5a68e0771 100644 --- a/src/components/bids/BidGcPermits.tsx +++ b/src/components/bids/BidGcPermits.tsx @@ -143,7 +143,7 @@ export function BidGcPermits({ )} {view.elsewhere &&
{view.elsewhere}
} {view.unreadable &&
{view.unreadable}
} - + ) } diff --git a/src/components/bids/BidGcTiedNames.render.test.tsx b/src/components/bids/BidGcTiedNames.render.test.tsx new file mode 100644 index 0000000000..279b9d182c --- /dev/null +++ b/src/components/bids/BidGcTiedNames.render.test.tsx @@ -0,0 +1,62 @@ +// @vitest-environment jsdom +/** + * Render-smoke tests for the names tied to a GC (punch list #307, PR 7), and for the way into a + * company's page from a customer's record (punch list #465, step 2): on the customer's own page a + * name the city lists a permit under is a link to its page on Builders. Over a bid it is plain + * words, since a link would leave the window. Every name here is made up. + */ +import { beforeEach, describe, expect, it, vi } from 'vitest' +import { screen, waitFor, within } from '@testing-library/react' +import type { SitePermit } from '../../lib/research/permitPublic' + +const { siteIo, io } = vi.hoisted(() => ({ + siteIo: { loadNameAnswers: vi.fn(), onNameAnswered: vi.fn(), recordNameAnswer: vi.fn() }, + io: { loadPermitsOfBuilder: vi.fn(), loadResearchers: vi.fn() }, +})) + +vi.mock('../../lib/supabase', async () => { + const { makeSupabaseStub } = await import('../../test/renderSmokeMocks') + return { supabase: makeSupabaseStub() } +}) +vi.mock('../../lib/research/bidSiteIo', () => siteIo) +vi.mock('../../lib/research/permitResearchIo', () => io) +vi.mock('../../hooks/usePermitRecordsStart', () => ({ usePermitRecordsStart: () => null })) +vi.mock('./FindNamesSheet', () => ({ FindNamesSheet: () =>
})) + +import { installDomShims, renderWithProviders } from '../../test/renderSmokeMocks' +import { BidGcTiedNames } from './BidGcTiedNames' + +installDomShims() + +const permit = (id: string): SitePermit => ({ id, permit_number: `COM-${id}`, permit_type: 'Commercial Building Permit', kind: 'building', stage: 'issued', work_type: 'New commercial', submitted_on: '2026-10-01', issued_on: '2026-10-20', contact: 'Hartwell Interiors', address: '5 FAR RD', declared_value: 100000 }) + +beforeEach(() => { + for (const fn of [...Object.values(siteIo), ...Object.values(io)]) fn.mockReset() + siteIo.onNameAnswered.mockReturnValue(() => {}) + io.loadResearchers.mockResolvedValue([{ id: 'u2', name: 'Eve' }]) + // Someone tied Hartwell Interiors to the customer, on every permit. + siteIo.loadNameAnswers.mockResolvedValue({ rows: [{ id: 'a1', builder_key: 'hartwellinteriors', customer_id: 'c1', answer: 'works_for', scope: 'all', permit_id: null, name: 'Hartwell Interiors', answered_by: 'u2', answered_at: '2026-11-20T15:00:00Z' }], me: 'u1' }) + // The city lists a permit under the tied name and none under the customer's own. + io.loadPermitsOfBuilder.mockImplementation(async (city: string, key: string) => (city === 'Austin' && key === 'hartwellinteriors' ? [permit('1')] : [])) +}) + +const rows = async () => within(await screen.findByTestId('bid-gc-tied-names')) + +describe('BidGcTiedNames', () => { + it('on the customer’s own page, a name with a permit is a link to the company’s page on Builders', async () => { + renderWithProviders() + const list = await rows() + await waitFor(() => expect(list.getByRole('link', { name: 'Hartwell Interiors' })).toBeTruthy()) + expect(list.getByRole('link', { name: 'Hartwell Interiors' }).getAttribute('href')).toBe('/prospects?tab=permits&view=builders&builder=hartwellinteriors') + // The customer's own name has no permit on record: no page to open, so plain words. + expect(list.queryByRole('link', { name: 'Ridgeway Builders' })).toBeNull() + expect(list.getByText('Ridgeway Builders')).toBeTruthy() + }) + + it('over a bid, the names stay plain words', async () => { + renderWithProviders() + const list = await rows() + await waitFor(() => expect(list.getByText('Hartwell Interiors')).toBeTruthy()) + expect(list.queryByRole('link')).toBeNull() + }) +}) diff --git a/src/components/bids/BidGcTiedNames.tsx b/src/components/bids/BidGcTiedNames.tsx index b3c26f683a..d066476f5b 100644 --- a/src/components/bids/BidGcTiedNames.tsx +++ b/src/components/bids/BidGcTiedNames.tsx @@ -1,4 +1,5 @@ import { useCallback, useEffect, useState, type CSSProperties } from 'react' +import { Link } from 'react-router-dom' import { formatErrorMessage } from '../../utils/errorHandling' import { todayYmdInAppTz } from '../../utils/dateUtils' import { usePermitRecordsStart } from '../../hooks/usePermitRecordsStart' @@ -8,6 +9,7 @@ import { sitePermitLines as feedLines, type SitePermit } from '../../lib/researc import { loadPermitsOfBuilder, loadResearchers } from '../../lib/research/permitResearchIo' import { loadNameAnswers, onNameAnswered, recordNameAnswer } from '../../lib/research/bidSiteIo' import { foldNameAnswers, listedOnWords, tiedNames, type TiedName } from '../../lib/research/nameAnswers' +import { builderProfileHref } from '../../lib/research/permitsLink' import { FindNamesSheet } from './FindNamesSheet' /** @@ -26,11 +28,14 @@ export function BidGcTiedNames({ customerIds, customerName, findPress = true, + pageLinks = false, }: { customerIds: readonly string[] customerName: string /** The press that opens Find their names on permits. Off inside that sheet itself. */ findPress?: boolean + /** On the customer's own page a name with a permit is a link to the company's page on Builders. Off over a bid, where a link would leave the window. */ + pageLinks?: boolean }) { const [finding, setFinding] = useState(false) const [loaded, setLoaded] = useState({ state: 'loading' }) @@ -115,7 +120,13 @@ export function BidGcTiedNames({ return (
- {r.name} + {pageLinks && r.permits.length > 0 ? ( + + {r.name} + + ) : ( + {r.name} + )} {r.how}
diff --git a/src/components/prospects/PermitBuilderProfile.tsx b/src/components/prospects/PermitBuilderProfile.tsx index 354de271ff..38089a9f2a 100644 --- a/src/components/prospects/PermitBuilderProfile.tsx +++ b/src/components/prospects/PermitBuilderProfile.tsx @@ -1,4 +1,5 @@ -import { useCallback, useEffect, useMemo, useState, type CSSProperties } from 'react' +import { Fragment, useCallback, useEffect, useMemo, useState, type CSSProperties } from 'react' +import { Link } from 'react-router-dom' import { useBuilderAskFor } from '../../hooks/useBuilderAskFor' import { byWordWords } from '../../lib/research/builderAnswers' import type { BuilderAnswersGround } from '../../lib/research/builderAnswersIo' @@ -209,7 +210,25 @@ export function PermitBuilderProfile({
{byWord &&
{byWord}
} - {tied.length > 0 && !byWord &&
Tied to {tied.map((c) => c.name).join(', ')} by a person’s word.
} + {/* Each tied customer is a press to its record's Permits tab, which links back here (punch list #465, step 2). */} + {tied.length > 0 && ( +
+ {byWord ? 'Their record with us: ' : 'Tied to '} + {tied.map((c, i) => ( + + {i > 0 ? ', ' : ''} + {c.ids[0] ? ( + + {c.name} + + ) : ( + c.name + )} + + ))} + {byWord ? '.' : ' by a person’s word.'} +
+ )}
diff --git a/src/components/prospects/PermitBuilders.render.test.tsx b/src/components/prospects/PermitBuilders.render.test.tsx index 3c60541053..a505ccf953 100644 --- a/src/components/prospects/PermitBuilders.render.test.tsx +++ b/src/components/prospects/PermitBuilders.render.test.tsx @@ -109,6 +109,10 @@ describe('Builders, Our bids', () => { // No builder's permits in this city name a plumber, so the sheet says nothing of one. expect(within(sheet).getByText('Our bids: 4 priced, 2 won, the last on Oct 14.')).toBeTruthy() expect(within(sheet).getByText('1 of them is with Ridgeway Builders, tied to this name by a person’s word.')).toBeTruthy() + // The page behind the sheet links to the tied customer's record, its Permits tab (punch list #465, step 2). + const tied = document.querySelector('[data-profile-tied]') as HTMLElement + expect(tied.textContent).toBe('Their record with us: Ridgeway Builders.') + expect(within(tied).getByRole('link', { name: 'Ridgeway Builders' }).getAttribute('href')).toMatch(/^\/customers\/c[12]\?tab=permits$/) }) it('says it on a phone card too', async () => { @@ -553,6 +557,8 @@ describe('A company’s profile (punch list #465, step 2)', () => { it('opens the builder’s sheet for the mark, and reads the jobs again once it is kept', async () => { everyCity() const sheet = await openSheet('Sable Creek Construction') + // The sheet is over the company's own page here, so it offers no press to it. + expect(within(sheet).queryByRole('link', { name: 'Everything they are working on' })).toBeNull() fireEvent.click(within(sheet).getByRole('button', { name: 'Good' })) fireEvent.change(within(sheet).getByLabelText('Why, in a line'), { target: { value: 'Pays on time.' } }) fireEvent.click(within(sheet).getByRole('button', { name: 'Mark as Good' })) diff --git a/src/components/prospects/PermitBuilders.tsx b/src/components/prospects/PermitBuilders.tsx index aa5f50855b..55c899bf40 100644 --- a/src/components/prospects/PermitBuilders.tsx +++ b/src/components/prospects/PermitBuilders.tsx @@ -1,5 +1,5 @@ import { Fragment, useCallback, useEffect, useMemo, useState, type CSSProperties } from 'react' -import { useSearchParams } from 'react-router-dom' +import { Link, useSearchParams } from 'react-router-dom' import { EmptyState } from '../EmptyState' import { emptyWords, emptyWordsWithPress } from '../../lib/emptyWords' import { DEAD_PRESS_FILL, DEAD_PRESS_TEXT } from '../../lib/deadPress' @@ -32,7 +32,7 @@ import { byWordWords, openLookAlikes, throughWords, withAnsweredBids } from '../ import type { BuilderAnswersGround } from '../../lib/research/builderAnswersIo' import { BuilderNameTies } from './BuilderNameTies' import { PermitLookAlikes } from './PermitLookAlikes' -import { permitsLinkWithBuilder, permitsLinkWithLooks, readPermitsLink } from '../../lib/research/permitsLink' +import { builderProfileHref, permitsLinkWithBuilder, permitsLinkWithLooks, readPermitsLink } from '../../lib/research/permitsLink' import { loadBuildersOf, loadPermitsOfBuilder, markBuilder, pullPermitsBack, saveBuilder } from '../../lib/research/permitResearchIo' import { BUILDER_OURS, BUILDER_OURS_WORDS, DEFAULT_BUILDER_SORT, ariaSortOf, barWidth, builderShares, buildersOfOurs, drawnWords, longestShare, oursCounts, pressSort, recordsStartWords, shareWords, sortBuilders, sortMark, type BuilderOurs, type BuilderShare, type BuilderSort, type BuilderSortBy } from '../../lib/research/builderShare' import { Money } from '../Money' @@ -474,7 +474,7 @@ export function PermitBuilders({ city, cities, authUserId, todayYmd, isMobile, o * **Put back** kept the same way. Until that read lands the sheet shows the Google press alone, as it did, so * it never says nobody looked before it knows. */ -export function BuilderSheet({ row, city, permitCities, authUserId, todayYmd, reach, namesPlumbers, ground, onAnswered, onLookupChecked, onClose, onSaved }: { row: BuilderRow; city: string; /** The cities the name's permits are read in, when the list read more than one. The one city when left out. */ permitCities?: readonly string[]; authUserId: string; todayYmd: string; reach: RecordsReach; /** False where no builder's permits in the city name a plumber: the sheet says nothing of one. */ namesPlumbers: boolean; /** The answers on names. Null before they are read, and before the table is on the database: the section is not drawn. */ ground: BuilderAnswersGround | null; onAnswered: () => void; /** A press on a looked-up fact was kept: a list behind the sheet reads its lookups again. */ onLookupChecked?: () => void; onClose: () => void; onSaved: () => void }) { +export function BuilderSheet({ row, city, permitCities, authUserId, todayYmd, reach, namesPlumbers, ground, onAnswered, onLookupChecked, pageLink, onClose, onSaved }: { row: BuilderRow; city: string; /** The cities the name's permits are read in, when the list read more than one. The one city when left out. */ permitCities?: readonly string[]; authUserId: string; todayYmd: string; reach: RecordsReach; /** False where no builder's permits in the city name a plumber: the sheet says nothing of one. */ namesPlumbers: boolean; /** The answers on names. Null before they are read, and before the table is on the database: the section is not drawn. */ ground: BuilderAnswersGround | null; onAnswered: () => void; /** A press on a looked-up fact was kept: a list behind the sheet reads its lookups again. */ onLookupChecked?: () => void; /** True where the sheet opens over another view, as on Market: it offers the company's page. Left out on the page itself. */ pageLink?: boolean; onClose: () => void; onSaved: () => void }) { const { showToast } = useToastContext() const name = builderName(row) const [mark, setMark] = useState(row.mark ?? 'none') @@ -550,6 +550,13 @@ export function BuilderSheet({ row, city, permitCities, authUserId, todayYmd, re
{builderCountWords(row, reachWords(reach, todayYmd))} · last filed {shortDay(row.last_permit_on)}
+ {pageLink && ( +
+ + Everything they are working on + +
+ )}
)} - {step.also && ( -
- - {step.also.label} - + {step.also && step.also.length > 0 && ( +
+ {step.also.map((a) => ( + + {a.label} + + ))}
)} {step.press && ( diff --git a/src/components/prospects/ProspectsResearchTab.render.test.tsx b/src/components/prospects/ProspectsResearchTab.render.test.tsx index d766bb6dbc..6349e24bcf 100644 --- a/src/components/prospects/ProspectsResearchTab.render.test.tsx +++ b/src/components/prospects/ProspectsResearchTab.render.test.tsx @@ -268,6 +268,22 @@ describe('ProspectsResearchTab (v2.6782, punch list #292)', () => { expect(io.approachFromPermit).toHaveBeenCalledWith(expect.objectContaining({ id: 'p1' }), 'gc', 'u1', expect.objectContaining({ phone: '(210) 555-0199', website: 'https://example.com', ownerOfRecord: 'SAMPLE HOLDINGS LLC' })) }) + it('the card of who pulled it offers the company’s page, and closes on the way (punch list #465, step 2)', async () => { + // A row the older read returned carries no key: the card offers no page. + await openLedger() + fireEvent.click(screen.getByRole('button', { name: 'Ridgeway Builders' })) + await waitFor(() => expect(screen.getByText('(210) 555-0199')).toBeTruthy()) + expect(screen.queryByRole('link', { name: 'Everything they are working on' })).toBeNull() + cleanup() + io.loadResearchPermits.mockResolvedValue([row({ builder_key: 'ridgewaybuilders' })]) + await openLedger() + fireEvent.click(screen.getByRole('button', { name: 'Ridgeway Builders' })) + const link = await screen.findByRole('link', { name: 'Everything they are working on' }) + expect(link.getAttribute('href')).toBe('/prospects?tab=permits&view=builders&builder=ridgewaybuilders') + fireEvent.click(link) + await waitFor(() => expect(screen.queryByRole('dialog')).toBeNull()) + }) + it('the address opens The building: the county, every field the city sent, the permits on the address, and a Google search', async () => { await openLedger() fireEvent.click(screen.getByRole('button', { name: '100 SAMPLE ST' })) diff --git a/src/components/prospects/WhoPulledItSheet.tsx b/src/components/prospects/WhoPulledItSheet.tsx index 895eb38224..319e760f27 100644 --- a/src/components/prospects/WhoPulledItSheet.tsx +++ b/src/components/prospects/WhoPulledItSheet.tsx @@ -1,4 +1,5 @@ import { Fragment, useCallback, useEffect, useMemo, useState, type CSSProperties } from 'react' +import { Link } from 'react-router-dom' import { formatErrorMessage } from '../../utils/errorHandling' import { contactParts, type CompanyFacts, type ParcelFacts } from '../../../supabase/functions/_shared/permitLookup' import { askingCountyWords, noParcelWords, parcelPointWords, permitSearchDoor } from '../../lib/research/permitCityDoors' @@ -9,6 +10,7 @@ import { todayYmdInAppTz } from '../../utils/dateUtils' import { GoogleSearchPress } from './GoogleSearchPress' import { usePermitRecordsStart } from '../../hooks/usePermitRecordsStart' import { reachWords, recordsReach } from '../../lib/research/permitReach' +import { builderProfileHref } from '../../lib/research/permitsLink' /** * Research, Who pulled it (punch list #292, PR 4): the card behind a contact's name. The @@ -149,6 +151,14 @@ export function WhoPulledItSheet({
{row.permit_number} · {work.main} · {row.address ?? 'no address'}
+ {/* The company's page, every city (punch list #465, step 2). This sheet is about one permit, so it closes on the way. */} + {row.builder_key && ( +
+ + Everything they are working on + +
+ )} {(asks.company || asks.person) && (
diff --git a/src/content/help/find-your-way-around-prospects.md b/src/content/help/find-your-way-around-prospects.md index 7a0e72df65..45d9d90f0b 100644 --- a/src/content/help/find-your-way-around-prospects.md +++ b/src/content/help/find-your-way-around-prospects.md @@ -27,7 +27,7 @@ Every funnel has the same four steps, in order. Each step shows its count and one line on what it is for. Press the button in a step to open it. {{button:blue|Skim permits}} opens the Permits skim. {{button:outline|Call the deck}} opens the calling deck. -The **Identify** step of Jobs sorts the permits that wait on the skim into three counts. The counts are **We want it**, **Acceptable** and **Likely not a fit**. The three add up to the permits that wait. The step says one count for a moment while the three are read. [Skim the permits](/help/research-permits-for-work-to-bid#skim-the-permits) says what puts a permit in each. Press **What we want** in the step to open the sheet the counts are read against. [Change what we want](/help/research-permits-for-work-to-bid#change-what-we-want) says how to change a number on it. +The **Identify** step of Jobs sorts the permits that wait on the skim into three counts. The counts are **We want it**, **Acceptable** and **Likely not a fit**. The three add up to the permits that wait. The step says one count for a moment while the three are read. [Skim the permits](/help/research-permits-for-work-to-bid#skim-the-permits) says what puts a permit in each. Press **What we want** in the step to open the sheet the counts are read against. [Change what we want](/help/research-permits-for-work-to-bid#change-what-we-want) says how to change a number on it. Press **See who is building** beside it to open Builders. A name there opens [the company's page](/help/research-permits-for-work-to-bid#open-a-company-s-page). ## The band and the ratio diff --git a/src/content/help/research-permits-for-work-to-bid.md b/src/content/help/research-permits-for-work-to-bid.md index aa57500faa..d181663034 100644 --- a/src/content/help/research-permits-for-work-to-bid.md +++ b/src/content/help/research-permits-for-work-to-bid.md @@ -227,10 +227,12 @@ Four numbers come next. The first counts the jobs open now. The second is its sh **Working on now** lists every job with no plumbing permit yet. Each job has a chip that says where it stands with us. A job we passed stays on the list. Its chip says why we passed. -**Who to ask for** shows what a lookup found about the company. It also names who files their permits. **Who they use** names their plumbers. **Us and them** has our bids and our mark. +**Who to ask for** shows what a lookup found about the company. It also names who files their permits. **Who they use** names their plumbers. **Us and them** has our bids and our mark. It also names each customer a person tied the company to. Press a customer's name there to open its **Permits** tab. The page has an address of its own. Copy the address to send the page to a teammate. Press **Back to Builders** to return to the list. Picking a city in the picker returns to that city's list too. +Other presses open the page too. **Everything they are working on** is on the card of who pulled a permit. The same press is on the builder's sheet over Market. On the Overview, **See who is building** opens Builders. On a customer's **Permits** tab, a name with a permit opens its page. + ### Mark a builder Open the company's page and press **Mark, kind and ties**. The builder's sheet opens. Pick **Good** or **Avoid** and say why in a line. The mark shows on every skim card of that builder. A Good builder's permits come first. An Avoid builder's permits come last. @@ -261,7 +263,7 @@ Five names show, so one person can call them all. A name with a building word co {{chip:gray|May file for others}} marks a name that reads like a permit service or a design firm. {{chip:gray|Could be a person}} marks a name with no company in it. Those names wait behind the builders. Say what a name is on its builder's sheet to settle it. -Press an address after **Open now** to open the building. Press **Open builder** to open the builder's sheet. +Press an address after **Open now** to open the building. Press **Open builder** to open the builder's sheet. On the sheet, press **Everything they are working on** to open [the company's page](#open-a-company-s-page). Press {{button:blue|Pursue}} to go after a builder. Say what for, who follows up and what they are. The lead goes on a calling deck, as a pursue on the skim does. Press **Not for us** to pass on the name. Say why in one press, or leave it unsaid. @@ -428,7 +430,7 @@ Press **Google the address** to search Google for it. Press the name beside **Pu ## Find out who pulled it -Press the name under **Who pulled it**. A card opens with six parts. +Press the name under **Who pulled it**. A card opens with six parts. Under the name, **Everything they are working on** opens [the company's page](#open-a-company-s-page). :::cards diff --git a/src/content/help/see-what-the-city-has-on-a-bids-address.md b/src/content/help/see-what-the-city-has-on-a-bids-address.md index 9d70f8ec6f..93e0cc3146 100644 --- a/src/content/help/see-what-the-city-has-on-a-bids-address.md +++ b/src/content/help/see-what-the-city-has-on-a-bids-address.md @@ -69,6 +69,8 @@ Go to **Customers** and open the customer. Press the **Permits** tab. The tab holds the same block as the bid's window. The block lists the jobs you priced for them, then the names tied to them. On a phone the first six jobs show here, with a press for the rest. +On this tab a name the city lists a permit under is a link. Press it to open [the company's page](/help/research-permits-for-work-to-bid#open-a-company-s-page) on Builders. That page links back to this customer. + Two customer rows sometimes carry one name. The tab reads them together and says so under the block. The **Profile** tab keeps a **Names on permits** line where the card used to be. Press **Open Permits** on that line to reach the tab. diff --git a/src/content/releaseNotes/v2.9277.ts b/src/content/releaseNotes/v2.9277.ts new file mode 100644 index 0000000000..21f4bfaefc --- /dev/null +++ b/src/content/releaseNotes/v2.9277.ts @@ -0,0 +1,16 @@ +import type { ReleaseNote } from '../../lib/releaseNotes' + +const note: ReleaseNote = { + version: 'v2.9277', + date: '2026-12-03', + title: 'Builders: more ways into a company\'s page', + kind: 'feature', + highlights: [ + 'The card of who pulled a permit has a new press under the name, Everything they are working on. It opens the company\'s page, over every city it files in.', + 'The builder\'s sheet on Market has the same press, so a name on the call list or in the table is two presses from the page.', + 'On Prospects → Overview, the Identify step has a second quiet press, See who is building, which opens Builders.', + 'A customer\'s Permits tab links each name with a permit to the company\'s page, and the page links back to the customer under Us and them.', + ], +} + +export default note diff --git a/src/lib/prospects/funnelOverview.test.ts b/src/lib/prospects/funnelOverview.test.ts index fc73ac2dc5..e7675b06d5 100644 --- a/src/lib/prospects/funnelOverview.test.ts +++ b/src/lib/prospects/funnelOverview.test.ts @@ -196,7 +196,11 @@ describe('buildOverview', () => { expect(identify(counts).facts).toEqual([{ value: '310', words: 'wait on the skim' }]) expect(identify({ ...counts, bands: { want: 10, acceptable: 200, not_fit: 100 } }).facts.map((f) => `${f.value} ${f.words}`)).toEqual(['10 We want it', '200 Acceptable', '100 Likely not a fit']) // The box opens the sheet the three counts are read against, a quieter press beside Skim permits (step 2). - expect(identify(counts).also).toEqual({ label: 'What we want', to: '/prospects?tab=permits&sheet=1' }) + // And Builders, where a name opens the company's page (punch list #465, step 2). + expect(identify(counts).also).toEqual([ + { label: 'What we want', to: '/prospects?tab=permits&sheet=1' }, + { label: 'See who is building', to: '/prospects?tab=permits&view=builders' }, + ]) expect(funnel(buildOverview(counts, ALL, NOW), 'jobs').steps[1]!.also).toBeUndefined() }) diff --git a/src/lib/prospects/funnelOverview.ts b/src/lib/prospects/funnelOverview.ts index 025672cbe5..82017d36e7 100644 --- a/src/lib/prospects/funnelOverview.ts +++ b/src/lib/prospects/funnelOverview.ts @@ -227,8 +227,8 @@ export type OverviewStep = { empty: EmptyWords | null facts: Array<{ value: string; words: string }> press: OverviewPress | null - /** A second, quieter press under the facts: the Identify box opens the sheet the three counts are read against. */ - also?: OverviewPress | null + /** Quieter presses under the facts: the Identify box opens the sheet the three counts are read against, and Builders, who is building (punch list #465). */ + also?: readonly OverviewPress[] /** The step's own address, which the step row over a funnel's tabs opens. */ home: string /** What carries a row to the next step. */ @@ -289,6 +289,8 @@ export const OVERVIEW_DOORS = { skim: '/prospects?tab=permits', /** The skim with the sheet of what we want open over it (punch list #464, step 2). */ sheet: '/prospects?tab=permits&sheet=1', + /** Builders: every company on the permits, each a press from its page (punch list #465, step 2). */ + builders: '/prospects?tab=permits&view=builders', deck: '/prospects?tab=follow-up', convert: '/prospects?tab=convert', roll: '/prospects?tab=roll&roll=everyone', @@ -325,7 +327,10 @@ function jobsFunnel(c: OverviewCounts, doors: OverviewDoors, nowMs: number): Ove empty: p && p.onFile === 0 ? emptyWords({ kind: 'data', noun: 'permits on file', page: { label: 'Permits', tail: 'reads the cities each morning.' } }) : null, facts: p ? identifyFacts(p.waiting, c.bands ?? null) : [], press: { label: 'Skim permits', to: OVERVIEW_DOORS.skim }, - also: { label: 'What we want', to: OVERVIEW_DOORS.sheet }, + also: [ + { label: 'What we want', to: OVERVIEW_DOORS.sheet }, + { label: 'See who is building', to: OVERVIEW_DOORS.builders }, + ], then: `Then: Investigate keeps one. ${val('n', n(p?.skimmed ?? 0))} skimmed so far.`, }), step('jobs', 'permits', doors.permits, 'The office and the estimators decide on the permits kept.', { diff --git a/to-dos/prospects-profiles/README.md b/to-dos/prospects-profiles/README.md index 217ce4b58a..9ead08cc54 100644 --- a/to-dos/prospects-profiles/README.md +++ b/to-dos/prospects-profiles/README.md @@ -2,7 +2,7 @@ name: "Prospects: a profile for every company and every person on a permit" number: 465 group: ready -status: asked 2026-12-01 by the owner · what the app holds about a builder read in the code the same day · the card and the mock-up written · the owner's answer the same day: a share is drawn as two bars, dollars and permits · his word the same day, *let's roll with it*, and his question of how a person reaches the view, answered here as six ways in · his word the same day that the build should look like the drawing, so each step is tied to its drawing · calls 2 to 7 answered 2026-12-02, every pick stands · step 1 built 2026-12-02 in two PRs: the migration (v2.9261, `research_builders_v2`, pushed to prod on 2026-12-03) and the client (v2.9263, the two shares as bars, headings that sort, the three chips, *All five cities*) · step 2's page built 2026-12-02 (v2.9266): a company's profile on an address of its own, opened from a name on Builders, with the other five ways in still to build +status: asked 2026-12-01 by the owner · what the app holds about a builder read in the code the same day · the card and the mock-up written · the owner's answer the same day: a share is drawn as two bars, dollars and permits · his word the same day, *let's roll with it*, and his question of how a person reaches the view, answered here as six ways in · his word the same day that the build should look like the drawing, so each step is tied to its drawing · calls 2 to 7 answered 2026-12-02, every pick stands · step 1 built 2026-12-02 in two PRs: the migration (v2.9261, `research_builders_v2`, pushed to prod on 2026-12-03) and the client (v2.9263, the two shares as bars, headings that sort, the three chips, *All five cities*) · step 2's page built 2026-12-02 (v2.9266): a company's profile on an address of its own, opened from a name on Builders · four more ways in built 2026-12-03 (v2.9277): the card of who pulled it, the builder's sheet over Market, the Overview and a tied customer's record, with the search still to build summary: > The owner wants to sort permits by GC or by the person who files them, and build a profile for each. It serves two ends. When the office calls someone, it should see everything they are @@ -12,7 +12,7 @@ summary: > own sheet and the calling deck. No one screen shows a company whole, none counts dollars or share, none is sorted by the person, and a call is logged against one job. This card gathers them into one page a name, one call for every job, and a share for every company. -next: The other five ways into a profile (step 2's last piece), then step 3. Step 1's migration (v2.9261) is on prod, its client (v2.9263) merges first, and step 2's page (v2.9266) after that client. Each owes a look after its deploy: time the first draw on *All five cities* and of a profile, and hold three names' dollars to the Ledger. +next: The search (step 2's last way in), then step 3. Step 1's migration (v2.9261) is on prod, and its client (v2.9263) and step 2's page (v2.9266) are on main. The four ways in are v2.9277. Each owes a look after its deploy: time the first draw on *All five cities* and of a profile, and hold three names' dollars to the Ledger. size: L as a train of six (M · M · M · M · S · M) blocker: Nothing. All seven calls are answered. opinion: build — the facts are already read and kept, a place at a time, and the two things the owner wants are the two things no place does @@ -152,7 +152,8 @@ Smallest first. Each step is one pull request with its release note and its frag - **Left to do:** the client's look after its deploy. The *Companies or People* switch is step 4's. 2. **A company's profile (M).** `builderProfile.ts`, the page and its address, opened from a row on Builders, from a name wherever it is drawn, from the search, from the Overview and from a tied customer's record. - **The page is written** (v2.9266, 2026-12-02): `builderProfile.ts`, `PermitBuilderProfile`, the address `view=builders&builder=`, and the first way in, a name on Builders. Where it differs from the drawing is said in `docs/recent-features/v2.9266.md`: a job is open while no plumbing permit sits on it, the chips use the tab's own words, plumbers are counted on the jobs that name one, and the press *Call about all 5 jobs*, *Never called* and *Also files for 2 other companies* wait for steps 3 and 4. - - **Left to do:** the other five ways in. Each is a link to `builderProfileHref`. + - **Four more ways in are written** (v2.9277, 2026-12-03): the press **Everything they are working on** on the card of who pulled it and on the builder's sheet over Market, *See who is building* on the Overview's Identify box, and a tied customer's record, where the Permits tab links a name to its page and the page links back. A name still opens its sheet first and the page is one press further, which differs from *How a person gets there*. That is a call, said in `docs/recent-features/v2.9277.md`, and the pick is the sheet first. + - **Left to do:** the search. The calling deck's press is step 3's. 3. **One call, every job (M).** The call's screen, the four answers, and the one save. The calling deck's press on a lead that came from a permit. 4. **People (M).** The *People* side of the list, and a person's page. 5. **Who holds the work (S).** The ten bars and the sentence, on Market beside the plumbers' part.