From 6cd6992d9af38ee17cc4defb63bb4ccb0d4371b2 Mon Sep 17 00:00:00 2001 From: Kobe Attias Date: Fri, 20 Nov 2026 21:52:38 -0500 Subject: [PATCH] RFP landing follow-ups: proposal guide, funnel events, no "pool" From the 2026-11-20 call on the audit landing page. Workspace - Applying to an RFP opens the start screen with a guide beside the chat (cover, title, facts, the parts a proposal needs, Read the RFP), or a row that opens a sheet where there is no room. Audit and consciousness hand over guides of their own; every other RFP gets a generic one that links back to its page. - The composer opens with an unsent starter prompt, first blank selected. - The "Submitting an application to" card is gone (the RFP chip names it); visibility is one grey line. Landing pages - Audit: $100k goal, no tax claim, "See how to apply" in the hero and the sticky bar opening a new "How do I apply?" FAQ. - Consciousness: "tax-deductible on qualifying contributions". - No "pool" on either page or in their funding panel ("Fund the audit", "Fund the research"; new successTitle prop on the contribute modal). Analytics (Amplitude) - rfp_how_to_apply_clicked, rfp_fund_clicked, rfp_submit_proposal_clicked, rfp_apply_started, rfp_guide_read_clicked, rfp_apply_message_sent, rfp_apply_draft_created, rfp_application_submitted. - Fund and Apply on every /rfp page log with page: rfp; Fund logs before the panel's own amount step. Co-Authored-By: Claude Opus 5.5 --- app/audit/components/ActionDock.tsx | 5 +- app/audit/components/Actions.tsx | 35 +++- app/audit/components/AuditRfpActions.tsx | 46 +++-- app/audit/components/Hero.tsx | 3 +- app/audit/components/HeroCard.tsx | 2 +- app/audit/components/Sections.tsx | 3 +- app/audit/data/content.ts | 40 +++- app/audit/data/rfp.ts | 12 +- app/consciousness/components/HowItWorks.tsx | 12 +- .../components/LiveRfpActions.tsx | 45 ++-- app/consciousness/components/OrchActions.tsx | 4 +- app/consciousness/components/Phases.tsx | 6 +- app/consciousness/components/PoolPanel.tsx | 6 +- app/consciousness/data/content.ts | 29 ++- app/consciousness/data/rfp.ts | 8 +- components/AIMode/WorkspacePage.tsx | 17 ++ components/AIMode/chat/ChatPane.tsx | 64 +++++- components/AIMode/rfpGuide.ts | 62 ++++++ components/AIMode/rfpHandoff.ts | 26 ++- components/AIMode/shell/WorkspacePanes.tsx | 20 +- components/AIMode/start/ApplyingToCard.tsx | 58 ------ components/AIMode/start/RfpGuidePanel.tsx | 192 ++++++++++++++++++ components/AIMode/start/StartContextChips.tsx | 4 + components/AIMode/start/StartScreen.tsx | 19 +- components/AIMode/start/VisibilityCard.tsx | 36 ---- components/AIMode/start/VisibilityNote.tsx | 19 ++ components/AIMode/useAIModeChat.ts | 46 ++++- components/Funding/FundButton.tsx | 10 +- components/Funding/GrantPageContext.tsx | 24 ++- .../PublishingForm/usePublishAction.ts | 8 + .../modals/ContributeToFundraiseModal.tsx | 15 +- .../modals/SelectFundingOpportunityModal.tsx | 6 + services/analytics.service.ts | 11 + types/grant.ts | 2 + 34 files changed, 716 insertions(+), 179 deletions(-) create mode 100644 components/AIMode/rfpGuide.ts delete mode 100644 components/AIMode/start/ApplyingToCard.tsx create mode 100644 components/AIMode/start/RfpGuidePanel.tsx delete mode 100644 components/AIMode/start/VisibilityCard.tsx create mode 100644 components/AIMode/start/VisibilityNote.tsx diff --git a/app/audit/components/ActionDock.tsx b/app/audit/components/ActionDock.tsx index 6b40ab7c0..a2a5c73df 100644 --- a/app/audit/components/ActionDock.tsx +++ b/app/audit/components/ActionDock.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react'; import { cn } from '@/utils/styles'; import { formatDateShort, formatUsd, formatUsdShort, type RfpView } from '../data/rfp'; -import { AddToPoolButton, SubmitProposalButton } from './Actions'; +import { AddToPoolButton, HowToApplyLink, SubmitProposalButton } from './Actions'; import { BackerFaces, PoolBar } from './Pool'; /** @@ -52,6 +52,7 @@ export function ActionDock({ rfp }: { rfp: RfpView }) {
+
@@ -66,7 +67,7 @@ export function ActionDock({ rfp }: { rfp: RfpView }) { {' '} raised toward {formatUsdShort(rfp.goalUsd)} - Phase 1 ends {formatDateShort(rfp.goalBy)} +

diff --git a/app/audit/components/Actions.tsx b/app/audit/components/Actions.tsx index 30151f75f..0c60b8dc7 100644 --- a/app/audit/components/Actions.tsx +++ b/app/audit/components/Actions.tsx @@ -1,9 +1,11 @@ 'use client'; import { useContext } from 'react'; -import { ArrowRight, Plus } from 'lucide-react'; +import { ArrowDown, ArrowRight, Plus } from 'lucide-react'; +import AnalyticsService, { LogEvent } from '@/services/analytics.service'; import { OrchActionsContext } from '@/app/consciousness/components/OrchActions'; import { cn } from '@/utils/styles'; +import { HOW_TO_APPLY_ID } from '../data/content'; /** * The page's two buttons, in its own style. The actions are the RFP landing @@ -67,3 +69,34 @@ export function SubmitProposalButton({ ); } + +/** + * A quiet link to the FAQ's "How do I apply?", which it opens and scrolls + * to. `placement` says where on the page it was clicked, for the funnel. + */ +export function HowToApplyLink({ + placement, + className, +}: { + placement: 'hero' | 'dock'; + className?: string; +}) { + const open = () => { + AnalyticsService.logEvent(LogEvent.RFP_HOW_TO_APPLY_CLICKED, { page: 'audit', placement }); + const entry = document.getElementById(HOW_TO_APPLY_ID); + if (entry instanceof HTMLDetailsElement) entry.open = true; + }; + return ( + + See how to apply + + + ); +} diff --git a/app/audit/components/AuditRfpActions.tsx b/app/audit/components/AuditRfpActions.tsx index 3f8a5b315..afb4b4755 100644 --- a/app/audit/components/AuditRfpActions.tsx +++ b/app/audit/components/AuditRfpActions.tsx @@ -7,9 +7,12 @@ import { ContributeToFundraiseModal } from '@/components/modals/ContributeToFund import { WorkCoverCard } from '@/components/work/WorkCoverCard'; import { isAwardMechanism } from '@/components/Funding/lib/fundingMechanism'; import { handOffRfp } from '@/components/AIMode/rfpHandoff'; +import AnalyticsService, { LogEvent } from '@/services/analytics.service'; import { newDraftTarget, workspaceHref } from '@/components/AIMode/workspaceUrl'; import { isGrantActive, type FundingPool, type Grant } from '@/types/grant'; import { OrchActionsContext } from '@/app/consciousness/components/OrchActions'; +import { PROPOSAL_GUIDE } from '../data/content'; +import { CAMPAIGN, formatUsdShort } from '../data/rfp'; /** * The page's buttons wired to the RFP, exactly as /consciousness wires its @@ -41,29 +44,43 @@ export function AuditRfpActions({ const organization = grant.organization?.trim() || grant.createdBy?.authorProfile?.fullName || ''; const submitProposal = useCallback(() => { + AnalyticsService.logEvent(LogEvent.RFP_SUBMIT_PROPOSAL_CLICKED, { + page: 'audit', + grant_id: grantId, + open: isActive, + }); if (!isActive) { toast(notOpen, { id: 'audit-action' }); return; } - handOffRfp({ - id: grantId, - shortTitle: grant.shortTitle || title, - imageUrl: imageUrl ?? '', - fundingAmount: grant.amount.usd ?? 0, - organization, - applicationVisibility: grant.applicationVisibility, - fundingMechanism: grant.fundingMechanism ?? 'FUNDING', - }); + handOffRfp( + { + id: grantId, + shortTitle: grant.shortTitle || title, + imageUrl: imageUrl ?? '', + fundingAmount: grant.amount.usd ?? 0, + organization, + applicationVisibility: grant.applicationVisibility, + fundingMechanism: grant.fundingMechanism ?? 'FUNDING', + }, + { ...PROPOSAL_GUIDE, fundingLabel: `${formatUsdShort(CAMPAIGN.goalUsd)} goal` } + ); router.push(workspaceHref(newDraftTarget('need_funding', grantId))); }, [isActive, notOpen, grant, grantId, title, imageUrl, organization, router]); const addToPool = useCallback(() => { - if (!isActive || pool?.status !== 'OPEN') { - toast(isActive ? 'The pool is not taking contributions.' : notOpen, { id: 'audit-action' }); + const open = isActive && pool?.status === 'OPEN'; + AnalyticsService.logEvent(LogEvent.RFP_FUND_CLICKED, { + page: 'audit', + grant_id: grantId, + open, + }); + if (!open) { + toast(isActive ? 'This call is not taking contributions.' : notOpen, { id: 'audit-action' }); return; } setIsPanelOpen(true); - }, [isActive, pool, notOpen]); + }, [isActive, pool, notOpen, grantId]); const handleContributeSuccess = useCallback( (updatedPool?: FundingPool) => { @@ -87,11 +104,14 @@ export function AuditRfpActions({ fundingPool={pool} proposalTitle={title} variant="panel" + headerTitle="Fund the audit" + successTitle={(amount) => `You put ${amount} toward the audit`} + successMessage="Thank you. Your contribution is in." topContent={ } isAward={isAwardMechanism(grant.fundingMechanism)} - successText="Every dollar in the pool goes to the audits funded under this call." + successText="Every dollar goes to the audits funded under this call." /> )} diff --git a/app/audit/components/Hero.tsx b/app/audit/components/Hero.tsx index 08f19e3de..745c1ff83 100644 --- a/app/audit/components/Hero.tsx +++ b/app/audit/components/Hero.tsx @@ -1,7 +1,7 @@ import Link from 'next/link'; import { Logo } from '@/components/ui/Logo'; import { BackButton } from '@/app/consciousness/components/BackButton'; -import { AddToPoolButton, SubmitProposalButton } from './Actions'; +import { AddToPoolButton, HowToApplyLink, SubmitProposalButton } from './Actions'; import { HeroArt } from './HeroArt'; import { HeroCard } from './HeroCard'; import type { RfpView } from '../data/rfp'; @@ -67,6 +67,7 @@ export function Hero({ rfp }: { rfp: RfpView }) {
+ diff --git a/app/audit/components/HeroCard.tsx b/app/audit/components/HeroCard.tsx index 5d6b36b86..680a40bbf 100644 --- a/app/audit/components/HeroCard.tsx +++ b/app/audit/components/HeroCard.tsx @@ -80,7 +80,7 @@ export function HeroCard({ rfp, children }: { rfp: RfpView; children: ReactNode

- {CAMPAIGN.taxDeductibleLine ?? 'The pool pays only for audits funded under this call'} + {CAMPAIGN.taxDeductibleLine ?? 'Every dollar goes to audits funded under this call'}

); diff --git a/app/audit/components/Sections.tsx b/app/audit/components/Sections.tsx index d8ad8aec9..54b651d67 100644 --- a/app/audit/components/Sections.tsx +++ b/app/audit/components/Sections.tsx @@ -235,7 +235,8 @@ export function Faq() { {FAQ.map((f) => (
{f.q} diff --git a/app/audit/data/content.ts b/app/audit/data/content.ts index 5fc114edc..0972f19b1 100644 --- a/app/audit/data/content.ts +++ b/app/audit/data/content.ts @@ -1,3 +1,5 @@ +import type { RfpGuide } from '@/components/AIMode/rfpGuide'; + /** * The page's words and figures: the problem in biomedicine, the audit the * call funds, what it makes possible, the FAQ and the sources. Every figure @@ -104,7 +106,7 @@ export const PROBLEMS: Problem[] = [ }, ]; -/** The audit the pool funds, step by step. DRAFT scope. */ +/** The audit the call funds, step by step. DRAFT scope. */ export interface AuditStep { title: string; text: string; @@ -130,7 +132,38 @@ export const BENEFITS: Benefit[] = [ { title: 'Smarter AI', text: 'Models learn from a literature that has been corrected.' }, ]; +/** + * What a proposal should cover. Submit a proposal hands it to the workspace, + * which shows it beside the chat and opens the composer with `starter`; the + * FAQ's first answer says the same in a paragraph. The scope is open: any + * slice of biomedicine, any method (call, 2026-11-20). Keep it in step with + * the RFP post's own text, which is what the assistant reads. + */ +export const PROPOSAL_GUIDE: RfpGuide = { + summary: + 'Pick any slice of biomedicine and any method. We fund proposals that complement each other.', + include: [ + { title: 'Who you are', text: 'Why you can judge the papers.' }, + { title: 'Which papers', text: 'The slice, and how you draw it.' }, + { title: 'What you check', text: 'Methods, statistics, figures, data, results.' }, + { title: 'How errors are confirmed', text: 'Who checks, and your false-positive rate.' }, + { title: 'Budget and timeline', text: 'Model time, expert checking, results date.' }, + ], + length: 'about 2 pages', + starter: [ + 'I’m applying to the call to audit biomedical research with AI.', + 'About me: [your background, and why you can judge these papers]', + 'What I’d audit: [which papers, what you’d check, and how errors get confirmed]', + ].join('\n\n'), + pageHref: '/audit', +}; + +/** The FAQ entry "See how to apply" opens. */ +export const HOW_TO_APPLY_ID = 'how-to-apply'; + export interface Faq { + /** An anchor for links to this entry. */ + id?: string; q: string; a: string; sources?: SourceKey[]; @@ -138,8 +171,9 @@ export interface Faq { export const FAQ: Faq[] = [ { - q: 'What makes a strong proposal?', - a: 'It names its corpus and how it is drawn, says how an error will be confirmed before it counts, and commits in advance to reporting its false-positive rate. It includes people qualified to judge the field.', + id: HOW_TO_APPLY_ID, + q: 'How do I apply?', + a: 'Click Submit a proposal and draft it with the AI assistant: about two pages on who you are, which papers you would audit and how you pick them, what you would check, how each error gets confirmed (and the false-positive rate you will report), and your budget. Any slice of biomedicine and any method is welcome; we fund proposals that complement each other.', }, { q: 'Does an audit show whether a result replicates?', diff --git a/app/audit/data/rfp.ts b/app/audit/data/rfp.ts index 44e27292b..855f6cd0a 100644 --- a/app/audit/data/rfp.ts +++ b/app/audit/data/rfp.ts @@ -27,10 +27,10 @@ export function rfpPostId(preview?: string | string[]): number | null { /** * The campaign's own terms, which the grant does not hold. * - * DRAFT: every value here is a placeholder until the call's terms are set. - * `taxDeductibleLine` is the short line in the hero card, worded as on - * /consciousness (Kobe, 2026-11-20). `taxDeductibleNote`, the longer note - * that names the fund, stays null until that is confirmed for this pool. + * The $100k goal was set on the 2026-11-20 call. No tax line: applicants + * are unlikely to be at a nonprofit institution, so the page does not claim + * contributions are tax deductible (both fields stay null). The date and + * award range are still placeholders. */ export const CAMPAIGN: { goalUsd: number; @@ -39,10 +39,10 @@ export const CAMPAIGN: { taxDeductibleLine: string | null; taxDeductibleNote: string | null; } = { - goalUsd: 250_000, + goalUsd: 100_000, goalBy: '2027-01-31', awardRangeLabel: '$5k – $100k', - taxDeductibleLine: 'Contributions are tax deductible', + taxDeductibleLine: null, taxDeductibleNote: null, }; diff --git a/app/consciousness/components/HowItWorks.tsx b/app/consciousness/components/HowItWorks.tsx index ee1fe34bc..e86d4f409 100644 --- a/app/consciousness/components/HowItWorks.tsx +++ b/app/consciousness/components/HowItWorks.tsx @@ -193,8 +193,8 @@ const STEPS: { }[] = [ { Art: BackersArt, - title: 'You add to the pool', - text: 'Any amount, pooled with every other backer.', + title: 'You fund the call', + text: 'Any amount, alongside every other backer.', }, { Art: ExperimentsArt, @@ -203,8 +203,8 @@ const STEPS: { }, { Art: PoolArt, - title: 'Peers review, the pool pays', - text: 'Open review on ResearchHub. The strongest get funded.', + title: 'Peers review, the best get funded', + text: 'Open review on ResearchHub decides where the money goes.', }, { Art: AnswersArt, @@ -216,7 +216,7 @@ const STEPS: { /** * How it works from the reader's side: what a backer and a scientist each * do, in four stages on one dotted track (you give, scientists propose, - * peers review and the pool pays, results are published). The programme's + * peers review and the best get funded, results are published). The programme's * dates and targets are in the phases, not here. */ export function HowItWorks({ rfp }: { rfp: RfpView }) { @@ -231,7 +231,7 @@ export function HowItWorks({ rfp }: { rfp: RfpView }) { id="how-title" className="o-reveal o-serif max-w-[16em] text-[clamp(28px,3vw,40px)] leading-[1.1]" > - How the pool works + How it works diff --git a/app/consciousness/components/LiveRfpActions.tsx b/app/consciousness/components/LiveRfpActions.tsx index b8e12eb9b..7dea9afad 100644 --- a/app/consciousness/components/LiveRfpActions.tsx +++ b/app/consciousness/components/LiveRfpActions.tsx @@ -8,9 +8,11 @@ import { ContributeToFundraiseModal } from '@/components/modals/ContributeToFund import { WorkCoverCard } from '@/components/work/WorkCoverCard'; import { isAwardMechanism } from '@/components/Funding/lib/fundingMechanism'; import { handOffRfp } from '@/components/AIMode/rfpHandoff'; +import AnalyticsService, { LogEvent } from '@/services/analytics.service'; import { newDraftTarget, workspaceHref } from '@/components/AIMode/workspaceUrl'; import { isGrantActive, type FundingPool, type Grant } from '@/types/grant'; import { CAMPAIGN } from '../data/rfp'; +import { PROPOSAL_GUIDE } from '../data/content'; import { OrchActionsContext } from './OrchActions'; /** @@ -50,29 +52,43 @@ export function LiveRfpActions({ const organization = grant.organization?.trim() || grant.createdBy?.authorProfile?.fullName || ''; const submitProposal = useCallback(() => { + AnalyticsService.logEvent(LogEvent.RFP_SUBMIT_PROPOSAL_CLICKED, { + page: 'consciousness', + grant_id: grantId, + open: isActive, + }); if (!isActive) { toast(notOpen, { id: 'orch-action' }); return; } - handOffRfp({ - id: grantId, - shortTitle: grant.shortTitle || title, - imageUrl: imageUrl ?? '', - fundingAmount: grant.amount.usd ?? 0, - organization, - applicationVisibility: grant.applicationVisibility, - fundingMechanism: grant.fundingMechanism ?? 'FUNDING', - }); + handOffRfp( + { + id: grantId, + shortTitle: grant.shortTitle || title, + imageUrl: imageUrl ?? '', + fundingAmount: grant.amount.usd ?? 0, + organization, + applicationVisibility: grant.applicationVisibility, + fundingMechanism: grant.fundingMechanism ?? 'FUNDING', + }, + { ...PROPOSAL_GUIDE, fundingLabel: `${CAMPAIGN.awardRangeLabel} awards` } + ); router.push(workspaceHref(newDraftTarget('need_funding', grantId))); }, [isActive, notOpen, grant, grantId, title, imageUrl, organization, router]); const addToPool = useCallback(() => { - if (!isActive || pool?.status !== 'OPEN') { - toast(isActive ? 'The pool is not taking contributions.' : notOpen, { id: 'orch-action' }); + const open = isActive && pool?.status === 'OPEN'; + AnalyticsService.logEvent(LogEvent.RFP_FUND_CLICKED, { + page: 'consciousness', + grant_id: grantId, + open, + }); + if (!open) { + toast(isActive ? 'This call is not taking contributions.' : notOpen, { id: 'orch-action' }); return; } setIsPanelOpen(true); - }, [isActive, pool, notOpen]); + }, [isActive, pool, notOpen, grantId]); const handleContributeSuccess = useCallback( (updatedPool?: FundingPool) => { @@ -96,6 +112,9 @@ export function LiveRfpActions({ fundingPool={pool} proposalTitle={title} variant="panel" + headerTitle="Fund the research" + successTitle={(amount) => `You put ${amount} toward the research`} + successMessage="Thank you. Your contribution is in." topContent={
@@ -108,7 +127,7 @@ export function LiveRfpActions({
} isAward={isAwardMechanism(grant.fundingMechanism)} - successText="Every dollar in the pool goes to the experiments funded under this call." + successText="Every dollar goes to the experiments funded under this call." /> )} diff --git a/app/consciousness/components/OrchActions.tsx b/app/consciousness/components/OrchActions.tsx index 69ce7a43b..5eccf2508 100644 --- a/app/consciousness/components/OrchActions.tsx +++ b/app/consciousness/components/OrchActions.tsx @@ -28,7 +28,7 @@ export function OrchActionsProvider({ children }: { children: ReactNode }) { }, []); const addToPool = useCallback(() => { - toast('The pool opens soon.', { id: 'orch-action' }); + toast('Funding opens soon.', { id: 'orch-action' }); }, []); const value = useMemo(() => ({ submitProposal, addToPool }), [submitProposal, addToPool]); @@ -73,7 +73,7 @@ export function SubmitProposalButton({ export function AddToPoolButton({ size = 'md', - label = 'Add to the pool', + label = 'Fund the research', className, }: { size?: Size; diff --git a/app/consciousness/components/Phases.tsx b/app/consciousness/components/Phases.tsx index 190fa320a..4653d3456 100644 --- a/app/consciousness/components/Phases.tsx +++ b/app/consciousness/components/Phases.tsx @@ -92,8 +92,8 @@ function PhaseOne({ rfp }: { rfp: RfpView }) { Everything raised still funds experiments under this call; we fund fewer of them. - Gifts go to the ResearchHub Foundation’s fund at Endaoment, a 501(c)(3) public charity, so - they are generally tax-deductible in the US. + Qualifying contributions go to the ResearchHub Foundation’s fund at Endaoment, a 501(c)(3) + public charity, and are generally tax-deductible in the US. @@ -104,7 +104,7 @@ function PhaseTwo({ rfp }: { rfp: RfpView }) { return (

- Reviewers score the proposals in the open. The pool funds the strongest, and the results are + Reviewers score the proposals in the open. The strongest get funded, and the results are published.

diff --git a/app/consciousness/components/PoolPanel.tsx b/app/consciousness/components/PoolPanel.tsx index d9e5f8769..09cabdd6a 100644 --- a/app/consciousness/components/PoolPanel.tsx +++ b/app/consciousness/components/PoolPanel.tsx @@ -80,8 +80,8 @@ export function PoolPanel({ rfp }: { rfp: RfpView }) { const more = pool.backerCount - pool.backers.length; return ( -