Repository navigation
Save and manage named Timeline filters - #188
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 745629c3ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| guard let value = storedRecord(for: graph, keys: keysByGraph[graph, default: []].map(\.key), in: stored) | ||
| else { continue } |
There was a problem hiding this comment.
Preserve an invalid-record marker in the startup snapshot
If a graph has malformed, oversized, or unsupported saved preferences, storedRecord returns nil and this branch silently omits the graph from the snapshot. Consequently, saved_filters treats it as having no preferences, and restore_filters cannot display its invalid-record warning. The user sees their saved filters disappear without explanation, and a subsequent Save can overwrite the retained record because the commit path also treats it as absent. Preserve a bounded per-graph invalid marker, distinct from missing or intentionally ignored legacy records, so startup can surface the failure without rewriting the original data.
Useful? React with 👍 / 👎.
|
|
||
| private func savedFilterManagement(_ names: [String]) -> some SwiftUI.View { | ||
| DisclosureGroup("Manage saved filters", isExpanded: $managesSavedFilters) { | ||
| ForEach(names, id: \.self) { name in |
There was a problem hiding this comment.
Use byte-distinct identities for saved-filter management rows
When two saved names are canonically equivalent Unicode strings, such as precomposed é and e followed by a combining acute accent, the OCaml reducer and Swift persistence validator accept both because they compare UTF-8 bytes. Swift String equality instead treats them as equal, so ForEach(names, id: \.self) gives these distinct definitions duplicate row identities. By inspection, this makes row reconciliation unreliable when either definition is deleted, potentially leaving stale management controls. Use a byte-based identity, consistent with the persistence validator, rather than the Swift string itself.
Useful? React with 👍 / 👎.
Adds graph-local named Timeline filters (up to five), a native quick-select menu, and Save / Apply / Delete flows. Only saved definitions and the current named choice persist. The Timeline filter contract is compiled as a Dune virtual module with its implementation in app/impl/timeline_filter. Existing Timeline query and paging are reused. Verified reducer and storage boundaries, full Dune tests, and synthetic iOS Simulator operation for save, clear, restoration, and delete (final storage-only hardening covered by regression tests).