Skip to content

feat(app-accessibility): read the App Accessibility dashboard with an ai_agent token - #589

Closed
Parth-browserstack wants to merge 2 commits into
feat/a11y-dashboard-oauth-capabilitiesfrom
ATA-1598-app-a11y-mcp-dashboard-jwt
Closed

Parth-browserstack wants to merge 2 commits into
feat/a11y-dashboard-oauth-capabilitiesfrom
ATA-1598-app-a11y-mcp-dashboard-jwt

Conversation

@Parth-browserstack

@Parth-browserstack Parth-browserstack commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Why

App Accessibility MCP could only reach the access-key (public) API, which covers projects, builds and manual report lists. Most of what a user sees on the App Accessibility dashboard (build overview and trend, tests, per-test issues, conformance, compare, manual report overview, rules and WCAG levels) was out of reach. Jira: ATA-1598.

app-accessibility now accepts a central-auth token carrying the ai_agent scope on an allowlist of dashboard reads (browserstack/app-accessibility#3033), the same model as Web Accessibility (#570). This PR adds the MCP side.

What changed

  • config.ts: app_accessibility gets a dashboard host (appAccessibilityDashboard, already defined for us/eu/in) and joins STRICT_NAMED_HOST_PRODUCTS, so overriding only the product host cannot send dashboard calls to production.
  • capability/app_accessibility.capability-index.json: 17 read capabilities with host: dashboard and auth: {type: oauth2}.
    • Automate: get_app_accessibility_build, get_app_accessibility_build_overview, get_app_accessibility_build_conformance_summary, list_app_accessibility_comparable_builds, compare_app_accessibility_builds, list_app_accessibility_build_tests, list_app_accessibility_test_issues, list_app_accessibility_build_names, list_app_accessibility_bundle_ids.
    • Users: list_app_accessibility_users.
    • Manual: count_manual_app_accessibility_reports, list_manual_app_accessibility_devices, get_manual_app_accessibility_report, get_manual_app_accessibility_report_overview, list_manual_app_accessibility_report_rules, list_manual_app_accessibility_report_wcag_levels, get_manual_app_accessibility_report_conformance_summary.
    • Plus: product hosts, a DashboardFailure schema, Dashboard* responses, the test_case and user entities, and an updated summary.
    • The new entries are spliced into the hand-formatted file, so only 6 existing lines change.
  • Left out on purpose:
    • Build and manual report snapshot: fetchAccessibilityIssues already serves them.
    • The project, build and manual-report lists: the existing Basic capabilities serve them.
    • Moving those to the dashboard is a follow-up.
    • No writes. Hide, unhide and review need a backend change first.
  • Tests:
    • New tests/tools/capabilityAppAccessibilityDashboard.test.ts, 23 tests. It checks:
      • Only these capabilities use oauth2; the three public-API lists keep Basic.
      • Every route is a GET on a mirror of the backend allowlist.
      • Each capability declares exactly the path params its path names.
      • Nothing fetchAccessibilityIssues already serves is duplicated.
      • The minted token carries the ai_agent scope.
      • The us/eu/in dashboard hosts, the strict override, and search hits.
    • capabilityAppAccessibility.test.ts now checks only the public-API lists.

How it was verified

  • npx vitest run: 160 files, 2493 tests, all passing. Before this change: 2470.
  • tsc builds.
  • Against a lower environment (rengg) with app-accessibility#3033 deployed:
    • Settings: CAPABILITY_REGISTRY_AUTH_TOKEN_URL and CAPABILITY_REGISTRY_BASE_URL_APP_ACCESSIBILITY{,_HOST_DASHBOARD}, with a test account.
    • In-process run of all 17 capabilities through the invokeCapability handler: 13 answer 200. The other 4 answer the account's own "not enabled" refusal, exactly as the dashboard does: conformance gives 404, compare and comparable builds give 403.
    • A real MCP server in Claude Code ran listProducts → searchCapability → describeCapability → invokeCapability for a build overview, its tests, and a manual report's rules and WCAG levels. All returned 200.
    • The backend logs show scoped_bearer_auth result=ok scope=ai_agent for each dashboard call. The public-API list still goes over Basic.

Dependencies and risk

🤖 Generated with Claude Code

Parth-browserstack and others added 2 commits November 19, 2026 16:32
Capabilities that name host "dashboard" now resolve to the regional
App Accessibility dashboard (app-accessibility[-eu|-in].browserstack.com).
app_accessibility joins STRICT_NAMED_HOST_PRODUCTS, so a lower-env
override of the product host alone cannot send dashboard calls to prod.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ai_agent token

Adds 17 read capabilities on the App Accessibility dashboard routes that
app-accessibility admits for an ai_agent token: build details, overview
and score trend, tests, per-test issues, conformance summary, comparable
builds and compare; build names, bundle ids and users; manual report
count, devices, details, overview, rules, WCAG levels and conformance.

Each declares host "dashboard" and auth oauth2, so the registry mints a
central-auth token instead of sending Basic. The three public-API lists
keep Basic. Routes fetchAccessibilityIssues or the existing lists already
serve are left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto (fallback from Default branch)
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited), Workspace UI (inherited); Enforced overrides: Organization
  • Review profile: ASSERTIVE
  • Plan: Enterprise
  • Run ID: 9eb5806d-6d7b-4050-8478-dbe8bca8b111

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@Parth-browserstack

Copy link
Copy Markdown
Collaborator Author

Combined into #595 (dashboard reads from this PR, plus issue actions, Screen Reader Automation reads and the screen reader run option).

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