Skip to content

Save and manage named Timeline filters - #188

Merged
RCmerci merged 15 commits into
mainfrom
feat/saved-timeline-filters
Nov 26, 2026
Merged

RCmerci merged 15 commits into
mainfrom
feat/saved-timeline-filters

Conversation

@RCmerci

@RCmerci RCmerci commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

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).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T13:01:07.476390Z 745629c PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +82 to +83
guard let value = storedRecord(for: graph, keys: keysByGraph[graph, default: []].map(\.key), in: stored)
else { continue }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread swift/JournalChrome.swift Outdated

private func savedFilterManagement(_ names: [String]) -> some SwiftUI.View {
DisclosureGroup("Manage saved filters", isExpanded: $managesSavedFilters) {
ForEach(names, id: \.self) { name in

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@RCmerci
RCmerci merged commit 7ea9b81 into main Nov 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant