Skip to content

store: instructions panel + reveal-toggle in install modal + GA4 logo#244

Open
keysersoft wants to merge 2 commits into
mainfrom
keysersoft/install-modal-instructions-and-ga4-logo
Open

store: instructions panel + reveal-toggle in install modal + GA4 logo#244
keysersoft wants to merge 2 commits into
mainfrom
keysersoft/install-modal-instructions-and-ga4-logo

Conversation

@keysersoft
Copy link
Copy Markdown
Contributor

Summary

Three small UX fixes around the connector install flow:

1) Show the adapter's setup instructions inside the install modal

Until now the credentials modal listed bare env var names (e.g. `GOOGLE_REFRESH_TOKEN`) with no hint of how to obtain them — users had to leave the page and dig into our docs. The data was already on the backend (`AdapterDefinition.instructions` field, populated by every adapter JSON's `instructions` block), the frontend just wasn't reading it.

Renders as a collapsible `

Details` block, default open, with full Markdown support via `react-markdown` + `remark-gfm` (same stack already used by `chat-message.tsx`).

2) "Show / Hide" toggle on password-masked credential inputs

Per-field button on inputs whose env var name contains `secret`/`password`/`token`/`key`. Pain point: users pasting long OAuth refresh tokens couldn't visually verify the value before submitting, and copy-paste corruption (truncated tail, trailing `%`, etc.) went undetected. State is keyed by env var name, reset together with `credentialValues` when the modal opens/closes.

3) Google Analytics 4 brand logo

Ships `packages/frontend/public/logos/connectors/google-analytics-4.svg` so the new adapter from PR #243 renders with its proper brand mark in both the store grid and the installed-connector list, instead of the fallback initial.

Multi-tenant note (for the v2 "Connect with Google" flow)

The credentials submitted via this modal already go through the existing per-user / per-workspace encryption path: `adapters.service.ts` → `encrypt()` with the org's encryption key, stored in the `Connector.authConfig` column scoped to `(userId, organizationId)`. This PR is purely client-side rendering and doesn't touch that boundary. The future "Connect with Google" OAuth dance will follow the same path — the OAuth callback writes into the same encrypted column, scoped to the logged-in user's workspace.

Test plan

  • Open https://cloud.anythingmcp.com/connectors/store → click "Install" on google-analytics-4 → modal should show:
    • GA4 brand logo in the card
    • "How to get these credentials" panel expanded, with Markdown-formatted setup steps including the OAuth Playground walkthrough
    • 3 password-masked inputs, each with a "Show" button that toggles to "Hide"
  • Repeat on freshbooks or zoho-crm to spot-check the instructions render correctly across long-form Markdown adapters
  • Spot-check openweather (single env var) and bitrix24 (no env vars, no modal) — neither should regress

… Funnel)

Mirrors the 7 tools the upstream googleanalytics/google-analytics-mcp
server exposes — split into 8 here because their `get_custom_dimensions
_and_metrics` is two separate Admin endpoints, easier to call as two
distinct tools than to merge in our request shape.

Single adapter, dual-host (analyticsadmin.googleapis.com for metadata
+ analyticsdata.googleapis.com for reports) via the absolute-URL
support already in the REST engine.

Auth: OAuth2 with user refresh_token against the standard Google
token endpoint. Service-account JWT (RS256) NOT supported yet —
documented in the instructions with a workaround (dedicated automation
Google account). Adding RS256 to the engine would unlock all other
Google product APIs (Drive, Sheets, BigQuery, Calendar) — deferring
until we see actual demand for GA4.

Tools:
  ga4_get_account_summaries          (Admin v1beta)
  ga4_get_property_details           (Admin v1beta)
  ga4_list_google_ads_links          (Admin v1beta)
  ga4_list_custom_dimensions         (Admin v1beta)
  ga4_list_custom_metrics            (Admin v1beta)
  ga4_run_report                     (Data v1beta)
  ga4_run_realtime_report            (Data v1beta)
  ga4_run_funnel_report              (Data v1alpha)

Tested: validate-adapters.mjs OK, 2143/2143 jest tests pass including
the new spec that asserts: dual-host routing, OAuth2 token URL,
tool naming, full tool set coverage. Catalog regenerated (168 total).
…secret fields + GA4 logo

Three small UX fixes around the connector install flow:

1. Render the adapter's `instructions` Markdown inside the credentials
   modal as a collapsible <details> block, default-open. Until now the
   modal only showed bare env var names ("GOOGLE_REFRESH_TOKEN") with
   no hint of how to obtain them. The data was already on the adapter
   JSON and exposed by the backend `AdapterDefinition` — we just
   weren't reading it in the frontend. Uses react-markdown + remark-gfm
   already in deps (chat-message.tsx pattern).

2. Add a per-field "Show / Hide" toggle on password-masked inputs
   (env vars whose name includes secret/password/token/key). Users
   pasting long OAuth refresh tokens couldn't visually verify the
   value before submitting; common copy-paste corruption (truncated
   tail, trailing %, etc.) went undetected.

3. Ship the Google Analytics 4 brand logo at
   `public/logos/connectors/google-analytics-4.svg` so the new
   adapter shipped in PR #243 renders with the proper GA4 mark in
   both the store grid and the installed-connector list, instead of
   the fallback initial.

Note on multi-tenancy (for the v2 "Connect with Google" flow we
discussed): credentials submitted via this modal already follow the
existing per-user / per-workspace encryption path
(adapters.service.ts → encrypt() with the org's encryption key);
the new instructions panel is purely client-side rendering and
doesn't change that boundary.
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