Skip to content

Conversation

@unboundlopez
Copy link

@unboundlopez unboundlopez commented Jan 27, 2026

order-search-filter

This overlay adds a small filter field to the Work Orders screen. Typing text filters the existing manager order list so only matching entries remain visible.

Overlay
When the Work Orders screen is open, press Alt+S to focus the filter field. As you type, the list of work orders updates to show only the matching entries. Clearing the filter restores the full list.

@unboundlopez
Copy link
Author

pre-commit.ci autofix

@unboundlopez unboundlopez marked this pull request as draft January 29, 2026 03:43
Motivation
Prevent deleted work orders from being reinserted into the filtered snapshot while a search filter is active, which could lead to UI actions on stale entries and crashes.

Description
Track the IDs of the last filtered set in self.last_filtered_ids and compute the current live orders IDs each filter application.
When previously-visible orders are missing from the live list, prune those IDs out of self.unfiltered_orders so deleted orders are not re-added.
Reset self.last_filtered_ids when restoring the full, unfiltered list in restore_orders.
@unboundlopez unboundlopez marked this pull request as ready for review January 29, 2026 04:06
@unboundlopez unboundlopez reopened this Feb 1, 2026
Added
self:drop_deleted_from_snapshot(self:detect_deleted_ids())

I was receiving a crash while troubleshooting. With this change, the crash no longer occurs.

Repro steps:
Open the work order menu
Search: meal
Delete Easy Meal and Lavish Meal
Exit the work order menu
Re-enter the work order menu
Search: meal
Error:
The deleted Easy Meal and Lavish Meal reappear. This is an error. If the user attempts to delete them again or quit, the game crashes.
@ab9rf ab9rf added this to 53.10-r2 Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant