From fd141c232b67faba5ed4d30ddf13ffc769c880e9 Mon Sep 17 00:00:00 2001
From: Aaron Kimbrell
Date: Tue, 29 Sep 2026 06:14:47 -0500
Subject: [PATCH] feat(dashboard): the UGC page replaces UGC Search
The UGC Search page and the UGC page searched the same things (owner,
account, property, the name and description a player gave a model, LOT,
UGC / blueprint id) with the same SQL. The UGC page's lists are now the
one search:
- models' List view has a Where column: placed on a property (with the
name given there and a link to the model in the property's 3D view),
in a mail or in the creator's inventories, or not found
(/api/ugc?where=1, UgcLinks::Whereabouts as before)
- owners link to their character and, with accounts_view, account
- while searching, the kind buttons say how many models and how many
cars and rockets match (/api/ugc "matches")
- /ugc_search?q= redirects to /ugc?view=list&q=; the menu's UGC Search
entry is now UGC, which opens the UGC page (it was only under Server
Admin, for ugc_manage)
- References lose their Find button (Where it is has the same) and name
the inventory a build is in
The ugc-search page and script are removed; /api/ugc_links/search stays
for API users.
Check: the menu's UGC entry; an old /ugc_search?q= link opens the UGC
list with the search filled in; owner:, account:, property:, name:,
lot: and id: searches, and the counts on the kind buttons; the Where
column's links (property, 3D, character, account).
Co-Authored-By: Claude Opus 5.5
---
dDashboardServer/routes/UgcLinks.cpp | 21 ++++++-
dDashboardServer/routes/UgcRoutes.cpp | 21 +++++--
dDashboardServer/static/js/ugc-search.js | 66 --------------------
dDashboardServer/static/js/ugc.js | 36 ++++++++---
dDashboardServer/templates/header.jinja2 | 7 +--
dDashboardServer/templates/ugc-search.jinja2 | 35 -----------
dDashboardServer/templates/ugc.jinja2 | 7 ++-
docs/Dashboard.md | 3 +-
docs/UgcServer.md | 35 ++++++-----
9 files changed, 91 insertions(+), 140 deletions(-)
delete mode 100644 dDashboardServer/static/js/ugc-search.js
delete mode 100644 dDashboardServer/templates/ugc-search.jinja2
diff --git a/dDashboardServer/routes/UgcLinks.cpp b/dDashboardServer/routes/UgcLinks.cpp
index 55efeae79..e364b74d1 100644
--- a/dDashboardServer/routes/UgcLinks.cpp
+++ b/dDashboardServer/routes/UgcLinks.cpp
@@ -1,5 +1,6 @@
#include "UgcLinks.h"
+#include
#include
@@ -75,7 +76,7 @@
-
Icon
ID
Owner
State
Made
Took
CPU
RAM (est.)
Saved
Size
File
+
Icon
ID
Owner
State
Made
Took
CPU
RAM (est.)
Saved
Size
File
Where
Icon
ID
Owner
State
Made
Took
CPU
RAM (est.)
Size
File
Where
@@ -172,7 +173,7 @@
References the builds that use these modules
-
Build (blueprint id)
Owner
Account
State
Made
Where it is
+
Build (blueprint id)
Owner
Account
State
Made
Where it is
diff --git a/docs/Dashboard.md b/docs/Dashboard.md
index 1f5ac74fb..4ff1d5477 100644
--- a/docs/Dashboard.md
+++ b/docs/Dashboard.md
@@ -1073,7 +1073,8 @@ are time taken, so less is better.
The property page's model list shows each model's icon: for a player-built model (or a car or rocket) the icon the UGC
server made of it (the item's icon until it has), with its UGC state and a link to it on the UGC page. The character
page's inventories (models, vault models and the brick building ones included) show creations the same way.
-**UGC Search** (`/ugc_search`, `properties_view`) finds creations and where they are: see docs/UgcServer.md.
+The **UGC** page (`/ugc`, `properties_view`) finds creations by owner, account, property, name, LOT or id and says where they are (it
+replaced the UGC Search page): see docs/UgcServer.md.
**Today's Top Properties** (Properties page, permission `feature_properties`, default GM 5). The game's news screen has
four "Today's Top Properties" slots, one per small property world: Block Yard, Nimbus Rock, Chantey Shanty and Raven
diff --git a/docs/UgcServer.md b/docs/UgcServer.md
index 04f6114ed..dd48e8042 100644
--- a/docs/UgcServer.md
+++ b/docs/UgcServer.md
@@ -777,7 +777,7 @@ it sends every 5 seconds with its workers, totals and storage), in the `server`
comes back, in the System Log (`UgcServer_*.log`) and crash dumps (`Crash_UgcServer__.log` in `dump_folder`), and in
Prometheus (`darkflame_ugc_up`, `darkflame_ugc_items`, `darkflame_server_ugc_*{server="ugc"}`). See docs/Dashboard.md.
-The UGC Server page (`/ugc`, Server Admin menu; `properties_view` to look, the new `ugc_manage` permission to make
+The UGC Server page (`/ugc`, **UGC** in the menu under Properties; `properties_view` to look, the new `ugc_manage` permission to make
things again and to save icon values) reads the database: counts per state for models and for cars and rockets, and the
items as a gallery of their icons or a list. Player models are listed one by one (owner, state, attempts, last attempt,
bricks and triangles, file name, failure reason). Cars and rockets are listed as **assemblies**, one per combination of
@@ -786,24 +786,26 @@ columns and sorts (assemblies have no Saved): Icon, ID and Owner (an assembly's
many other owners), State (an assembly is made when any build of it is), Made, Took, CPU and RAM (an assembly's: the
latest make of any of its builds, and the cost of the make the UGC server did for it; builds that shared the made icon
cost nothing), Size (bricks and triangles; an assembly's module count), File (the file name; an assembly's build type,
-named after the type's assembly object in `ModularBuildComponent`, and its modules) and, for assemblies, how many builds
-and owners use it.
+named after the type's assembly object in `ModularBuildComponent`, and its modules) and Where: for a model where it is
+(below), for an assembly how many builds and owners use it. Owners link to their character and, with `accounts_view`,
+account.
Both lists are paged on the server (`GET /api/ugc?kind=model|modular&q=&state=&type=&sort=&page=&size=`, with the
-total), with numbered pages, first and last, a page to jump to and a page size kept per user. The search box takes
+total; `where=1` adds each model's whereabouts; while searching, `matches` says how many of each kind match, shown on
+the kind buttons), with numbered pages, first and last, a page to jump to and a page size kept per user. The search box takes
plain text (names, owners, ids) or field prefixes: `owner:`, `account:`, `property:`, `name:`, `lot:` or `module:` (a
LOT, or for assemblies a module's name), `id:`, `state:` and `kind:` (a car or rocket type). Models sort by newest,
oldest, most bricks, most triangles, recently made, slowest, most CPU, most RAM, most triangles saved, owner or file
name; assemblies the same (most modules for most bricks, no triangles or saved) and by most builds. The kind,
search, filters, sort, page and view are kept in the address, so Back and Forward and shared links work. The search
-is the UGC search's SQL (`UgcLookupSql`, the same on MySQL and SQLite, `IUgcLookup::ListUgc`); assemblies are grouped
+is `UgcLookupSql` (the same on MySQL and SQLite, `IUgcLookup::ListUgc`); assemblies are grouped
from the builds (`UgcAssemblies`). Buttons make one item, the failed ones or everything again (these only reset the
columns; the UGC server picks the rows up).
An assembly opens with its modules, the icon editor and **References**: the builds that use it (`GET
/api/ugc/assembly/builds?modules=&q=&page=`), with owner character and account, state and where each is (placed on a
-property, in a mail, in its creator's inventories; the same lookup as the UGC search), paged and searchable. A link
-to a build, `/ugc?item=&kind=modular` (what the UGC search and the character pages link to), opens its
+property, in a mail, in its creator's inventories; the same lookup as the models' Where), paged and searchable. A link
+to a build, `/ugc?item=&kind=modular` (what the property and character pages link to), opens its
assembly (`GET /api/ugc/assembly/of/`) with that build highlighted in References.
**The icon editor** (on every opened item, and per type under **Icon presets per type**, which opens each type on an
@@ -848,16 +850,17 @@ were removed, vertices, shapes, timings, with the change since the version befor
### Finding creations and showing them elsewhere
-**UGC Search** (`/ugc_search`, in the menu under Properties, `properties_view`; `?q=` fills the search in) finds
-players' creations with `GET /api/ugc_links/search?q=`. A number matches the UGC / blueprint id, a placed model's
-object id, the property it is placed on, the creator's character or account id, or a LOT (a model placed as that LOT,
-or a car or rocket with that module); text matches the creator's character and account names, property names, the
-name and description a player gave a placed model and the upload's file name. `owner:`, `property:`, `model:`, `id:`
-and `lot:` search one field. Each result has its icon, state, creator and where it is: placed on a property (from
-`properties_contents`), attached to a mail (a car's or rocket's subkey, a model item's blueprint in the attachment's
-config) or in its creator's inventories (their saved XML); anything else is "Not found" (traded, sold or deleted).
+The UGC page's search is the one search for creations (it replaced the UGC Search page; `/ugc_search?q=` redirects
+to `/ugc?view=list&q=`). A number matches the UGC / blueprint id, a placed model's object id, the property it is placed
+on, the creator's character or account id, or a LOT (a model placed as that LOT, or a car or rocket with that module);
+text matches the creator's character and account names, property names, the name and description a player gave a
+placed model and the upload's file name. A model's Where (`UgcLinks::Whereabouts`) is where it is: placed on a property
+(from `properties_contents`, with the name the player gave it there and a link to that model in the property's 3D view),
+attached to a mail (a model item's blueprint in the attachment's config; for a car's or rocket's build, its subkey) or
+in its creator's inventories (their saved XML, looked at for the 25 first creators on a page); anything else is "Not
+found" (traded, sold or deleted). `GET /api/ugc_links/search?q=` (API) answers the same search for both kinds at once.
-Results, the property page and the character page link to a creation on the UGC page as
+The property page and the character page link to a creation on the UGC page as
`/ugc?item=&kind=model|modular`, for the page to open that item.
What the UGC server made shows on the pages that show a creation, to whoever may view that page: