Skip to content

Collect Flows signup decisions on the web - #116

Open
kjgbot wants to merge 7 commits into
mainfrom
codex/flows-web-input
Open

kjgbot wants to merge 7 commits into
mainfrom
codex/flows-web-input

Conversation

@kjgbot

@kjgbot kjgbot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Builds on #112.

Moves the agent signup follow-up answers into the Flows signup page, with web-based selection/text controls, a saved-draft result, and copy that keeps local house-key and sync constraints accurate. Agent actions still go through the Cloud progress/input APIs; the page never receives the progress token.

Validation: all 320 marketing workspace tests pass (248 web, 72 router); diff check clean.

Dependent Cloud API PR follows. Before merging to main, rebase/retarget after #112. The separate Codex wake-up/injection work remains with the other agent.


Note

Medium Risk
Changes the Flows signup funnel and submits user choices with the progress write token; correctness depends on the companion Cloud progress/input API, but client-side validation limits notice links and answer payloads.

Overview
Flows agent signup now surfaces repository/workflow/approver questions (and inactive-preview notices) on the signup page instead of in chat. Progress polling exposes optional inputRequest; the owning tab submits answers with PUT + the progress bearer token, while read-only watcher tabs see a prompt to use the original tab.

The journey UI adds an input card (text/select, notice + dashboard link), keeps “answer received” visible at step 0 until the agent advances, and adjusts headings/status copy for Flows. Types and isSignupProgress validation cover inputRequest (including restricted notice actionHref paths). Flows agent markdown guides document the web-input protocol, notice drafts, integration polling (oauth.connected vs ready), and house-key eligibility blockers; tracked prompts tell agents not to ask in chat.

Local dev: the agent signup route preserves localhost vs 127.0.0.1 from the Host header when Next normalizes request.url, so OAuth and the progress page stay aligned.

Unit and Playwright tests cover validation, guide strings, hostname behavior, and the answered-at-step-zero UX.

Reviewed by Cursor Bugbot for commit 7528c00. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 0baa8441-9d9f-4edd-920b-ba88c921bfa1


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://e0599f86-agentrelay-web.agent-workforce.workers.dev

