Commit graph

40 commits

Author SHA1 Message Date
05b3caaa73 Add ongoing sync indicator to dashboard
This means I can remove the "loading" state of the dashboard.
2026-01-06 15:32:26 +00:00
97ea4ad3bb Begin work on debugging user behavior in early setup 2026-01-06 14:46:31 +00:00
b542b8268e Add precalc h3 cells to fieldseeker tables
This makes it so we don't have to try to parse the geometry JSON and
instead can just pass pre-calculated h3 values, which take fewer bytes,
everywhere.
2026-01-05 23:25:16 +00:00
1395e3d3ac Remove old FieldSeeker tables, use v2 generated tables.
This requires a bunch of changes since the types on these tables are
much closer to the underlying types of the Fieldseeker data we are
getting back from the API.

I now need to use proper UUID types everywhere, which means I had to
modify the bob gen config to consistently use google UUID, my UUID
library of choice.

I also had to add the organization_id to all the fieldseeker tables
since we rely on them existing for some of our compound queries.

There were some changes to the API type signatures to get things to
build. I may yet regret those.
2025-12-24 17:58:08 -07:00
bd16f69e28
Initially made it through full update with new fieldseeker schema 2025-12-05 23:11:57 +00:00
0904f086b2
Specify the translation to database logic for all the non-zero layers 2025-12-04 14:09:21 +00:00
ab5be998c8
Checkpoint on more dynamically populating tables for fieldseeker 2025-12-04 02:52:01 +00:00
04ba2e5df2
Switch sync stats to uints, save partial work on new export logic. 2025-12-03 16:27:35 +00:00
97ec2c767d
Big checkpoint on new schema work
I have to checkpoint this because I'm trying to get a very complicated
multi-layered SQL query for inserting version history into the database
and I need to improve it iteratively

I've got a new binary that I can use to directly test complex stored
procedures. This is to shorted my testing loop.
2025-12-02 22:12:43 +00:00
ff7c5cdb6b
Save a copy of the Fieldseeker schema on oauth connect
This will make it easier to debug when we get a new customer which
schema elements are in common and which are specific to Delta.
2025-12-02 00:30:08 +00:00
7c4fb02908
Move to latest bobgen, add fieldseeker schema references
This is an intermediate step between shifting from the old fs_* prefixed
table names to an entire fieldseeker schema. At this point we have both,
and we aren't doing much with the new schema but compiling.
2025-12-02 00:28:14 +00:00
41587c3694
Move database logic into separate subdirectory
I'm trying to see if this speeds up builds a bit. May not without a
module boundary, but for now it's nice organization to have as the
program grows.
2025-11-24 18:08:31 +00:00
5c8e016b1c
Update the summary tables after export 2025-11-21 17:28:05 +00:00
0614a768c3
Remove redundant API error type, use arcgis
That's what the library is supposed to be for.
Errors still aren't working quite right.
2025-11-14 23:08:26 +00:00
7919f0da66
Wrap errors. Don't emit crash message on no oauth tokens. 2025-11-13 20:53:20 +00:00
8e71542c3f
Convert arcgis.go to use zerolog 2025-11-13 20:34:48 +00:00
fc40309dd0
Make it possible to resolve notifications 2025-11-13 16:48:23 +00:00
ae4be91d52
Use max refresh token expiration time in production
Keep the value low for dev so that I can test that we recover well.
2025-11-13 15:15:35 +00:00
6fb5d48791
Maintain tokens in a loop forever. 2025-11-13 14:34:50 +00:00
9f82c483e2
Don't cross-write token types 2025-11-13 14:33:08 +00:00
901f65361a
Don't pass the redirect URI through
It's always the same, might as well just get it where we need it.
2025-11-13 14:31:33 +00:00
4198f18d94
Timestamp token debug files so I can view them all 2025-11-13 03:17:49 +00:00
ddb204995f
Refresh refresh tokens too
I'm not sure yet if this is making the request correctly, but I'm pretty
sure it needs to be done.
2025-11-13 03:17:23 +00:00
249cb15e5b
Only use tokens that are valid 2025-11-13 03:17:05 +00:00
8382009492
Attempt to request webhook data
This isn't exactly working for me right now since I don't have an API
key that has access to control webhooks, but it is making the request to
the correct endpoint and getting back a permission error.
2025-11-13 03:15:45 +00:00
1fd407681e
Only keep valid oauth tokens alive 2025-11-12 21:27:39 +00:00
bf3dedf7cd
Pull notifications from the database
Previously we were storing them, just not showing them.
2025-11-11 22:53:48 +00:00
337e5f7a7d
Get error reports of failure in goroutines 2025-11-11 22:36:29 +00:00
a2e67e3d60
Add oauth token failure model and notification
This will allow me to mark when an oauth token fails and surface it to
the user so that they can re-up on their auth token.
2025-11-11 20:10:56 +00:00
31ca1a2f45
Add mocks for service request, sync information to dashboard
Should have been split, but I had commit challenges
2025-11-08 00:04:44 +00:00
ed1b878b8d
Do update work in a pool for speed, and show some actual data. 2025-11-07 10:48:12 +00:00
b0432f3243
Add statistics on the sync and save org ID with fieldseeker tables
We need the org ID so that we can avoid bleedover between different
organizations.
2025-11-07 09:30:31 +00:00
9010726707
Add initial synchronization of Fieldseeker data by oauth
This involves a lot of copy-pasta of code from the previous version of
this logic in another code base. It'll need to be cleaned up, but for
now I need something sooner rather than later.
2025-11-07 08:34:32 +00:00
109495b702
Track access token and refresh token expiry
Also make a bunch more progress on actually updating the tokens when we
need them updated.
2025-11-07 05:46:41 +00:00
cf01c8c5c6
Create clean shutdown logic for http worker 2025-11-07 02:29:34 +00:00
a08cd87813
Save information about the organization and user from ArcGIS 2025-11-07 02:07:33 +00:00
72cbe2de5e
Check if we have oauth information, only prompt if its missing
Also include a rough dashboard of information that we'll pull from
Fieldseeker
2025-11-06 22:58:18 +00:00
fa89e0719f
Format all source files. 2025-11-06 22:31:51 +00:00
ff1fd18da1
Start using the ArcGIS client to get user data with the token 2025-11-06 22:28:56 +00:00
858bc031a0
Save oauth tokens to the database for use later. 2025-11-06 00:23:58 +00:00