Skip to content

Commit 26cd002

Browse files
tphoneyactions-user
authored andcommitted
Integrate the riverui in area51 (#3745)
<img width="2618" height="1061" alt="image" src="https://github.com/user-attachments/assets/9f2aa352-9528-452f-8e28-f776535dc4fe" /> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Adds a new mounted admin-capable UI (`riverui`) that starts background processes and exposes job control actions, so misconfiguration of auth scopes, routing order, or context cancellation could impact operations or shutdown behavior. > > **Overview** > Integrates the official River UI into Area51 by creating and starting a `riverui` handler during router construction, mounting it at `/area51/api-server/riverui` with `admin:write` scope protection, and adding a navigation link. > > Refactors the Area51 router plumbing by renaming `NewAdminRouter*`/`adminApp` to `NewRouter*`/`area51App`, adding an `area51` lifecycle context from `service.Server` (with explicit cancellation on shutdown and on startup failures), and updating handlers/templates/tests to use the new app/type names. Dependencies are updated to include `riverui` and a `slog`→logrus adapter for River UI logging. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e6fc872d5daa4b9bb283ea465e3a2f48fe9c9485. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> GitOrigin-RevId: 68f673d4701e7776c953bf56f4128b9d297ab0d7
1 parent 03a4175 commit 26cd002

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ require (
146146
github.com/riverqueue/river/rivertype v0.30.2
147147
github.com/riverqueue/rivercontrib/otelriver v0.7.0
148148
github.com/rs/cors v1.11.1
149+
github.com/samber/slog-logrus/v2 v2.5.2
149150
github.com/sashabaranov/go-openai v1.41.2
150151
github.com/serpapi/serpapi-golang v0.0.0-20260126142127-0e41c7993cda
151152
github.com/sirupsen/logrus v1.9.4
@@ -385,6 +386,8 @@ require (
385386
github.com/rs/xid v1.5.0 // indirect
386387
github.com/sagikazarmark/locafero v0.11.0 // indirect
387388
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect
389+
github.com/samber/lo v1.47.0 // indirect
390+
github.com/samber/slog-common v0.18.1 // indirect
388391
github.com/segmentio/asm v1.2.0 // indirect
389392
github.com/sergi/go-diff v1.3.1 // indirect
390393
github.com/shirou/gopsutil/v3 v3.23.7 // indirect

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,12 @@ github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDc
895895
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
896896
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d h1:hrujxIzL1woJ7AwssoOcM/tq5JjjG2yYOc8odClEiXA=
897897
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU=
898+
github.com/samber/lo v1.47.0 h1:z7RynLwP5nbyRscyvcD043DWYoOcYRv3mV8lBeqOCLc=
899+
github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU=
900+
github.com/samber/slog-common v0.18.1 h1:c0EipD/nVY9HG5shgm/XAs67mgpWDMF+MmtptdJNCkQ=
901+
github.com/samber/slog-common v0.18.1/go.mod h1:QNZiNGKakvrfbJ2YglQXLCZauzkI9xZBjOhWFKS3IKk=
902+
github.com/samber/slog-logrus/v2 v2.5.2 h1:pReWs5r4u/NbZokrJkFoFhURA5CnlUAgcMcPV1U1LuY=
903+
github.com/samber/slog-logrus/v2 v2.5.2/go.mod h1:wHDewbid6WQqF8E1HfMGeQtd+nAs9aqZgWCHoiGy4sQ=
898904
github.com/sashabaranov/go-openai v1.41.2 h1:vfPRBZNMpnqu8ELsclWcAvF19lDNgh1t6TVfFFOPiSM=
899905
github.com/sashabaranov/go-openai v1.41.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
900906
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=

0 commit comments

Comments
 (0)