Skip to content

feat(about_app): add a runtime capability catalog for app discovery#267

Merged
graycyrus merged 2 commits intotinyhumansai:mainfrom
YellowSnnowmann:feat/about-app
Apr 2, 2026
Merged

feat(about_app): add a runtime capability catalog for app discovery#267
graycyrus merged 2 commits intotinyhumansai:mainfrom
YellowSnnowmann:feat/about-app

Conversation

@YellowSnnowmann
Copy link
Copy Markdown
Contributor

@YellowSnnowmann YellowSnnowmann commented Apr 2, 2026

Summary

  • Add a new src/openhuman/about_app/ module as the machine-readable source of truth for user-facing capabilities in the desktop app.
  • Introduce structured capability metadata with stable IDs, categories, descriptions, UI navigation hints, and rollout status so agents and future product surfaces can reason about app features consistently.
  • Expose the catalog at runtime through about_app.list, about_app.lookup, and about_app.search, wired into the shared controller registry and JSON-RPC surface.
  • Expand the initial catalog to cover the app’s major user-facing areas and refine capability metadata for recently added or clarified flows.
  • Add validation and tests so duplicate IDs are rejected and catalog queries remain stable as the feature set evolves.
  • Update the feature workflow docs so future user-facing changes must keep about_app in sync.

Problem

  • OpenHuman did not have a single structured place to answer “what can this app do?” across agent flows, runtime APIs, and future product discovery surfaces.
  • User-facing capabilities were scattered across UI routes, settings panels, onboarding steps, and domain modules, which made feature guidance inconsistent and easy to drift out of date.
  • Without a cataloged runtime surface, reviewers and future contributors had no clear contract for capability lookup, search, or status reporting.

Solution

  • Create a dedicated about_app domain with typed capability models and a static catalog that can be queried programmatically.
  • Register about_app.list, about_app.lookup, and about_app.search in the shared controller/schema registry so the same capability data is available over the existing JSON-RPC infrastructure.
  • Add catalog validation to catch duplicate capability IDs early and keep the registry safe to extend.
  • Seed the catalog with audited user-facing capabilities across conversation, intelligence, skills, local AI, team, auth, screen intelligence, channels, settings, and automation.
  • Cover the new surface with focused unit tests plus JSON-RPC integration coverage so catalog behavior is verified through the real runtime path.
  • Document about_app as part of the feature design workflow so future user-visible changes update the catalog in the same work.

Submission Checklist

  • Unit tests — Vitest (app/) and/or cargo test (core) for logic you add or change
  • E2E / integration — Where behavior is user-visible or crosses UI → Tauri → sidecar → JSON-RPC; use existing harnesses (app/test/e2e, mock backend, tests/json_rpc_e2e.rs as appropriate)
  • N/A — If truly not applicable, say why (e.g. change is documentation-only)
  • Doc comments/// / //! (Rust), JSDoc or brief file/module headers (TS) on public APIs and non-obvious modules
  • Inline comments — Where logic, invariants, or edge cases aren’t clear from names alone (keep them grep-friendly; avoid restating the code)

Impact

  • Adds a new core/runtime discovery surface for app capabilities through the existing JSON-RPC/controller registry.
  • No migration is required, but future user-facing features should now update src/openhuman/about_app/ to preserve catalog accuracy.
  • Improves agent and reviewer visibility into app functionality without changing existing UI behavior directly.
  • Low performance risk: the catalog is static and validated once, and query operations are lightweight in-memory lookups/searches.

Related

Summary by CodeRabbit

  • New Features

    • Added an app capability catalog system with search, list, and lookup functionality to help users discover and understand available features
    • Capability metadata includes status indicators (Stable/Beta/Coming Soon/Deprecated) and usage guidance
  • Documentation

    • Updated contributor documentation requiring capability catalog updates when adding or modifying user-facing features

- Added a new module for the capability catalog, providing a single source of truth for user-facing features in the OpenHuman app.
- Implemented functions for listing, looking up, and searching capabilities, enhancing user interaction with the app's features.
- Created a structured schema for capabilities, including categories and statuses, to improve organization and accessibility.
- Added comprehensive end-to-end tests to validate the functionality of the new capability catalog, ensuring robust performance and reliability.

This update significantly enhances the app's ability to expose its features to users, improving overall usability and experience.
…oved instructions

