Commit graph

361 commits

Author SHA1 Message Date
40ffc2a3ba
lint: remove unused sync/signin, sync/sms, platform/trap, platform/arcgis code
- Delete sync/signin.go (entirely unused, no routes registered)
- Delete sync/sms.go (entirely unused, no routes registered)
- Remove toTemplateTrapData and fsToTime from platform/trap.go
- Remove 8 orphaned helper functions from platform/arcgis.go
2026-05-12 14:35:46 +00:00
fa27f79911
Implement GET on a single communication object 2026-05-11 23:26:22 +00:00
d992eee560
Emit updated events for communication resources on mark 2026-05-11 23:22:59 +00:00
93510e4b2e
Properly insert nuisance and water public reports 2026-05-11 23:22:07 +00:00
e9127466f0 lint: remove unused code from platform/label_studio, email, dashboard, sync
- Delete sync/text.go, sync/tile.go, platform/dashboard.go (entirely unused)
- Remove unused vars/funcs from platform/label_studio.go (9 items)
- Remove contentEmailInitial, contentEmailReportConfirmation,
  newContentEmailNotificationConfirmation, contentEmailBase from platform/email
2026-05-09 20:14:38 +00:00
10046f1edb lint: remove unused items from resource, sync, platform, db
- Remove contentUploadList/Placeholder/Detail from resource/upload.go
- Remove toImageURLs, userURI from resource/communication.go
- Remove responseListUser from resource/user.go
- Remove contentSignin/getSignin from sync/signin.go (re-add contentSignin used elsewhere)
- Delete sync/service-request.go (entirely unused)
- Remove _rowWithID from platform/signal.go
- Remove unused tag field from db/tx.go Rows struct
2026-05-09 17:19:38 +00:00
b9a68aab04 lint: remove unused code from platform/arcgis.go, platform/text, rmo
- Remove 7 unused functions from platform/arcgis.go (generateCodeChallenge,
  generateCodeVerifier, newTimestampedFilename, logResponseHeaders, saveResponse,
  saveOrUpdateDBRecords, rowmapViaQuery) plus orphaned stubs
- Delete platform/text/db.go (entirely unused)
- Remove insertTextLog from platform/text/send.go
- Delete rmo/image.go, rmo/mailer.go, rmo/scss.go, rmo/district.go, rmo/water.go
2026-05-09 17:10:03 +00:00
53a3f9816a lint: remove unused code across api, comms, h3utils, html, middleware, minio, platform, rmo
Deleted files: api/compliance.go, api/debug.go, rmo/compliance.go, rmo/email.go,
rmo/mock.go, platform/publicreport/address.go

