effect-form-e2e
Skill9 starsChanged 42 days agoMITView on GitHub
Use when adding or changing a form, a field's validation rules, or a Playwright test in this repository. Covers why a form is effect-form and lives in the app rather than the design system, declaring field rules once in the contract, telling a validation failure apart from a refusal, and the e2e harness's rules — a user per test, waiting on a condition rather than sleeping.
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Every check carries a message, because that is what a person reads.
- Very specific: line 49
Read it out of the Cause with AsyncResult.error, not off the result.
- Very specific: line 62
Never sleep. interactUntil retries the action against the condition it was meant to cause — a click on a server-rendered button before …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
A write is a form, and a form is effect-form
FormReact.make over a FormBuilder, living in the app rather than in
@vantion/ui. The library binds the submit into the form definition, so a shared
presentational component taking onCreate as a prop cannot be one. apps/design renders
plain inputs for the layout, because validation and submit state are the part of a form
that has nothing to do with how it looks.
That also removes a problem rather than managing it: effect-form does not render its fields during SSR, so there is no window in which somebody can type into a control that is not listening.
A field's rules are declared once, in the contract
ContactFields in ContactRpc.ts is what the CreateContact payload is built from and
what the form validates with, so the form refuses exactly what the server would.
export const ContactFields = {
fullName: Schema.String.check(Schema.isNonEmpty({ message: "Enter a name." })),
};Every check carries a message, because that is what a person reads. They were two
declarations of one rule once — the procedure checked isNonEmpty with no message while
the screen kept a readable copy — and the server's was the version nobody could read.
For a rule a regex cannot express, Schema.makeFilter returns a sentence or undefined.
EndpointFields.url is the worked example, and the rule it enforces is the difference
between a webhook form and server-side request forgery.
A failed submit is two different things
submitMessage in apps/web/src/lib/form/result.ts tells them apart: a SchemaError is
the form failing to decode, anything else came back from a server. Saying "check the fields
above" to somebody whose permission was denied sends them looking in the wrong place.
The validation case is named rather than inferred from everything that is not one particular request error. Written the other way round, every error added later inherits the wrong message.
A refusal worth acting on gets its own sentence. LimitReached carries the number, so
the screen says "this plan includes two API keys" rather than "could not create that key".
Read it out of the Cause with AsyncResult.error, not off the result.
Browser tests
pnpm e2e needs nothing set up: its own Postgres container on a free port, migrated with
the same runner bun run dev uses, both servers on 3100 and 5273.
Two properties keep it parallel and deterministic:
- Every test signs up its own user, so none truncates a table and none shares a tenant.
- Every test presents its own
x-forwarded-for, because the credential endpoints are rate-limited per caller and a parallel suite from one address exhausts the bucket.
Never sleep. interactUntil retries the action against the condition it was meant to
cause — a click on a server-rendered button before React attaches succeeds and does
nothing, and the next assertion is what fails fifteen seconds later.
Three refusals an integration hits first, all worth knowing before debugging one:
415 for no Content-Type, 403 MISSING_OR_NULL_ORIGIN for no Origin, and a hydration
race that looks like a broken feature.
Where to look
apps/web/src/components/contact/contact-form.tsx— the worked formapps/web/src/lib/form/result.ts— the two sentencese2e/fixtures.ts—signedIn,interactUntil,completeOnboardingrepos/effect-form/packages/form*/src/— the only reference; there are no published docs for the v4 API
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/better-auth.mdcCursor rule
- .cursor/rules/brand-review.mdcCursor rule
- .cursor/rules/campaign-plan.mdcCursor rule
- .cursor/rules/competitive-brief.mdcCursor rule
- .cursor/rules/content-creation.mdcCursor rule
- .cursor/rules/draft-content.mdcCursor rule
- .cursor/rules/effect-form-e2e.mdcCursor rule
- .cursor/rules/effect-sql-rls.mdcCursor rule
- .cursor/rules/email-sequence.mdcCursor rule
- .cursor/rules/grilling.mdcCursor rule
- .cursor/rules/grill-me.mdcCursor rule
- .cursor/rules/impeccable.mdcCursor rule
- .cursor/rules/performance-report.mdcCursor rule
- .cursor/rules/product-development.mdcCursor rule
- .cursor/rules/seo-audit.mdcCursor rule
- .cursor/rules/tanstack-start-ssr.mdcCursor rule
- better-authSkill
- brand-reviewSkill
- campaign-planSkill
- competitive-briefSkill
- content-creationSkill
- draft-contentSkill
- effect-sql-rlsSkill
- email-sequenceSkill
- grillingSkill
- grill-meSkill
- impeccableSkill
- performance-reportSkill
- product-developmentSkill
- seo-auditSkill
- tanstack-start-ssrSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

