Skip to content

fix: agentic apply — scroll, form detection, AI field filling, preview, and submit flow #24

@Mayank-glitch-cpu

Description

@Mayank-glitch-cpu

Problem

The current agentic apply workflow has several blockers that prevent it from working end-to-end:

  1. Playwright doesn't scroll — on listing pages (Greenhouse, Lever, Ashby job boards), the Apply button is below the fold and Playwright never scrolls to find it, so the inspector sees 0 fields
  2. No click-through from listing → form — the agent lands on the job description page, not the application form. It needs to click the Apply/Apply for this Job CTA and follow any redirect or new-tab navigation
  3. Form field detection is unreliable — DOM selector extraction misses JS-rendered inputs (Ashby, Greenhouse iframes), custom radio groups, and multi-page wizard steps
  4. AI answers not generated for open-text fields — cover letter, "Why this company?", motivational essay fields are left blank instead of being auto-filled with profile-aware responses
  5. Resume upload not wired — resumePath in personal.json is mapped but the file input selector often doesn't match, so the PDF never gets attached
  6. No persistent form state — there is no saved state between inspect and submit; if the LLM re-navigates, everything resets
  7. No in-chat preview before submit — the agent should show a table of every field + value and wait for user confirmation before clicking Submit

Acceptance Criteria

  • Scroll + Apply CTA click — Playwright scrolls the full page, detects the Apply/Apply for this Job button, clicks it, and lands on the actual application form (same-page, new-tab, or iframe)

  • Field detection works on:

    • Ashby (jobs.ashbyhq.com) — React-rendered, form at {listing}/application
    • Greenhouse (boards.greenhouse.io) — form may be in an iframe
    • Workday (myworkdayjobs.com) — multi-step wizard (bonus)
  • All required fields filled using personal.json:

    • First name, last name, email, phone
    • LinkedIn, GitHub, portfolio URL
    • Work authorization + sponsorship radio/select
    • City, state, country
  • Resume uploaded — resumePath from personal.json is correctly set on the file input; PDF attaches successfully

  • AI-generated answers for open-text fields (cover letter, "Why this company?", "Tell us about yourself") using the user's experience.md, skills.md, projects.md — 150–300 words, personalized to the company

  • In-chat preview table shown before submit:

    Field Value
    First Name Mayank
    Email mvyas7@asu.edu
    Cover Letter I'm excited about Glean be…

    Agent waits for user to say "yes" / "apply" before submitting

  • Stored form state — filled values are persisted so saying "apply" after reviewing re-uses the same state without re-navigating

  • Post-submit confirmation — agent detects success page text and calls pipeline_mark_applied

Acceptance Gate

  • Screen recording showing a full apply run (inspect → AI fill → preview → submit → confirmation) on at least Ashby and Greenhouse
  • Workday working is a bonus (multi-step wizard support)
  • No crashes, no blank required fields, resume visibly attached in the recording

Affected files

  • mcp-server/src/lib/browser-apply.ts — scroll, click-through, iframe handling, file upload
  • mcp-server/src/tools/apply-tools.ts — form state persistence between inspect and submit
  • mcp-server/src/prompts/index.ts — AUTO_APPLY_WORKFLOW and PIPELINE_DASHBOARD inline apply steps

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