Skip to content

Opensearch query builder#12573

Open
fira wants to merge 18 commits into
cmss13-devs:masterfrom
fira:opensearch-query-builder
Open

Opensearch query builder#12573
fira wants to merge 18 commits into
cmss13-devs:masterfrom
fira:opensearch-query-builder

Conversation

@fira

@fira fira commented Jul 3, 2026

Copy link
Copy Markdown
Member

About the pull request

Adds an in-game REST API client to query logs for the current round from OpenSearch.

The UI is rather simple, but comes with a few noteworthy features:

  • Queries can be created with ckey straight from Player Panel
  • Queries can be used collaboratively, and linked in Asay like tickets with ~ tilde
  • Queries can be written in Lucene syntax, which enables Boosting and Fuzzy Search
  • Queries can be sorted by time as usual, but also by relevance using Results Score, letting you find the closest matches instead of the most recent ones
  • Results have JMP links to the location of the event if present, or you can click on the CKEY to open the relevant Player Panel
  • You can filter to only show logs relevant to proximity of a certain place

Explain why it's good for the game

Smoother flow for simple log queries, directly ingame.

With results score ranking it also becomes possible to just take a shotgun approach by throwing relevant words and letting OpenSearch find closest matches, rather than fiddling with filters for days.

Testing Photographs and Procedure

It needs the backend to work so you'll have to try it live

Player panel button. You can also use .opensearch verb or the one in Admin verbs.
image

Example query made by the PP
image

How an example query with range filtering ends up when opening it on Dashboards
image

Writing keywords and letting the backend do its search job also becomes an option to find important events, without needing to slowboat through the entire stream of time sorted logs:
image

Changelog

🆑
admin: Added OpenSearch Query Builder for in-game log searching
/:cl:

@github-project-automation github-project-automation Bot moved this to Awaiting Review in Review Backlog Jul 3, 2026
@cmss13-ci cmss13-ci Bot added UI deletes nanoui/html Admin Make things harder for admins size/XL Denotes a PR that changes 799-1999 lines, ignoring generated files. labels Jul 3, 2026
Comment thread code/datums/opensearch/opensearch_query.dm Outdated
Comment thread code/datums/opensearch/opensearch_query.dm Outdated
Comment thread code/modules/admin/player_panel/actions/general.dm
*/}
<Stack.Item grow />
<Stack.Item align="right">
<Box color="label">rewind:</Box>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a tooltip explaining what it does. See https://github.com/cmss13-devs/cmss13/blob/master/tgui/docs/component-reference.md#tooltip Also may look nicer capitalized to Rewind.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to but none of these elements accept a tooltip. Might need to put an info bubble next to it

@Drulikar Drulikar Jul 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the component Tooltip (never not available) is different than the property tooltip (if available).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to do this aswell

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up putting a disabled gray button because the TGUI docs encourage doing that rather than using deprecated Tooltip

Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx Outdated
Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx Outdated
Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx Outdated
Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx
Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx
Comment thread tgui/packages/tgui/interfaces/OpenSearchQuery.tsx Outdated
@github-project-automation github-project-automation Bot moved this from Awaiting Review to Changes Requested in Review Backlog Jul 4, 2026
@Drulikar Drulikar marked this pull request as draft July 4, 2026 05:29
Comment thread code/datums/opensearch/opensearch_query.dm Outdated
@fira

fira commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

Changed a lot to try to streamline and fix bugs. Got rid of a lot of backend handling for stuff that was halfbaked.

Still have to address the 2 comments from Drathek above

@neeshacark

Copy link
Copy Markdown
Contributor

i love u btw

@fira fira marked this pull request as ready for review July 5, 2026 04:49
@fira fira added the Testmerge Candidate we'll test this while you're asleep and the server has 10 players label Jul 5, 2026
@fira fira added the Needs Testing Need to test it on the guinea pigs (production server) label Jul 5, 2026
@cm13-github

Copy link
Copy Markdown
Contributor

Test merge deployment history:

Test Merge Deployed @ 07/05/2026 06:16:15 +00:00:
Server Instance

CM13 Live

Revision

Origin: 584ce29
Pull Request: f5282ee
Server: 4f94099

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Make things harder for admins Needs Testing Need to test it on the guinea pigs (production server) size/XL Denotes a PR that changes 799-1999 lines, ignoring generated files. Testmerge Candidate we'll test this while you're asleep and the server has 10 players UI deletes nanoui/html

Projects

Status: Changes Requested

Development

Successfully merging this pull request may close these issues.

4 participants