Skip to content

feat(chat): local hints for conversations - #29

Merged
MaxDac merged 2 commits into
mainfrom
maxdac-local-session-hints
Oct 8, 2026
Merged

MaxDac merged 2 commits into
mainfrom
maxdac-local-session-hints

Conversation

@MaxDac

@MaxDac MaxDac commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Description

Each conversation in "Conversations on this device" can now have a short private hint saying who is speaking. Hints are stored only locally.

  • Storage: hints live in PeerMeta.hint, inside the encrypted Signal state under noBackupFilesDir. They are never sent to the server, push payloads or notifications. This PR makes no API change and does not bump api_version.
  • Normalization: whitespace is trimmed and collapsed, the length is limited to 40 code points, and a blank hint is removed.
  • Lifecycle: "Clear history" keeps hints. Signing out (clearPeerHints) and "Forget device" (wipe) drop them.
  • UI:
    • Long-press a conversation on the home screen, or open the chat overflow menu and choose "Add hint" / "Edit hint", to open HintDialog.
    • Each time the dialog opens, it shows an inline advice not to write the other person's name.
    • The field uses NoPersonalizedLearning.
    • The hint appears under the conversation name and in the chat header.
  • Strings: added in all five locales.
  • Docs: updated docs/ARCHITECTURE.md.

The matching website change is MaxDac/Privee#177. The two PRs don't depend on each other.

Validation:

  • ./gradlew test :app:lintDebug :app:assembleDebug: passed, including after merging main.
  • New tests:
    • SignalClientTest: normalization, persistence across "Clear history" and a restart, clearPeerHints, the code-point limit, and decoding old state that has no hint.
    • RecentsTest: peerId and hint in the list.
    • HintTest (Robolectric):
      • the advice is always shown;
      • Save normalizes the text;
      • Remove saves null;
      • a long-press opens the editor;
      • the chat header shows the hint.

Checklist

  • No secrets committed (API keys, endpoints, tokens, .jks, .env)
  • :core:* modules contain no android.* / androidx.* imports
  • Tests pass (./gradlew test)
  • Commit messages follow Conventional Commits

Each conversation can carry a short private hint, stored only in the encrypted local Signal state. The editor always advises against writing the other person's name. Hints survive Clear history and are dropped on sign-out and Forget device.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 98a81038-4434-476d-a7f9-04a8f6baace8
@MaxDac
MaxDac enabled auto-merge (squash) October 8, 2026 19:02
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 98a81038-4434-476d-a7f9-04a8f6baace8
@MaxDac
MaxDac merged commit b8009d6 into main Oct 8, 2026
5 checks passed
@MaxDac
MaxDac deleted the maxdac-local-session-hints branch October 8, 2026 19:23
@MaxDac MaxDac mentioned this pull request Oct 8, 2026
4 tasks done
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