store: instructions panel + reveal-toggle in install modal + GA4 logo#244
Open
keysersoft wants to merge 2 commits into
Open
store: instructions panel + reveal-toggle in install modal + GA4 logo#244keysersoft wants to merge 2 commits into
keysersoft wants to merge 2 commits into
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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