mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1585] [Issue]: character search is client-side only — full collection must download before the user can type #822
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#822
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Gunterlie on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1585
Originally assigned to: @Xelvanis on GitHub.
Summary
All character search and filtering (by name, tags, creator) is done client-side via
Array.filter()after the full collection has been fetched. The Rust storage backend supports only exact-match filters, not substring search. This means the user cannot search until the entire payload has arrived and been parsed — at 180 characters with the avatar fix in place that is ~144 KB; at 1000+ characters it becomes a bottleneck again. Adding asearchparameter to the backend list endpoint enables search-as-you-type with no full-dataset download.Expected behavior
Typing in a character search box returns results immediately, without requiring the full collection to be in memory first. Works at any collection size.
Actual behavior
useMemofilters it client-sideSteps to reproduce
Environment
Additional context
Current backend capability
src-tauri/src/commands/storage/commands/entities.rsline 61:No substring match, no full-text search.
Proposed backend change
Add a
searchfield to the options object instorage_list. Implement as a case-insensitive substring match ondata.name(SQLiteLIKE '%term%'). Optionally extend to tags and creator. SQLite LIKE on an indexed column handles <10k records without FTS5.Frontend change
Pass the debounced search term as a query param. React Query includes it in the query key so each distinct search has its own cache entry:
Empty search (browse all) continues to use the existing cached full list — no change to that path.
Constraint: local Tauri install keeps working
The
searchparam goes through the samestorageApi/invokeabstraction. No HTTP-only assumptions. Callers that omitsearchget current behavior unchanged.Dependency
This issue is independent of issues #1–#3 but is most useful after #1 (avatar payload) is fixed, since before that the per-query network cost dominates regardless of search.
Template check
@cha1latte commented on GitHub (May 29, 2026):
Triage note: labeling this as
scope-riskbecause moving character search server-side changes the list endpoint contract, search semantics, and client filtering expectations.A good next step is to define searchable fields plus pagination and empty-state behavior before implementing the API slice.
@Promansis commented on GitHub (May 30, 2026):
Fixed with #1598