Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ local.properties
captures/
build/
app/build/
.vercel
10 changes: 10 additions & 0 deletions STATE_FRAMEWORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ This project uses one shared state/storage framework in [`script.js`](./script.j
- Clear persisted value:
`stateStore.persist("wallpaper", "")`

## Search History Split

- `recent`: only the visible recent panel, capped at 4 items.
- `history`: hidden ranking memory for search suggestions, capped at 48 items.
- `suggestDebug`: developer-facing switch that shows suggestion provider, score, and feature breakdown in the suggestion list.
- `addRecentEntry(entry)`: updates both fields, increments `visitCount`, refreshes `lastVisitedAt`, and records the last suggestion provider.
- `stateStore.clearRecent()`: clears both visible recent entries and hidden ranking history.

Do not rank search suggestions directly from `recent` unless `history` is empty for backward compatibility.

## Guardrail

`state` is wrapped in a guarded `Proxy`. Direct writes still work technically, but they log a warning in the console so accidental bypasses are easier to catch during development.
Expand Down
Loading