Plain
Use Plain for MainSDK feedback and support - API key, main.yaml, opening reports and tickets, local testing and swapping.
Plain is a customer support platform and one of the drivers behind feedback. Reports from feedback.open() and tickets from support.ticket() land in Plain with the trace, version, device and steps attached. Pick it when your team already runs support in Plain.
Interfaces it serves
Pick Plain in main.yaml for any of these. Your calls stay the same, and you can swap later.
feedbackBuilding for 0.6Driver plain Plain
feedback:
driver: plainBefore you start
- Have a Plain workspace.
- Create an API key in its settings with permission to create customers and threads, and store it in your secrets manager.
Configure
feedback:
driver: plain
# [to be decided] key name; the key goes in as secret:PLAIN_API_KEY (suggested name)Use it
"use client";
import { feedback } from "mainsdk";
export function reportProblem(user: { id: string }) {
feedback.open({ for: user, context: { screen: "settings" } });
}support.ticket() arguments arrive with the spec.
Local development and testing
Use driver: builtin in a development overlay. In tests, createTestApp() from @mainsdk/testing runs feedback on an in-memory fake, and chaos.on("feedback", { outage: true }) simulates Plain being down.
What MainSDK adds on top
- Screenshots redacted and support access audited.
- Trace, version, device and steps on every report.
See Feedback and support.
Limits and notes
Planned driver, not in a spec yet: feedback is phase 2. Key names are not decided yet.
Swap to or from it
feedback:
driver: plain # was builtinPast threads stay in the old tool.
FAQ
Does Plain need its own SDK in my app? No. Your code calls feedback; the driver talks to Plain.
Next
Open questions
Was this page helpful?