Removed unused functions/types from: api/api.go, api/configuration.go, api/district.go,
api/publicreport.go, api/sudo.go, api/types.go, comms/text/twilio.go,
comms/text/voipms.go, h3utils/h3.go, html/embed.go, html/form.go,
middleware/terminal.go, minio/client.go, platform/csv/csv.go,
platform/csv/flyover.go, platform/file/base.go, platform/file/upload.go,
platform/geocode/address.go, platform/types/service_request.go
2026-05-09 14:47:56 +00:00
d74c24339e lint: finish errcheck — zero remaining
Fix final cW calls in middleware/recoverer.go and
sendTextCommandResponse in platform/text/text.go.
2026-05-09 14:24:33 +00:00
7270de2937 lint: fix remaining errcheck issues across multiple files
- Fix renderShim errcheck in district.go, image.go
- Fix txn.Rollback/Commit in publicreport.go, notification, review, signal, upload
- Fix addError calls in csv/flyover.go, csv/pool.go
- Fix cW/write calls in logger.go, recoverer.go, voipms.go
- Fix resendInitialText, handleWaitingTextJobs, setPhoneStatus in text/send.go, text.go
- Fix populateDistrictURI/populateReportURI in resource files
2026-05-09 03:06:56 +00:00
808e172221
lint: fix remaining errcheck for Write, Fprintf, Rollback, Commit
- Use lint.Write for unchecked w.Write in handlerJSONPost/Put, report
- Use lint.Fprintf for fmt.Fprintf in twilio handlers
- Use lint.LogOnErrRollback for deferred Rollbacks in compliance, lead, note
- Check errors from txn.Commit in lead, note
- Use lint.LogOnErrCtx for addError calls in flyover
2026-05-09 02:41:49 +00:00
679d12b48f
lint: fix errcheck for txn calls, query results, and unchecked errors
- Fix Rollback/Commit in compliance.go, csv/csv.go, csv/pool.go
- Capture and check errors from .One() insert queries in send.go, text.go
- Check errors from markFunc, PopulateURL, and hydrate functions
- Use lint.LogOnErrCtx for best-effort notification sends
2026-05-09 02:35:55 +00:00
0ec810591e
lint: fix errcheck for Close and Write calls across multiple files
Use lint.LogOnErr for deferred Body/File/Client Close calls.
Use lint.Write for unchecked w.Write calls.
Fix bug in sync/sms.go where fmt.Errorf result was discarded
(replace with proper log.Error call).
2026-05-09 02:29:07 +00:00
934fb03ca2
lint: fix errcheck for txn.Rollback/Commit and insert in platform
Use lint.LogOnErrRollback for deferred Rollbacks in arcgis.go.
Capture and check errors from txn.Commit and CommunicationLogEntryInsert.
2026-05-09 02:17:25 +00:00
935800e334
Switch to using the Gleipnir fork of jet
Because we need those sweet, sweet geometry columns
2026-05-09 01:48:56 +00:00
28cf7683a7
Pass-through an address shim with whatever data we have 2026-05-08 22:45:26 +00:00
d1ba2f53fa
Fix setting address on compliance reports
This error was subtle. First, we want to set the GID and raw content
directly using the updater instead of doing two round trips because we
can. Second, we want to do some geocoding if the address isn't already
in the system. Likely it is, because the frontend would have requested a
geocode, but it's possible that it isn't.
2026-05-08 22:43:57 +00:00
24a3610c4c
Correctly build updaters with New
Otherwise we have nil columns
2026-05-08 22:22:52 +00:00
f2585c569c
Woops, actually set all columns on compliance because it doesn't have a serial key 2026-05-08 01:08:06 +00:00
61ad3fbe45
Remove string-based queries for public report data
Use the new jet hotness
2026-05-07 23:22:50 +00:00
12213fb31b
Remove string-only references to location_* generated columns 2026-05-07 17:01:54 +00:00
7a361a330d
Remove now-extraneous latitude/longitude generated columns
Now that we can pull out the geometry directly into a go object we don't
need these and they complicate our insertions
2026-05-07 16:38:42 +00:00
fcd95f1a25
Get back to compiling, but using new jet for publicreport
This was an epically long change, and a terrible idea, but it compiles.
This was essentially a cascade that came about because I can't blend jet
and bob in the same transaction. In for a penny, I guess...
2026-05-07 10:39:17 +00:00
a95e44cf42
Use transactions to set the communication status changes
Not doing it yet, but soon we'll do log entries for them.
2026-05-04 20:57:50 +00:00
5f3fcc2b3e
Fix a bunch of not-checking-error lints 2026-05-04 20:29:02 +00:00
60bf09e813
Avoid emitting error on transaction rollback that's complete
It's on purpose
2026-05-04 19:53:36 +00:00
3153e8bf13
Initial work marking communications
And a bunch of lint fixes
2026-05-04 19:07:29 +00:00
67c99436d1
Properly set submitted on PUT, return new status properties on comms 2026-05-02 00:41:31 +00:00
431435f8bd
Set the organization on inserted communications 2026-05-02 00:38:38 +00:00
57dc2023cd
Remove unused submit function 2026-05-02 00:38:12 +00:00
7f71ff9a2e
Send submit PUT on compliance report flow, create communication then
This makes it so that people don't see compliance reports as they're
being formulated in the communication workbench
2026-05-01 21:27:17 +00:00
a82732a49c
Return communication database rows from communication API
This is a pretty big refactor of how communication works to start moving
us in the direction we want to go long-term. This adds the new
communication row and migrates existing reports to add rows for
communication.

There's also a bunch of automatic fixes from the new linter. I should
have added them separately, but whatever.
2026-05-01 21:00:23 +00:00
bab3200b6c
Port all of the arcgis schema to using jet
Have not tested anything at this point, it just compiles.
2026-05-01 17:28:33 +00:00
e5a84e09a8
Initial working version of using jet for SQL building 2026-05-01 05:11:28 +00:00
00d26a684a
Handle EXIF location data set to "NaN"
Probably Android's new privacy thing. Jerks.
2026-04-30 15:34:08 +00:00
797067ee38
Refuse to send compliance letters to addresses without a postal code 2026-04-30 03:09:42 +00:00
89eca2ddf9
One more attempt to handle report null-ness 2026-04-29 20:58:47 +00:00
a1b2d580a8
Return nil through on by id compliance 2026-04-29 20:37:36 +00:00
c6cb645453
Don't error out on missing report 2026-04-29 20:24:41 +00:00
7e79308868
Don't return an error when report doesn't exist 2026-04-29 20:18:36 +00:00
af39a73e8f
Add address raw content to report
This populates the address in the compliance flow UI
2026-04-29 19:30:38 +00:00
2fbceb11e3
Don't bail on district match early, check address
This is the other half of doing proper district match via raw address -
we have to use the address if available for looking up a district.
2026-04-29 15:01:35 +00:00
524353bfa1
Geocode address if we only have a raw value
This will help with matching when the user does not select a suggested
address.
2026-04-29 13:55:10 +00:00
a101ff3cc9
Suppress errors from canceled context on DB notification goroutine 2026-04-28 22:24:15 +00:00
4a90917645
Add more detail to address creation failure 2026-04-28 22:16:22 +00:00
309f8fe2c5
Downgrade failure to get admin info to warning
To clear out Glitchtip a bit
2026-04-28 22:10:39 +00:00
8bdd18649d
Separate out a public and non-public halves to publicreport APIs
This prevents us from leaking text messaging details on public
endpoints.
2026-04-28 06:36:55 +00:00
82b313f62f
Add text message log to report display 2026-04-28 05:15:01 +00:00
4ce91d77d4
Add text message history to acitivity log 2026-04-28 01:12:18 +00:00
937953f2a2
Produce a raw address value from geocode requests
This makes it so that the frontend doesn't have to calculate what to
display
2026-04-27 19:44:25 +00:00