Stu Mason
Stu Mason

Activity

StuMason/cleanconnect
TidyLinker.com
TypeScript
Pull Request Merged

PR #170 merged: fix: JobCard crash when property_size is null (Sentry 3P/3R/3S/32)

Why

Four Sentry issues, one root cause:

SentrySurfaceLast seen
TIDY-LINKER-3PMobile Safari, /cleaner/jobstoday 16:35
TIDY-LINKER-3RChrome Mobile, /cleaner/jobstoday 06:15
TIDY-LINKER-3SChrome Mobile, /cleaner/jobstoday 08:02
TIDY-LINKER-32Inertia SSR workertoday 08:02

The SSR exception gave it away — full traceback names JobCard and points at bootstrap/ssr/assets/jobs-Bh1y5WTL.js:212:238, which is job.property_size.replace(/_/g, ' ') in resources/js/components/jobs/job-card.tsx:216.

property_size has been nullable in the schema since the 2025_11_25_add_property_type_to_job_postings_table migration. 23 of 41 jobs in prod have null property_size — overwhelmingly direct bookings, which skip the wizard step that sets it. Job #55 (6AgxZben) — the no-show situation we built admin tooling for yesterday — is one of them, which is why the cleaner job board was crashing for everyone with that job visible.

Fix

  • JobCard renders the property-size pill (icon + label) only when property_size is set. Showing a generic Home icon next to nothing was the other option and felt worse.
  • types/jobs.ts: property_size widened to string | null to match the schema. property_category stays non-null — its column has a residential default.
  • Regression test in tests/Feature/Cleaner/JobControllerTest.php: listings must include null-property_size jobs (otherwise the guard would never get exercised in CI).

Out of scope

The remaining live Sentry issues are too noisy / single-user to chase in this PR:

  • TIDY-LINKER-3Q — React insertBefore NotFoundError on /login (7 hits, 0 users): hydration race, no source maps yet, hard to localise.
  • TIDY-LINKER-3NFailed to construct 'FormData' on / (Samsung Internet, 1 hit): one event, unclear repro.
  • TIDY-LINKER-3CHttpNetworkError on update-rates (2 hits, 2 users): looks like a user network drop, no server-side trace.
  • TIDY-LINKER-2SNotFoundError: The object can not be found here. (1 hit): not actionable.

The fixes in PR #167 (notification deserialization + ThrottlesResendApi retryUntil) have NOT recurred — last sightings of 3J/3H/3K/3M/3A all predate the merge.

Test plan

  • pest tests/Feature/Cleaner/JobControllerTest.php — 9 passing (including new null-property_size case)
  • pint --dirty clean
  • eslint clean on touched files
  • tsc --noEmit no new errors
  • Manual: deploy and confirm no further 3P/3R/3S/32 events in Sentry within 24h
  • Manual: resolve the four Sentry issues post-deploy
+34
additions
-9
deletions
3
files changed