Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
cb006d7
chore(thing/well-show): Update PDF preview to only require view access
TylerAdamMartinez Apr 29, 2026
48557e2
test(FieldCompilationNotesPdf): Add pkg for decoding pdf text
TylerAdamMartinez Apr 29, 2026
97769a7
Merge pull request #272 from DataIntegrationGroup/TAM-BDMS-777
TylerAdamMartinez Apr 29, 2026
2a567e6
Attach well_id to PostHog pageviews on well detail routes.
jeremyzilar Apr 30, 2026
4c0cd52
Add PostHog global_search events and unmask command palette in sessio…
jeremyzilar Apr 30, 2026
30572f0
Merge pull request #273 from DataIntegrationGroup/BDMS-562
jeremyzilar Apr 30, 2026
8c956c5
Show organization name for contacts without a personal name
jeremyzilar May 1, 2026
8d655b9
fix(ListPage): Rm export button from list pages
TylerAdamMartinez May 5, 2026
82ac983
refactor(ListPage): Toolbar buttons configurable
TylerAdamMartinez May 5, 2026
7940758
Merge pull request #276 from DataIntegrationGroup/TAM-BDMS-775
TylerAdamMartinez May 11, 2026
a9542e9
feat(thing/list): Increase export page size to 500
TylerAdamMartinez May 18, 2026
8de7893
fix(home): patch broken link
TylerAdamMartinez May 18, 2026
e2bfa75
Merge pull request #275 from DataIntegrationGroup/BDMS-786-Company-Co…
jeremyzilar May 18, 2026
a806207
fix(thing/list): Well list will have the same filters as the search
TylerAdamMartinez May 19, 2026
3a8d5ef
Merge pull request #277 from DataIntegrationGroup/TAM-BDMS-776
TylerAdamMartinez May 20, 2026
6e9d297
Merge pull request #278 from DataIntegrationGroup/TAM-BDMS-788
TylerAdamMartinez May 20, 2026
447d773
fix(CD_preview): ignore production branch in pull request types for d…
jirhiker May 20, 2026
1deb7da
Merge pull request #280 from DataIntegrationGroup/branch-preview-igno…
jirhiker May 20, 2026
19782c9
Disable refetchOnWindowFocus on all queries
jeremyzilar Jun 2, 2026
a5680e6
Memoize THING_LAYERS object in useThingLayers
jeremyzilar Jun 2, 2026
4a786d3
Fix map view jitter — layout mismatch, debounce, and skeleton polish
jeremyzilar Jun 2, 2026
d7a6b9f
Add PostHog tracking to the map view
jeremyzilar Jun 2, 2026
dda9c27
Add PostHog tracking to the Wells list page
jeremyzilar Jun 2, 2026
fdf5e90
Remove features loading skeleton — causes flash in no-features areas
jeremyzilar Jun 2, 2026
7924775
Merge pull request #282 from DataIntegrationGroup/BDMS-784
jeremyzilar Jun 2, 2026
e90e66e
Fix TS2554: pass details arg through filter and sort model handlers
jeremyzilar Jun 2, 2026
614faf5
Fix TS2554: Refine's onFilterModelChange and onSortModelChange only a…
jeremyzilar Jun 2, 2026
f0b05eb
Merge branch 'staging' into BDMS-764-posthog
jeremyzilar Jun 3, 2026
93e7520
Fix TS2554 in wells list sort and filter handlers
jeremyzilar Jun 3, 2026
19b5b25
Install shadcn/ui and replace first MUI Button with shadcn equivalent
jeremyzilar Jun 4, 2026
78e919e
Merge pull request #283 from DataIntegrationGroup/BDMS-784-posthog
jeremyzilar Jun 4, 2026
297ce9a
Upgrade to Tailwind v4 and migrate color tokens from theme.ts
jeremyzilar Jun 4, 2026
92a12c5
Fix theme.ts colors after Tailwind v4 upgrade
jeremyzilar Jun 4, 2026
31ca931
Expand theme.ts colors to full Tailwind v3 hex palette
jeremyzilar Jun 4, 2026
565f46c
Add shadcn sidebar, collapsible, dropdown, tooltip, and supporting ui…
jeremyzilar Jun 4, 2026
c028dc3
Fix Button component to use forwardRef so Radix can pass refs through it
jeremyzilar Jun 4, 2026
111a44f
Add AppShell — single-file application layout shell using shadcn Sidebar
jeremyzilar Jun 4, 2026
e88008e
Wire AppShell into app, sync dark mode with Tailwind, remove Refine D…
jeremyzilar Jun 4, 2026
afb0ad7
Fix setMode call in legacy sider after context signature change
jeremyzilar Jun 4, 2026
e08d1a9
Remove in-page breadcrumb from WellShow — breadcrumb now lives in App…
jeremyzilar Jun 4, 2026
f09fcf2
Switch app backgrounds to neutral-50, add @tailwindcss/typography plugin
jeremyzilar Jun 4, 2026
7f1ae5c
Add @tailwindcss/typography and shadcn sidebar package dependencies
jeremyzilar Jun 4, 2026
3407fdc
Merge pull request #284 from DataIntegrationGroup/BDMS-764-posthog
jeremyzilar Jun 5, 2026
5bc22be
Remove the /amp/ section entirely
jeremyzilar Jun 8, 2026
8fd5676
Update access control test to remove water.* resource expectations
jeremyzilar Jun 8, 2026
d735401
Merge pull request #285 from DataIntegrationGroup/BDMS-838-dead-code
jeremyzilar Jun 9, 2026
737bb59
Add shadcn UI primitives and typography specimen page
jeremyzilar Jun 9, 2026
4cab8a3
Merge origin/staging — bring in AMP removal, PostHog tracking, TS fixes
jeremyzilar Jun 9, 2026
edc5f96
Hide Example nav section and Help & Support button for PR review
jeremyzilar Jun 9, 2026
338c03f
Add permission-aware sidebar nav config
jeremyzilar Jun 9, 2026
d2db081
Fix nav active state picking most specific matching route
jeremyzilar Jun 9, 2026
b145642
Fix map viewport overflow by pinning shell to h-svh
jeremyzilar Jun 9, 2026
ce51749
Bump version to v1.0.1
jirhiker Jun 9, 2026
1487410
fix(thing/well-show): URL encoding in fetchPOD, correct url, and add …
chasetmartin May 8, 2026
5c75b56
feat(pages/well-show): restructure fetchSiteInfo and add record parsi…
chasetmartin May 8, 2026
a9f8855
feat(thing/well-show): replace tables with DataGrid for OSEPOD and US…
chasetmartin May 8, 2026
5d5d191
refactor(card): update URL detection to only recognize HTTPS and impr…
chasetmartin Jun 9, 2026
33ee315
Merge pull request #288 from DataIntegrationGroup/BDMS-863-ose-usgs-c…
chasetmartin Jun 9, 2026
bd90628
Rename SidebarProvider/SidebarInset, fix Well Detail and map panel sc…
jeremyzilar Jun 10, 2026
bfaf03b
Fix mobile nav, responsive header, and remove unused Geist font
jeremyzilar Jun 10, 2026
361ce61
Use shadcn Button primitive for CollapseButton and ExpandButton
jeremyzilar Jun 10, 2026
ec10c68
Add explicit role permissions to nav items and enforce them in AppShell
jeremyzilar Jun 10, 2026
3af4d9d
Fix build error in legacy header — ReportBugButton no longer takes us…
jeremyzilar Jun 10, 2026
bbe962c
Revert "Fix build error in legacy header — ReportBugButton no longer …
jeremyzilar Jun 10, 2026
806c72c
Reapply "Fix build error in legacy header — ReportBugButton no longer…
jeremyzilar Jun 10, 2026
bca1402
Merge pull request #287 from DataIntegrationGroup/claude/determined-a…
jirhiker Jun 10, 2026
4635809
Merge pull request #286 from DataIntegrationGroup/base-app-frame
jirhiker Jun 10, 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
4 changes: 3 additions & 1 deletion .github/workflows/CD_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Preview deploy to Cloud Run

