Skip to content

Lovable

Paste one prompt into Lovable’s chat and it wires the Patchrooms widget into the app it generates — reviewers comment in place on the preview, and you hand the structured feedback back to your builder.

  • A Lovable project you can chat with.
  • For the cloud variant: a project key (pr_…) from your Patchrooms dashboard. The local variant needs no account.

Lovable can’t run a CLI install, so you instruct it in plain language. Pick one variant:

  • Local-mode quick-start — fastest. No account, no key, nothing leaves the browser. Reports live in localStorage; you export them from the widget. Best for a first review pass.
  • Cloud with a project key — feedback lands in the Patchrooms dashboard and streams live; an agent can later read it over MCP.

Paste this into Lovable’s chat:

Add Patchrooms visual feedback to this app so I can review it in place.

  1. Load the SDK just before </body>: <script src="https://room.patchrooms.com/v1/patchrooms.js"></script>
  2. After it loads, initialize:
    <script>
    Patchrooms.init({
    mode: 'artifact-review',
    storage: 'local',
    artifact: { id: 'my-app', tool: 'lovable', title: 'My app' },
    });
    </script>
  3. Add a stable data-patchroom-id attribute to the key UI elements — primary buttons, the header/nav, hero, and each form field — using semantic, unchanging ids (e.g. data-patchroom-id="checkout-submit"). Reuse the same ids if you regenerate, so my comments stay attached.
  4. Do not put any API keys, secrets, or personal data in the page, artifact.meta, or extra.

storage: 'local' means no account or backend — feedback is saved in the browser, and I’ll export it from the widget to hand to my coding agent.

The primary, lowest-friction cloud install is the per-project loader — the key lives in the URL and the server inlines your config, so the widget auto-initializes:

<script src="https://room.patchrooms.com/v1/patchrooms/pr_xxx.js"></script>

Programmatic alternative (use when you want to pass mode/artifact from JS):

<script src="https://room.patchrooms.com/v1/patchrooms.js"></script>
<script>
Patchrooms.init({ projectKey: 'pr_xxx' });
</script>

The script tag belongs in the page <head> or just before </body>. In a React app, render the <script> tags in index.html (not inside a component) so window.Patchrooms exists before app code runs.

  1. Open the Lovable preview.

  2. Look for the Patchrooms launcher docked to the edge of the viewport. If it’s there, the widget loaded.

  3. Click any element to drop a comment. If you used a project key, open your Patchrooms dashboard — the report should stream in live.

Open the preview, click a primary button (e.g. the one tagged data-patchroom-id="checkout-submit"), and leave a comment like:

This button label should say “Pay now”, and the spacing above it is too tight.

You can attach a screenshot, an element selection, or a voice note in the same thread. When you’re done in local mode, hit Copy agent feedback (or Download .md) in the widget and paste the Markdown back into Lovable’s chat so it can patch. In cloud mode, the report is already in your dashboard.

SymptomFix
No launcher appearsConfirm the <script> is in the rendered HTML and loads (Network tab). In React, the tags must be in index.html, not a component.
Console: [Patchrooms] unknown project keyThe pr_… key in the URL is wrong. Copy it again from the dashboard.
Comments don’t survive a regenerationAdd stable data-patchroom-id anchors on the key elements and reuse the same ids when you regenerate.
Cloud reports never arriveYou’re in storage: 'local'. Drop storage and pass a projectKey to send to the dashboard.