Skip to content

Add private personalized suggestion ranking - #373

Merged
bartekplus merged 6 commits into
masterfrom
feature_361
Jul 28, 2026
Merged

Add private personalized suggestion ranking#373
bartekplus merged 6 commits into
masterfrom
feature_361

Conversation

@bartekplus

Copy link
Copy Markdown
Owner

Summary

  • add a pure, stable personalization policy and ranker over the existing ten-candidate Presage pool
  • persist bounded, versioned, per-language acceptance scores in chrome.storage.local
  • learn only after successful suggestion acceptance and reverse the exact event on FluentTyper undo
  • keep personalization opt-in and bypass ranking exactly when disabled
  • add localized settings plus a confirmed Clear learned words action
  • exclude learned state from settings import/export and all observability/logging paths
  • cover menu and inline promotion, runtime restart persistence, and clearing on Chrome and Firefox

Why

Users repeatedly choose personally useful words that can sit below the visible Presage cutoff. This promotes those existing candidates locally without changing Presage, enabling online learning, adding network behavior, or expanding extension permissions.

Behavior and privacy

  • default: off
  • storage: local browser profile only, partitioned by resolved language
  • learning inputs: successful suggestion acceptances only
  • excluded: ordinary typing, document text, text expansions, dynamic templates, ignored suggestions, and arbitrary out-of-pool words
  • limits: 500 words per language and 100 recent event IDs
  • disabled ordering remains byte-for-byte identical to the previous path

Validation

  • bun run check
  • bun run test (1,558 main tests plus isolated suites)
  • bun run test:e2e (Chrome: 26 passed)
  • bun run test:e2e --platform=firefox (Firefox: 26 passed)
  • bun run check:e2e:coverage (77 behaviors)
  • bun run test:e2e:full (Chrome: 65 passed, 7 development-only skipped)
  • bun run test:e2e:full --platform=firefox (Firefox: 65 passed, 7 development-only skipped)
  • bun run build
  • bun run build --platform=firefox
  • enabled ten-candidate ranker microbenchmark: about 14.5 microseconds/call locally; disabled mode bypasses snapshot access and sorting

Closes #361

@bartekplus
bartekplus marked this pull request as ready for review July 28, 2026 12:10

@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: d9b6037f78

ℹ️ 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 thread src/core/application/personalization/PersonalizationService.ts
Comment thread src/core/application/personalization/PersonalizationRepository.ts
Comment thread src/core/application/personalization/PersonalizationService.ts Outdated
Comment thread src/core/application/personalization/PersonalizationService.ts Outdated
@bartekplus
bartekplus merged commit 2b2eee0 into master Jul 28, 2026
8 checks passed
@bartekplus
bartekplus deleted the feature_361 branch July 28, 2026 12:35
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.

[Feature]: learn most frequently used words for targeted prompting.

1 participant