Repository navigation
feat(web): Google Cloud integration card - #1334
JeremyFunk wants to merge 44 commits into
Conversation
…Labs/maple into feat/gcp-integration-card
…across connectors
…Labs/maple into feat/gcp-integration-card
…hLabs/maple into feat/gcp-integration-card
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Google Cloud card to the Integrations page: connect form, per-capability switches with status, and the Cloud Shell setup/cleanup scripts, on the existing v2 API. The card state machine and its contract use check out; the head still fails CI's web typecheck, so it is unproven as compiling.
What was checked
|
|
Warning The review of |
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Google Cloud integration card: a scope-picker connect form, per-capability switches and status, setup/cleanup scripts, and hub status/overview derived from the existing v2 status read. UI-only, no backend or contract change, and safe to merge.
What was checked
|
Maple review🟢 Confidence 7/10 · likely safe to merge Adds the Google Cloud integration card, its pure state/validation module and the catalog entry, all on the
Before merge
What was checked
|
Maple review🟡 Confidence 6/10 · needs attention Adds the Google Cloud integration card: catalog entry, connect form, per-connection log and metrics status rows with switches, and the setup/cleanup script panels, all over the existing
What was checked
|
…disconnect on the integration card
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Google Cloud card to the Integrations page: connect form, per-connection capability switches with a shared status model, setup and disconnect panels. Contained to apps/web and safe to merge; the new logic is unit-tested.
What was checked
|
…se, clearer rows, named links
Maple review🟢 Confidence 8/10 · likely safe to merge The last commits refine the Google Cloud card: capability states, the setup panel's confirmation, and a stacked checklist layout. Presentational and safe to merge, except the card's hardcoded docs link, whose page does not exist.
Findings🟠 Warning · F1 · GCP card hardcodes a docs URL whose page does not existcorrectness ·
🤖 Prompt to fix this finding with an AI agentWhat was checked
Observability coverage: 1 of 1 changes observable
|
| /** How much of a script shows before "Show all lines": the wrapper and the header comment. */ | ||
| const SCRIPT_PREVIEW_LINES = 10 | ||
|
|
||
| const DOCS = "https://maple.dev/docs/integrations/gcp" |
There was a problem hiding this comment.
Warning
GCP card hardcodes a docs URL whose page does not exist
F1 · Warning · correctness
apps/landing/src/content/docs/integrations/ has no gcp.md at this head, so the connect form's Costs link (${DOCS}#google-cloud-costs) 404s. The same commit dropped docsUrl: docsUrl("gcp") from the catalog entry, so apps/web/src/lib/docs.test.ts — which exists to fail in the PR that would rot a docs link into a 404 — no longer covers this page.
Add the landing page (`apps/landing/src/content/docs/integrations/gcp.md`), add `gcp: "/docs/integrations/gcp"` to `DOCS` in `apps/web/src/lib/docs.ts`, and go back to `docsUrl("gcp")` here and on the catalog entry. If the page is not shipping with this stack, drop the `Costs` link instead of hardcoding it.
🤖 Prompt to fix with an AI agent
In `apps/web/src/components/integrations/gcp-integration-card.tsx:98`: GCP card hardcodes a docs URL whose page does not exist.
`apps/landing/src/content/docs/integrations/` has no `gcp.md` at this head, so the connect form's `Costs` link (`${DOCS}#google-cloud-costs`) 404s. The same commit dropped `docsUrl: docsUrl("gcp")` from the catalog entry, so `apps/web/src/lib/docs.test.ts` — which exists to fail in the PR that would rot a docs link into a 404 — no longer covers this page.
Suggested fix: Add the landing page (`apps/landing/src/content/docs/integrations/gcp.md`), add `gcp: "/docs/integrations/gcp"` to `DOCS` in `apps/web/src/lib/docs.ts`, and go back to `docsUrl("gcp")` here and on the catalog entry. If the page is not shipping with this stack, drop the `Costs` link instead of hardcoding it.
Verify the problem exists at that location before changing it, and keep the fix to those lines.
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Google Cloud integration card and catalog entry to /integrations on the existing
Still open from earlier reviews
What was checked
|
A run that stopped before a capability asks for the script again, the wrong-ID remedy does not claim the script names the ID, and a read that stays out says when to write to support.
Maple review🟢 Confidence 8/10 · likely safe to merge Wording-only pass over the Google Cloud card: the setup and failure copy, and the "run the script again" hint now keyed on any reported run instead of per capability. Safe to merge.
Still open from earlier reviews
What was checked
|
…sk before including them The Log filter select lists the recommended filter first and starts a connection without a sink on it. Choosing Include GKE container logs shows an acknowledgement where the script would be: the script is fetched with that filter only after it is confirmed, and choosing the option again asks again. The form, the empty state and the filter's helper text say that GKE container logs are left out by default.
The confirm button says that it shows the script, backing out returns to the filter the panel started on (the sink's own filter when one exists), and a filter that replaces a sink's filter says so. Labels fit at 390px, and a link's icon stays with its last word.
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Google Cloud integration card: catalog entry, connect form, per-capability switches and status rows, setup and disconnect panels, all driven by the pure, tested
Before merge
Still open from earlier reviews
|
…up steps and the script on request Layout, spacing and hierarchy of Integrations -> Google Cloud. Content, state rules and the API stay as they are. - One 768px column like the settings pages: a "Connections" section with a card per connection, and the connect form as its own "New connection" section. The page header ends with the column. - Setup steps of the card's own: numbered, one filled button per step, the script text and the log filter opened on request. A first setup leads with its steps; a later run has them under the switches, in one band with the notice that asks for it. A connection that waits on a change opens on its steps after a reload too. - Small print keeps to 72 characters; inputs, the select, notices and the script span their container. Names are 14px, explanations brighter than fine print. - A capability is its name and switch over its status line; what to do is said once per connection. A connection that is not healthy carries its state as a badge, and its buttons sit beside the name on a wide card and under it on a narrow one. - A failure's bracketed answer from Google goes on a line of its own; a command breaks between its words only; a named link stays on one line. - The value tiles break on the page's width, so they stack beside two sidebars. - The setup checklist is PlanetScale's alone again.
Maple review🟢 Confidence 8/10 · likely safe to merge Reworks the Google Cloud card's status lines, setup panel and empty state, and retires PlanetScale's generic checklist API. No new defect found in the files changed since the last review, so it is safe to merge once the stacked base branches land.
Before merge
Still open from earlier reviews
What was checked
|
…ollect and its script
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Google Cloud integration page: catalog entry, per-connection cards, and a two-stage configure dialog that generates, copies and polls on the setup and cleanup scripts. New web UI over the existing
Before merge
Still open from earlier reviews
What was checked
|
…he cleanup script; panel first in the dialog body
Maple review🟢 Confidence 8/10 · likely safe to merge Since the last review the Google Cloud card changes are copy (
Still open from earlier reviews
What was checked
Observability coverage: 1 of 1 changes observable
|
Maple review🟢 Confidence 9/10 · safe to merge Safe to merge: three lines of copy and layout on the Google Cloud page (the apply recap drops the log-filter row once Google Cloud matches, a stalled metrics warning takes the card's width). The open item, the setup script's Still open from earlier reviews
What was checked
|
…ibling cards The loading skeleton takes the panel radius and the connect button's icon takes its size from the button, as on every other integration card.
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Google Cloud integrations page: catalog entry, hub row, a worst-state card per connection, a two-stage
Still open from earlier reviews
|
As the primitives pass did on the sibling cards: the text link that shows the script is a Button with the link variant, and the icon in Open Cloud Shell takes its size from the button.
Maple review🟢 Confidence 8/10 · likely safe to merge Since the last review the head only turns the "Read the script" toggle into the shared link
Before merge
Still open from earlier reviews
What was checked
|
# Conflicts: # apps/web/src/routes/integrations.tsx
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Google Cloud integration page: one panel per connection with its two capabilities' state, and a single Configure dialog that saves what to collect, hands over the setup script, and keeps the cleanup script for a removed connection. Client-only, no contract change; the state rules carry a large unit suite.
Still open from earlier reviews
What was checked
|
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Google Cloud page to Integrations — catalog entry, hub row, one panel per connection and a two-stage Configure/Apply dialog with cleanup-first Disconnect — on the existing
Still open from earlier reviews
What was checked
|
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Google Cloud integrations page: catalog entry, per-connection status, a two-stage Configure dialog and a disconnect flow that keeps the cleanup script until dismissed. The diff is client-side only, built on the existing
Before merge
Still open from earlier reviews
What was checked
|
Stacked on the metrics poller PR (which is stacked on #1320 and #1321). Merge order: bottom up.
Summary
Adds the Google Cloud page to Integrations. An org admin connects an organization, a folder or a project, chooses log forwarding and metrics and resources per connection, and runs the generated script in Cloud Shell. Built on the
/v2/integrations/gcpAPI; no backend or contract changes.isNew). Hub row and page header read the connection's worst state.Configure.Disconnect. A connection removed before its cleanup was seen keeps a panel with the cleanup script until it is dismissed, across reloads.Interaction model
What a change does, as the API has it: turning a capability off acts in Maple at once (logs are no longer stored within about a minute, the poller skips the connection from the next 5-minute read) while Google Cloud keeps its resources until the script runs. Turning one on does nothing until the script has run. The page is built on that.
Configureopens a dialog with two stages, named under its title:Configure > Apply in Google Cloud.Starts once the script has run in Google Cloud., orMaple stops storing these logs within about a minute of saving. Google Cloud keeps forwarding them until the script has run.In Mapleand what goes onIn Google Cloud.Google Cloud matches this configuration.Continue to the script: that is how the script is run again.Finish setuporApply changes. The band says what goes on until then (Google Cloud keeps forwarding logs, billed by Google, until the script has removed the log sink.). A failure whose text asks for the setup script gets the same band withRun the script again, once per connection.Connect > Apply in Google Cloud. Stage 1 has the scope, the IDs, what to collect and the log filter;Create and continueleads into the same stage 2.Disconnectis in the card's menu, with its cleanup-first dialog.Layout
gap-4, like the Cloudflare and PlanetScale pages. Breakpoints are container queries on the page (@container/page): beside two sidebars the viewport says little.Panelper connection, worst state first. Header: name,Configure, the menu. Under it the band, when the script has to run. Under that the two capabilities, side by side while both are one line of status; a capability with a hint or a failure takes the card's width, with its state next to its name.integration-empty-state.tsx: the value tiles go three-up on the page's width (@2xl/page), not the viewport's.GcpMessagelays a failure out as headline, lines and fine print wherever it renders, which includes the Infrastructure page's notices in the PR above.Decisions to look at:
Keep the sink's current filter, so running the script again never resets a filter, and the filter's own lines sayApplies: when the script runs. Changing only the filter saves nothing, so the button staysContinue to the script.Include GKE container logskeeps its acknowledgement (title, both sentences and the checkbox sentence unchanged). Ticking the box is the confirmation: the stage's button stays disabled until then, and the formerConfirm and show scriptbutton is gone because the script is now the next stage.Save, its noteNothing to run after this, the confirmationTurn on, and the dialog then shows that Google Cloud matches.Not set up;Setup pendingis the connection's word (header, hub, band).Kept after screenshot review, with the reason:
Configurestays on the card beside the band's button: it is the stable door, the band's button is the shortcut to its second stage.Disconnect: it keeps the destructive action out of the primary position.Configurefor a rerun in its text: the rerun is the fallback, not the first thing to do.Healthywith an amber dot on the capability: metrics are unaffected, and for a scope over the list limit it would never clear.Needs attentionbadge over a red capability dot: the hub's and the header's tone for the state. The dot carries the severity.Status model
gcp-connector-state.tsholds the rules, pure and tested; the card, the configuration dialog, the hub and the Infrastructure page call the same functions.applied_logs_enabled,applied_metrics_enabledandsetup_reported_at: what the latest script run reported.gcpDraftEffectsays what saving a choice does and when (starts-after-script,stops-now,resumes-now,removed-by-script); the dialog's notes and its confirmation read it.gcpPendingChangessays, per capability, what goes on until the script has run;gcpRunAskednames the capabilities whose failure asks for the setup script;gcpMessagePartscuts a failure into headline, lines and Google's answer.Can't read metrics; with a read inside 10 minutes it staysReceiving metrics, incomplete.Setup runningfor two minutes after a report on the other one: the script reports its sections seconds apart.Receiving metricsand addsresource list incompletewith an amber dot: metrics are unaffected, and the connection stays healthy.setup_reported_at, not by the browser's clock. Its "no confirmation yet" help counts five minutes from the connection's creation, so a reload does not restart it.Decisions
MapleApiV2AtomClient.query, notretainedQueryV2: they embed the connector's secret, so they are disposed with the dialog. The<pre>carriesREPLAY_BLOCK_CLASS. Only the cleanup script from the delete response, which has no secret, is persisted (Atom.kvs, per organization) for the panel that stays after a disconnect.Roles if you aren't an Owner,Troubleshooting,Write a filter of your own, and the links from the acknowledgement and the filter lines) and the catalog's docs link arrive with the docs PR above, so nothing here points at a page that is not there.gcp-integration-card.tsx(the page, 0.8k lines) andgcp-configure.tsx(the dialog, the scripts and the disconnect dialog, 1.5k lines), from 1.7k.Verification
gcp-connector-state.test.ts(70 tests): one case per row of the state tables, the partial-report window, the script-needed rule, what a draft does and when, which failures ask for the script, how a failure is cut, the order of the log filters and the acknowledgement rule.Review notes
Scriptapplies the class unconditionally in one line, and it only ever renders a secret-bearing script; a render test would pin a class name.Receiving metrics, incompletewhatever the message says. The card does not read meaning out of message text, with one exception: a failure that names the setup script gets the band'sRun the script again.Setup runningrests on the report of the other capability alone. If the script stopped between its sections, the row says so two minutes later.Waiting for datastays the connection's word also when only one capability waits.Summary by CodeRabbit