Commit graph

1702 commits

Author SHA1 Message Date
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
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
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
c7a7e8431c
lint: fix errcheck for fmt.Fprintf/Fprint across multiple files
Add lint.Fprint helper for unchecked fmt.Fprint calls.
Use lint.Fprintf/Fprint in api/event.go, api/image.go, rmo/root.go.
Add explicit error check for fmt.Fprintf in middleware/terminal.go cW.
2026-05-09 02:21:53 +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
4008b9aa25
lint: fix errcheck for txn.Rollback/Commit and r.Close
Use lint.LogOnErrRollback for deferred Rollback in test-jet.
Use lint.LogOnErrCtx for Commit in test-jet.
Use lint.LogOnErr for r.Close in ExecuteNoneTxBob.
2026-05-09 02:14:47 +00:00
8993a6dcb7
lint: fix errcheck in api/handler.go w.Write calls
Replace unchecked w.Write(body) with lint.Write(w, body) in handlerJSON,
handlerJSONSlice, and handlerFormUpload.
2026-05-09 02:08:15 +00:00
8730f0034d
lint: fix errcheck in api/audio.go and api/district.go renderShim
Check the error returned by renderShim and respond with a 500 if
rendering fails, consistent with the existing pattern in handleClientIos.
2026-05-09 02:07:14 +00:00
c83606908f
lint: fix errcheck in api/api.go debug log writes
Add lint.Fprintf and lint.Write helpers for safe writer operations.
Use lint.Fprintf for unchecked fmt.Fprintf calls in webhookFieldseeker.
2026-05-09 02:05:40 +00:00
970cd568dc
Add generated jet tables and models
These will change with schema changes
2026-05-09 01:54:12 +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
b5bc54b7f4
Start adding context resources to communications
These will contain URIs for anything related to the communication
2026-05-09 01:39:08 +00:00
0301545df9
Go back to replacing jet for now
I need it for my geometry column types
2026-05-09 01:38:36 +00:00
e36b512908
Stop ignoring any paths with 'nidus-sync' in them
Dumb oversight on my part
2026-05-09 01:38:07 +00:00
aa3c6e6209
Don't use custom jet, tidy module 2026-05-09 01:22:30 +00:00
93b69c4cbb
Remove dead query.go at project root
The QueryWriter interface and queryToString function had zero callers.
The commented-out insertQueryToString was a Bob remnant. The io import
was only used in this file.
2026-05-09 01:05:29 +00:00
7ffa2e891b
Remove dead esbuild build.js and flake.nix dependency
build.js was an esbuild-based build script from the pre-Vite era (March 2026).
It is not referenced by package.json, CI, or any config. Vite is used for
both sync and rmo builds. Also dropped pkgs.esbuild from flake.nix devShell.
2026-05-09 01:03:51 +00:00
be99baf64c
Remove unused tomtom/ integration
TomTom was added Feb 2026 for routing but was never imported outside
its own directory. Stadia Maps is now the geocoding and tile provider.
No references in go.mod, go.sum, or any Go file.
2026-05-09 01:01:49 +00:00
8592659432
Test of agent capabilities:
"I'd like you to take a look at the project nidus-sync. It has been developed over the past 6 months and had several different architectural approaches that have evolved over time. The git history may be especially useful to see the
evolution. Write up a report of what you understand has happend, with approximate timelines. This should go in HISTORY.md. Determine which changes are incomplete - libraries or approaches that are no longer preferred, but not fully
removed yet. Create another file, CLEANUP.md, which lists out cleanup
efforts that should be done to completely remove these older,
less-preferred parts of the code."
2026-05-09 00:54:39 +00:00
1b6fac3313
Distinguish between communication stubs and full resources
This is useful so I don't have to pull together the entirety of the log
for a communication list, which would be much more expensive.
2026-05-09 00:03:11 +00:00
01f35b603e
Add centralized error handler for sync Vue app 2026-05-08 23:33:49 +00:00
da90401b2d
Push location config to client
We'll let the default stay the default.
2026-05-08 22:48:51 +00:00