- Revised existing capability instructions for clarity and accuracy, enhancing user guidance on accessing features.
- Introduced several new capabilities related to skills and authentication, including connections to Google, Notion, and Web3 wallets, expanding the app's functionality.
- Added new settings management capabilities, allowing users to manage desktop services and clear app data, improving user control over the application.

These updates significantly enhance the capability catalog, providing users with more options and clearer instructions for utilizing the app's features.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 2, 2026

📝 Walkthrough

Walkthrough

This PR introduces a new about_app runtime capability catalog system, including type definitions for capabilities with categories and statuses, a searchable catalog module with lookup and filtering functions, RPC schema handlers for list/lookup/search operations, and comprehensive e2e tests. The system is integrated into the core controller registry and documented as a required workflow step for feature changes.

Changes

Cohort / File(s) Summary
Documentation
CLAUDE.md
Added workflow directive requiring runtime capability catalog updates under src/openhuman/about_app/ when user-facing capabilities are modified.
Core Integration
src/core/all.rs, src/openhuman/mod.rs
Registered about_app controllers and schemas in the core controller registry; added namespace description for the about_app module.
Type Definitions
src/openhuman/about_app/types.rs
Introduced CapabilityCategory (10 variants), CapabilityStatus (4 variants), and Capability struct with serde support, string conversions, and FromStr parsing with alias support.
Capability Catalog
src/openhuman/about_app/catalog.rs
Implemented hard-coded catalog with 774 lines of capability entries and lazy validation; exposed all_capabilities(), capabilities_by_category(), lookup(), and search() with multi-field substring searching.
RPC Interface
src/openhuman/about_app/mod.rs, src/openhuman/about_app/schemas.rs
Defined RPC handlers (list_capabilities, lookup_capability, search_capabilities) with schema definitions, parameter deserialization, and logging.
Testing
tests/json_rpc_e2e.rs
Added e2e test exercising all three RPC functions with isolated environment, verifying array structure, filtering, lookup accuracy, and search matching.

Sequence Diagram(s)

sequenceDiagram
    participant Client as JSON-RPC Client
    participant Server as RPC Server
    participant Handler as Schema Handler
    participant AboutApp as about_app Module
    participant Catalog as Catalog
    participant Validator as Validator

    Client->>Server: POST list/lookup/search capability request
    Server->>Handler: Route to about_app schema handler
    Handler->>Handler: Deserialize parameters
    Handler->>AboutApp: Call list_capabilities/lookup_capability/search_capabilities
    AboutApp->>Catalog: Access catalog for filtered results
    Catalog->>Validator: Trigger ensure_validated() (first call only)
    Validator->>Validator: Validate capability IDs (uniqueness, non-empty)
    Validator-->>Catalog: Return OnceLock guard
    Catalog-->>AboutApp: Return filtered/searched capabilities
    AboutApp-->>Handler: Return RpcOutcome with results
    Handler->>Handler: Serialize to JSON
    Handler-->>Server: Return JSON response
    Server-->>Client: HTTP 200 with capability data
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Poem

🐰 A catalog of features, shiny and bright,
Listed and searched in the data's light,
Categories sorted, statuses clear,
Every capability catalog near! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.87% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introducing a runtime capability catalog (about_app module) for app discovery, which aligns with the core objective of centralizing capability discovery.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
tests/json_rpc_e2e.rs (2)

1591-1594: Consider making the catalog size assertion more flexible.

The assertion capabilities.len() >= 40 is tied to the current catalog size. If capabilities are removed or the catalog is reorganized, this test may fail unexpectedly. Consider either:

  • Asserting a smaller minimum (e.g., >= 10) that represents a sanity check
  • Removing the size assertion entirely and relying on specific capability presence checks