on:
pull_request:
types: [opened, synchronize, reopened, closed]
types: [ opened, synchronize, reopened, closed ]
branches-ignore:
- production

jobs:
deploy-preview:
Expand Down
25 changes: 25 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "radix-nova",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/index.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide",
"rtl": false,
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"menuColor": "default",
"menuAccent": "subtle",
"registries": {}
}
120 changes: 120 additions & 0 deletions feature_files/contact-display-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
id: contact-display-name
title: Contact Display Name
status: partial
created: 2026-05-01
updated: 2026-05-01
related_files:
- src/utils/contactDisplayName.ts
- src/components/WellShow/Contacts.tsx
- src/pages/ocotillo/contact/list.tsx
- src/pages/ocotillo/contact/show.tsx
- src/pages/ocotillo/thing/list.tsx
- api/search.py # OcotilloAPI repo
deferred_items:
- id: org-contact-type
title: "Mark contacts as org type"
description: >
Requires a new contact_type lexicon term ("Organization"), an Alembic
migration, API filter support, and UI filtering/display changes in both
repos. Would make org-only contacts filterable and visually distinct
from person contacts.
effort: medium
priority: low
- id: confidential-org-masking
title: "Mask organization as well as name for confidential contacts"
description: >
sanitizeContact currently replaces name with "Confidential Contact" but
leaves organization visible. For org-only contacts the org becomes the
display name, which may expose sensitive information. sanitizeContact
should be updated to also blank organization when release_status is
private and the viewer lacks confidential access. As of 2026-05-01,
2,052 of 2,126 contacts (96%) are private, so this gap affects nearly
all contact records for viewers without elevated access.
effort: low
priority: medium
---

