Closed Bug 1876208 Opened 2 years ago Closed 2 years ago

Add support for dismissing suggestions to the Suggest Rust component

Categories

(Application Services :: Suggest, task, P2)

x86_64
macOS

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lina, Assigned: bdk)

References

Details

(Whiteboard: [disco])

Desktop has a “dismiss this suggestion” option for sponsored and non-sponsored suggestions, and a “restore dismissed suggestions” button in Search settings. We also have design specs to implement the same affordances on iOS and Android.

Let’s add some APIs to our Rust component to support:

  • Dismissing a suggestion.
  • Restoring all dismissed suggestions.

There are a few tricky parts to dismissals:

  • Our component doesn’t currently store any user data, so most of our database migrations are lossy, and our consumers store the Suggest database in discardable cache directories (Desktop, Android, iOS). Dismissals are user data, though—so we might want to store them in a separate database, in the user’s profile directory.
  • Suggestions don’t have stable identifiers, so we’ll want to keep track of them by URL, and filter out suggestions with those URLs in query().
Summary: Add support for hiding suggestions to the Suggest Rust component → Add support for dismissing suggestions to the Suggest Rust component
Severity: -- → N/A
Priority: -- → P2

After working on this for a bit, I realize it's going to be a serious effort to manage both a permanent and cache database. We'll need to maintain 2 Db types, two sets of schemas, maybe two Daos, etc. Having a single permanent database would simplify things considerably, how bad would that be?

  • We could still make migrations lossy if they only touched the data that can be downloaded from remote settings, you just drop the table(s) and re-create.
  • If the user's disk is nearly completely full, then maybe you have a better chance of keeping the permanent data if you split it up, but the complexity doesn't seem worth it to work around this corner case.
  • The new SuggestStoreBuilder code that provides us with both paths is still useful. We could use that to move the cache DB file to the permanent DB file location to migrate existing users. If both files were present, then we should log a warning and not move/copy anything.
Depends on: 1882381
Assignee: nobody → bdeankawamura
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.