Skip to content

feat(privacy): backend-backed capability privacy metadata + PrivacyPanel#760

Merged
senamakel merged 2 commits into
tinyhumansai:mainfrom
jwalin-shah:feat/privacy-capability-metadata
Apr 22, 2026
Merged

feat(privacy): backend-backed capability privacy metadata + PrivacyPanel#760
senamakel merged 2 commits into
tinyhumansai:mainfrom
jwalin-shah:feat/privacy-capability-metadata

Conversation

@jwalin-shah
Copy link
Copy Markdown
Contributor

Summary

  • about_app capabilities can now ship CapabilityPrivacy { leaves_device, data_kind, destinations }. Twelve representative capabilities are annotated for the first audited set (raw/local, derived/backend, credentials, diagnostics, model download).
  • PrivacyPanel no longer hand-maintains the rows — it calls openhuman.about_app_list and renders only entries that disclose privacy metadata. Analytics toggle and explanatory copy are unchanged.
  • Wire format is backward compatible: privacy is omitted when None.

Why

Privacy disclosure was duplicated as static UI strings. Anchoring it to the capability catalog makes "what leaves my computer" a property of the feature itself, not of the panel that happens to render it. That keeps the disclosure honest as features ship.

Notes

  • Annotation coverage is intentionally limited to the first audited set. Remaining capabilities default to `None` and are simply not surfaced. Follow-up work expands annotation coverage, not panel design.
  • Loading and RPC failure both degrade gracefully — the analytics toggle stays available even if `about_app.list` fails.
  • No new global Redux state; the panel owns its own load state.

Test plan

  • `cargo test --lib about_app` (20/20)
  • `yarn test PrivacyPanel.test.tsx` (3/3 — render, unannotated entries omitted, RPC failure fallback)
  • `yarn compile` (`tsc --noEmit`) clean
  • Manual: open Settings → Privacy & Security in a built app and confirm rows render
  • Manual: kill core sidecar and confirm panel still shows analytics toggle + graceful error

Adds optional `CapabilityPrivacy { leaves_device, data_kind, destinations }`
to the about_app capability catalog so the in-app Privacy surface can be
backend-backed instead of hand-maintained. Twelve representative capabilities
are annotated for the first audited set (raw/local, derived/backend,
credentials, diagnostics, model download); remaining entries default to
None and are simply not surfaced. Wire format stays backward compatible
via skip_serializing_if.
Replaces the hand-maintained privacy rows with data fetched from
openhuman.about_app_list. Only capabilities that ship privacy metadata
are rendered; loading and RPC failure both degrade gracefully and the
analytics toggle plus explanatory copy remain intact. Adds a small typed
client (utils/tauriCommands/aboutApp.ts) and focused vitest coverage for
render, omission of unannotated entries, and RPC failure.
@jwalin-shah jwalin-shah requested a review from a team April 22, 2026 06:40
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@jwalin-shah has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 31 minutes and 40 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 31 minutes and 40 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4a4e16a2-c2d8-4746-967c-9ed194f7ba4e

📥 Commits

Reviewing files that changed from the base of the PR and between 758958b and 313e44e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • app/src/components/settings/panels/PrivacyPanel.tsx
  • app/src/components/settings/panels/__tests__/PrivacyPanel.test.tsx
  • app/src/utils/tauriCommands/aboutApp.ts
  • app/src/utils/tauriCommands/index.ts
  • src/openhuman/about_app/catalog.rs
  • src/openhuman/about_app/mod.rs
  • src/openhuman/about_app/types.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@senamakel senamakel merged commit bc9e223 into tinyhumansai:main Apr 22, 2026
6 of 8 checks passed
senamakel added a commit to jwalin-shah/openhuman that referenced this pull request Apr 22, 2026
… WelcomeStep test

- Rebase onto upstream/main (20 commits since PR merge base)
- Resolve PrivacyPanel.tsx conflict: keep upstream capability-backed dynamic
  privacy list (PR tinyhumansai#760) rather than the static whatLeavesItems fallback —
  the dynamic system supersedes the static one
- Resolve WelcomeStep.tsx conflict: keep simplified interface from upstream
  (nextDisabled/nextLoading/nextLoadingLabel removed) plus WhatLeavesLink
  footer from this PR
- Resolve login-flow.spec.ts conflict: remove ReferralApplyStep comment
  (step was removed in upstream PR tinyhumansai#772), keep ContextGatheringStep
  user-driven gate copy from this PR
- Fix WelcomeStep.test.tsx: remove test that passes now-removed props
  (nextDisabled, nextLoading, nextLoadingLabel) — update to verify CTA
  is always enabled in simplified interface
- Apply Prettier formatting across files reformatted post-rebase
- All quality checks pass: typecheck clean, lint 0 errors, format
  unchanged, 534 unit tests passed (2 pre-existing skips)
@jwalin-shah jwalin-shah deleted the feat/privacy-capability-metadata branch April 23, 2026 21:30
AusAgentSmith pushed a commit to AusAgentSmith/openhuman that referenced this pull request May 23, 2026
…nel (tinyhumansai#760)

* feat(about_app): add capability privacy metadata

Adds optional `CapabilityPrivacy { leaves_device, data_kind, destinations }`
to the about_app capability catalog so the in-app Privacy surface can be
backend-backed instead of hand-maintained. Twelve representative capabilities
are annotated for the first audited set (raw/local, derived/backend,
credentials, diagnostics, model download); remaining entries default to
None and are simply not surfaced. Wire format stays backward compatible
via skip_serializing_if.

* feat(settings): drive privacy panel from about_app capabilities

Replaces the hand-maintained privacy rows with data fetched from
openhuman.about_app_list. Only capabilities that ship privacy metadata
are rendered; loading and RPC failure both degrade gracefully and the
analytics toggle plus explanatory copy remain intact. Adds a small typed
client (utils/tauriCommands/aboutApp.ts) and focused vitest coverage for
render, omission of unannotated entries, and RPC failure.

---------

Co-authored-by: Jwalin Shah <jshah1331@gmail.com>
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.

3 participants