# Contact Display Name

## Problem

The `Contact` data model allows `name` to be null when `organization` is
present (the API enforces that at least one of the two fields is set). This
means org-only contacts have always had a blank display name everywhere in
the UI: the wells list contacts column, the well detail Contacts card, the
contacts list page, and contact search results.

## Resolution logic

A single utility function in `src/utils/contactDisplayName.ts` resolves the
display name for any contact object:

```
getContactDisplayName(contact):
1. name (non-empty after trim) → return name
2. organization (non-empty) → return organization
3. neither → return "" (guarded by API validation)
```

For a list of contacts (for example the Contacts column on the wells list):

```
getContactsLabel(contacts[]):
map each contact through getContactDisplayName,
filter out blank results,
join with ", "
```

## All edge cases

| Scenario | name | organization | Display value |
|---|---|---|---|
| Person only | "Matt Zwager" | null | "Matt Zwager" |
| Person + org | "Matt Zwager" | "NMBGMR" | "Matt Zwager" |
| Org only | null | "NPS" | "NPS" |
| Both null | null | null | "" (blocked by API) |
| Empty string name | "" | "NPS" | "NPS" (trim treats "" as null) |
| Confidential person | "Confidential Contact" | "NMBGMR" | "Confidential Contact" |
| Confidential org-only | "Confidential Contact" | "NPS" | "Confidential Contact" |

**Important:** `getContactDisplayName` must be called on the contact value
*after* `sanitizeContact` has run. `sanitizeContact` sets `name` to
`"Confidential Contact"` for private contacts when the viewer lacks
confidential access. Calling `getContactDisplayName` first and then
`sanitizeContact` would cause org-only private contacts to fall through
to their organization value and expose it.

## Current contact_type values

The `contact_type` lexicon category currently has three terms:

- **Primary** — the main contact for a well
- **Secondary** — an additional contact for a well
- **Field Event Participant** — a person who participated in a field event

None of these distinguish a person from an organization. This is tracked as a
deferred item (`org-contact-type`) for a future cycle.

## Why the utility function approach was chosen

The two data-level alternatives were considered and rejected:

- **Copy org name into the name field**: Would conflict with the
`uq_contact_name_organization` unique constraint for rows where org already
equals name. Also creates duplicated data that must stay in sync.
- **Mark contacts as org type**: Valid longer-term but requires schema changes,
a migration, and API and UI filtering work in both repos.

The utility function fixes all four display surfaces immediately with no data
migration, no schema change, and one small API label fix.

## Where the logic is applied

| Surface | File | Change |
|---|---|---|
| Search results label | `api/search.py` (OcotilloAPI) | `c.name` → `c.name or c.organization` |
| Wells list Contacts column | `src/pages/ocotillo/thing/list.tsx` | `valueGetter` and `renderCell` use `getContactDisplayName` |
| Well detail Contacts card | `src/components/WellShow/Contacts.tsx` | name gates use `getContactDisplayName`; org line suppressed when display name equals org |
| Contacts list Name column | `src/pages/ocotillo/contact/list.tsx` | `valueGetter` uses `getContactDisplayName` |
| Contact show page title | `src/pages/ocotillo/contact/show.tsx` | title uses `getContactDisplayName` |
Loading
Loading