Skip to content

Build script-tag embeddable feedback widget #3

Description

@kosako

Overview

Build the first PatchLoop experience around an embeddable widget rather than the dashboard.

The core value to validate is that a normal HTML page can add PatchLoop with a script tag, enter comment mode, click a precise location, and produce a feedback payload with enough context to send to Slack or GitHub later.

Scope

  • Add a standalone widget script under widget/patchloop-widget.js
  • Add a plain HTML example page that loads the widget via script tag
  • Expose window.PatchLoop.init(options)
  • Render a floating launcher button
  • Toggle feedback/comment mode
  • Capture click position and show a pin
  • Open a small comment form
  • Capture metadata: URL, x/y position, selector, viewport, browser, timestamp
  • Provide a payload preview or console output so the captured feedback can be inspected
  • Keep this independent from the current dashboard and GitHub integration

Out of scope

  • Real Slack delivery
  • Real GitHub Issue creation
  • Backend persistence
  • AI PR integration
  • PoC portal work

Acceptance criteria

  • A normal HTML page can load the widget with a script tag
  • The widget can be initialized with window.PatchLoop.init(options)
  • A user can enable feedback mode, click the page, write a comment, and submit
  • The resulting payload includes comment, URL, x/y, selector, viewport, browser, and timestamp
  • The example page demonstrates the flow without requiring a build step
  • README documents how to run and try the widget

Documentation

Update Notion with the widget API and payload shape after implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions