Commit graph

1722 commits

Author SHA1 Message Date
8b203908a0
Add basic layout of the contact review 2026-05-15 17:19:06 +00:00
d020a33642
Add review link for contacts 2026-05-15 17:13:53 +00:00
ffb981e40b
Add generic resource store, start adding context cards
These cards are meant to be generic and can show an unlimited amount of
related context about a communication.
2026-05-15 17:10:03 +00:00
c92d23792f
Try running nix develop with an absolute path
Some checks failed
/ golint (push) Has been cancelled
2026-05-15 17:08:58 +00:00
70f78e4ae5
Fix email websocket to receive new mail events
We aren't doing much with them yet, but we do receive them.
2026-05-15 17:07:47 +00:00
df359f59bb
Show PATH in action
All checks were successful
/ golint (push) Successful in 3s
I'm debugging what my environment looks like.
2026-05-15 17:07:15 +00:00
0b62bcad50
Move linting out of precommit hooks
Some checks failed
/ golint (push) Failing after 3s
It's way too slow, and we have a forge to do it now.
2026-05-15 17:05:54 +00:00
f1fe8b4d2b
Add contacts, rework comms schema
This in a pretty huge change. At a high level we're adding the concept
of a 'contact' which is a person or organization that has zero or more
contact methods (email, phone). This ended up cascading a number of
changes, including critically to the publicreprt schema. In the end it
seemed safer to get to the point where I'm confident we aren't using any
of the old fields for storing reporter information (though I haven't
deleted the columns yet) so I removed the code for defining those
columns.

At this point I think it's not possible for me to regenerate the bob
schema due to the interdependencies between my various schemas, so the
migration is well-and-truly happening.
2026-05-15 16:58:28 +00:00
085935fa66
Get email websocket connection working 2026-05-13 16:50:31 +00:00
17c6bf8d50
Add test lint action 2026-05-13 14:18:21 +00:00
ec98c8226e
Add log and related resources to API in frontend 2026-05-12 23:20:54 +00:00
999d69365c
More tracing logging 2026-05-12 20:00:29 +00:00
7ba66997b4
Longer timeout, more tracking on login 2026-05-12 18:37:59 +00:00
03849e55f1
Merge remote-tracking branch 'github/main' 2026-05-12 18:07:43 +00:00
3faf29d761
Remove debug logs on setting up related resources 2026-05-12 18:04:40 +00:00
60654579ae
Fix reference to URI route names 2026-05-12 18:04:40 +00:00
b41839a5ee
Add missing "created" field on related record 2026-05-12 18:04:40 +00:00
de78151b2f
Add timing information on hashing user passwords
We're getting timeouts in staging and I don't know why yet.
2026-05-12 18:04:39 +00:00
e569bb32b7
Start work on populating context of communication at API layer
Remove communication stub, it's a performance enhancement.
2026-05-12 18:04:39 +00:00
266004624d
Update vendor hash for new deps 2026-05-12 18:04:39 +00:00
b369361a43
Initial work on getting communication context
Committing now to debug build process.
2026-05-12 18:04:39 +00:00
bab00db3ee
Add test plan, update cleanup
This is a plan to get us from where we are to some minimal testing
infrastructure
2026-05-12 14:37:47 +00:00
6c8f83f42d
docs: add AGENTS.md with codebase conventions and cleanup context
Document lint helpers, architecture patterns, build commands,
the rmo/sync host situation, DB access patterns, remaining
lint issues, and the May 2026 cleanup summary.
2026-05-12 14:35:47 +00:00
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
33329ba90b
Update vendor hash for new deps 2026-05-12 13:22:54 +00:00
8f0ee9015d
Initial work on getting communication context
Committing now to debug build process.
2026-05-12 03:21:18 +00:00
fa012bebca
Add status and source filters to communications display 2026-05-12 00:19:19 +00:00
9be95763e2
Don't show error logs on closed transaction rollback 2026-05-11 23:29:35 +00:00
85fd1d081d
Fetch updates to communication when SSE pushes a message 2026-05-11 23:26:25 +00:00
eac81778bd
Switch authenticated single GET to not require returning a pointer 2026-05-11 23:26:25 +00:00
fa27f79911
Implement GET on a single communication object 2026-05-11 23:26:22 +00:00
8e0ac790f1
Return all communications from the DB
We'll filter on the frontend
2026-05-11 23:23:01 +00:00
d992eee560
Emit updated events for communication resources on mark 2026-05-11 23:22:59 +00:00
633abd19a9
Filter communications in the frontend
Since we will know about communications we just moved into another state
in frontend land.
2026-05-11 23:22:43 +00:00
3a3cd78cac
Only show communications that are 'new' or 'opened' 2026-05-11 23:22:43 +00:00
27596aff20
Fix insertion of communication log entries when marking 2026-05-11 23:22:41 +00:00
57eea3a08a
Fix reference to enum value in SQL
Without this we get a runtime crash querying the DB :(
2026-05-11 23:22:09 +00:00
e73dc9dc9b
Fix hydration to not return when there's no error
This is a subtlety that comes from incorrectly assigning n
ErrorWithStatus to an error variable/pointer.
2026-05-11 23:22:09 +00:00
d1935d31af
Sort communication by recency 2026-05-11 23:22:09 +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
fbb95920dc lint: remove unused rmo/ handler files
All route registrations in rmo/routes.go were commented out,
making the entire handler package dead code. Delete:
rmo/error.go, rmo/quick.go, rmo/report.go, rmo/nuisance.go,
rmo/root.go, rmo/status.go, rmo/notification.go
2026-05-09 17:12:50 +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
9ce5058e85 lint: remove unused code from sync/ package
Deleted 15 entirely-unused files: admin, cell, communication, dash,
download, intelligence, messages, mock, notification, operations,
parcel, planning, pool, radar, review.

Removed unused contentOauthPrompt and getOAuthRefresh from oauth.go.
2026-05-09 14:52:12 +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