💡 Suggested change
     assert!(
-        capabilities.len() >= 40,
+        capabilities.len() >= 10,
         "expected large capability catalog, got: {list_result}"
     );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/json_rpc_e2e.rs` around lines 1591 - 1594, The fixed test should avoid
a brittle hard minimum of 40 for capabilities; update the assertion around the
`capabilities` length in this test (the assert! that currently uses
`capabilities.len() >= 40` and references `list_result`) to either a smaller
sanity threshold (e.g., `>= 10`) or remove the length assertion entirely and
instead assert presence of specific expected capability entries from
`capabilities` (use membership checks against known capability identifiers in
the same test). Ensure you update the failure message to reference `list_result`
or the specific missing capability for clearer diagnostics.

1578-1583: Optional: Extract shared inner() helper.

This helper pattern is duplicated across billing_rpc_e2e, team_rpc_e2e, and now about_app_rpc_list_lookup_and_search. Consider extracting it to a shared test utility function to reduce duplication.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/json_rpc_e2e.rs` around lines 1578 - 1583, The local helper function
inner(outer: &Value) that returns outer.get("result").cloned().unwrap_or_else(||
outer.clone()) is duplicated across billing_rpc_e2e, team_rpc_e2e, and
about_app_rpc_list_lookup_and_search; extract it to a shared test utility (e.g.,
tests::utils or a new tests/helpers module) as a named function like
extract_result(outer: &Value) -> Value, update the three tests to import and
call extract_result instead of defining inner, and run tests to ensure no
name/import conflicts.
src/openhuman/about_app/catalog.rs (1)

6-637: File exceeds recommended ~500 line limit but splitting may not be beneficial.

At ~773 lines, this file exceeds the coding guideline of ≤500 lines per file. However, the bulk is the static CAPABILITIES array which is inherently verbose and benefits from being co-located with its query functions.

Consider whether future growth warrants splitting (e.g., moving capabilities to a separate capabilities_data.rs), but for now the cohesion benefit of keeping everything together outweighs the size concern.

As per coding guidelines: "Prefer ≤ ~500 lines per source file; split modules when growing larger."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/openhuman/about_app/catalog.rs` around lines 6 - 637, The file is
oversized due to the large static CAPABILITIES array; extract CAPABILITIES into
a new module (e.g., capabilities_data.rs) and expose it via pub (or pub(crate))
so catalog.rs can import it with mod/use; update catalog.rs to remove the inline
CAPABILITIES constant and reference the moved CAPABILITIES symbol from the new
module wherever it's used (ensure any functions that previously referenced
CAPABILITIES still resolve, e.g., query functions in catalog.rs).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/openhuman/about_app/catalog.rs`:
- Around line 6-637: The file is oversized due to the large static CAPABILITIES
array; extract CAPABILITIES into a new module (e.g., capabilities_data.rs) and
expose it via pub (or pub(crate)) so catalog.rs can import it with mod/use;
update catalog.rs to remove the inline CAPABILITIES constant and reference the
moved CAPABILITIES symbol from the new module wherever it's used (ensure any
functions that previously referenced CAPABILITIES still resolve, e.g., query
functions in catalog.rs).

In `@tests/json_rpc_e2e.rs`:
- Around line 1591-1594: The fixed test should avoid a brittle hard minimum of
40 for capabilities; update the assertion around the `capabilities` length in
this test (the assert! that currently uses `capabilities.len() >= 40` and
references `list_result`) to either a smaller sanity threshold (e.g., `>= 10`)
or remove the length assertion entirely and instead assert presence of specific
expected capability entries from `capabilities` (use membership checks against
known capability identifiers in the same test). Ensure you update the failure
message to reference `list_result` or the specific missing capability for
clearer diagnostics.
- Around line 1578-1583: The local helper function inner(outer: &Value) that
returns outer.get("result").cloned().unwrap_or_else(|| outer.clone()) is
duplicated across billing_rpc_e2e, team_rpc_e2e, and
about_app_rpc_list_lookup_and_search; extract it to a shared test utility (e.g.,
tests::utils or a new tests/helpers module) as a named function like
extract_result(outer: &Value) -> Value, update the three tests to import and
call extract_result instead of defining inner, and run tests to ensure no
name/import conflicts.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 71887676-77af-4c15-86aa-fc97f1798894

📥 Commits

Reviewing files that changed from the base of the PR and between fa7c41c and 2bfad27.

📒 Files selected for processing (8)
  • CLAUDE.md
  • src/core/all.rs
  • src/openhuman/about_app/catalog.rs
  • src/openhuman/about_app/mod.rs
  • src/openhuman/about_app/schemas.rs
  • src/openhuman/about_app/types.rs
  • src/openhuman/mod.rs
  • tests/json_rpc_e2e.rs

@graycyrus graycyrus merged commit c09983b into tinyhumansai:main Apr 2, 2026
9 checks 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.

2 participants