This is a Cloudflare Workers preview version of this PR's build.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread web/components/AgentSignupJourney.tsx Outdated
{complete ? <a onClick={() => { if (token) analytics.track('dashboard_opened', active); }} className={s.primary} href={teamsCloudUrl(product === 'teams' ? '/dashboard/sessions' : '/dashboard')}>Open {product === 'teams' ? 'your workspace' : 'dashboard'} <ArrowUpRight size={17} /></a>
: !active ? <button type="button" className={s.primary} disabled={!prompt || expired} onClick={() => void copy()}>{copyMessage.startsWith('Copied') ? <Check size={17} /> : <Copy size={17} />}{copyMessage.startsWith('Copied') ? 'Prompt copied' : 'Copy setup prompt'}</button> : null}
<p className={s.copyStatus} role="status">{complete ? '' : active ? (paused ? 'Your agent will continue after you approve.' : 'You can leave this page open.') : copyMessage || (progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p>
<p className={s.copyStatus} role="status">{complete ? '' : notice ? 'No action is required to keep this draft saved.' : active ? (inputRequest?.status === 'pending' ? 'Your answer goes straight to your agent.' : paused ? (product === 'flows' && inputRequest?.status === 'answered' ? 'Your agent is processing your answer.' : 'Your agent will continue after you approve.') : 'You can leave this page open.') : copyMessage || (progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending input ignored at step zero

Low Severity

heading and the input card treat a pending inputRequest as actionable at any step, but the subtitle, agent logos, and copy-prompt button still key off active. A question posted while step is 0 keeps the original waiting copy and CTA beside the new answer form.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0c83f55. Configure here.

…elay.com into fix/agentrelay-116-review

# Conflicts:
#	web/components/AgentSignupJourney.tsx
@khaliqgant

Copy link
Copy Markdown
Member

Review audit + base merge at cfd88f1 (release lead, sole writer — PR was unowned):

  • Merged updated base codex/agent-signup@4c129bb (carries the Add agent-driven signup with live progress and Relay animation #112 expired/retry/analytics fixes) — resolved the render-block conflict preserving both sides.
  • Bugbot Low — pending input ignored at step zero: FIXED. At step: 0 a pending inputRequest now owns the page state: subtitle falls through to the input detail ('Answer on this page and your agent will keep going.'), the agent-logo row and copy-prompt CTA hide, copyStatus shows 'Your answer goes straight to your agent.', and the progress line reads 'Waiting for your answer'. notice previews keep their dedicated copy. Also carried over the base's expired/failed gating so a dead session can no longer masquerade as waiting.

Tests: vitest run — 26 files, 250 tests green; tsc --noEmit clean. Requesting fresh review; merge held behind #112 (stacked base) per dependency order.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread web/components/AgentSignupJourney.tsx Outdated
<p className={s.copyStatus} role="status">{complete ? '' : active ? (paused ? 'Your agent will continue after you approve.' : 'You can leave this page open.') : copyMessage || (expired ? '' : progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p>
: !active && !expired && inputRequest?.status !== 'pending' ? <button type="button" className={s.primary} disabled={!prompt} onClick={() => void copy()}>{copyMessage.startsWith('Copied') ? <Check size={17} /> : <Copy size={17} />}{copyMessage.startsWith('Copied') ? 'Prompt copied' : 'Copy setup prompt'}</button> : null}
<p className={s.copyStatus} role="status">{complete ? '' : expired ? '' : notice ? 'No action is required to keep this draft saved.' : inputRequest?.status === 'pending' ? 'Your answer goes straight to your agent.' : active ? (paused ? (product === 'flows' && inputRequest?.status === 'answered' ? 'Your agent is processing your answer.' : 'Your agent will continue after you approve.') : 'You can leave this page open.') : copyMessage || (progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p>
{inputRequest && !expired && !complete && (inputRequest.status === 'pending' || paused) && <section className={s.inputCard} aria-label={notice ? 'Flow preview status' : 'Question from your agent'}>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answered input lost at step zero

Medium Severity

After a Flows answer succeeds while progress is still at step 0, paused stays false, so the input card and “answer received” copy never appear. The page falls back to the initial waiting state and shows Copy setup prompt again, which hides confirmation and can look like setup reset.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 179fd84. Configure here.

@miyaontherelay miyaontherelay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO-GO — review at exact head 179fd84, against stacked #112 base e8d60fb.

The #112 stack dependency is correct and #112 is independently GO at e8d60fb. However #116 is not merge-ready at this exact head:

  1. Deploy Preview is terminal FAILURE (run 35821318463, job 107053596618). Tests/typecheck pass, but the failed preview must be fixed and rerun successfully.
  2. The diff commits two absolute local node_modules symlinks: node_modules -> /home/khaliqgant/Projects/AgentWorkforce/agentrelay-112-fix/node_modules and web/node_modules -> /home/khaliqgant/Projects/AgentWorkforce/agentrelay-112-fix/web/node_modules. These are non-reproducible machine-local paths and must be removed before merge.

The input-request journey changes otherwise preserve the progress-token boundary and answer handling, but I cannot give GO while the preview is failing and repository contains machine-local dependency links. Please push a corrected head, rerun exact-head CI/preview, and request re-review.

Base automatically changed from codex/agent-signup to main September 23, 2026 06:50
Session-Id: 01a0cc08-1399-7b02-871e-542dc1e28509

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7528c00. Configure here.

// An answered web-input request can arrive before the agent advances the
// numbered progress step. Keep the response card visible at step 0 so the
// user sees confirmation instead of the initial copy-prompt state.
const answeredInput = product === 'flows' && inputRequest?.status === 'answered';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answered input overrides later progress

Medium Severity

answeredInput is true for any answered inputRequest, so it now wins over a later working step. After the first answer, heading, mode, and the input card can stay on confirmation instead of the current setup step.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7528c00. Configure here.

<div className={s.progress} role="status" aria-live="polite">
<div className={s.progressDots} aria-hidden="true">{steps.map((step, index) => <i key={step.title} data-done={complete || active > index + 1} data-current={!complete && active === index + 1} />)}</div>
<span>{expired ? 'Session expired' : error ? 'Waiting for a connection' : complete ? 'Setup complete' : active ? `${active} of 5 · ${paused ? 'Waiting for your approval' : failed ? 'Needs your attention' : steps[active - 1].title}` : progress ? 'Ready when your agent is' : 'Preparing your session…'}</span>
<span>{expired ? 'Session expired' : error ? 'Waiting for a connection' : complete ? 'Setup complete' : notice ? `${active} of 5 · Preview saved; activation pending` : inputRequest?.status === 'pending' ? 'Waiting for your answer' : answeredInput ? `${active} of 5 · Answer received` : active ? `${active} of 5 · ${paused ? 'Waiting for your approval' : failed ? 'Needs your attention' : steps[active - 1].title}` : progress ? 'Ready when your agent is' : 'Preparing your session…'}</span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress label shows zero of five

Low Severity

An answered request at step 0 now renders the live progress label as 0 of 5 · Answer received. The five setup steps are 1-based, so that count is wrong. Pending input at step 0 already omits a step number.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7528c00. Configure here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants