YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(onboarding): make guide send action functional
Louis Beaumontff9a8f76c2ec
diff --git a/apps/screenpipe-app-tauri/components/onboarding/first-run-guide.test.tsx b/apps/screenpipe-app-tauri/components/onboarding/first-run-guide.test.tsxindex e45bea0ff..46f1f423a 100644--- a/apps/screenpipe-app-tauri/components/onboarding/first-run-guide.test.tsx+++ b/apps/screenpipe-app-tauri/components/onboarding/first-run-guide.test.tsx@@ -200,6 +200,34 @@ describe("first-run guide", () => {}});+ it("submits the real composer from the guide's primary action", () => {+ const composer = document.createElement("form");+ composer.setAttribute("data-firstrun-target", "composer");+ const onSubmit = vi.fn((event: Event) => event.preventDefault());+ composer.addEventListener("submit", onSubmit);+ document.body.appendChild(composer);+ try {+ render(+ <FirstRunGuide+ onDone={vi.fn()}+ onGoToAutomations={vi.fn()}+ />,+ );+ startTour();++ fireEvent.click(+ screen.getByRole("button", { name: /send prompt/i }),+ );++ expect(onSubmit).toHaveBeenCalledOnce();+ expect(mocks.capture).toHaveBeenCalledWith(+ "firstrun_send_prompt_clicked",+ );+ } finally {+ composer.remove();+ }+ });+it("ignores background pipe-run sessions — only a real chat advances the phase", () => {render(<FirstRunGuidediff --git a/apps/screenpipe-app-tauri/components/onboarding/first-run-guide.tsx b/apps/screenpipe-app-tauri/components/onboarding/first-run-guide.tsxindex 3f1578541..c37213e22 100644--- a/apps/screenpipe-app-tauri/components/onboarding/first-run-guide.tsx+++ b/apps/screenpipe-app-tauri/components/onboarding/first-run-guide.tsx@@ -259,6 +259,18 @@ export default function FirstRunGuide({const skip = useCallback(() => dismiss("skip_button"), [dismiss]);+ // The guide used to render `send ↵` as a button-shaped span. Submit the+ // real composer from an actual button so the first action is unambiguous+ // and still exercises the same chat path as pressing Enter.+ const submitPrefilledPrompt = useCallback(() => {+ const form = document.querySelector<HTMLFormElement>(+ '[data-firstrun-target="composer"]',+ );+ if (!form) return;+ posthog.capture("firstrun_send_prompt_clicked");+ form.requestSubmit();+ }, []);+// Step 0 accepted — start the tour. Reset the send baseline so a chat// sent while the invite sat open doesn't instantly advance the phase.const acceptInvite = useCallback(() => {@@ -530,12 +542,16 @@ export default function FirstRunGuide({</span></div><p className="font-sans text-sm text-foreground/90 leading-snug">- i wrote a prompt below to create your first automation — hit{" "}- <span className="font-mono text-xs border border-foreground/25 px-1.5 py-0.5">- send ↵- </span>{" "}- and screenpipe will set it up for you.+ i filled the prompt below. send it to create your first+ automation.</p>+ <button+ type="button"+ onClick={submitPrefilledPrompt}+ className="mt-4 flex w-full items-center justify-center border border-foreground bg-foreground py-2.5 font-mono text-xs uppercase tracking-widest text-background transition-colors hover:bg-background hover:text-foreground"+ >+ send prompt ↵+ </button><buttononClick={skip}className={SKIP_BUTTON_CLASS}